@qratilabs/qrati-connect 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +474 -617
  2. package/README.md +19 -23
  3. package/element/{AuthLayout-4cQy1mdD.js → AuthLayout-CyO9f3yS.js} +1 -1
  4. package/element/ContentsPage-DTXin7QX.js +16 -0
  5. package/element/CuratePage-Da329OuY.js +1 -0
  6. package/element/{Dialog-tlCUbTDz.js → Dialog-DUE33ABe.js} +1 -1
  7. package/element/{DotLottiePlayer-Bn1qmQOv.js → DotLottiePlayer-8MlLiMyZ.js} +1 -1
  8. package/element/{EventHeaderAdminButtons-BkQKOgQe.js → EventHeaderAdminButtons-ZWRtXY11.js} +1 -1
  9. package/element/{FolderBreadcrumb-k6xX9GO0.js → FolderBreadcrumb-CEs6rjY8.js} +1 -1
  10. package/element/{ForgotPasswordPage-5MSixvyz.js → ForgotPasswordPage-DcrSZb4Y.js} +1 -1
  11. package/element/{InputField-BoykWQKB.js → InputField-C89vrW2H.js} +1 -1
  12. package/element/{LazyLoadImage-D708Su5P.js → LazyLoadImage-CCgs8tnO.js} +1 -1
  13. package/element/LeaderboardPage-CTDNDeXw.js +1 -0
  14. package/element/{LoginPage-2L0Nuvin.js → LoginPage-smlCb8hl.js} +1 -1
  15. package/element/{NCMVHL6D-yoCKe8ct.js → NCMVHL6D-mctK8Nwg.js} +1 -1
  16. package/element/{PublicEvents-BdeCqgPZ.js → PublicEvents-D2zm99Nv.js} +1 -1
  17. package/element/{RegisterPage-DMsMeUof.js → RegisterPage-B6iFPEOf.js} +1 -1
  18. package/element/{SocialLoginButton-qk-MY7em.js → SocialLoginButton-Bmw5w2Wo.js} +1 -1
  19. package/element/{UploadPage-CZUVc8kB.js → UploadPage-CeUd2Ngw.js} +1 -1
  20. package/element/{VideoPlayer-BT17hBMS.js → VideoPlayer-D3O9yQy5.js} +1 -1
  21. package/element/element.es.js +1 -1
  22. package/element/{heic2any-BQWUOfBR.js → heic2any-ChkiLE0t.js} +1 -1
  23. package/element/{index-BZcFrhzQ.js → index-Dc66pO4G.js} +1 -1
  24. package/element/{index-DNJlz80z.js → index-eZDSy_OJ.js} +3 -3
  25. package/element/{index.esm-BggMyH0D.js → index.esm-fgGipFtS.js} +1 -1
  26. package/element/{photoswipe-DmjIC4PN.js → photoswipe-CqOSmPl3.js} +1 -1
  27. package/element/styles.css +1 -1
  28. package/element/{tslib.es6-BLNHjh5A.js → tslib.es6-CrRFG_pJ.js} +1 -1
  29. package/element/{useOrgAccess-B44Mf6ac.js → useOrgAccess-DwChBdHT.js} +1 -1
  30. package/element/web.es.js +1 -1
  31. package/package.json +1 -1
  32. package/react/{BAYb6fnT.js → 01YpbkrK.js} +1 -1
  33. package/react/{BAE8xft-.js → 3-7xITP8.js} +1 -1
  34. package/react/{BmCY907J.js → B-6zXxDr.js} +1 -1
  35. package/react/{Baa_9kjk.js → BC4qG4vp.js} +1 -1
  36. package/react/BG98DA1v.js +16 -0
  37. package/react/{Bif_3AVc.js → Bhx5l06G.js} +1 -1
  38. package/react/{CoJ8gDSW.js → C9K7NHY-.js} +1 -1
  39. package/react/{DfHcM_ha.js → CQ_GAdf6.js} +1 -1
  40. package/react/{C4kVnfZ8.js → CwHDgEUw.js} +1 -1
  41. package/react/{CKrTAQni.js → Cwug7XlJ.js} +1 -1
  42. package/react/{B2_6-tNW.js → Cy0hl_vl.js} +1 -1
  43. package/react/{c1q53V4Z.js → D9rAIIEm.js} +1 -1
  44. package/react/{FbLadgve.js → DBT304mv.js} +1 -1
  45. package/react/{CzlrzFMj.js → DDDUG6Th.js} +1 -1
  46. package/react/{ht6gpEra.js → DGbDKxZM.js} +1 -1
  47. package/react/{D6oeiPFE.js → DGrws0Ed.js} +1 -1
  48. package/react/{C-9ti-8O.js → DOyHX7jh.js} +1 -1
  49. package/react/{B9gK2pCi.js → DR9E1aMG.js} +3 -3
  50. package/react/DgG5NhsB.js +1 -0
  51. package/react/{D-xnMYoW.js → DlRtYLod.js} +1 -1
  52. package/react/DtITAxUS.js +1 -0
  53. package/react/{DNUABsUN.js → HRRHpVRs.js} +1 -1
  54. package/react/{B8-MmXCH.js → YK1PgWHO.js} +1 -1
  55. package/react/index.es.js +2 -2
  56. package/umd/web.umd.js +43 -43
  57. package/element/ContentsPage-DbUFI6uS.js +0 -16
  58. package/element/CuratePage-BAEOsYip.js +0 -1
  59. package/element/LeaderboardPage-Y1heQYpw.js +0 -1
  60. package/react/Bo3ykSiZ.js +0 -1
  61. package/react/Bs0qJUPj.js +0 -1
  62. package/react/BwBdsDzv.js +0 -16
@@ -1 +1 @@
1
- import{e as t,r as i,c as s,g as e,p as o,s as n,a,b as r,d as h,t as p,f as l,Z as c,h as d,i as u,j as m,P as _,C as v,k as g}from"./BwBdsDzv.js";class y{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&t(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:s,dragAxis:e}=this.gestures,{currSlide:o}=this.pswp;if("y"===e&&this.pswp.options.closeOnVerticalDrag&&o&&o.currZoomLevel<=o.zoomLevels.fit&&!this.gestures.isMultitouch){const i=o.pan.y+(t.y-s.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._setPanWithFriction("y",i,.6);const t=1-Math.abs(this._getVerticalDragRatio(o.pan.y));this.pswp.applyBgOpacity(t),o.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),o&&(i(o.pan),o.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:i,currSlide:s}=this.pswp;let e=0;if(this.pswp.animations.stopAll(),i.isShifted()){const s=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&s<0||t.x<.1&&s<-.5?(e=1,t.x=Math.min(t.x,0)):(t.x>.5&&s>0||t.x>-.1&&s>.5)&&(e=-1,t.x=Math.max(t.x,0)),i.moveIndexBy(e,!0,t.x,!0)}s&&s.currZoomLevel>s.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:i}=this.gestures,{currSlide:e}=this.pswp;if(!e)return;const{pan:o,bounds:n}=e,a=o[t],r=this.pswp.bgOpacity<1&&"y"===t,h=a+function(t,i){return t*i/(1-i)}(i[t],.995);if(r){const t=this._getVerticalDragRatio(a),i=this._getVerticalDragRatio(h);if(t<0&&i<-.4||t>0&&i>.4)return void this.pswp.close()}const p=n.correctPan(t,h);if(a===p)return;const l=p===h?1:.82,c=this.pswp.bgOpacity,d=p-a;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:a,end:p,velocity:i[t],dampingRatio:l,onUpdate:i=>{if(r&&this.pswp.bgOpacity<1){const t=1-(p-i)/d;this.pswp.applyBgOpacity(s(c+(1-c)*t,0,1))}o[t]=Math.floor(i),e.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:i,dragAxis:s,prevP1:e,isMultitouch:o}=this.gestures,{currSlide:n,mainScroll:a}=this.pswp,r=i[t]-e[t],h=a.x+r;if(!r||!n)return!1;if("x"===t&&!n.isPannable()&&!o)return a.moveTo(h,!0),!0;const{bounds:p}=n,l=n.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===s&&"x"===t&&!o){const i=a.getCurrSlideX(),s=a.x-i,e=r>0,o=!e;if(l>p.min[t]&&e){if(p.min[t]<=this.startPan[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,l)}else if(l<p.max[t]&&o){if(this.startPan[t]<=p.max[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,l)}else if(0!==s){if(s>0)return a.moveTo(Math.max(h,i),!0),!0;if(s<0)return a.moveTo(Math.min(h,i),!0),!0}else this._setPanWithFriction(t,l)}else"y"===t?!a.isShifted()&&p.min.y!==p.max.y&&this._setPanWithFriction(t,l):this._setPanWithFriction(t,l);return!1}_getVerticalDragRatio(t){return(t-(this.pswp.currSlide?.bounds.center.y??0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,i,s){const{currSlide:e}=this.pswp;if(!e)return;const{pan:o,bounds:n}=e;if(n.correctPan(t,i)!==i||s){const e=Math.round(i-o[t]);o[t]+=e*(s||.35)}else o[t]=i}}function w(t){return!!t.target.closest(".pswp__container")}class f{constructor(t){this.gestures=t}click(t,i){const s=i.target.classList,e=s.contains("pswp__img"),o=s.contains("pswp__item")||s.contains("pswp__zoom-wrap");e?this._doClickOrTapAction("imageClick",t,i):o&&this._doClickOrTapAction("bgClick",t,i)}tap(t,i){w(i)&&this._doClickOrTapAction("tap",t,i)}doubleTap(t,i){w(i)&&this._doClickOrTapAction("doubleTap",t,i)}_doClickOrTapAction(t,i,s){const{pswp:e}=this.gestures,{currSlide:o}=e,n=t+"Action",a=e.options[n];if(!e.dispatch(n,{point:i,originalEvent:s}).defaultPrevented){if("function"==typeof a)return void a.call(e,i,s);switch(a){case"close":case"next":e[a]();break;case"zoom":o?.toggleZoom(i);break;case"zoom-or-close":o?.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(i):e.options.clickToCloseNonZoomable&&e.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}}}}function P(t,i,s){return t.x=(i.x+s.x)/2,t.y=(i.y+s.y)/2,t}class x{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:i}=this.gestures.pswp;i&&(this._startZoomLevel=i.currZoomLevel,t(this._startPan,i.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:i,p2:s,startP2:o,pswp:n}=this.gestures,{currSlide:a}=n;if(!a)return;const r=a.zoomLevels.min,h=a.zoomLevels.max;if(!a.isZoomable()||n.mainScroll.isShifted())return;P(this._startZoomPoint,i,o),P(this._zoomPoint,t,s);let p=1/e(i,o)*e(t,s)*this._startZoomLevel;if(p>a.zoomLevels.initial+a.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),p<r)if(n.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=a.zoomLevels.initial){const t=1-(r-p)/(r/1.2);n.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||n.applyBgOpacity(t)}else p=r-.15*(r-p);else p>h&&(p=h+.05*(p-h));a.pan.x=this._calculatePanForZoomLevel("x",p),a.pan.y=this._calculatePanForZoomLevel("y",p),a.setZoomLevel(p),a.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:i}=t;(!i||i.currZoomLevel<i.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,i){const s=i/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*s}correctZoomPan(i){const{pswp:e}=this.gestures,{currSlide:n}=e;if(!n?.isZoomable())return;0===this._zoomPoint.x&&(i=!0);const a=n.currZoomLevel;let r,h=!0;a<n.zoomLevels.initial?r=n.zoomLevels.initial:a>n.zoomLevels.max?r=n.zoomLevels.max:(h=!1,r=a);const p=e.bgOpacity,l=e.bgOpacity<1,c=t({x:0,y:0},n.pan);let d=t({x:0,y:0},c);i&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=a,t(this._startPan,c)),h&&(d={x:this._calculatePanForZoomLevel("x",r),y:this._calculatePanForZoomLevel("y",r)}),n.setZoomLevel(r),d={x:n.bounds.correctPan("x",d.x),y:n.bounds.correctPan("y",d.y)},n.setZoomLevel(a);const u=!o(d,c);if(!u&&!h&&!l)return n._setResolution(r),void n.applyCurrentZoomPan();e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,u||h){if(u&&(n.pan.x=c.x+(d.x-c.x)*t,n.pan.y=c.y+(d.y-c.y)*t),h){const i=a+(r-a)*t;n.setZoomLevel(i)}n.applyCurrentZoomPan()}l&&e.bgOpacity<1&&e.applyBgOpacity(s(p+(1-p)*t,0,1))},onComplete:()=>{n._setResolution(r),n.applyCurrentZoomPan()}})}}class S{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new y(this),this.zoomLevels=new x(this),this.tapHandler=new f(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,i,s,e){const{pswp:o}=this,{events:n}=o,a=e?t+e:"";n.add(o.scrollWrap,t+i,this.onPointerDown.bind(this)),n.add(window,t+"move",this.onPointerMove.bind(this)),n.add(window,t+s,this.onPointerUp.bind(this)),a&&n.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(i){const s="mousedown"===i.type||"mouse"===i.pointerType;if(s&&i.button>0)return;const{pswp:e}=this;e.opener.isOpen?e.dispatch("pointerDown",{originalEvent:i}).defaultPrevented||(s&&(e.mouseDetected(),this._preventPointerEventBehaviour(i,"down")),e.animations.stopAll(),this._updatePoints(i,"down"),1===this._numActivePoints&&(this.dragAxis=null,t(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):i.preventDefault()}onPointerMove(i){this._preventPointerEventBehaviour(i,"move"),this._numActivePoints&&(this._updatePoints(i,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:i}).defaultPrevented&&(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,t(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?o(this.p1,this.prevP1)||this.drag.change():(!o(this.p1,this.prevP1)||!o(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(i){const s=Date.now(),e=s-this._intervalTime;e<50&&!i||(this.velocity.x=this._getVelocity("x",e),this.velocity.y=this._getVelocity("y",e),this._intervalTime=s,t(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(i){const{mainScroll:s}=this.pswp;if(s.isShifted())return void s.moveIndexBy(0,!0);if(i.type.indexOf("cancel")>0)return;if("mouseup"===i.type||"mouse"===i.pointerType)return void this.tapHandler.click(this.startP1,i);const o=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),e(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,i)):(t(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,i),this._clearTapTimer()},o))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,i){const s=this.p1[t]-this._intervalP1[t];return Math.abs(s)>1&&i>5?s/i:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,i){this.pswp.applyFilters("preventPointerEvent",!0,t,i)&&t.preventDefault()}_updatePoints(i,s){if(this._pointerEventEnabled){const e=i,o=this._ongoingPointers.findIndex(t=>t.id===e.pointerId);"up"===s&&o>-1?this._ongoingPointers.splice(o,1):"down"===s&&-1===o?this._ongoingPointers.push(this._convertEventPosToPoint(e,{x:0,y:0})):o>-1&&this._convertEventPosToPoint(e,this._ongoingPointers[o]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&t(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&t(this.p2,this._ongoingPointers[1])}else{const t=i;this._numActivePoints=0,t.type.indexOf("touch")>-1?t.touches&&t.touches.length>0&&(this._convertEventPosToPoint(t.touches[0],this.p1),this._numActivePoints++,t.touches.length>1&&(this._convertEventPosToPoint(t.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(i,this.p1),"up"===s?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){t(this.prevP1,this.p1),t(this.prevP2,this.p2)}_updateStartPoints(){t(this.startP1,this.p1),t(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const i=t>0?"x":"y";Math.abs(this.p1[i]-this.startP1[i])>=10&&(this.dragAxis=i)}}}_convertEventPosToPoint(t,i){return i.x=t.pageX-this.pswp.offset.x,i.y=t.pageY-this.pswp.offset.y,"pointerId"in t?i.id=t.pointerId:void 0!==t.identifier&&(i.id=t.identifier),i}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const b={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},T=(t,i)=>i?t:b[t];class L{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const i=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&i&&this._wasFocused&&i.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:i}=this;if(i.dispatch("keydown",{originalEvent:t}).defaultPrevented||n(t))return;let s,e,o=!1;const a="key"in t;switch(a?t.key:t.keyCode){case T("Escape",a):i.options.escKey&&(s="close");break;case T("z",a):s="toggleZoom";break;case T("ArrowLeft",a):e="x";break;case T("ArrowUp",a):e="y";break;case T("ArrowRight",a):e="x",o=!0;break;case T("ArrowDown",a):o=!0,e="y";break;case T("Tab",a):this._focusRoot()}if(e){t.preventDefault();const{currSlide:n}=i;i.options.arrowKeys&&"x"===e&&i.getNumItems()>1?s=o?"next":"prev":n&&n.currZoomLevel>n.zoomLevels.fit&&(n.pan[e]+=o?-80:80,n.panTo(n.pan.x,n.pan.y))}s&&(t.preventDefault(),i[s]())}_onFocusIn(t){const{template:i}=this.pswp;i&&document!==t.target&&i!==t.target&&!i.contains(t.target)&&i.focus()}}class A{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:i}=this,s=Math.round(i.viewportSize.x+i.viewportSize.x*i.options.spacing),e=s!==this.slideWidth;e&&(this.slideWidth=s,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((i,s)=>{e&&a(i.el,(s+this._containerShiftIndex)*this.slideWidth),t&&i.slide&&i.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const i=r("pswp__item","div",this.pswp.container);i.setAttribute("role","group"),i.setAttribute("aria-roledescription","slide"),i.setAttribute("aria-hidden","true"),i.style.display=1===t?"block":"none",this.itemHolders.push({el:i})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,i,s){const{pswp:e}=this;let o=e.potentialIndex+t;const n=e.getNumItems();if(e.canLoop()){o=e.getLoopedIndex(o);const i=(t+n)%n;t=i<=n/2?i:i-n}else o<0?o=0:o>=n&&(o=n-1),t=o-e.potentialIndex;e.potentialIndex=o,this._currPositionIndex-=t,e.animations.stopMainScroll();const a=this.getCurrSlideX();if(i){e.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:s||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),e.appendHeavy()}});let t=e.potentialIndex-e.currIndex;if(e.canLoop()){const i=(t+n)%n;t=i<=n/2?i:i-n}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){const{pswp:t}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let s,e=Math.abs(i);e>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),e=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let o=0;o<e;o++)i>0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this._containerShiftIndex++,a(s.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(s,t.currIndex-e+o+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this._containerShiftIndex--,a(s.el,this._containerShiftIndex*this.slideWidth),t.setContent(s,t.currIndex+e-o-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((t,i)=>{t.slide&&t.slide.setIsActive(1===i)}),t.currSlide=this.itemHolders[1]?.slide,t.contentLoader.updateLazy(i),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(t,i){if(!this.pswp.canLoop()&&i){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+.35*s)}this.x=t,this.pswp.container&&a(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:i??!1})}}const z=.003;class C{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,i=this.pswp.currSlide,{options:s}=t;if("fade"===s.showHideAnimationType?(s.showHideOpacity=!0,this._thumbBounds=void 0):"none"===s.showHideAnimationType?(s.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=i?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&i?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=s.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&i&&(i.zoomAndPanToInitial(),i.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>z,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(z)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=this.pswp.currSlide?.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(z)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(z)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(z)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(t=>{let i=!1,s=!0;h(this._placeholder).finally(()=>{i=!0,s||t(!0)}),setTimeout(()=>{s=!1,i&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){this.pswp.element?.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),this.pswp.element?.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed?t.destroy():this.isOpen&&(this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),t.currSlide?.applyCurrentZoomPan())}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(i){if(!this._thumbBounds)return;const{pswp:s}=this,{innerRect:e}=this._thumbBounds,{currSlide:o,viewportSize:n}=s;if(this._croppedZoom&&e&&this._cropContainer1&&this._cropContainer2){const t=-n.x+(this._thumbBounds.x-e.x)+e.w,s=-n.y+(this._thumbBounds.y-e.y)+e.h,o=n.x-e.w,r=n.y-e.h;i?(this._animateTo(this._cropContainer1,"transform",p(t,s)),this._animateTo(this._cropContainer2,"transform",p(o,r))):(a(this._cropContainer1,t,s),a(this._cropContainer2,o,r))}o&&(t(o.pan,e||this._thumbBounds),o.currZoomLevel=this._thumbBounds.w/o.width,i?this._animateTo(o.container,"transform",o.getCurrentTransform()):o.applyCurrentZoomPan())}_animateTo(t,i,s){if(!this._duration)return void(t.style[i]=s);const{animations:e}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{e.activeAnimations.length||this._onAnimationComplete()},target:t};o[i]=s,e.startTransition(o)}}class Z{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:i}=this.pswp;let{deltaX:s,deltaY:e}=t;if(i&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let s=-e;1===t.deltaMode?s*=.05:s*=t.deltaMode?1:.002,s=2**s;const o=i.currZoomLevel*s;i.zoomTo(o,{x:t.clientX,y:t.clientY})}}else i.isPannable()&&(1===t.deltaMode&&(s*=18,e*=18),i.panTo(i.pan.x-s,i.pan.y-e))}}class I{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:i}=this.slide,s=this.slide["x"===t?"width":"height"]*this.currZoomLevel,e=l("x"===t?"left":"top",i.options,i.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-s)/2)+e,this.max[t]=s>o?Math.round(o-s)+e:this.center[t],this.min[t]=s>o?e:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,i){return s(i,this.max[t],this.min[t])}}class O{constructor(t,i,s){this.data=t,this.index=i,this.pswp=s,this.isActive=i===s.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!s.opener.isOpen,this.zoomLevels=new c(s.options,t,i,s),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:i}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=r("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new I(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||(this.isActive,0)||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const i=this.currentResolution||this.zoomLevels.initial;if(!i)return;const s=Math.round(this.width*i)||this.pswp.viewportSize.x,e=Math.round(this.height*i)||this.pswp.viewportSize.y;!this.sizeChanged(s,e)&&!t||this.content.setDisplayedSize(s,e)}sizeChanged(t,i){return(t!==this.prevDisplayedWidth||i!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=i,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(t,e,o,n){const{pswp:a}=this;if(!this.isZoomable()||a.mainScroll.isShifted())return;a.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:o}),a.animations.stopAllPan();const r=this.currZoomLevel;n||(t=s(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,r),this.pan.y=this.calculateZoomToPanOffset("y",e,r),i(this.pan);const h=()=>{this._setResolution(t),this.applyCurrentZoomPan()};o?a.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:h,duration:o,easing:a.options.easing}):h()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,i,s){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];i||(i=this.pswp.getViewportCenterPoint()),s||(s=this.zoomLevels.initial);const e=this.currZoomLevel/s;return this.bounds.correctPan(t,(this.pan[t]-i[t])*e+i[t])}panTo(t,i){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",i),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),t(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,i,s){s/=this.currentResolution||this.zoomLevels.initial,a(this.container,t,i,s)}calculateSize(){const{pswp:i}=this;t(this.panAreaSize,d(i.options,i.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),i.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return p(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}function D(t,i,s){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),i.on("change",()=>{i.options.loop||(t.disabled=s?!(i.currIndex<i.getNumItems()-1):!(i.currIndex>0))})}const E={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:D},M={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,i)=>{D(t,i,!0)}},F={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},B={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},R={name:"counter",order:5,onInit:(t,i)=>{i.on("change",()=>{t.innerText=i.currIndex+1+i.options.indexIndicatorSep+i.getNumItems()})}},k={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,i)=>{let s,e=null;const o=i=>{s!==i&&(s=i,((i,s)=>{t.classList.toggle("pswp__preloader--"+i,s)})("active",i))},n=()=>{if(!i.currSlide?.content.isLoading())return o(!1),void(e&&(clearTimeout(e),e=null));e||(e=setTimeout(()=>{o(!!i.currSlide?.content.isLoading()),e=null},i.options.preloaderDelay))};i.on("change",n),i.on("loadComplete",t=>{i.currSlide===t.slide&&n()}),i.ui&&(i.ui.updatePreloaderVisibility=n)}};class H{constructor(t,i){const s=i.name||i.className;let e=i.html;if(!1===t.options[s])return;"string"==typeof t.options[s+"SVG"]&&(e=t.options[s+"SVG"]),t.dispatch("uiElementCreate",{data:i});let o="";i.isButton?(o+="pswp__button ",o+=i.className||`pswp__button--${i.name}`):o+=i.className||`pswp__${i.name}`;let n=i.isButton?i.tagName||"button":i.tagName||"div";n=n.toLowerCase();const a=r(o,n);if(i.isButton){"button"===n&&(a.type="button");let{title:e}=i;const{ariaLabel:o}=i;"string"==typeof t.options[s+"Title"]&&(e=t.options[s+"Title"]),e&&(a.title=e);const r=o||e;r&&a.setAttribute("aria-label",r)}a.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const i=t;let s='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return s=s.split("%d").join(i.size||32),i.outlineID&&(s+='<use class="pswp__icn-shadow" xlink:href="#'+i.outlineID+'"/>'),s+=i.inner,s+="</svg>",s}(e),i.onInit&&i.onInit(a,t),i.onClick&&(a.onclick=s=>{"string"==typeof i.onClick?t[i.onClick]():"function"==typeof i.onClick&&i.onClick(s,a,t)});const h=i.appendTo||"bar";let p=t.element;"bar"===h?(t.topBar||(t.topBar=r("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),p=t.topBar):(a.classList.add("pswp__hide-on-close"),"wrapper"===h&&(p=t.scrollWrap)),p?.appendChild(t.applyFilters("uiElement",a,i))}}function W(t,i){t.classList.toggle("pswp--zoomed-in",i)}class N{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[F,E,M,B,k,R],t.dispatch("uiRegister"),this.uiElementsData.sort((t,i)=>(t.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(t=>{this.registerElement(t)}),t.on("change",()=>{t.element?.classList.toggle("pswp--one-slide",1===t.getNumItems())}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new H(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:i,options:s}=this.pswp;if(this.pswp.opener.isClosing||!t||!i)return;let{currZoomLevel:e}=i;if(this.pswp.opener.isOpen||(e=i.zoomLevels.initial),e===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=e;const o=i.zoomLevels.initial-i.zoomLevels.secondary;if(Math.abs(o)<.01||!i.isZoomable())return W(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed");W(t,(e===i.zoomLevels.initial?i.zoomLevels.secondary:i.zoomLevels.initial)<=e),("zoom"===s.imageClickAction||"zoom-or-close"===s.imageClickAction)&&t.classList.add("pswp--click-to-zoom")}}const V="cubic-bezier(.4,0,.22,1)";class q{constructor(t){this.props=t;const{target:i,onComplete:s,transform:e,onFinish:o=()=>{},duration:n=333,easing:a=V}=t;this.onFinish=o;const r=e?"transform":"opacity",h=t[r]??"";this._target=i,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{u(i,r,n,a),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},n+500),i.style[r]=h},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&(clearTimeout(this._helperTimeout),this._helperTimeout=null),m(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}class U{constructor(t,i,s){this.velocity=1e3*t,this._dampingRatio=i||.75,this._naturalFrequency=s||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,i){let s,e=0;i/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*i);if(1===this._dampingRatio)s=this.velocity+this._naturalFrequency*t,e=(t+s*i)*o,this.velocity=e*-this._naturalFrequency+s*o;else if(this._dampingRatio<1){s=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const n=Math.cos(this._dampedFrequency*i),a=Math.sin(this._dampedFrequency*i);e=o*(t*n+s*a),this.velocity=e*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*s*n)}return e}}class G{constructor(t){this.props=t,this._raf=0;const{start:i,end:s,velocity:e,onUpdate:o,onComplete:n,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:h}=t;this.onFinish=a;const p=new U(e,r,h);let l=Date.now(),c=i-s;const d=()=>{this._raf&&(c=p.easeFrame(c,Date.now()-l),Math.abs(c)<1&&Math.abs(p.velocity)<50?(o(s),n&&n(),this.onFinish()):(l=Date.now(),o(c+s),this._raf=requestAnimationFrame(d)))};this._raf=requestAnimationFrame(d)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class X{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,i){const s=i?new G(t):new q(t);return this.activeAnimations.push(s),s.onFinish=()=>this.stop(s),s}stop(t){t.destroy();const i=this.activeAnimations.indexOf(t);i>-1&&this.activeAnimations.splice(i,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isPan||(t.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isMainScroll||(t.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}let K=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{K=!0}}))}catch{}class Y{constructor(){this._pool=[]}add(t,i,s,e){this._toggleListener(t,i,s,e)}remove(t,i,s,e){this._toggleListener(t,i,s,e,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,i,s,e,o,n){if(!t)return;const a=o?"removeEventListener":"addEventListener";i.split(" ").forEach(i=>{if(i){n||(o?this._pool=this._pool.filter(e=>e.type!==i||e.listener!==s||e.target!==t):this._pool.push({target:t,type:i,listener:s,passive:e}));const r=!!K&&{passive:e||!1};t[a](i,s,r)}})}}const j={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class $ extends _{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new Y,this.animations=new X,this.mainScroll=new A(this),this.gestures=new S(this),this.opener=new C(this),this.keyboard=new L(this),this.contentLoader=new v(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new Z(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const i=this.getNumItems();return this.options.loop&&(t>i-1&&(t-=i),t<0&&(t+=i)),s(t,0,i-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{t.slide?.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex,!0)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){this.currSlide?.zoomTo(...t)}toggleZoom(){this.currSlide?.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),this.element?.remove(),this.mainScroll.itemHolders.forEach(t=>{t.slide?.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((i,s)=>{let e=(this.currSlide?.index??0)-1+s;this.canLoop()&&(e=this.getLoopedIndex(e)),e===t&&(this.setContent(i,t,!0),1===s&&(this.currSlide=i.slide,i.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,i,s){if(this.canLoop()&&(i=this.getLoopedIndex(i)),t.slide){if(t.slide.index===i&&!s)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(i<0||i>=this.getNumItems()))return;const e=this.getItemData(i);t.slide=new O(e,i,this),i===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(i){if(this.isDestroying)return;const s=g(this.options,this);!i&&o(s,this._prevViewportSize)||(t(this._prevViewportSize,s),this.dispatch("beforeResize"),t(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){this.hasMouse||(this.hasMouse=!0,this.element?.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,i){this.offset.x=t,this.offset.y=i,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=r("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=r("pswp__bg","div",this.element),this.scrollWrap=r("pswp__scroll-wrap","section",this.element),this.container=r("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new N(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,i,s){const e=s.dispatch("thumbBounds",{index:t,itemData:i,instance:s});if(e.thumbBounds)return e.thumbBounds;const{element:o}=i;let n,a;if(o&&!1!==s.options.thumbSelector){const t=s.options.thumbSelector||"img";a=o.matches(t)?o:o.querySelector(t)}return a=s.applyFilters("thumbEl",a,i,t),a&&(n=i.thumbCropped?function(t,i,s){const e=t.getBoundingClientRect(),o=e.width/i,n=e.height/s,a=o>n?o:n,r=(e.width-i*a)/2,h=(e.height-s*a)/2,p={x:e.left+r,y:e.top+h,w:i*a};return p.innerRect={w:e.width,h:e.height,x:r,y:h},p}(a,i.width||i.w||0,i.height||i.h||0):function(t){const i=t.getBoundingClientRect();return{x:i.left,y:i.top,w:i.width}}(a)),s.applyFilters("thumbBounds",n,i,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...j,...t}}}export{$ as default};
1
+ import{e as t,r as i,c as s,g as e,p as o,s as n,a,b as r,d as h,t as p,f as l,Z as c,h as d,i as u,j as m,P as _,C as v,k as g}from"./BG98DA1v.js";class y{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&t(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:s,dragAxis:e}=this.gestures,{currSlide:o}=this.pswp;if("y"===e&&this.pswp.options.closeOnVerticalDrag&&o&&o.currZoomLevel<=o.zoomLevels.fit&&!this.gestures.isMultitouch){const i=o.pan.y+(t.y-s.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._setPanWithFriction("y",i,.6);const t=1-Math.abs(this._getVerticalDragRatio(o.pan.y));this.pswp.applyBgOpacity(t),o.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),o&&(i(o.pan),o.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:i,currSlide:s}=this.pswp;let e=0;if(this.pswp.animations.stopAll(),i.isShifted()){const s=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&s<0||t.x<.1&&s<-.5?(e=1,t.x=Math.min(t.x,0)):(t.x>.5&&s>0||t.x>-.1&&s>.5)&&(e=-1,t.x=Math.max(t.x,0)),i.moveIndexBy(e,!0,t.x,!0)}s&&s.currZoomLevel>s.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:i}=this.gestures,{currSlide:e}=this.pswp;if(!e)return;const{pan:o,bounds:n}=e,a=o[t],r=this.pswp.bgOpacity<1&&"y"===t,h=a+function(t,i){return t*i/(1-i)}(i[t],.995);if(r){const t=this._getVerticalDragRatio(a),i=this._getVerticalDragRatio(h);if(t<0&&i<-.4||t>0&&i>.4)return void this.pswp.close()}const p=n.correctPan(t,h);if(a===p)return;const l=p===h?1:.82,c=this.pswp.bgOpacity,d=p-a;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:a,end:p,velocity:i[t],dampingRatio:l,onUpdate:i=>{if(r&&this.pswp.bgOpacity<1){const t=1-(p-i)/d;this.pswp.applyBgOpacity(s(c+(1-c)*t,0,1))}o[t]=Math.floor(i),e.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:i,dragAxis:s,prevP1:e,isMultitouch:o}=this.gestures,{currSlide:n,mainScroll:a}=this.pswp,r=i[t]-e[t],h=a.x+r;if(!r||!n)return!1;if("x"===t&&!n.isPannable()&&!o)return a.moveTo(h,!0),!0;const{bounds:p}=n,l=n.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===s&&"x"===t&&!o){const i=a.getCurrSlideX(),s=a.x-i,e=r>0,o=!e;if(l>p.min[t]&&e){if(p.min[t]<=this.startPan[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,l)}else if(l<p.max[t]&&o){if(this.startPan[t]<=p.max[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,l)}else if(0!==s){if(s>0)return a.moveTo(Math.max(h,i),!0),!0;if(s<0)return a.moveTo(Math.min(h,i),!0),!0}else this._setPanWithFriction(t,l)}else"y"===t?!a.isShifted()&&p.min.y!==p.max.y&&this._setPanWithFriction(t,l):this._setPanWithFriction(t,l);return!1}_getVerticalDragRatio(t){return(t-(this.pswp.currSlide?.bounds.center.y??0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,i,s){const{currSlide:e}=this.pswp;if(!e)return;const{pan:o,bounds:n}=e;if(n.correctPan(t,i)!==i||s){const e=Math.round(i-o[t]);o[t]+=e*(s||.35)}else o[t]=i}}function w(t){return!!t.target.closest(".pswp__container")}class f{constructor(t){this.gestures=t}click(t,i){const s=i.target.classList,e=s.contains("pswp__img"),o=s.contains("pswp__item")||s.contains("pswp__zoom-wrap");e?this._doClickOrTapAction("imageClick",t,i):o&&this._doClickOrTapAction("bgClick",t,i)}tap(t,i){w(i)&&this._doClickOrTapAction("tap",t,i)}doubleTap(t,i){w(i)&&this._doClickOrTapAction("doubleTap",t,i)}_doClickOrTapAction(t,i,s){const{pswp:e}=this.gestures,{currSlide:o}=e,n=t+"Action",a=e.options[n];if(!e.dispatch(n,{point:i,originalEvent:s}).defaultPrevented){if("function"==typeof a)return void a.call(e,i,s);switch(a){case"close":case"next":e[a]();break;case"zoom":o?.toggleZoom(i);break;case"zoom-or-close":o?.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(i):e.options.clickToCloseNonZoomable&&e.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}}}}function P(t,i,s){return t.x=(i.x+s.x)/2,t.y=(i.y+s.y)/2,t}class x{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:i}=this.gestures.pswp;i&&(this._startZoomLevel=i.currZoomLevel,t(this._startPan,i.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:i,p2:s,startP2:o,pswp:n}=this.gestures,{currSlide:a}=n;if(!a)return;const r=a.zoomLevels.min,h=a.zoomLevels.max;if(!a.isZoomable()||n.mainScroll.isShifted())return;P(this._startZoomPoint,i,o),P(this._zoomPoint,t,s);let p=1/e(i,o)*e(t,s)*this._startZoomLevel;if(p>a.zoomLevels.initial+a.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),p<r)if(n.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=a.zoomLevels.initial){const t=1-(r-p)/(r/1.2);n.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||n.applyBgOpacity(t)}else p=r-.15*(r-p);else p>h&&(p=h+.05*(p-h));a.pan.x=this._calculatePanForZoomLevel("x",p),a.pan.y=this._calculatePanForZoomLevel("y",p),a.setZoomLevel(p),a.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:i}=t;(!i||i.currZoomLevel<i.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,i){const s=i/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*s}correctZoomPan(i){const{pswp:e}=this.gestures,{currSlide:n}=e;if(!n?.isZoomable())return;0===this._zoomPoint.x&&(i=!0);const a=n.currZoomLevel;let r,h=!0;a<n.zoomLevels.initial?r=n.zoomLevels.initial:a>n.zoomLevels.max?r=n.zoomLevels.max:(h=!1,r=a);const p=e.bgOpacity,l=e.bgOpacity<1,c=t({x:0,y:0},n.pan);let d=t({x:0,y:0},c);i&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=a,t(this._startPan,c)),h&&(d={x:this._calculatePanForZoomLevel("x",r),y:this._calculatePanForZoomLevel("y",r)}),n.setZoomLevel(r),d={x:n.bounds.correctPan("x",d.x),y:n.bounds.correctPan("y",d.y)},n.setZoomLevel(a);const u=!o(d,c);if(!u&&!h&&!l)return n._setResolution(r),void n.applyCurrentZoomPan();e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,u||h){if(u&&(n.pan.x=c.x+(d.x-c.x)*t,n.pan.y=c.y+(d.y-c.y)*t),h){const i=a+(r-a)*t;n.setZoomLevel(i)}n.applyCurrentZoomPan()}l&&e.bgOpacity<1&&e.applyBgOpacity(s(p+(1-p)*t,0,1))},onComplete:()=>{n._setResolution(r),n.applyCurrentZoomPan()}})}}class S{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new y(this),this.zoomLevels=new x(this),this.tapHandler=new f(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,i,s,e){const{pswp:o}=this,{events:n}=o,a=e?t+e:"";n.add(o.scrollWrap,t+i,this.onPointerDown.bind(this)),n.add(window,t+"move",this.onPointerMove.bind(this)),n.add(window,t+s,this.onPointerUp.bind(this)),a&&n.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(i){const s="mousedown"===i.type||"mouse"===i.pointerType;if(s&&i.button>0)return;const{pswp:e}=this;e.opener.isOpen?e.dispatch("pointerDown",{originalEvent:i}).defaultPrevented||(s&&(e.mouseDetected(),this._preventPointerEventBehaviour(i,"down")),e.animations.stopAll(),this._updatePoints(i,"down"),1===this._numActivePoints&&(this.dragAxis=null,t(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):i.preventDefault()}onPointerMove(i){this._preventPointerEventBehaviour(i,"move"),this._numActivePoints&&(this._updatePoints(i,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:i}).defaultPrevented&&(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,t(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?o(this.p1,this.prevP1)||this.drag.change():(!o(this.p1,this.prevP1)||!o(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(i){const s=Date.now(),e=s-this._intervalTime;e<50&&!i||(this.velocity.x=this._getVelocity("x",e),this.velocity.y=this._getVelocity("y",e),this._intervalTime=s,t(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(i){const{mainScroll:s}=this.pswp;if(s.isShifted())return void s.moveIndexBy(0,!0);if(i.type.indexOf("cancel")>0)return;if("mouseup"===i.type||"mouse"===i.pointerType)return void this.tapHandler.click(this.startP1,i);const o=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),e(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,i)):(t(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,i),this._clearTapTimer()},o))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,i){const s=this.p1[t]-this._intervalP1[t];return Math.abs(s)>1&&i>5?s/i:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,i){this.pswp.applyFilters("preventPointerEvent",!0,t,i)&&t.preventDefault()}_updatePoints(i,s){if(this._pointerEventEnabled){const e=i,o=this._ongoingPointers.findIndex(t=>t.id===e.pointerId);"up"===s&&o>-1?this._ongoingPointers.splice(o,1):"down"===s&&-1===o?this._ongoingPointers.push(this._convertEventPosToPoint(e,{x:0,y:0})):o>-1&&this._convertEventPosToPoint(e,this._ongoingPointers[o]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&t(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&t(this.p2,this._ongoingPointers[1])}else{const t=i;this._numActivePoints=0,t.type.indexOf("touch")>-1?t.touches&&t.touches.length>0&&(this._convertEventPosToPoint(t.touches[0],this.p1),this._numActivePoints++,t.touches.length>1&&(this._convertEventPosToPoint(t.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(i,this.p1),"up"===s?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){t(this.prevP1,this.p1),t(this.prevP2,this.p2)}_updateStartPoints(){t(this.startP1,this.p1),t(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const i=t>0?"x":"y";Math.abs(this.p1[i]-this.startP1[i])>=10&&(this.dragAxis=i)}}}_convertEventPosToPoint(t,i){return i.x=t.pageX-this.pswp.offset.x,i.y=t.pageY-this.pswp.offset.y,"pointerId"in t?i.id=t.pointerId:void 0!==t.identifier&&(i.id=t.identifier),i}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const b={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},T=(t,i)=>i?t:b[t];class L{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const i=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&i&&this._wasFocused&&i.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:i}=this;if(i.dispatch("keydown",{originalEvent:t}).defaultPrevented||n(t))return;let s,e,o=!1;const a="key"in t;switch(a?t.key:t.keyCode){case T("Escape",a):i.options.escKey&&(s="close");break;case T("z",a):s="toggleZoom";break;case T("ArrowLeft",a):e="x";break;case T("ArrowUp",a):e="y";break;case T("ArrowRight",a):e="x",o=!0;break;case T("ArrowDown",a):o=!0,e="y";break;case T("Tab",a):this._focusRoot()}if(e){t.preventDefault();const{currSlide:n}=i;i.options.arrowKeys&&"x"===e&&i.getNumItems()>1?s=o?"next":"prev":n&&n.currZoomLevel>n.zoomLevels.fit&&(n.pan[e]+=o?-80:80,n.panTo(n.pan.x,n.pan.y))}s&&(t.preventDefault(),i[s]())}_onFocusIn(t){const{template:i}=this.pswp;i&&document!==t.target&&i!==t.target&&!i.contains(t.target)&&i.focus()}}class A{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:i}=this,s=Math.round(i.viewportSize.x+i.viewportSize.x*i.options.spacing),e=s!==this.slideWidth;e&&(this.slideWidth=s,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((i,s)=>{e&&a(i.el,(s+this._containerShiftIndex)*this.slideWidth),t&&i.slide&&i.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const i=r("pswp__item","div",this.pswp.container);i.setAttribute("role","group"),i.setAttribute("aria-roledescription","slide"),i.setAttribute("aria-hidden","true"),i.style.display=1===t?"block":"none",this.itemHolders.push({el:i})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,i,s){const{pswp:e}=this;let o=e.potentialIndex+t;const n=e.getNumItems();if(e.canLoop()){o=e.getLoopedIndex(o);const i=(t+n)%n;t=i<=n/2?i:i-n}else o<0?o=0:o>=n&&(o=n-1),t=o-e.potentialIndex;e.potentialIndex=o,this._currPositionIndex-=t,e.animations.stopMainScroll();const a=this.getCurrSlideX();if(i){e.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:s||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),e.appendHeavy()}});let t=e.potentialIndex-e.currIndex;if(e.canLoop()){const i=(t+n)%n;t=i<=n/2?i:i-n}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){const{pswp:t}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let s,e=Math.abs(i);e>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),e=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let o=0;o<e;o++)i>0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this._containerShiftIndex++,a(s.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(s,t.currIndex-e+o+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this._containerShiftIndex--,a(s.el,this._containerShiftIndex*this.slideWidth),t.setContent(s,t.currIndex+e-o-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((t,i)=>{t.slide&&t.slide.setIsActive(1===i)}),t.currSlide=this.itemHolders[1]?.slide,t.contentLoader.updateLazy(i),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(t,i){if(!this.pswp.canLoop()&&i){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+.35*s)}this.x=t,this.pswp.container&&a(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:i??!1})}}const z=.003;class C{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,i=this.pswp.currSlide,{options:s}=t;if("fade"===s.showHideAnimationType?(s.showHideOpacity=!0,this._thumbBounds=void 0):"none"===s.showHideAnimationType?(s.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=i?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&i?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=s.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&i&&(i.zoomAndPanToInitial(),i.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>z,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(z)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=this.pswp.currSlide?.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(z)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(z)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(z)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(t=>{let i=!1,s=!0;h(this._placeholder).finally(()=>{i=!0,s||t(!0)}),setTimeout(()=>{s=!1,i&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){this.pswp.element?.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),this.pswp.element?.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed?t.destroy():this.isOpen&&(this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),t.currSlide?.applyCurrentZoomPan())}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(i){if(!this._thumbBounds)return;const{pswp:s}=this,{innerRect:e}=this._thumbBounds,{currSlide:o,viewportSize:n}=s;if(this._croppedZoom&&e&&this._cropContainer1&&this._cropContainer2){const t=-n.x+(this._thumbBounds.x-e.x)+e.w,s=-n.y+(this._thumbBounds.y-e.y)+e.h,o=n.x-e.w,r=n.y-e.h;i?(this._animateTo(this._cropContainer1,"transform",p(t,s)),this._animateTo(this._cropContainer2,"transform",p(o,r))):(a(this._cropContainer1,t,s),a(this._cropContainer2,o,r))}o&&(t(o.pan,e||this._thumbBounds),o.currZoomLevel=this._thumbBounds.w/o.width,i?this._animateTo(o.container,"transform",o.getCurrentTransform()):o.applyCurrentZoomPan())}_animateTo(t,i,s){if(!this._duration)return void(t.style[i]=s);const{animations:e}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{e.activeAnimations.length||this._onAnimationComplete()},target:t};o[i]=s,e.startTransition(o)}}class Z{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:i}=this.pswp;let{deltaX:s,deltaY:e}=t;if(i&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let s=-e;1===t.deltaMode?s*=.05:s*=t.deltaMode?1:.002,s=2**s;const o=i.currZoomLevel*s;i.zoomTo(o,{x:t.clientX,y:t.clientY})}}else i.isPannable()&&(1===t.deltaMode&&(s*=18,e*=18),i.panTo(i.pan.x-s,i.pan.y-e))}}class I{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:i}=this.slide,s=this.slide["x"===t?"width":"height"]*this.currZoomLevel,e=l("x"===t?"left":"top",i.options,i.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-s)/2)+e,this.max[t]=s>o?Math.round(o-s)+e:this.center[t],this.min[t]=s>o?e:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,i){return s(i,this.max[t],this.min[t])}}class O{constructor(t,i,s){this.data=t,this.index=i,this.pswp=s,this.isActive=i===s.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!s.opener.isOpen,this.zoomLevels=new c(s.options,t,i,s),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:i}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=r("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new I(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||(this.isActive,0)||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const i=this.currentResolution||this.zoomLevels.initial;if(!i)return;const s=Math.round(this.width*i)||this.pswp.viewportSize.x,e=Math.round(this.height*i)||this.pswp.viewportSize.y;!this.sizeChanged(s,e)&&!t||this.content.setDisplayedSize(s,e)}sizeChanged(t,i){return(t!==this.prevDisplayedWidth||i!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=i,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(t,e,o,n){const{pswp:a}=this;if(!this.isZoomable()||a.mainScroll.isShifted())return;a.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:o}),a.animations.stopAllPan();const r=this.currZoomLevel;n||(t=s(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,r),this.pan.y=this.calculateZoomToPanOffset("y",e,r),i(this.pan);const h=()=>{this._setResolution(t),this.applyCurrentZoomPan()};o?a.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:h,duration:o,easing:a.options.easing}):h()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,i,s){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];i||(i=this.pswp.getViewportCenterPoint()),s||(s=this.zoomLevels.initial);const e=this.currZoomLevel/s;return this.bounds.correctPan(t,(this.pan[t]-i[t])*e+i[t])}panTo(t,i){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",i),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),t(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,i,s){s/=this.currentResolution||this.zoomLevels.initial,a(this.container,t,i,s)}calculateSize(){const{pswp:i}=this;t(this.panAreaSize,d(i.options,i.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),i.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return p(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}function D(t,i,s){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),i.on("change",()=>{i.options.loop||(t.disabled=s?!(i.currIndex<i.getNumItems()-1):!(i.currIndex>0))})}const E={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:D},M={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,i)=>{D(t,i,!0)}},F={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},B={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},R={name:"counter",order:5,onInit:(t,i)=>{i.on("change",()=>{t.innerText=i.currIndex+1+i.options.indexIndicatorSep+i.getNumItems()})}},k={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,i)=>{let s,e=null;const o=i=>{s!==i&&(s=i,((i,s)=>{t.classList.toggle("pswp__preloader--"+i,s)})("active",i))},n=()=>{if(!i.currSlide?.content.isLoading())return o(!1),void(e&&(clearTimeout(e),e=null));e||(e=setTimeout(()=>{o(!!i.currSlide?.content.isLoading()),e=null},i.options.preloaderDelay))};i.on("change",n),i.on("loadComplete",t=>{i.currSlide===t.slide&&n()}),i.ui&&(i.ui.updatePreloaderVisibility=n)}};class H{constructor(t,i){const s=i.name||i.className;let e=i.html;if(!1===t.options[s])return;"string"==typeof t.options[s+"SVG"]&&(e=t.options[s+"SVG"]),t.dispatch("uiElementCreate",{data:i});let o="";i.isButton?(o+="pswp__button ",o+=i.className||`pswp__button--${i.name}`):o+=i.className||`pswp__${i.name}`;let n=i.isButton?i.tagName||"button":i.tagName||"div";n=n.toLowerCase();const a=r(o,n);if(i.isButton){"button"===n&&(a.type="button");let{title:e}=i;const{ariaLabel:o}=i;"string"==typeof t.options[s+"Title"]&&(e=t.options[s+"Title"]),e&&(a.title=e);const r=o||e;r&&a.setAttribute("aria-label",r)}a.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const i=t;let s='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return s=s.split("%d").join(i.size||32),i.outlineID&&(s+='<use class="pswp__icn-shadow" xlink:href="#'+i.outlineID+'"/>'),s+=i.inner,s+="</svg>",s}(e),i.onInit&&i.onInit(a,t),i.onClick&&(a.onclick=s=>{"string"==typeof i.onClick?t[i.onClick]():"function"==typeof i.onClick&&i.onClick(s,a,t)});const h=i.appendTo||"bar";let p=t.element;"bar"===h?(t.topBar||(t.topBar=r("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),p=t.topBar):(a.classList.add("pswp__hide-on-close"),"wrapper"===h&&(p=t.scrollWrap)),p?.appendChild(t.applyFilters("uiElement",a,i))}}function W(t,i){t.classList.toggle("pswp--zoomed-in",i)}class N{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[F,E,M,B,k,R],t.dispatch("uiRegister"),this.uiElementsData.sort((t,i)=>(t.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(t=>{this.registerElement(t)}),t.on("change",()=>{t.element?.classList.toggle("pswp--one-slide",1===t.getNumItems())}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new H(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:i,options:s}=this.pswp;if(this.pswp.opener.isClosing||!t||!i)return;let{currZoomLevel:e}=i;if(this.pswp.opener.isOpen||(e=i.zoomLevels.initial),e===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=e;const o=i.zoomLevels.initial-i.zoomLevels.secondary;if(Math.abs(o)<.01||!i.isZoomable())return W(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed");W(t,(e===i.zoomLevels.initial?i.zoomLevels.secondary:i.zoomLevels.initial)<=e),("zoom"===s.imageClickAction||"zoom-or-close"===s.imageClickAction)&&t.classList.add("pswp--click-to-zoom")}}const V="cubic-bezier(.4,0,.22,1)";class q{constructor(t){this.props=t;const{target:i,onComplete:s,transform:e,onFinish:o=()=>{},duration:n=333,easing:a=V}=t;this.onFinish=o;const r=e?"transform":"opacity",h=t[r]??"";this._target=i,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{u(i,r,n,a),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},n+500),i.style[r]=h},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&(clearTimeout(this._helperTimeout),this._helperTimeout=null),m(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}class U{constructor(t,i,s){this.velocity=1e3*t,this._dampingRatio=i||.75,this._naturalFrequency=s||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,i){let s,e=0;i/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*i);if(1===this._dampingRatio)s=this.velocity+this._naturalFrequency*t,e=(t+s*i)*o,this.velocity=e*-this._naturalFrequency+s*o;else if(this._dampingRatio<1){s=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const n=Math.cos(this._dampedFrequency*i),a=Math.sin(this._dampedFrequency*i);e=o*(t*n+s*a),this.velocity=e*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*s*n)}return e}}class G{constructor(t){this.props=t,this._raf=0;const{start:i,end:s,velocity:e,onUpdate:o,onComplete:n,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:h}=t;this.onFinish=a;const p=new U(e,r,h);let l=Date.now(),c=i-s;const d=()=>{this._raf&&(c=p.easeFrame(c,Date.now()-l),Math.abs(c)<1&&Math.abs(p.velocity)<50?(o(s),n&&n(),this.onFinish()):(l=Date.now(),o(c+s),this._raf=requestAnimationFrame(d)))};this._raf=requestAnimationFrame(d)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class X{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,i){const s=i?new G(t):new q(t);return this.activeAnimations.push(s),s.onFinish=()=>this.stop(s),s}stop(t){t.destroy();const i=this.activeAnimations.indexOf(t);i>-1&&this.activeAnimations.splice(i,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isPan||(t.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isMainScroll||(t.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}let K=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{K=!0}}))}catch{}class Y{constructor(){this._pool=[]}add(t,i,s,e){this._toggleListener(t,i,s,e)}remove(t,i,s,e){this._toggleListener(t,i,s,e,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,i,s,e,o,n){if(!t)return;const a=o?"removeEventListener":"addEventListener";i.split(" ").forEach(i=>{if(i){n||(o?this._pool=this._pool.filter(e=>e.type!==i||e.listener!==s||e.target!==t):this._pool.push({target:t,type:i,listener:s,passive:e}));const r=!!K&&{passive:e||!1};t[a](i,s,r)}})}}const j={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class $ extends _{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new Y,this.animations=new X,this.mainScroll=new A(this),this.gestures=new S(this),this.opener=new C(this),this.keyboard=new L(this),this.contentLoader=new v(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new Z(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const i=this.getNumItems();return this.options.loop&&(t>i-1&&(t-=i),t<0&&(t+=i)),s(t,0,i-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{t.slide?.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex,!0)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){this.currSlide?.zoomTo(...t)}toggleZoom(){this.currSlide?.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),this.element?.remove(),this.mainScroll.itemHolders.forEach(t=>{t.slide?.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((i,s)=>{let e=(this.currSlide?.index??0)-1+s;this.canLoop()&&(e=this.getLoopedIndex(e)),e===t&&(this.setContent(i,t,!0),1===s&&(this.currSlide=i.slide,i.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,i,s){if(this.canLoop()&&(i=this.getLoopedIndex(i)),t.slide){if(t.slide.index===i&&!s)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(i<0||i>=this.getNumItems()))return;const e=this.getItemData(i);t.slide=new O(e,i,this),i===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(i){if(this.isDestroying)return;const s=g(this.options,this);!i&&o(s,this._prevViewportSize)||(t(this._prevViewportSize,s),this.dispatch("beforeResize"),t(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){this.hasMouse||(this.hasMouse=!0,this.element?.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,i){this.offset.x=t,this.offset.y=i,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=r("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=r("pswp__bg","div",this.element),this.scrollWrap=r("pswp__scroll-wrap","section",this.element),this.container=r("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new N(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,i,s){const e=s.dispatch("thumbBounds",{index:t,itemData:i,instance:s});if(e.thumbBounds)return e.thumbBounds;const{element:o}=i;let n,a;if(o&&!1!==s.options.thumbSelector){const t=s.options.thumbSelector||"img";a=o.matches(t)?o:o.querySelector(t)}return a=s.applyFilters("thumbEl",a,i,t),a&&(n=i.thumbCropped?function(t,i,s){const e=t.getBoundingClientRect(),o=e.width/i,n=e.height/s,a=o>n?o:n,r=(e.width-i*a)/2,h=(e.height-s*a)/2,p={x:e.left+r,y:e.top+h,w:i*a};return p.innerRect={w:e.width,h:e.height,x:r,y:h},p}(a,i.width||i.w||0,i.height||i.h||0):function(t){const i=t.getBoundingClientRect();return{x:i.left,y:i.top,w:i.width}}(a)),s.applyFilters("thumbBounds",n,i,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...j,...t}}}export{$ as default};
@@ -1 +1 @@
1
- import{j as t,c as e}from"./B9gK2pCi.js";import*as r from"react";import{useRef as i,useState as s}from"react";var o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],n=t=>{let e=0;for(let r=0;r<t.length;r++){let i=t[r];e=83*e+o.indexOf(i)}return e},a=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},h=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},l=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),c=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},u=t=>{let e=t>>8&255,r=255&t;return[a(t>>16),a(e),a(r)]},p=(t,e)=>{let r=Math.floor(t/361),i=Math.floor(t/19)%19,s=t%19;return[l((r-9)/9,2)*e,l((i-9)/9,2)*e,l((s-9)/9,2)*e]},d=(t,e,r,i)=>{(t=>{if(!t||t.length<6)throw new c("The blurhash string must be at least 6 characters");let e=n(t[0]),r=Math.floor(e/9)+1,i=e%9+1;if(t.length!==4+2*i*r)throw new c(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*i*r}`)})(t),i|=1;let s=n(t[0]),o=Math.floor(s/9)+1,a=s%9+1,l=(n(t[1])+1)/166,d=new Array(a*o);for(let e=0;e<d.length;e++)if(0===e){let r=n(t.substring(2,6));d[e]=u(r)}else{let r=n(t.substring(4+2*e,6+2*e));d[e]=p(r,l*i)}let b=4*e,f=new Uint8ClampedArray(b*r);for(let t=0;t<r;t++)for(let i=0;i<e;i++){let s=0,n=0,l=0;for(let h=0;h<o;h++)for(let o=0;o<a;o++){let c=Math.cos(Math.PI*i*o/e)*Math.cos(Math.PI*t*h/r),u=d[o+h*a];s+=u[0]*c,n+=u[1]*c,l+=u[2]*c}let c=h(s),u=h(n),p=h(l);f[4*i+0+t*b]=c,f[4*i+1+t*b]=u,f[4*i+2+t*b]=p,f[4*i+3+t*b]=255}return f},b=Object.defineProperty,f=Object.defineProperties,g=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V=(t,e)=>{for(var r in e||(e={}))m.call(e,r)&&y(t,r,e[r]);if(w)for(var r of w(e))v.call(e,r)&&y(t,r,e[r]);return t},M=(t,e)=>f(t,g(e)),I=(t,e)=>{var r={};for(var i in t)m.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&w)for(var i of w(t))e.indexOf(i)<0&&v.call(t,i)&&(r[i]=t[i]);return r},q=class extends r.PureComponent{constructor(){super(...arguments),this.canvas=null,this.handleRef=t=>{this.canvas=t,this.draw()},this.draw=()=>{let{hash:t,height:e,punch:r,width:i}=this.props;if(this.canvas){let s=d(t,i,e,r),o=this.canvas.getContext("2d"),n=o.createImageData(i,e);n.data.set(s),o.putImageData(n,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:e,height:i,width:s}=t,o=I(t,["hash","height","width"]);return r.createElement("canvas",M(V({},o),{height:i,width:s,ref:this.handleRef}))}};q.defaultProps={height:128,width:128};var C={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends r.PureComponent{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:e,height:i,width:s,punch:o,resolutionX:n,resolutionY:a,style:h}=t,l=I(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return r.createElement("div",M(V({},l),{style:M(V({display:"inline-block",height:i,width:s},h),{position:"relative"})}),r.createElement(q,{hash:e,height:a,width:n,punch:o,style:C}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=Object.defineProperty,k=(t,e,r)=>((t,e,r)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),O=new Map,x=new WeakMap,E=0;function P(t){return Object.keys(t).sort().filter(e=>void 0!==t[e]).map(e=>`${e}_${"root"===e?function(t){return t?(x.has(t)||(E+=1,x.set(t,E.toString())),x.get(t)):"0"}(t.root):t[e]}`).toString()}function N(t,e,r={},i=undefined){if(typeof window.IntersectionObserver>"u"&&void 0!==i){const s=t.getBoundingClientRect();return e(i,{isIntersecting:i,target:t,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}),()=>{}}const{id:s,observer:o,elements:n}=function(t){const e=P(t);let r=O.get(e);if(!r){const i=new Map;let s;const o=new IntersectionObserver(e=>{e.forEach(e=>{var r;const o=e.isIntersecting&&s.some(t=>e.intersectionRatio>=t);t.trackVisibility&&typeof e.isVisible>"u"&&(e.isVisible=o),null==(r=i.get(e.target))||r.forEach(t=>{t(o,e)})})},t);s=o.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),r={id:e,observer:o,elements:i},O.set(e,r)}return r}(r),a=n.get(t)||[];return n.has(t)||n.set(t,a),a.push(e),o.observe(t),function(){a.splice(a.indexOf(e),1),0===a.length&&(n.delete(t),o.unobserve(t)),0===n.size&&(o.disconnect(),O.delete(s))}}var R=class extends r.Component{constructor(t){super(t),k(this,"node",null),k(this,"_unobserveCb",null),k(this,"lastInView"),k(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&(this.setState({inView:!!this.props.initialInView,entry:void 0}),this.lastInView=this.props.initialInView)),this.node=t||null,this.observeNode()}),k(this,"handleChange",(t,e)=>{const r=this.lastInView;this.lastInView=t,(void 0!==r||t)&&(t&&this.props.triggerOnce&&this.unobserve(),function(t){return"function"!=typeof t.children}(this.props)||this.setState({inView:t,entry:e}),this.props.onChange&&this.props.onChange(t,e))}),this.state={inView:!!t.initialInView,entry:void 0},this.lastInView=t.initialInView}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(t){(t.rootMargin!==this.props.rootMargin||t.root!==this.props.root||t.threshold!==this.props.threshold||t.skip!==this.props.skip||t.trackVisibility!==this.props.trackVisibility||t.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:t,root:e,rootMargin:r,trackVisibility:i,delay:s,fallbackInView:o}=this.props;void 0===this.lastInView&&(this.lastInView=this.props.initialInView),this._unobserveCb=N(this.node,this.handleChange,{threshold:t,root:e,rootMargin:r,trackVisibility:i,delay:s},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if("function"==typeof t){const{inView:e,entry:r}=this.state;return t({inView:e,entry:r,ref:this.handleNode})}const{as:e,triggerOnce:i,threshold:s,root:o,rootMargin:n,onChange:a,skip:h,trackVisibility:l,delay:c,initialInView:u,fallbackInView:p,...d}=this.props;return r.createElement(e||"div",{ref:this.handleNode,...d},t)}};const z=({src:r,alt:o,delayTime:n=0,threshold:a=.5,blurhash:h="LEHV6nWB2yk8pyo0adR*.7kCMdnj",wrapperClassName:l="qc:size-full",sizeMode:c="cover",position:u="center",onClick:p})=>{const d=i(null),b=i(null),[f,g]=s(!1),[w,m]=s(!1);return t.jsxs(R,{as:"div",className:e(l,"qc:relative qc:overflow-hidden"),threshold:a,onChange:t=>{t?b.current||(n<=0?g(!0):b.current=setTimeout(()=>g(!0),n)):b.current&&(clearTimeout(b.current),b.current=null)},children:[t.jsx(q,{className:"qc:size-full qc:blur-2xl",hash:h}),t.jsx("img",{alt:o,ref:d,src:f?r:null,onLoad:()=>m(!0),className:e("qc:bg-background qc:absolute qc:left-0 qc:top-0 qc:size-full qc:object-center qc:transition-all qc:duration-300",w?"qc:scale-100 qc:opacity-100":"qc:scale-95 qc:opacity-0","contain"===c?"qc:object-contain":"qc:object-cover","top"===u?"qc:object-top":"bottom"===u?"qc:object-bottom":"qc:object-center"),onClick:p})]})};export{R as I,z as L,d as j};
1
+ import{j as t,c as e}from"./DR9E1aMG.js";import*as r from"react";import{useRef as i,useState as s}from"react";var o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],n=t=>{let e=0;for(let r=0;r<t.length;r++){let i=t[r];e=83*e+o.indexOf(i)}return e},a=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},h=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},l=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),c=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},u=t=>{let e=t>>8&255,r=255&t;return[a(t>>16),a(e),a(r)]},p=(t,e)=>{let r=Math.floor(t/361),i=Math.floor(t/19)%19,s=t%19;return[l((r-9)/9,2)*e,l((i-9)/9,2)*e,l((s-9)/9,2)*e]},d=(t,e,r,i)=>{(t=>{if(!t||t.length<6)throw new c("The blurhash string must be at least 6 characters");let e=n(t[0]),r=Math.floor(e/9)+1,i=e%9+1;if(t.length!==4+2*i*r)throw new c(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*i*r}`)})(t),i|=1;let s=n(t[0]),o=Math.floor(s/9)+1,a=s%9+1,l=(n(t[1])+1)/166,d=new Array(a*o);for(let e=0;e<d.length;e++)if(0===e){let r=n(t.substring(2,6));d[e]=u(r)}else{let r=n(t.substring(4+2*e,6+2*e));d[e]=p(r,l*i)}let b=4*e,f=new Uint8ClampedArray(b*r);for(let t=0;t<r;t++)for(let i=0;i<e;i++){let s=0,n=0,l=0;for(let h=0;h<o;h++)for(let o=0;o<a;o++){let c=Math.cos(Math.PI*i*o/e)*Math.cos(Math.PI*t*h/r),u=d[o+h*a];s+=u[0]*c,n+=u[1]*c,l+=u[2]*c}let c=h(s),u=h(n),p=h(l);f[4*i+0+t*b]=c,f[4*i+1+t*b]=u,f[4*i+2+t*b]=p,f[4*i+3+t*b]=255}return f},b=Object.defineProperty,f=Object.defineProperties,g=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V=(t,e)=>{for(var r in e||(e={}))m.call(e,r)&&y(t,r,e[r]);if(w)for(var r of w(e))v.call(e,r)&&y(t,r,e[r]);return t},M=(t,e)=>f(t,g(e)),I=(t,e)=>{var r={};for(var i in t)m.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&w)for(var i of w(t))e.indexOf(i)<0&&v.call(t,i)&&(r[i]=t[i]);return r},q=class extends r.PureComponent{constructor(){super(...arguments),this.canvas=null,this.handleRef=t=>{this.canvas=t,this.draw()},this.draw=()=>{let{hash:t,height:e,punch:r,width:i}=this.props;if(this.canvas){let s=d(t,i,e,r),o=this.canvas.getContext("2d"),n=o.createImageData(i,e);n.data.set(s),o.putImageData(n,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:e,height:i,width:s}=t,o=I(t,["hash","height","width"]);return r.createElement("canvas",M(V({},o),{height:i,width:s,ref:this.handleRef}))}};q.defaultProps={height:128,width:128};var C={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends r.PureComponent{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:e,height:i,width:s,punch:o,resolutionX:n,resolutionY:a,style:h}=t,l=I(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return r.createElement("div",M(V({},l),{style:M(V({display:"inline-block",height:i,width:s},h),{position:"relative"})}),r.createElement(q,{hash:e,height:a,width:n,punch:o,style:C}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=Object.defineProperty,k=(t,e,r)=>((t,e,r)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),O=new Map,x=new WeakMap,E=0;function P(t){return Object.keys(t).sort().filter(e=>void 0!==t[e]).map(e=>`${e}_${"root"===e?function(t){return t?(x.has(t)||(E+=1,x.set(t,E.toString())),x.get(t)):"0"}(t.root):t[e]}`).toString()}function N(t,e,r={},i=undefined){if(typeof window.IntersectionObserver>"u"&&void 0!==i){const s=t.getBoundingClientRect();return e(i,{isIntersecting:i,target:t,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}),()=>{}}const{id:s,observer:o,elements:n}=function(t){const e=P(t);let r=O.get(e);if(!r){const i=new Map;let s;const o=new IntersectionObserver(e=>{e.forEach(e=>{var r;const o=e.isIntersecting&&s.some(t=>e.intersectionRatio>=t);t.trackVisibility&&typeof e.isVisible>"u"&&(e.isVisible=o),null==(r=i.get(e.target))||r.forEach(t=>{t(o,e)})})},t);s=o.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),r={id:e,observer:o,elements:i},O.set(e,r)}return r}(r),a=n.get(t)||[];return n.has(t)||n.set(t,a),a.push(e),o.observe(t),function(){a.splice(a.indexOf(e),1),0===a.length&&(n.delete(t),o.unobserve(t)),0===n.size&&(o.disconnect(),O.delete(s))}}var R=class extends r.Component{constructor(t){super(t),k(this,"node",null),k(this,"_unobserveCb",null),k(this,"lastInView"),k(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&(this.setState({inView:!!this.props.initialInView,entry:void 0}),this.lastInView=this.props.initialInView)),this.node=t||null,this.observeNode()}),k(this,"handleChange",(t,e)=>{const r=this.lastInView;this.lastInView=t,(void 0!==r||t)&&(t&&this.props.triggerOnce&&this.unobserve(),function(t){return"function"!=typeof t.children}(this.props)||this.setState({inView:t,entry:e}),this.props.onChange&&this.props.onChange(t,e))}),this.state={inView:!!t.initialInView,entry:void 0},this.lastInView=t.initialInView}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(t){(t.rootMargin!==this.props.rootMargin||t.root!==this.props.root||t.threshold!==this.props.threshold||t.skip!==this.props.skip||t.trackVisibility!==this.props.trackVisibility||t.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:t,root:e,rootMargin:r,trackVisibility:i,delay:s,fallbackInView:o}=this.props;void 0===this.lastInView&&(this.lastInView=this.props.initialInView),this._unobserveCb=N(this.node,this.handleChange,{threshold:t,root:e,rootMargin:r,trackVisibility:i,delay:s},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if("function"==typeof t){const{inView:e,entry:r}=this.state;return t({inView:e,entry:r,ref:this.handleNode})}const{as:e,triggerOnce:i,threshold:s,root:o,rootMargin:n,onChange:a,skip:h,trackVisibility:l,delay:c,initialInView:u,fallbackInView:p,...d}=this.props;return r.createElement(e||"div",{ref:this.handleNode,...d},t)}};const z=({src:r,alt:o,delayTime:n=0,threshold:a=.5,blurhash:h="LEHV6nWB2yk8pyo0adR*.7kCMdnj",wrapperClassName:l="qc:size-full",sizeMode:c="cover",position:u="center",onClick:p})=>{const d=i(null),b=i(null),[f,g]=s(!1),[w,m]=s(!1);return t.jsxs(R,{as:"div",className:e(l,"qc:relative qc:overflow-hidden"),threshold:a,onChange:t=>{t?b.current||(n<=0?g(!0):b.current=setTimeout(()=>g(!0),n)):b.current&&(clearTimeout(b.current),b.current=null)},children:[t.jsx(q,{className:"qc:size-full qc:blur-2xl",hash:h}),t.jsx("img",{alt:o,ref:d,src:f?r:null,onLoad:()=>m(!0),className:e("qc:bg-background qc:absolute qc:left-0 qc:top-0 qc:size-full qc:object-center qc:transition-all qc:duration-300",w?"qc:scale-100 qc:opacity-100":"qc:scale-95 qc:opacity-0","contain"===c?"qc:object-contain":"qc:object-cover","top"===u?"qc:object-top":"bottom"===u?"qc:object-bottom":"qc:object-center"),onClick:p})]})};export{R as I,z as L,d as j};
@@ -1 +1 @@
1
- import{j as e,M as t,L as n,u as r,O as o,c as a}from"./B9gK2pCi.js";import*as c from"react";import{useState as i}from"react";import*as s from"react-dom";import u from"react-dom";import{a as l,b as d,c as f}from"./D6nr9_KD.js";function p(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function m(t,n=[]){let r=[];const o=()=>{const e=r.map(e=>c.createContext(e));return function(n){const r=n?.[t]||e;return c.useMemo(()=>({[`__scope${t}`]:{...n,[t]:r}}),[n,r])}};return o.scopeName=t,[function(n,o){const a=c.createContext(o),i=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,u=r?.[t]?.[i]||a,l=c.useMemo(()=>s,Object.values(s));return e.jsx(u.Provider,{value:l,children:o})};return s.displayName=n+"Provider",[s,function(e,r){const s=r?.[t]?.[i]||a,u=c.useContext(s);if(u)return u;if(void 0!==o)return o;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},v(o,...n)]}function v(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var h=globalThis?.document?c.useLayoutEffect:()=>{},g=c[" useId ".trim().toString()]||(()=>{}),y=0;function b(e){const[t,n]=c.useState(g());return h(()=>{n(e=>e??String(y++))},[e]),e||(t?`radix-${t}`:"")}var E=c[" useInsertionEffect ".trim().toString()]||h;function w({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=function({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),a=c.useRef(t);return E(()=>{a.current=t},[t]),c.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,u=s?e:o;{const t=c.useRef(void 0!==e);c.useEffect(()=>{const e=t.current;e!==s&&console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[u,c.useCallback(t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&i.current?.(n)}else a(t)},[s,e,a,i])]}var N=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((n,r)=>{const o=t(`Primitive.${r}`),a=c.forwardRef((t,n)=>{const{asChild:a,...c}=t,i=a?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(i,{...c,ref:n})});return a.displayName=`Primitive.${r}`,{...n,[r]:a}},{});function x(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...e)=>t.current?.(...e),[])}var C,R="dismissableLayer.update",D="dismissableLayer.pointerDownOutside",S="dismissableLayer.focusOutside",q=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),M=c.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:u,onDismiss:l,...d}=t,f=c.useContext(q),[m,v]=c.useState(null),h=m?.ownerDocument??globalThis?.document,[,g]=c.useState({}),y=n(r,e=>v(e)),b=Array.from(f.layers),[E]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(E),M=m?b.indexOf(m):-1,O=f.layersWithOutsidePointerEventsDisabled.size>0,L=M>=w,_=function(e,t=globalThis?.document){const n=x(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){T(D,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...f.branches].some(e=>e.contains(t));!L||n||(i?.(e),u?.(e),e.defaultPrevented||l?.())},h),k=function(e,t=globalThis?.document){const n=x(e),r=c.useRef(!1);return c.useEffect(()=>{const e=e=>{e.target&&!r.current&&T(S,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...f.branches].some(e=>e.contains(t))||(s?.(e),u?.(e),e.defaultPrevented||l?.())},h);return function(e,t=globalThis?.document){const n=x(e);c.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{M===f.layers.size-1&&(a?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},h),c.useEffect(()=>{if(m)return o&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(C=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),P(),()=>{o&&1===f.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=C)}},[m,h,o,f]),c.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),P())},[m,f]),c.useEffect(()=>{const e=()=>g({});return document.addEventListener(R,e),()=>document.removeEventListener(R,e)},[]),e.jsx(N.div,{...d,ref:y,style:{pointerEvents:O?L?"auto":"none":void 0,...t.style},onFocusCapture:p(t.onFocusCapture,k.onFocusCapture),onBlurCapture:p(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:p(t.onPointerDownCapture,_.onPointerDownCapture)})});M.displayName="DismissableLayer";var O=c.forwardRef((t,r)=>{const o=c.useContext(q),a=c.useRef(null),i=n(r,a);return c.useEffect(()=>{const e=a.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),e.jsx(N.div,{...t,ref:i})});function P(){const e=new CustomEvent(R);document.dispatchEvent(e)}function T(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}O.displayName="DismissableLayerBranch";var L="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",k={bubbles:!1,cancelable:!0},A=c.forwardRef((t,r)=>{const{loop:o=!1,trapped:a=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...u}=t,[l,d]=c.useState(null),f=x(i),p=x(s),m=c.useRef(null),v=n(r,e=>d(e)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(a){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?m.current=t:W(m.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||W(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&W(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[a,l,h.paused]),c.useEffect(()=>{if(l){$.add(h);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(L,k);l.addEventListener(L,f),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(W(r,{select:t}),document.activeElement!==n)return}(function(e){return e.filter(e=>"A"!==e.tagName)}(j(l)),{select:!0}),document.activeElement===e&&W(l))}return()=>{l.removeEventListener(L,f),setTimeout(()=>{const t=new CustomEvent(_,k);l.addEventListener(_,p),l.dispatchEvent(t),t.defaultPrevented||W(e??document.body,{select:!0}),l.removeEventListener(_,p),$.remove(h)},0)}}},[l,f,p,h]);const g=c.useCallback(e=>{if(!o&&!a||h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,a]=function(e){const t=j(e),n=I(t,e),r=I(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||n!==a?e.shiftKey&&n===r&&(e.preventDefault(),o&&W(a,{select:!0})):(e.preventDefault(),o&&W(r,{select:!0})):n===t&&e.preventDefault()}},[o,a,h.paused]);return e.jsx(N.div,{tabIndex:-1,...u,ref:v,onKeyDown:g})});function j(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function I(e,t){for(const n of e)if(!F(n,{upTo:t}))return n}function F(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function W(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}A.displayName="FocusScope";var $=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=B(e,t),e.unshift(t)},remove(t){e=B(e,t),e[0]?.resume()}}}();function B(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var U=c.forwardRef((t,n)=>{const{container:r,...o}=t,[a,i]=c.useState(!1);h(()=>i(!0),[]);const s=r||a&&globalThis?.document?.body;return s?u.createPortal(e.jsx(N.div,{...o,ref:n}),s):null});U.displayName="Portal";var z=e=>{const{present:t,children:r}=e,o=function(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),a=c.useRef("none"),i=e?"mounted":"unmounted",[s,u]=function(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const e=K(r.current);a.current="mounted"===s?e:"none"},[s]),h(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,c=K(t);u(e?"MOUNT":"none"===c||"none"===t?.display?"UNMOUNT":n&&r!==c?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),h(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,c=a=>{const c=K(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&c&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},i=e=>{e.target===t&&(a.current=K(r.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),a="function"==typeof r?r({present:o.isPresent}):c.Children.only(r),i=n(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(a));return"function"==typeof r||o.isPresent?c.cloneElement(a,{ref:i}):null};function K(e){return e?.animationName||"none"}z.displayName="Presence";var X=0;function Y(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??H()),document.body.insertAdjacentElement("beforeend",e[1]??H()),X++,()=>{1===X&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),X--}},[])}function H(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Z="right-scroll-bar-position",V="width-before-scroll-bar";function G(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var J=typeof window<"u"?c.useLayoutEffect:c.useEffect,Q=new WeakMap;function ee(e,t){var n=function(e,t){var n=i(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}(null,function(t){return e.forEach(function(e){return G(e,t)})});return J(function(){var t=Q.get(n);if(t){var r=new Set(t),o=new Set(e),a=n.current;r.forEach(function(e){o.has(e)||G(e,null)}),o.forEach(function(e){r.has(e)||G(e,a)})}Q.set(n,e)},[e]),n}function te(e){return e}var ne=function(e){var t=e.sideCar,n=d(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,l({},n))};ne.isSideCarExport=!0;var re=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=te);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=l({async:!0,ssr:!1},e),t}(),oe=function(){},ae=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:oe,onWheelCapture:oe,onTouchMoveCapture:oe}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,u=e.className,f=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,h=e.noRelative,g=e.noIsolation,y=e.inert,b=e.allowPinchZoom,E=e.as,w=void 0===E?"div":E,N=e.gapMode,x=d(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,R=ee([n,t]),D=l(l({},x),o);return c.createElement(c.Fragment,null,p&&c.createElement(C,{sideCar:re,removeScrollBar:f,shards:m,noRelative:h,noIsolation:g,inert:y,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:N}),i?c.cloneElement(c.Children.only(s),l(l({},D),{ref:R})):c.createElement(w,l({},D,{className:u,ref:R}),s))});ae.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ae.classNames={fullWidth:V,zeroRight:Z};function ce(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var ie=function(){var e=0,t=null;return{add:function(n){0==e&&(t=ce())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},se=function(){var e=function(){var e=ie();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}}();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ue={left:0,top:0,right:0,gap:0},le=function(e){return parseInt(e||"",10)||0},de=function(e){if(void 0===e&&(e="margin"),typeof window>"u")return ue;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[le(n),le(r),le(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fe=se(),pe="data-scroll-locked",me=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body[").concat(pe,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Z," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(V," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(Z," .").concat(Z," {\n right: 0 ").concat(r,";\n }\n \n .").concat(V," .").concat(V," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(pe,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},ve=function(){var e=parseInt(document.body.getAttribute(pe)||"0",10);return isFinite(e)?e:0},he=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;c.useEffect(function(){return document.body.setAttribute(pe,(ve()+1).toString()),function(){var e=ve()-1;e<=0?document.body.removeAttribute(pe):document.body.setAttribute(pe,e.toString())}},[]);var a=c.useMemo(function(){return de(o)},[o]);return c.createElement(fe,{styles:me(a,!t,o,n?"":"!important")})},ge=!1;if(typeof window<"u")try{var ye=Object.defineProperty({},"passive",{get:function(){return ge=!0,!0}});window.addEventListener("test",ye,ye),window.removeEventListener("test",ye,ye)}catch{ge=!1}var be=!!ge&&{passive:!1},Ee=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},we=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),Ne(e,r)){var o=xe(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ne=function(e,t){return"v"===e?function(e){return Ee(e,"overflowY")}(t):function(e){return Ee(e,"overflowX")}(t)},xe=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},Ce=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Re=function(e){return[e.deltaX,e.deltaY]},De=function(e){return e&&"current"in e?e.current:e},Se=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},qe=0,Me=[];function Oe(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Pe=(Te=function(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(qe++)[0],a=c.useState(se)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=f([e.lockRef.current],(e.shards||[]).map(De),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Ce(e),c=n.current,s="deltaX"in e?e.deltaX:c[0]-a[0],u="deltaY"in e?e.deltaY:c[1]-a[1],l=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=we(d,l);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=we(d,l)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,c=n.target,i=t.contains(c),s=!1,u=a>0,l=0,d=0;do{if(!c)break;var f=xe(e,c),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Ne(e,c)&&(l+=m,d+=p);var v=c.parentNode;c=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!i&&c!==document.body||i&&(t.contains(c)||t===c));return(u&&Math.abs(l)<1||!u&&Math.abs(d)<1)&&(s=!0),s}(p,t,e,"h"===p?s:u)},[]),u=c.useCallback(function(e){var n=e;if(Me.length&&Me[Me.length-1]===a){var r="deltaY"in n?Re(n):Ce(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var c=(i.current.shards||[]).map(De).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=c.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:Oe(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=Ce(e),r.current=void 0},[]),p=c.useCallback(function(t){l(t.type,Re(t),t.target,s(t,e.lockRef.current))},[]),m=c.useCallback(function(t){l(t.type,Ce(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return Me.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,be),document.addEventListener("touchmove",u,be),document.addEventListener("touchstart",d,be),function(){Me=Me.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,be),document.removeEventListener("touchmove",u,be),document.removeEventListener("touchstart",d,be)}},[]);var v=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:Se(o)}):null,v?c.createElement(he,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},re.useMedium(Te),ne);var Te,Le=c.forwardRef(function(e,t){return c.createElement(ae,l({},e,{ref:t,sideCar:Pe}))});Le.classNames=ae.classNames;var _e=new WeakMap,ke=new WeakMap,Ae={},je=0,Ie=function(e){return e&&(e.host||Ie(e.parentNode))},Fe=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ie(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return!!e})}(t,Array.isArray(e)?e:[e]);Ae[n]||(Ae[n]=new WeakMap);var a=Ae[n],c=[],i=new Set,s=new Set(o),u=function(e){!e||i.has(e)||(i.add(e),u(e.parentNode))};o.forEach(u);var l=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(i.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(_e.get(e)||0)+1,u=(a.get(e)||0)+1;_e.set(e,s),a.set(e,u),c.push(e),1===s&&o&&ke.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return l(t),i.clear(),je++,function(){c.forEach(function(e){var t=_e.get(e)-1,o=a.get(e)-1;_e.set(e,t),a.set(e,o),t||(ke.has(e)||e.removeAttribute(r),ke.delete(e)),o||e.removeAttribute(n)}),--je||(_e=new WeakMap,_e=new WeakMap,ke=new WeakMap,Ae={})}},We=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Fe(r,o,n,"aria-hidden")):function(){return null}},$e="Dialog",[Be]=m($e),[Ue,ze]=Be($e),Ke=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=t,u=c.useRef(null),l=c.useRef(null),[d,f]=w({prop:o,defaultProp:a??!1,onChange:i,caller:$e});return e.jsx(Ue,{scope:n,triggerRef:u,contentRef:l,contentId:b(),titleId:b(),descriptionId:b(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(e=>!e),[f]),modal:s,children:r})};Ke.displayName=$e;var Xe="DialogTrigger",Ye=c.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,c=ze(Xe,o),i=n(r,c.triggerRef);return e.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":pt(c.open),...a,ref:i,onClick:p(t.onClick,c.onOpenToggle)})});Ye.displayName=Xe;var He="DialogPortal",[Ze,Ve]=Be(He,{forceMount:void 0}),Ge=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=t,i=ze(He,n);return e.jsx(Ze,{scope:n,forceMount:r,children:c.Children.map(o,t=>e.jsx(z,{present:r||i.open,children:e.jsx(U,{asChild:!0,container:a,children:t})}))})};Ge.displayName=He;var Je="DialogOverlay",Qe=c.forwardRef((t,n)=>{const r=Ve(Je,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,c=ze(Je,t.__scopeDialog);return c.modal?e.jsx(z,{present:o||c.open,children:e.jsx(tt,{...a,ref:n})}):null});Qe.displayName=Je;var et=t("DialogOverlay.RemoveScroll"),tt=c.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=ze(Je,r);return e.jsx(Le,{as:et,allowPinchZoom:!0,shards:[a.contentRef],children:e.jsx(N.div,{"data-state":pt(a.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),nt="DialogContent",rt=c.forwardRef((t,n)=>{const r=Ve(nt,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,c=ze(nt,t.__scopeDialog);return e.jsx(z,{present:o||c.open,children:c.modal?e.jsx(ot,{...a,ref:n}):e.jsx(at,{...a,ref:n})})});rt.displayName=nt;var ot=c.forwardRef((t,r)=>{const o=ze(nt,t.__scopeDialog),a=c.useRef(null),i=n(r,o.contentRef,a);return c.useEffect(()=>{const e=a.current;if(e)return We(e)},[]),e.jsx(ct,{...t,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:p(t.onCloseAutoFocus,e=>{e.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:p(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:p(t.onFocusOutside,e=>e.preventDefault())})}),at=c.forwardRef((t,n)=>{const r=ze(nt,t.__scopeDialog),o=c.useRef(!1),a=c.useRef(!1);return e.jsx(ct,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target;r.triggerRef.current?.contains(n)&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),ct=c.forwardRef((t,r)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...u}=t,l=ze(nt,o),d=c.useRef(null),f=n(r,d);return Y(),e.jsxs(e.Fragment,{children:[e.jsx(A,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:e.jsx(M,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":pt(l.open),...u,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),e.jsxs(e.Fragment,{children:[e.jsx(gt,{titleId:l.titleId}),e.jsx(yt,{contentRef:d,descriptionId:l.descriptionId})]})]})}),it="DialogTitle",st=c.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=ze(it,r);return e.jsx(N.h2,{id:a.titleId,...o,ref:n})});st.displayName=it;var ut="DialogDescription",lt=c.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=ze(ut,r);return e.jsx(N.p,{id:a.descriptionId,...o,ref:n})});lt.displayName=ut;var dt="DialogClose",ft=c.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=ze(dt,r);return e.jsx(N.button,{type:"button",...o,ref:n,onClick:p(t.onClick,()=>a.onOpenChange(!1))})});function pt(e){return e?"open":"closed"}ft.displayName=dt;var mt="DialogTitleWarning",[vt,ht]=function(t,n){const r=c.createContext(n),o=t=>{const{children:n,...o}=t,a=c.useMemo(()=>o,Object.values(o));return e.jsx(r.Provider,{value:a,children:n})};return o.displayName=t+"Provider",[o,function(e){const o=c.useContext(r);if(o)return o;if(void 0!==n)return n;throw new Error(`\`${e}\` must be used within \`${t}\``)}]}(mt,{contentName:nt,titleName:it,docsSlug:"dialog"}),gt=({titleId:e})=>{const t=ht(mt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},yt=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ht("DialogDescriptionWarning").contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},bt=Qe,Et=rt,wt=st,Nt=lt,xt=ft;const Ct=Ke,Rt=Ge,Dt=c.forwardRef(({className:t,...n},r)=>e.jsx(bt,{ref:r,className:a("data-[state=open]:qc:animate-in data-[state=closed]:qc:animate-out data-[state=closed]:qc:fade-out-0 data-[state=open]:qc:fade-in-0 qc:fixed qc:inset-0 qc:z-2001 qc:backdrop-blur-md",t),...n})),St=c.forwardRef(({className:t,children:n,...c},i)=>{const{organization:s,props:{fontClassName:u,textClassName:l}}=r();return e.jsxs(Rt,{children:[e.jsx(Dt,{}),e.jsxs(Et,{ref:i,className:a("qc:bg-background qc:shadow-outer qc:border-border qc:max-w-screen data-[state=open]:qc:animate-in data-[state=closed]:qc:animate-out data-[state=closed]:qc:fade-out-0 data-[state=open]:qc:fade-in-0 data-[state=closed]:qc:zoom-out-95 data-[state=open]:qc:zoom-in-95 data-[state=closed]:qc:slide-out-to-left-1/2 data-[state=closed]:qc:slide-out-to-top-[48%] data-[state=open]:qc:slide-in-from-left-1/2 data-[state=open]:qc:slide-in-from-top-[48%] qc:fixed qc:left-[50%] qc:top-[50%] qc:z-2002 qc:w-auto qc:translate-x-[-50%] qc:translate-y-[-50%] qc:rounded qc:duration-300 qc:sm:rounded",u,l,t),style:o(s),...c,children:[n,e.jsx(xt,{className:"qc:ring-offset-background focus:qc:ring-ring data-[state=open]:qc:text-foreground qc:hover:opacity-100 qc:focus:outline-none qc:disabled:pointer-events-none qc:focus:qc:ring-2 qc:focus:qc:ring-offset-2 qc:absolute qc:right-3 qc:top-3 qc:rounded qc:opacity-70 qc:transition-opacity",children:e.jsx("span",{className:"qc:sr-only",children:"Close"})})]})]})}),qt=({className:t,...n})=>e.jsx("div",{className:a("qc:flex qc:flex-col qc:space-y-1 qc:p-3 qc:text-center qc:sm:text-left",t),...n}),Mt=c.forwardRef(({className:t,...n},r)=>e.jsx(wt,{ref:r,className:a("qc:text-foreground qc:text-center qc:text-lg qc:font-semibold",t),...n})),Ot=c.forwardRef(({className:t,...n},r)=>e.jsx(Nt,{ref:r,className:a("qc:text-muted qc:text-center qc:text-sm",t),...n}));export{Ct as D,A as F,N as P,Le as R,St as a,qt as b,Mt as c,Ot as d,m as e,x as f,z as g,U as h,We as i,p as j,Y as k,M as l,w as m,b as n,h as u};
1
+ import{j as e,M as t,L as n,u as r,O as o,c as a}from"./DR9E1aMG.js";import*as c from"react";import{useState as i}from"react";import*as s from"react-dom";import u from"react-dom";import{a as l,b as d,c as f}from"./D6nr9_KD.js";function p(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function m(t,n=[]){let r=[];const o=()=>{const e=r.map(e=>c.createContext(e));return function(n){const r=n?.[t]||e;return c.useMemo(()=>({[`__scope${t}`]:{...n,[t]:r}}),[n,r])}};return o.scopeName=t,[function(n,o){const a=c.createContext(o),i=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,u=r?.[t]?.[i]||a,l=c.useMemo(()=>s,Object.values(s));return e.jsx(u.Provider,{value:l,children:o})};return s.displayName=n+"Provider",[s,function(e,r){const s=r?.[t]?.[i]||a,u=c.useContext(s);if(u)return u;if(void 0!==o)return o;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},v(o,...n)]}function v(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var h=globalThis?.document?c.useLayoutEffect:()=>{},g=c[" useId ".trim().toString()]||(()=>{}),y=0;function b(e){const[t,n]=c.useState(g());return h(()=>{n(e=>e??String(y++))},[e]),e||(t?`radix-${t}`:"")}var E=c[" useInsertionEffect ".trim().toString()]||h;function w({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=function({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),a=c.useRef(t);return E(()=>{a.current=t},[t]),c.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,u=s?e:o;{const t=c.useRef(void 0!==e);c.useEffect(()=>{const e=t.current;e!==s&&console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[u,c.useCallback(t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&i.current?.(n)}else a(t)},[s,e,a,i])]}var N=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((n,r)=>{const o=t(`Primitive.${r}`),a=c.forwardRef((t,n)=>{const{asChild:a,...c}=t,i=a?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(i,{...c,ref:n})});return a.displayName=`Primitive.${r}`,{...n,[r]:a}},{});function x(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...e)=>t.current?.(...e),[])}var C,R="dismissableLayer.update",D="dismissableLayer.pointerDownOutside",S="dismissableLayer.focusOutside",q=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),M=c.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:u,onDismiss:l,...d}=t,f=c.useContext(q),[m,v]=c.useState(null),h=m?.ownerDocument??globalThis?.document,[,g]=c.useState({}),y=n(r,e=>v(e)),b=Array.from(f.layers),[E]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(E),M=m?b.indexOf(m):-1,O=f.layersWithOutsidePointerEventsDisabled.size>0,L=M>=w,_=function(e,t=globalThis?.document){const n=x(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){T(D,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...f.branches].some(e=>e.contains(t));!L||n||(i?.(e),u?.(e),e.defaultPrevented||l?.())},h),k=function(e,t=globalThis?.document){const n=x(e),r=c.useRef(!1);return c.useEffect(()=>{const e=e=>{e.target&&!r.current&&T(S,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...f.branches].some(e=>e.contains(t))||(s?.(e),u?.(e),e.defaultPrevented||l?.())},h);return function(e,t=globalThis?.document){const n=x(e);c.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{M===f.layers.size-1&&(a?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},h),c.useEffect(()=>{if(m)return o&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(C=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),P(),()=>{o&&1===f.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=C)}},[m,h,o,f]),c.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),P())},[m,f]),c.useEffect(()=>{const e=()=>g({});return document.addEventListener(R,e),()=>document.removeEventListener(R,e)},[]),e.jsx(N.div,{...d,ref:y,style:{pointerEvents:O?L?"auto":"none":void 0,...t.style},onFocusCapture:p(t.onFocusCapture,k.onFocusCapture),onBlurCapture:p(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:p(t.onPointerDownCapture,_.onPointerDownCapture)})});M.displayName="DismissableLayer";var O=c.forwardRef((t,r)=>{const o=c.useContext(q),a=c.useRef(null),i=n(r,a);return c.useEffect(()=>{const e=a.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),e.jsx(N.div,{...t,ref:i})});function P(){const e=new CustomEvent(R);document.dispatchEvent(e)}function T(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}O.displayName="DismissableLayerBranch";var L="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",k={bubbles:!1,cancelable:!0},A=c.forwardRef((t,r)=>{const{loop:o=!1,trapped:a=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...u}=t,[l,d]=c.useState(null),f=x(i),p=x(s),m=c.useRef(null),v=n(r,e=>d(e)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(a){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?m.current=t:W(m.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||W(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&W(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[a,l,h.paused]),c.useEffect(()=>{if(l){$.add(h);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(L,k);l.addEventListener(L,f),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(W(r,{select:t}),document.activeElement!==n)return}(function(e){return e.filter(e=>"A"!==e.tagName)}(j(l)),{select:!0}),document.activeElement===e&&W(l))}return()=>{l.removeEventListener(L,f),setTimeout(()=>{const t=new CustomEvent(_,k);l.addEventListener(_,p),l.dispatchEvent(t),t.defaultPrevented||W(e??document.body,{select:!0}),l.removeEventListener(_,p),$.remove(h)},0)}}},[l,f,p,h]);const g=c.useCallback(e=>{if(!o&&!a||h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,a]=function(e){const t=j(e),n=I(t,e),r=I(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||n!==a?e.shiftKey&&n===r&&(e.preventDefault(),o&&W(a,{select:!0})):(e.preventDefault(),o&&W(r,{select:!0})):n===t&&e.preventDefault()}},[o,a,h.paused]);return e.jsx(N.div,{tabIndex:-1,...u,ref:v,onKeyDown:g})});function j(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function I(e,t){for(const n of e)if(!F(n,{upTo:t}))return n}function F(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function W(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}A.displayName="FocusScope";var $=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=B(e,t),e.unshift(t)},remove(t){e=B(e,t),e[0]?.resume()}}}();function B(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var U=c.forwardRef((t,n)=>{const{container:r,...o}=t,[a,i]=c.useState(!1);h(()=>i(!0),[]);const s=r||a&&globalThis?.document?.body;return s?u.createPortal(e.jsx(N.div,{...o,ref:n}),s):null});U.displayName="Portal";var z=e=>{const{present:t,children:r}=e,o=function(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),a=c.useRef("none"),i=e?"mounted":"unmounted",[s,u]=function(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const e=K(r.current);a.current="mounted"===s?e:"none"},[s]),h(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,c=K(t);u(e?"MOUNT":"none"===c||"none"===t?.display?"UNMOUNT":n&&r!==c?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),h(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,c=a=>{const c=K(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&c&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},i=e=>{e.target===t&&(a.current=K(r.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),a="function"==typeof r?r({present:o.isPresent}):c.Children.only(r),i=n(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(a));return"function"==typeof r||o.isPresent?c.cloneElement(a,{ref:i}):null};function K(e){return e?.animationName||"none"}z.displayName="Presence";var X=0;function Y(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??H()),document.body.insertAdjacentElement("beforeend",e[1]??H()),X++,()=>{1===X&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),X--}},[])}function H(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Z="right-scroll-bar-position",V="width-before-scroll-bar";function G(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var J=typeof window<"u"?c.useLayoutEffect:c.useEffect,Q=new WeakMap;function ee(e,t){var n=function(e,t){var n=i(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}(null,function(t){return e.forEach(function(e){return G(e,t)})});return J(function(){var t=Q.get(n);if(t){var r=new Set(t),o=new Set(e),a=n.current;r.forEach(function(e){o.has(e)||G(e,null)}),o.forEach(function(e){r.has(e)||G(e,a)})}Q.set(n,e)},[e]),n}function te(e){return e}var ne=function(e){var t=e.sideCar,n=d(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,l({},n))};ne.isSideCarExport=!0;var re=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=te);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=l({async:!0,ssr:!1},e),t}(),oe=function(){},ae=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:oe,onWheelCapture:oe,onTouchMoveCapture:oe}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,u=e.className,f=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,h=e.noRelative,g=e.noIsolation,y=e.inert,b=e.allowPinchZoom,E=e.as,w=void 0===E?"div":E,N=e.gapMode,x=d(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,R=ee([n,t]),D=l(l({},x),o);return c.createElement(c.Fragment,null,p&&c.createElement(C,{sideCar:re,removeScrollBar:f,shards:m,noRelative:h,noIsolation:g,inert:y,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:N}),i?c.cloneElement(c.Children.only(s),l(l({},D),{ref:R})):c.createElement(w,l({},D,{className:u,ref:R}),s))});ae.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ae.classNames={fullWidth:V,zeroRight:Z};function ce(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var ie=function(){var e=0,t=null;return{add:function(n){0==e&&(t=ce())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},se=function(){var e=function(){var e=ie();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}}();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ue={left:0,top:0,right:0,gap:0},le=function(e){return parseInt(e||"",10)||0},de=function(e){if(void 0===e&&(e="margin"),typeof window>"u")return ue;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[le(n),le(r),le(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fe=se(),pe="data-scroll-locked",me=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body[").concat(pe,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Z," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(V," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(Z," .").concat(Z," {\n right: 0 ").concat(r,";\n }\n \n .").concat(V," .").concat(V," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(pe,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},ve=function(){var e=parseInt(document.body.getAttribute(pe)||"0",10);return isFinite(e)?e:0},he=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;c.useEffect(function(){return document.body.setAttribute(pe,(ve()+1).toString()),function(){var e=ve()-1;e<=0?document.body.removeAttribute(pe):document.body.setAttribute(pe,e.toString())}},[]);var a=c.useMemo(function(){return de(o)},[o]);return c.createElement(fe,{styles:me(a,!t,o,n?"":"!important")})},ge=!1;if(typeof window<"u")try{var ye=Object.defineProperty({},"passive",{get:function(){return ge=!0,!0}});window.addEventListener("test",ye,ye),window.removeEventListener("test",ye,ye)}catch{ge=!1}var be=!!ge&&{passive:!1},Ee=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},we=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),Ne(e,r)){var o=xe(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ne=function(e,t){return"v"===e?function(e){return Ee(e,"overflowY")}(t):function(e){return Ee(e,"overflowX")}(t)},xe=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},Ce=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Re=function(e){return[e.deltaX,e.deltaY]},De=function(e){return e&&"current"in e?e.current:e},Se=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},qe=0,Me=[];function Oe(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Pe=(Te=function(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(qe++)[0],a=c.useState(se)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=f([e.lockRef.current],(e.shards||[]).map(De),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Ce(e),c=n.current,s="deltaX"in e?e.deltaX:c[0]-a[0],u="deltaY"in e?e.deltaY:c[1]-a[1],l=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=we(d,l);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=we(d,l)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,c=n.target,i=t.contains(c),s=!1,u=a>0,l=0,d=0;do{if(!c)break;var f=xe(e,c),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Ne(e,c)&&(l+=m,d+=p);var v=c.parentNode;c=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!i&&c!==document.body||i&&(t.contains(c)||t===c));return(u&&Math.abs(l)<1||!u&&Math.abs(d)<1)&&(s=!0),s}(p,t,e,"h"===p?s:u)},[]),u=c.useCallback(function(e){var n=e;if(Me.length&&Me[Me.length-1]===a){var r="deltaY"in n?Re(n):Ce(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var c=(i.current.shards||[]).map(De).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=c.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:Oe(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=Ce(e),r.current=void 0},[]),p=c.useCallback(function(t){l(t.type,Re(t),t.target,s(t,e.lockRef.current))},[]),m=c.useCallback(function(t){l(t.type,Ce(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return Me.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,be),document.addEventListener("touchmove",u,be),document.addEventListener("touchstart",d,be),function(){Me=Me.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,be),document.removeEventListener("touchmove",u,be),document.removeEventListener("touchstart",d,be)}},[]);var v=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:Se(o)}):null,v?c.createElement(he,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},re.useMedium(Te),ne);var Te,Le=c.forwardRef(function(e,t){return c.createElement(ae,l({},e,{ref:t,sideCar:Pe}))});Le.classNames=ae.classNames;var _e=new WeakMap,ke=new WeakMap,Ae={},je=0,Ie=function(e){return e&&(e.host||Ie(e.parentNode))},Fe=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ie(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return!!e})}(t,Array.isArray(e)?e:[e]);Ae[n]||(Ae[n]=new WeakMap);var a=Ae[n],c=[],i=new Set,s=new Set(o),u=function(e){!e||i.has(e)||(i.add(e),u(e.parentNode))};o.forEach(u);var l=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(i.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(_e.get(e)||0)+1,u=(a.get(e)||0)+1;_e.set(e,s),a.set(e,u),c.push(e),1===s&&o&&ke.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return l(t),i.clear(),je++,function(){c.forEach(function(e){var t=_e.get(e)-1,o=a.get(e)-1;_e.set(e,t),a.set(e,o),t||(ke.has(e)||e.removeAttribute(r),ke.delete(e)),o||e.removeAttribute(n)}),--je||(_e=new WeakMap,_e=new WeakMap,ke=new WeakMap,Ae={})}},We=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Fe(r,o,n,"aria-hidden")):function(){return null}},$e="Dialog",[Be]=m($e),[Ue,ze]=Be($e),Ke=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=t,u=c.useRef(null),l=c.useRef(null),[d,f]=w({prop:o,defaultProp:a??!1,onChange:i,caller:$e});return e.jsx(Ue,{scope:n,triggerRef:u,contentRef:l,contentId:b(),titleId:b(),descriptionId:b(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(e=>!e),[f]),modal:s,children:r})};Ke.displayName=$e;var Xe="DialogTrigger",Ye=c.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,c=ze(Xe,o),i=n(r,c.triggerRef);return e.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":pt(c.open),...a,ref:i,onClick:p(t.onClick,c.onOpenToggle)})});Ye.displayName=Xe;var He="DialogPortal",[Ze,Ve]=Be(He,{forceMount:void 0}),Ge=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=t,i=ze(He,n);return e.jsx(Ze,{scope:n,forceMount:r,children:c.Children.map(o,t=>e.jsx(z,{present:r||i.open,children:e.jsx(U,{asChild:!0,container:a,children:t})}))})};Ge.displayName=He;var Je="DialogOverlay",Qe=c.forwardRef((t,n)=>{const r=Ve(Je,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,c=ze(Je,t.__scopeDialog);return c.modal?e.jsx(z,{present:o||c.open,children:e.jsx(tt,{...a,ref:n})}):null});Qe.displayName=Je;var et=t("DialogOverlay.RemoveScroll"),tt=c.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=ze(Je,r);return e.jsx(Le,{as:et,allowPinchZoom:!0,shards:[a.contentRef],children:e.jsx(N.div,{"data-state":pt(a.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),nt="DialogContent",rt=c.forwardRef((t,n)=>{const r=Ve(nt,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,c=ze(nt,t.__scopeDialog);return e.jsx(z,{present:o||c.open,children:c.modal?e.jsx(ot,{...a,ref:n}):e.jsx(at,{...a,ref:n})})});rt.displayName=nt;var ot=c.forwardRef((t,r)=>{const o=ze(nt,t.__scopeDialog),a=c.useRef(null),i=n(r,o.contentRef,a);return c.useEffect(()=>{const e=a.current;if(e)return We(e)},[]),e.jsx(ct,{...t,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:p(t.onCloseAutoFocus,e=>{e.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:p(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:p(t.onFocusOutside,e=>e.preventDefault())})}),at=c.forwardRef((t,n)=>{const r=ze(nt,t.__scopeDialog),o=c.useRef(!1),a=c.useRef(!1);return e.jsx(ct,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target;r.triggerRef.current?.contains(n)&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),ct=c.forwardRef((t,r)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...u}=t,l=ze(nt,o),d=c.useRef(null),f=n(r,d);return Y(),e.jsxs(e.Fragment,{children:[e.jsx(A,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:e.jsx(M,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":pt(l.open),...u,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),e.jsxs(e.Fragment,{children:[e.jsx(gt,{titleId:l.titleId}),e.jsx(yt,{contentRef:d,descriptionId:l.descriptionId})]})]})}),it="DialogTitle",st=c.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=ze(it,r);return e.jsx(N.h2,{id:a.titleId,...o,ref:n})});st.displayName=it;var ut="DialogDescription",lt=c.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=ze(ut,r);return e.jsx(N.p,{id:a.descriptionId,...o,ref:n})});lt.displayName=ut;var dt="DialogClose",ft=c.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=ze(dt,r);return e.jsx(N.button,{type:"button",...o,ref:n,onClick:p(t.onClick,()=>a.onOpenChange(!1))})});function pt(e){return e?"open":"closed"}ft.displayName=dt;var mt="DialogTitleWarning",[vt,ht]=function(t,n){const r=c.createContext(n),o=t=>{const{children:n,...o}=t,a=c.useMemo(()=>o,Object.values(o));return e.jsx(r.Provider,{value:a,children:n})};return o.displayName=t+"Provider",[o,function(e){const o=c.useContext(r);if(o)return o;if(void 0!==n)return n;throw new Error(`\`${e}\` must be used within \`${t}\``)}]}(mt,{contentName:nt,titleName:it,docsSlug:"dialog"}),gt=({titleId:e})=>{const t=ht(mt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},yt=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ht("DialogDescriptionWarning").contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},bt=Qe,Et=rt,wt=st,Nt=lt,xt=ft;const Ct=Ke,Rt=Ge,Dt=c.forwardRef(({className:t,...n},r)=>e.jsx(bt,{ref:r,className:a("data-[state=open]:qc:animate-in data-[state=closed]:qc:animate-out data-[state=closed]:qc:fade-out-0 data-[state=open]:qc:fade-in-0 qc:fixed qc:inset-0 qc:z-2001 qc:backdrop-blur-md",t),...n})),St=c.forwardRef(({className:t,children:n,...c},i)=>{const{organization:s,props:{fontClassName:u,textClassName:l}}=r();return e.jsxs(Rt,{children:[e.jsx(Dt,{}),e.jsxs(Et,{ref:i,className:a("qc:bg-background qc:shadow-outer qc:border-border qc:max-w-screen data-[state=open]:qc:animate-in data-[state=closed]:qc:animate-out data-[state=closed]:qc:fade-out-0 data-[state=open]:qc:fade-in-0 data-[state=closed]:qc:zoom-out-95 data-[state=open]:qc:zoom-in-95 data-[state=closed]:qc:slide-out-to-left-1/2 data-[state=closed]:qc:slide-out-to-top-[48%] data-[state=open]:qc:slide-in-from-left-1/2 data-[state=open]:qc:slide-in-from-top-[48%] qc:fixed qc:left-[50%] qc:top-[50%] qc:z-2002 qc:w-auto qc:translate-x-[-50%] qc:translate-y-[-50%] qc:rounded qc:duration-300 qc:sm:rounded",u,l,t),style:o(s),...c,children:[n,e.jsx(xt,{className:"qc:ring-offset-background focus:qc:ring-ring data-[state=open]:qc:text-foreground qc:hover:opacity-100 qc:focus:outline-none qc:disabled:pointer-events-none qc:focus:qc:ring-2 qc:focus:qc:ring-offset-2 qc:absolute qc:right-3 qc:top-3 qc:rounded qc:opacity-70 qc:transition-opacity",children:e.jsx("span",{className:"qc:sr-only",children:"Close"})})]})]})}),qt=({className:t,...n})=>e.jsx("div",{className:a("qc:flex qc:flex-col qc:space-y-1 qc:p-3 qc:text-center qc:sm:text-left",t),...n}),Mt=c.forwardRef(({className:t,...n},r)=>e.jsx(wt,{ref:r,className:a("qc:text-foreground qc:text-center qc:text-lg qc:font-semibold",t),...n})),Ot=c.forwardRef(({className:t,...n},r)=>e.jsx(Nt,{ref:r,className:a("qc:text-muted qc:text-center qc:text-sm",t),...n}));export{Ct as D,A as F,N as P,Le as R,St as a,qt as b,Mt as c,Ot as d,m as e,x as f,z as g,U as h,We as i,p as j,Y as k,M as l,w as m,b as n,h as u};
@@ -1 +1 @@
1
- import{u as a,j as s,E as r,c as t,T as l,I as e,A as c,a as n,b as i,d as f,N as o,P as d,e as m,S as h,f as x,g as j,h as q,F as p,k as g,i as u}from"./B9gK2pCi.js";import{useMemo as v,Fragment as b}from"react";import{F as z,g as y}from"./BAE8xft-.js";import{L as w}from"./C4kVnfZ8.js";import{u as N,T as L}from"./BmCY907J.js";const A=a=>a===r.UPCOMING?"qc:bg-warning":a===r.CLOSED?"qc:bg-destructive":"qc:bg-success",I=({event:e})=>{const{organization:c}=a(),n=e?.coverImageUrl?e?.coverImageUrl:e?.contents?.length>0?e.contents[0].thumbnailUrl||e.contents[0].url:void 0;return s.jsxs("div",{className:"qc:space-y-4",children:[s.jsxs("div",{className:"qc:relative qc:h-72 qc:overflow-hidden qc:rounded qc:sm:h-80",children:[n?s.jsx(w,{wrapperClassName:"qc:size-full sm:hover:qc:scale-105 qc:sm:transition-transform",src:e?.coverImageUrl?e?.coverImageUrl:e?.contents?.length>0?e.contents[0].thumbnailUrl||e.contents[0].url:`https://placehold.co/600x400/${c?.color?.slice(1)}/white`,blurhash:e?.coverBlurHash?e?.coverBlurHash:e?.contents?.length>0?e.contents[0].blurHash:void 0}):s.jsx("div",{className:"qc:bg-primary qc:flex qc:size-full qc:items-center qc:justify-center",children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-primary-foreground qc:size-16",viewBox:"0 0 24 24",children:s.jsx("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zm0 0V5zm2-2h10q.3 0 .45-.275t-.05-.525l-2.75-3.675q-.15-.2-.4-.2t-.4.2L11.25 16L9.4 13.525q-.15-.2-.4-.2t-.4.2l-2 2.675q-.2.25-.05.525T7 17"})})}),!c?.integrationSettings?.hideEventStatus&&e?.status!==r.CLOSED&&s.jsx("span",{className:t("qc:absolute qc:right-4 qc:top-4 qc:inline-flex qc:items-center qc:rounded-full qc:px-3 qc:py-2",A(e.status)),children:s.jsx(l,{variant:"h6",color:"white",children:e.status})})]}),s.jsx(l,{variant:"h4",immutable:!0,lines:"2",children:e.name})]})},E=({folder:a})=>s.jsxs("div",{className:"qc:shadow-outer qc:border-border qc:flex qc:items-center qc:gap-4 qc:rounded qc:border qc:bg-background-primary-dark qc:bg-opacity-5 qc:p-2 hover:qc:bg-opacity-10",children:[s.jsx(e,{name:"material-symbols:folder-rounded",style:{color:a.color}}),s.jsx(l,{variant:"h5",children:a.name})]}),S=({organization:a})=>{const{role:r,isSuper:t}=N(),l=v(()=>{const s=[];return(t||r&&(r===c.OWNER||r===c.ADMIN))&&(s.push({label:"Analytics",icon:"material-symbols:analytics-outline-rounded",href:n.ORGANIZATION_DASHBOARD(a?._id)}),s.push({label:"Admins",icon:"material-symbols:supervised-user-circle-outline",href:n.ORGANIZATION_ADMINS(a?._id)}),s.push({label:"Settings",icon:"material-symbols:settings-outline-rounded",href:n.ORGANIZATION_SETTINGS(a?._id)})),s},[r,t]);return s.jsx("div",{className:"qc:text-muted qc:sm:text-foreground qc:flex qc:flex-row qc:items-center qc:justify-end qc:gap-8 qc:pr-4",children:l.map(a=>s.jsx(L,{content:a?.label,children:s.jsx("a",{target:"_blank",href:a.href,children:s.jsx(e,{name:a.icon,size:"lg"})})},a.label))})},T=()=>{const{folderId:r=""}=i(),t=f(),{folders:l,organization:e,props:{organizationId:c}}=a();if(!t?.state?.internalNavigation)try{const a=new URLSearchParams(window?.location?.search);let r=a.get("event"),t=a.get("page");if(!r&&!t&&window?.location?.hash){const a=window.location.hash.split("?");if(a.length>1){const s=new URLSearchParams(a[1]);r=s.get("event"),t=s.get("page")}}if(r){if(t)switch(t.toLowerCase()){case"upload":return s.jsx(o,{to:d.UPLOAD(r)});case"curate":return s.jsx(o,{to:d.CURATE(r)});case"leaderboard":return s.jsx(o,{to:d.LEADERBOARD(r)});default:return s.jsx(o,{to:d.GALLERY(r)})}return s.jsx(o,{to:d.GALLERY(r)})}}catch(a){console.error("Error parsing URL parameters:",a)}const n=l?.filter(a=>a.parentFolderId===(r?.length>0?r:null)||a.parentFolderId===(r?.length>0?r:void 0)),{isLoading:v,data:w}=m({queryKey:[`public-events-${c}`,r],queryFn:async()=>(await g.get(u.PUBLIC_EVENTS,{headers:{"x-org-id":c},searchParams:{folderId:r,sort:"-createdAt"}}).json()).data});return v?s.jsx("div",{className:"qc:grid qc:grid-cols-1 qc:gap-4 qc:sm:grid-cols-3",children:Array.from({length:3}).map((a,r)=>s.jsxs("div",{className:"qc:space-y-4",children:[s.jsx(h,{className:"qc:h-72 qc:overflow-hidden qc:rounded qc:sm:h-80"}),s.jsx(h,{className:"qc:h-6 qc:w-64 qc:rounded"})]},r))}):s.jsxs(b,{children:[e?.navigationSettings?.enableNavbar&&s.jsx(x,{}),s.jsxs("div",{className:"qc:min-h-screen qc:w-full",children:[s.jsx(S,{organization:e}),r&&s.jsx("div",{className:"qc:mt-4 qc:lg:mt-8",children:s.jsx(z,{homeLink:d.PUBLIC_EVENTS,data:y(l,r)})}),n?.length>0&&s.jsx("div",{className:"qc:my-4 qc:grid qc:grid-cols-2 qc:gap-3 qc:md:grid-cols-2 qc:lg:my-8 qc:lg:grid-cols-4 qc:lg:gap-6",children:n?.map(a=>s.jsx(j,{to:d.FOLDER_EVENTS(a?._id),children:s.jsx(E,{folder:a},a._id)},a?._id))}),w?.length<=0&&s.jsx("div",{className:"min-h-[80vh]",children:s.jsx(q,{title:l?.length>0?"Empty folder":"No events",description:l?.length>0?"Browse other folders for events":"Check back later for our awesome events!",className:"qc:mt-24 qc:md:mt-36",iconSvg:s.jsxs("svg",{"data-name":"Layer 1",className:"qc:size-full",viewBox:"0 0 858.76 581.93",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.6 738.67a198.59 198.59 0 0 1 16.436-62.675q3.7094-8.2865 8.1655-16.208a1.2103 1.2103 0 0 0-2.0886-1.2208 201.33 201.33 0 0 0-22.403 61.805q-1.682 9.0855-2.5283 18.299c-0.14337 1.5493 2.2763 1.5396 2.4188 0z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"842.44",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m984.17 739.08a128.83 128.83 0 0 1 10.662-40.66q2.4064-5.3758 5.2973-10.515a0.78518 0.78518 0 0 0-1.355-0.792 130.61 130.61 0 0 0-14.534 40.096q-1.0912 5.8942-1.6402 11.872c-0.093 1.0051 1.4768 0.99878 1.5692 0z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"833.31",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.19 738.14a128.83 128.83 0 0 1-16.601-38.618q-1.409-5.7188-2.2905-11.549a0.78518 0.78518 0 0 0-1.5555 0.2089 130.61 130.61 0 0 0 13.202 40.554q2.7649 5.3186 6.0085 10.369c0.54487 0.84972 1.7787-0.12078 1.2373-0.96515z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"791.11",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.05 738.67a198.59 198.59 0 0 0-16.436-62.675q-3.7094-8.2865-8.1655-16.208a1.2103 1.2103 0 0 1 2.0886-1.2208 201.33 201.33 0 0 1 22.403 61.805q1.682 9.0855 2.5283 18.299c0.14338 1.5493-2.2763 1.5396-2.4188 0z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"139.97",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m339.48 739.08a128.83 128.83 0 0 0-10.662-40.66q-2.4064-5.3758-5.2973-10.515a0.78518 0.78518 0 0 1 1.355-0.792 130.61 130.61 0 0 1 14.534 40.096q1.0912 5.8942 1.6402 11.872c0.093 1.0051-1.4768 0.99878-1.5692 0z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"149.1",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.46 738.14a128.83 128.83 0 0 0 16.601-38.618q1.409-5.7188 2.2905-11.549a0.78518 0.78518 0 0 1 1.5555 0.2089 130.61 130.61 0 0 1-13.202 40.554q-2.7649 5.3186-6.0084 10.369c-0.54487 0.84972-1.7787-0.12078-1.2373-0.96515z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"191.3",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m925.02 538.41 0.2391 180.11a12.626 12.626 0 0 1-12.593 12.63l-74.817 0.10967c21.062-39.4 32.987-101.41 32.917-149.22a281.27 281.27 0 0 0-5.721-56.161l47.345-0.0694a12.626 12.626 0 0 1 12.63 12.593z",fill:"currentColor"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m1028.2 740.97h-738.29a1.1907 1.1907 0 0 1 0-2.3814h738.29a1.1907 1.1907 0 0 1 0 2.3814z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m815.39 513.79-133.34-0.52295 12.966-43.137a16.599 16.599 0 0 1 15.804-11.75h0.06274l76.106 0.29883a16.597 16.597 0 0 1 15.774 11.875z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m889.83 499.03a14 14 0 0 0-14 14h28a14 14 0 0 0-14-14z",fill:"currentColor"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m932.83 740.03h-368a17.019 17.019 0 0 1-17-17v-194a17.019 17.019 0 0 1 17-17h368a17.019 17.019 0 0 1 17 17v194a17.019 17.019 0 0 1-17 17zm-368-226a15.017 15.017 0 0 0-15 15v194a15.017 15.017 0 0 0 15 15h368a15.017 15.017 0 0 0 15-15v-194a15.017 15.017 0 0 0-15-15z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m764.83 497.53h-32a8.5 8.5 0 0 1 0-17h32a8.5 8.5 0 0 1 0 17z",fill:"#fff"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 702.03a76 76 0 1 1 76-76 76.086 76.086 0 0 1-76 76zm0-150a74 74 0 1 0 74 74 74.084 74.084 0 0 0-74-74z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 676.03a50 50 0 1 1 50-50 50.056 50.056 0 0 1-50 50zm0-98a48 48 0 1 0 48 48 48.054 48.054 0 0 0-48-48z",fill:"#3f3d56"}),s.jsx("circle",{cx:"578.2",cy:"467",r:"38",fill:"#ccc"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m725.83 626.03a25.001 25.001 0 0 1 21.5-24.751 25 25 0 1 0 0 49.502 25.001 25.001 0 0 1-21.5-24.751z",fill:"#fff"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m914.83 514.03h-50v-1a25 25 0 0 1 50 0zm-47.979-2h45.957a23 23 0 0 0-45.957 0z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m572.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),s.jsx("circle",{cx:"402.2",cy:"373",r:"5",fill:"currentColor"}),s.jsx("circle",{cx:"428.2",cy:"373",r:"5",fill:"#ccc"}),s.jsx("circle",{cx:"454.2",cy:"373",r:"5",fill:"#ccc"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m598.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m624.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),s.jsx("rect",{x:"378.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),s.jsx("rect",{x:"378.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),s.jsx("rect",{x:"648.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),s.jsx("rect",{x:"651.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m443.45 401.51c-8.1095-3.7255-13.44-14.377-13.137-24.881s5.8315-20.329 13.456-25.338a26.649 26.649 0 0 1 25.219-1.9056c8.1825 3.483 19.169 4.4318 24.087 13.089 3.7796 6.6528 2.4181 21.495-0.25792 28.892-2.3129 6.394-7.9684 9.9966-13.483 12.013a45.34 45.34 0 0 1-37.511-3.0216",fill:"#2f2e41"}),s.jsx("polygon",{points:"223.38 568.71 211.72 564.91 220.8 518.14 238.01 523.74",fill:"#ffb8b8"}),s.jsx("path",{transform:"translate(72.575 -240.02) rotate(18.021)",d:"m372.58 718.9h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),s.jsx("polygon",{points:"327.75 568.96 315.49 568.96 309.66 521.67 327.75 521.67",fill:"#ffb8b8"}),s.jsx("path",{d:"m306.73 565.46h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m497.75 708.65c-0.07373 0-0.14746-2e-3 -0.22168-0.00585l-13.586-0.64747a4.5061 4.5061 0 0 1-4.2854-4.4326l-1.8411-134.39a1.5 1.5 0 0 0-2.8267-0.67871l-71.958 136.44a4.4762 4.4762 0 0 1-4.822 2.3213l-13.521-2.5752a4.4992 4.4992 0 0 1-3.4014-5.918l52.43-148.55 4.0344-43.943a4.4698 4.4698 0 0 1 3.936-4.0498c15.277-1.877 36.624-14.395 45.092-19.689a4.446 4.446 0 0 1 3.5305-0.53125 4.5558 4.5558 0 0 1 2.8308 2.2451 202.75 202.75 0 0 1 22.277 123.98l-13.217 96.54a4.4752 4.4752 0 0 1-4.4507 3.8907z",fill:"#2f2e41"}),s.jsx("circle",{cx:"290.56",cy:"228.24",r:"24.561",fill:"#ffb8b8"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m436.71 516.82-7.3955-52.845a31.045 31.045 0 0 1 60.574-13.635c2.106 9.7686 6.385 21.66 4.8218 34.479-10.953 30.399-30.835 39.772-58 32z",fill:"#b3b3b3"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m469.21 434.82h-18a4.5051 4.5051 0 0 1-4.5-4.5v-6a4.5051 4.5051 0 0 1 4.5-4.5h18a4.5051 4.5051 0 0 1 4.5 4.5v6a4.5051 4.5051 0 0 1-4.5 4.5z",fill:"#b3b3b3"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m560.44 534.7a10.743 10.743 0 0 0-8.7149-13.979l-56.029-80.214-16.614 16.425 60.299 73.683a10.801 10.801 0 0 0 21.059 4.0847z",fill:"#ffb8b8"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m513.22 465.05-20.234 13.507a4.8169 4.8169 0 0 1-7.0291-1.9475l-10.365-21.928a13.377 13.377 0 0 1 22.295-14.789l16.229 17.919a4.8169 4.8169 0 0 1-0.8968 7.2386z",fill:"#b3b3b3"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m362.5 426.92a10.526 10.526 0 0 1 0.2393 1.6401l42.957 24.782 10.441-6.0109 11.131 14.572-17.45 12.438a8 8 0 0 1-9.5982-0.23384l-44.297-34.946a10.497 10.497 0 1 1 6.5757-12.241z",fill:"#ffb8b8"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m418.18 471.35-10.794-21.802a4.8169 4.8169 0 0 1 2.835-6.7204l23.078-7.4597a13.377 13.377 0 0 1 11.8 24.012l-19.857 13.79a4.8169 4.8169 0 0 1-7.0632-1.82z",fill:"#b3b3b3"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m477.67 356.34a4.0633 4.0633 0 0 0 4.3168-2.4094 5.8506 5.8506 0 0 0-0.41558-5.1377 10.736 10.736 0 0 0-3.7759-3.7034 12.406 12.406 0 0 0-5.9816-2.0579 7.4612 7.4612 0 0 0-5.7939 2.1993 5.3768 5.3768 0 0 0-0.97171 5.9276c0.89811 1.7319 2.7825 2.7031 4.6186 3.3625a27.094 27.094 0 0 0 11.378 1.4944",fill:"#2f2e41"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m485.52 398.45c-4.2928 0.20179-3.5536-8.9072-4.8971-12.989s-3.1955-8.9513-7.4212-9.734c-3.463-0.6414-6.5925 1.8908-9.609 3.7086-5.3764 3.24-12.336 4.4352-17.981 1.6906s-9.0786-10.078-6.3329-15.723a12.876 12.876 0 0 1 8.049-6.3415 25.906 25.906 0 0 1 10.462-0.50253 53.527 53.527 0 0 1 21.886 7.7574c4.5819 2.8736 8.9417 6.7864 10.306 12.02s1.9198 19.465-3.413 20.366z",fill:"#2f2e41"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m474.29 343.67c-3.2427-4.1108-2.0213-10.588 1.7582-14.211s9.3995-4.7529 14.615-4.292a29.621 29.621 0 0 1 24.025 17.275c3.2959 7.5393 3.2687 16.163 6.2494 23.832a32.137 32.137 0 0 0 43.41 17.543c5.1881-2.3921 10.128-7.0763 9.8321-12.782 3.2802 12.646-2.6276 27.112-13.823 33.847-6.5573 3.9448-14.323 5.284-21.92 6.2056-4.9507 0.60059-10.039 1.0474-14.87-0.18987-6.7592-1.731-12.418-6.7198-15.845-12.798s-4.7748-13.161-4.827-20.138c-0.04071-5.4353 0.67085-10.873 0.29483-16.296s-2.0061-11.031-5.9367-14.785-10.564-4.9899-14.878-1.6831c-1.7337 1.329-3.0043 3.2697-4.9563 4.2502s-5.036 0.21793-5.1666-1.9626z",fill:"#2f2e41"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m380.18 427.1h-202.58a6.9935 6.9935 0 0 1-6.9854-6.9854v-114.1a6.9936 6.9936 0 0 1 6.9854-6.9854h202.58a6.9933 6.9933 0 0 1 6.9854 6.9854v114.1a6.9933 6.9933 0 0 1-6.9854 6.9854zm-202.58-126.51a5.4392 5.4392 0 0 0-5.4331 5.4331v114.1a5.4392 5.4392 0 0 0 5.4331 5.4331h202.58a5.4395 5.4395 0 0 0 5.4331-5.4331v-114.1a5.4394 5.4394 0 0 0-5.4331-5.4331z",fill:"#3f3d56"}),s.jsx("circle",{cx:"73.768",cy:"191.12",r:"28.967",fill:"#e6e6e6"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m356.01 401.31-34.003-58.895a2.4215 2.4215 0 0 0-4.1941 0l-20.751 35.942-30.936-53.582a3.1047 3.1047 0 0 0-5.3774 0l-43.596 75.511a3.1046 3.1046 0 0 0 2.6887 4.657h134.07a2.4215 2.4215 0 0 0 2.0971-3.6322z",fill:"currentColor"}),s.jsx("rect",{x:"14.747",y:"153.97",width:"12.419",height:"12.419",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m459.04 259.1h-158.29a5.4645 5.4645 0 0 1-5.4581-5.4582v-89.15a5.4645 5.4645 0 0 1 5.4581-5.4582h158.29a5.4643 5.4643 0 0 1 5.4582 5.4582v89.15a5.4643 5.4643 0 0 1-5.4582 5.4582zm-158.29-98.853a4.25 4.25 0 0 0-4.2452 4.2452v89.15a4.25 4.25 0 0 0 4.2452 4.2452h158.29a4.2502 4.2502 0 0 0 4.2452-4.2452v-89.15a4.2502 4.2502 0 0 0-4.2452-4.2452z",fill:"#ccc"}),s.jsx("circle",{cx:"182.31",cy:"39.947",r:"22.634",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m440.15 238.95-26.569-46.018a1.892 1.892 0 0 0-3.2771 0l-16.214 28.084-24.172-41.867a2.4259 2.4259 0 0 0-4.2017 0l-34.064 59.001a2.4258 2.4258 0 0 0 2.1008 3.6388h104.76a1.8921 1.8921 0 0 0 1.6386-2.8381z",fill:"#e6e6e6"}),s.jsx("rect",{x:"136.2",y:"10.916",width:"9.7034",height:"9.7034",fill:"#ccc"})]})})}),w?.length>0&&s.jsx("div",{className:"qc:grid qc:grid-cols-1 qc:gap-4 qc:gap-y-6 qc:pb-16 qc:sm:grid-cols-3",children:w?.map(a=>s.jsx(j,{to:d.GALLERY(a.slug),children:s.jsx(I,{event:a})},a._id))})]}),s.jsx(p,{})]})};export{T as default};
1
+ import{u as a,j as s,E as r,c as t,T as l,I as e,A as c,a as n,b as i,d as f,N as o,P as d,e as m,S as h,f as x,g as j,h as q,F as p,k as g,i as u}from"./DR9E1aMG.js";import{useMemo as v,Fragment as b}from"react";import{F as z,g as y}from"./3-7xITP8.js";import{L as w}from"./CwHDgEUw.js";import{u as N,T as L}from"./B-6zXxDr.js";const A=a=>a===r.UPCOMING?"qc:bg-warning":a===r.CLOSED?"qc:bg-destructive":"qc:bg-success",I=({event:e})=>{const{organization:c}=a(),n=e?.coverImageUrl?e?.coverImageUrl:e?.contents?.length>0?e.contents[0].thumbnailUrl||e.contents[0].url:void 0;return s.jsxs("div",{className:"qc:space-y-4",children:[s.jsxs("div",{className:"qc:relative qc:h-72 qc:overflow-hidden qc:rounded qc:sm:h-80",children:[n?s.jsx(w,{wrapperClassName:"qc:size-full sm:hover:qc:scale-105 qc:sm:transition-transform",src:e?.coverImageUrl?e?.coverImageUrl:e?.contents?.length>0?e.contents[0].thumbnailUrl||e.contents[0].url:`https://placehold.co/600x400/${c?.color?.slice(1)}/white`,blurhash:e?.coverBlurHash?e?.coverBlurHash:e?.contents?.length>0?e.contents[0].blurHash:void 0}):s.jsx("div",{className:"qc:bg-primary qc:flex qc:size-full qc:items-center qc:justify-center",children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-primary-foreground qc:size-16",viewBox:"0 0 24 24",children:s.jsx("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zm0 0V5zm2-2h10q.3 0 .45-.275t-.05-.525l-2.75-3.675q-.15-.2-.4-.2t-.4.2L11.25 16L9.4 13.525q-.15-.2-.4-.2t-.4.2l-2 2.675q-.2.25-.05.525T7 17"})})}),!c?.integrationSettings?.hideEventStatus&&e?.status!==r.CLOSED&&s.jsx("span",{className:t("qc:absolute qc:right-4 qc:top-4 qc:inline-flex qc:items-center qc:rounded-full qc:px-3 qc:py-2",A(e.status)),children:s.jsx(l,{variant:"h6",color:"white",children:e.status})})]}),s.jsx(l,{variant:"h4",immutable:!0,lines:"2",children:e.name})]})},E=({folder:a})=>s.jsxs("div",{className:"qc:shadow-outer qc:border-border qc:flex qc:items-center qc:gap-4 qc:rounded qc:border qc:bg-background-primary-dark qc:bg-opacity-5 qc:p-2 hover:qc:bg-opacity-10",children:[s.jsx(e,{name:"material-symbols:folder-rounded",style:{color:a.color}}),s.jsx(l,{variant:"h5",children:a.name})]}),S=({organization:a})=>{const{role:r,isSuper:t}=N(),l=v(()=>{const s=[];return(t||r&&(r===c.OWNER||r===c.ADMIN))&&(s.push({label:"Analytics",icon:"material-symbols:analytics-outline-rounded",href:n.ORGANIZATION_DASHBOARD(a?._id)}),s.push({label:"Admins",icon:"material-symbols:supervised-user-circle-outline",href:n.ORGANIZATION_ADMINS(a?._id)}),s.push({label:"Settings",icon:"material-symbols:settings-outline-rounded",href:n.ORGANIZATION_SETTINGS(a?._id)})),s},[r,t]);return s.jsx("div",{className:"qc:text-muted qc:sm:text-foreground qc:flex qc:flex-row qc:items-center qc:justify-end qc:gap-8 qc:pr-4",children:l.map(a=>s.jsx(L,{content:a?.label,children:s.jsx("a",{target:"_blank",href:a.href,children:s.jsx(e,{name:a.icon,size:"lg"})})},a.label))})},T=()=>{const{folderId:r=""}=i(),t=f(),{folders:l,organization:e,props:{organizationId:c}}=a();if(!t?.state?.internalNavigation)try{const a=new URLSearchParams(window?.location?.search);let r=a.get("event"),t=a.get("page");if(!r&&!t&&window?.location?.hash){const a=window.location.hash.split("?");if(a.length>1){const s=new URLSearchParams(a[1]);r=s.get("event"),t=s.get("page")}}if(r){if(t)switch(t.toLowerCase()){case"upload":return s.jsx(o,{to:d.UPLOAD(r)});case"curate":return s.jsx(o,{to:d.CURATE(r)});case"leaderboard":return s.jsx(o,{to:d.LEADERBOARD(r)});default:return s.jsx(o,{to:d.GALLERY(r)})}return s.jsx(o,{to:d.GALLERY(r)})}}catch(a){console.error("Error parsing URL parameters:",a)}const n=l?.filter(a=>a.parentFolderId===(r?.length>0?r:null)||a.parentFolderId===(r?.length>0?r:void 0)),{isLoading:v,data:w}=m({queryKey:[`public-events-${c}`,r],queryFn:async()=>(await g.get(u.PUBLIC_EVENTS,{headers:{"x-org-id":c},searchParams:{folderId:r,sort:"-createdAt"}}).json()).data});return v?s.jsx("div",{className:"qc:grid qc:grid-cols-1 qc:gap-4 qc:sm:grid-cols-3",children:Array.from({length:3}).map((a,r)=>s.jsxs("div",{className:"qc:space-y-4",children:[s.jsx(h,{className:"qc:h-72 qc:overflow-hidden qc:rounded qc:sm:h-80"}),s.jsx(h,{className:"qc:h-6 qc:w-64 qc:rounded"})]},r))}):s.jsxs(b,{children:[e?.navigationSettings?.enableNavbar&&s.jsx(x,{}),s.jsxs("div",{className:"qc:min-h-screen qc:w-full",children:[s.jsx(S,{organization:e}),r&&s.jsx("div",{className:"qc:mt-4 qc:lg:mt-8",children:s.jsx(z,{homeLink:d.PUBLIC_EVENTS,data:y(l,r)})}),n?.length>0&&s.jsx("div",{className:"qc:my-4 qc:grid qc:grid-cols-2 qc:gap-3 qc:md:grid-cols-2 qc:lg:my-8 qc:lg:grid-cols-4 qc:lg:gap-6",children:n?.map(a=>s.jsx(j,{to:d.FOLDER_EVENTS(a?._id),children:s.jsx(E,{folder:a},a._id)},a?._id))}),w?.length<=0&&s.jsx("div",{className:"min-h-[80vh]",children:s.jsx(q,{title:l?.length>0?"Empty folder":"No events",description:l?.length>0?"Browse other folders for events":"Check back later for our awesome events!",className:"qc:mt-24 qc:md:mt-36",iconSvg:s.jsxs("svg",{"data-name":"Layer 1",className:"qc:size-full",viewBox:"0 0 858.76 581.93",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.6 738.67a198.59 198.59 0 0 1 16.436-62.675q3.7094-8.2865 8.1655-16.208a1.2103 1.2103 0 0 0-2.0886-1.2208 201.33 201.33 0 0 0-22.403 61.805q-1.682 9.0855-2.5283 18.299c-0.14337 1.5493 2.2763 1.5396 2.4188 0z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"842.44",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m984.17 739.08a128.83 128.83 0 0 1 10.662-40.66q2.4064-5.3758 5.2973-10.515a0.78518 0.78518 0 0 0-1.355-0.792 130.61 130.61 0 0 0-14.534 40.096q-1.0912 5.8942-1.6402 11.872c-0.093 1.0051 1.4768 0.99878 1.5692 0z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"833.31",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.19 738.14a128.83 128.83 0 0 1-16.601-38.618q-1.409-5.7188-2.2905-11.549a0.78518 0.78518 0 0 0-1.5555 0.2089 130.61 130.61 0 0 0 13.202 40.554q2.7649 5.3186 6.0085 10.369c0.54487 0.84972 1.7787-0.12078 1.2373-0.96515z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"791.11",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.05 738.67a198.59 198.59 0 0 0-16.436-62.675q-3.7094-8.2865-8.1655-16.208a1.2103 1.2103 0 0 1 2.0886-1.2208 201.33 201.33 0 0 1 22.403 61.805q1.682 9.0855 2.5283 18.299c0.14338 1.5493-2.2763 1.5396-2.4188 0z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"139.97",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m339.48 739.08a128.83 128.83 0 0 0-10.662-40.66q-2.4064-5.3758-5.2973-10.515a0.78518 0.78518 0 0 1 1.355-0.792 130.61 130.61 0 0 1 14.534 40.096q1.0912 5.8942 1.6402 11.872c0.093 1.0051-1.4768 0.99878-1.5692 0z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"149.1",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.46 738.14a128.83 128.83 0 0 0 16.601-38.618q1.409-5.7188 2.2905-11.549a0.78518 0.78518 0 0 1 1.5555 0.2089 130.61 130.61 0 0 1-13.202 40.554q-2.7649 5.3186-6.0084 10.369c-0.54487 0.84972-1.7787-0.12078-1.2373-0.96515z",fill:"#f2f2f2"}),s.jsx("circle",{cx:"191.3",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m925.02 538.41 0.2391 180.11a12.626 12.626 0 0 1-12.593 12.63l-74.817 0.10967c21.062-39.4 32.987-101.41 32.917-149.22a281.27 281.27 0 0 0-5.721-56.161l47.345-0.0694a12.626 12.626 0 0 1 12.63 12.593z",fill:"currentColor"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m1028.2 740.97h-738.29a1.1907 1.1907 0 0 1 0-2.3814h738.29a1.1907 1.1907 0 0 1 0 2.3814z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m815.39 513.79-133.34-0.52295 12.966-43.137a16.599 16.599 0 0 1 15.804-11.75h0.06274l76.106 0.29883a16.597 16.597 0 0 1 15.774 11.875z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m889.83 499.03a14 14 0 0 0-14 14h28a14 14 0 0 0-14-14z",fill:"currentColor"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m932.83 740.03h-368a17.019 17.019 0 0 1-17-17v-194a17.019 17.019 0 0 1 17-17h368a17.019 17.019 0 0 1 17 17v194a17.019 17.019 0 0 1-17 17zm-368-226a15.017 15.017 0 0 0-15 15v194a15.017 15.017 0 0 0 15 15h368a15.017 15.017 0 0 0 15-15v-194a15.017 15.017 0 0 0-15-15z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m764.83 497.53h-32a8.5 8.5 0 0 1 0-17h32a8.5 8.5 0 0 1 0 17z",fill:"#fff"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 702.03a76 76 0 1 1 76-76 76.086 76.086 0 0 1-76 76zm0-150a74 74 0 1 0 74 74 74.084 74.084 0 0 0-74-74z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 676.03a50 50 0 1 1 50-50 50.056 50.056 0 0 1-50 50zm0-98a48 48 0 1 0 48 48 48.054 48.054 0 0 0-48-48z",fill:"#3f3d56"}),s.jsx("circle",{cx:"578.2",cy:"467",r:"38",fill:"#ccc"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m725.83 626.03a25.001 25.001 0 0 1 21.5-24.751 25 25 0 1 0 0 49.502 25.001 25.001 0 0 1-21.5-24.751z",fill:"#fff"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m914.83 514.03h-50v-1a25 25 0 0 1 50 0zm-47.979-2h45.957a23 23 0 0 0-45.957 0z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m572.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),s.jsx("circle",{cx:"402.2",cy:"373",r:"5",fill:"currentColor"}),s.jsx("circle",{cx:"428.2",cy:"373",r:"5",fill:"#ccc"}),s.jsx("circle",{cx:"454.2",cy:"373",r:"5",fill:"#ccc"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m598.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m624.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),s.jsx("rect",{x:"378.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),s.jsx("rect",{x:"378.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),s.jsx("rect",{x:"648.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),s.jsx("rect",{x:"651.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m443.45 401.51c-8.1095-3.7255-13.44-14.377-13.137-24.881s5.8315-20.329 13.456-25.338a26.649 26.649 0 0 1 25.219-1.9056c8.1825 3.483 19.169 4.4318 24.087 13.089 3.7796 6.6528 2.4181 21.495-0.25792 28.892-2.3129 6.394-7.9684 9.9966-13.483 12.013a45.34 45.34 0 0 1-37.511-3.0216",fill:"#2f2e41"}),s.jsx("polygon",{points:"223.38 568.71 211.72 564.91 220.8 518.14 238.01 523.74",fill:"#ffb8b8"}),s.jsx("path",{transform:"translate(72.575 -240.02) rotate(18.021)",d:"m372.58 718.9h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),s.jsx("polygon",{points:"327.75 568.96 315.49 568.96 309.66 521.67 327.75 521.67",fill:"#ffb8b8"}),s.jsx("path",{d:"m306.73 565.46h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m497.75 708.65c-0.07373 0-0.14746-2e-3 -0.22168-0.00585l-13.586-0.64747a4.5061 4.5061 0 0 1-4.2854-4.4326l-1.8411-134.39a1.5 1.5 0 0 0-2.8267-0.67871l-71.958 136.44a4.4762 4.4762 0 0 1-4.822 2.3213l-13.521-2.5752a4.4992 4.4992 0 0 1-3.4014-5.918l52.43-148.55 4.0344-43.943a4.4698 4.4698 0 0 1 3.936-4.0498c15.277-1.877 36.624-14.395 45.092-19.689a4.446 4.446 0 0 1 3.5305-0.53125 4.5558 4.5558 0 0 1 2.8308 2.2451 202.75 202.75 0 0 1 22.277 123.98l-13.217 96.54a4.4752 4.4752 0 0 1-4.4507 3.8907z",fill:"#2f2e41"}),s.jsx("circle",{cx:"290.56",cy:"228.24",r:"24.561",fill:"#ffb8b8"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m436.71 516.82-7.3955-52.845a31.045 31.045 0 0 1 60.574-13.635c2.106 9.7686 6.385 21.66 4.8218 34.479-10.953 30.399-30.835 39.772-58 32z",fill:"#b3b3b3"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m469.21 434.82h-18a4.5051 4.5051 0 0 1-4.5-4.5v-6a4.5051 4.5051 0 0 1 4.5-4.5h18a4.5051 4.5051 0 0 1 4.5 4.5v6a4.5051 4.5051 0 0 1-4.5 4.5z",fill:"#b3b3b3"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m560.44 534.7a10.743 10.743 0 0 0-8.7149-13.979l-56.029-80.214-16.614 16.425 60.299 73.683a10.801 10.801 0 0 0 21.059 4.0847z",fill:"#ffb8b8"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m513.22 465.05-20.234 13.507a4.8169 4.8169 0 0 1-7.0291-1.9475l-10.365-21.928a13.377 13.377 0 0 1 22.295-14.789l16.229 17.919a4.8169 4.8169 0 0 1-0.8968 7.2386z",fill:"#b3b3b3"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m362.5 426.92a10.526 10.526 0 0 1 0.2393 1.6401l42.957 24.782 10.441-6.0109 11.131 14.572-17.45 12.438a8 8 0 0 1-9.5982-0.23384l-44.297-34.946a10.497 10.497 0 1 1 6.5757-12.241z",fill:"#ffb8b8"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m418.18 471.35-10.794-21.802a4.8169 4.8169 0 0 1 2.835-6.7204l23.078-7.4597a13.377 13.377 0 0 1 11.8 24.012l-19.857 13.79a4.8169 4.8169 0 0 1-7.0632-1.82z",fill:"#b3b3b3"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m477.67 356.34a4.0633 4.0633 0 0 0 4.3168-2.4094 5.8506 5.8506 0 0 0-0.41558-5.1377 10.736 10.736 0 0 0-3.7759-3.7034 12.406 12.406 0 0 0-5.9816-2.0579 7.4612 7.4612 0 0 0-5.7939 2.1993 5.3768 5.3768 0 0 0-0.97171 5.9276c0.89811 1.7319 2.7825 2.7031 4.6186 3.3625a27.094 27.094 0 0 0 11.378 1.4944",fill:"#2f2e41"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m485.52 398.45c-4.2928 0.20179-3.5536-8.9072-4.8971-12.989s-3.1955-8.9513-7.4212-9.734c-3.463-0.6414-6.5925 1.8908-9.609 3.7086-5.3764 3.24-12.336 4.4352-17.981 1.6906s-9.0786-10.078-6.3329-15.723a12.876 12.876 0 0 1 8.049-6.3415 25.906 25.906 0 0 1 10.462-0.50253 53.527 53.527 0 0 1 21.886 7.7574c4.5819 2.8736 8.9417 6.7864 10.306 12.02s1.9198 19.465-3.413 20.366z",fill:"#2f2e41"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m474.29 343.67c-3.2427-4.1108-2.0213-10.588 1.7582-14.211s9.3995-4.7529 14.615-4.292a29.621 29.621 0 0 1 24.025 17.275c3.2959 7.5393 3.2687 16.163 6.2494 23.832a32.137 32.137 0 0 0 43.41 17.543c5.1881-2.3921 10.128-7.0763 9.8321-12.782 3.2802 12.646-2.6276 27.112-13.823 33.847-6.5573 3.9448-14.323 5.284-21.92 6.2056-4.9507 0.60059-10.039 1.0474-14.87-0.18987-6.7592-1.731-12.418-6.7198-15.845-12.798s-4.7748-13.161-4.827-20.138c-0.04071-5.4353 0.67085-10.873 0.29483-16.296s-2.0061-11.031-5.9367-14.785-10.564-4.9899-14.878-1.6831c-1.7337 1.329-3.0043 3.2697-4.9563 4.2502s-5.036 0.21793-5.1666-1.9626z",fill:"#2f2e41"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m380.18 427.1h-202.58a6.9935 6.9935 0 0 1-6.9854-6.9854v-114.1a6.9936 6.9936 0 0 1 6.9854-6.9854h202.58a6.9933 6.9933 0 0 1 6.9854 6.9854v114.1a6.9933 6.9933 0 0 1-6.9854 6.9854zm-202.58-126.51a5.4392 5.4392 0 0 0-5.4331 5.4331v114.1a5.4392 5.4392 0 0 0 5.4331 5.4331h202.58a5.4395 5.4395 0 0 0 5.4331-5.4331v-114.1a5.4394 5.4394 0 0 0-5.4331-5.4331z",fill:"#3f3d56"}),s.jsx("circle",{cx:"73.768",cy:"191.12",r:"28.967",fill:"#e6e6e6"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m356.01 401.31-34.003-58.895a2.4215 2.4215 0 0 0-4.1941 0l-20.751 35.942-30.936-53.582a3.1047 3.1047 0 0 0-5.3774 0l-43.596 75.511a3.1046 3.1046 0 0 0 2.6887 4.657h134.07a2.4215 2.4215 0 0 0 2.0971-3.6322z",fill:"currentColor"}),s.jsx("rect",{x:"14.747",y:"153.97",width:"12.419",height:"12.419",fill:"#3f3d56"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m459.04 259.1h-158.29a5.4645 5.4645 0 0 1-5.4581-5.4582v-89.15a5.4645 5.4645 0 0 1 5.4581-5.4582h158.29a5.4643 5.4643 0 0 1 5.4582 5.4582v89.15a5.4643 5.4643 0 0 1-5.4582 5.4582zm-158.29-98.853a4.25 4.25 0 0 0-4.2452 4.2452v89.15a4.25 4.25 0 0 0 4.2452 4.2452h158.29a4.2502 4.2502 0 0 0 4.2452-4.2452v-89.15a4.2502 4.2502 0 0 0-4.2452-4.2452z",fill:"#ccc"}),s.jsx("circle",{cx:"182.31",cy:"39.947",r:"22.634",fill:"#f2f2f2"}),s.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m440.15 238.95-26.569-46.018a1.892 1.892 0 0 0-3.2771 0l-16.214 28.084-24.172-41.867a2.4259 2.4259 0 0 0-4.2017 0l-34.064 59.001a2.4258 2.4258 0 0 0 2.1008 3.6388h104.76a1.8921 1.8921 0 0 0 1.6386-2.8381z",fill:"#e6e6e6"}),s.jsx("rect",{x:"136.2",y:"10.916",width:"9.7034",height:"9.7034",fill:"#ccc"})]})})}),w?.length>0&&s.jsx("div",{className:"qc:grid qc:grid-cols-1 qc:gap-4 qc:gap-y-6 qc:pb-16 qc:sm:grid-cols-3",children:w?.map(a=>s.jsx(j,{to:d.GALLERY(a.slug),children:s.jsx(I,{event:a})},a._id))})]}),s.jsx(p,{})]})};export{T as default};
@@ -1 +1 @@
1
- import{c as e,T as r,P as t,a,D as o,Q as s}from"./FbLadgve.js";import{a5 as l,a6 as n,a7 as c}from"./B9gK2pCi.js";var u=u=>{const[i,d]=e({prefix:"TanstackQueryDevtools"}),m=l(),v=n(()=>{const e=i.theme_preference||r;return"system"!==e?e:m()});return c(s.Provider,{value:u,get children(){return c(t,{localStore:i,setLocalStore:d,get children(){return c(a.Provider,{value:v,get children(){return c(o,{localStore:i,setLocalStore:d})}})}})}})};export{u as default};
1
+ import{c as e,T as r,P as t,a,D as o,Q as s}from"./DBT304mv.js";import{a5 as l,a6 as n,a7 as c}from"./DR9E1aMG.js";var u=u=>{const[i,d]=e({prefix:"TanstackQueryDevtools"}),m=l(),v=n(()=>{const e=i.theme_preference||r;return"system"!==e?e:m()});return c(s.Provider,{value:u,get children(){return c(t,{localStore:i,setLocalStore:d,get children(){return c(a.Provider,{value:v,get children(){return c(o,{localStore:i,setLocalStore:d})}})}})}})};export{u as default};