@qratilabs/qrati-connect 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/element/{AuthLayout-BIIDdbLI.js → AuthLayout-yBnXbTdQ.js} +1 -1
- package/element/{ContentsPage-Cz9xHoZG.js → ContentsPage-BpGmiu2Y.js} +2 -2
- package/element/{CuratePage-CIcQGgHY.js → CuratePage-Bf96ltsu.js} +1 -1
- package/element/{Dialog-Bu_qHGFB.js → Dialog-BqAbQiPJ.js} +1 -1
- package/element/{DotLottiePlayer-CGyX5Uiy.js → DotLottiePlayer-BtxapiSJ.js} +1 -1
- package/element/{EventHeaderAdminButtons-CzyFFINt.js → EventHeaderAdminButtons-BplHheBN.js} +1 -1
- package/element/{FolderBreadcrumb-Cj7QxYYv.js → FolderBreadcrumb-DhqYRcyB.js} +1 -1
- package/element/{ForgotPasswordPage-CBmFRFNE.js → ForgotPasswordPage-Z0fY0XwU.js} +1 -1
- package/element/{InputField-CcuGCvlZ.js → InputField-B4v4KXcE.js} +1 -1
- package/element/{LazyLoadImage-Bm4-SISp.js → LazyLoadImage-DAovisp3.js} +1 -1
- package/element/{LeaderboardPage-BMvF370T.js → LeaderboardPage-Ygaebr-t.js} +1 -1
- package/element/{LoginPage-DArirI4F.js → LoginPage-DIZ7qlYO.js} +1 -1
- package/element/{NCMVHL6D-CbHXYjQh.js → NCMVHL6D-CxiMFMqg.js} +1 -1
- package/element/{PublicEvents-BMwJiX-a.js → PublicEvents-D4eUZCHS.js} +1 -1
- package/element/{RegisterPage-BwOo1H_W.js → RegisterPage-Bg7pyJeh.js} +1 -1
- package/element/{SocialLoginButton-Bkbp5LgY.js → SocialLoginButton-DsAt02H9.js} +1 -1
- package/element/{UploadPage-BONeTtwN.js → UploadPage-C0ek4Qqe.js} +1 -1
- package/element/{VideoPlayer-D0UnCWNM.js → VideoPlayer-g56XT4-3.js} +1 -1
- package/element/element.es.js +1 -1
- package/element/{heic2any-BvbAMS3F.js → heic2any-z2RaaSEC.js} +1 -1
- package/element/{index-B3zOFkob.js → index-BhzTVsTo.js} +1 -1
- package/element/{index-ER4_3XNl.js → index-DDOpdb3i.js} +2 -2
- package/element/{index.esm-BWTacECI.js → index.esm-BbqgTw7t.js} +1 -1
- package/element/{photoswipe-DMKE7eBJ.js → photoswipe-B7SExy7W.js} +1 -1
- package/element/{tslib.es6-Jsc-fWIN.js → tslib.es6-DIRCPYhi.js} +1 -1
- package/element/{useOrgAccess-DAaw7C4P.js → useOrgAccess-CQNPoSFq.js} +1 -1
- package/element/web.es.js +1 -1
- package/package.json +1 -1
- package/react/{Jy4Lc2ko.js → BBaDMfm_.js} +1 -1
- package/react/{pnBKcwun.js → BE9_Ublk.js} +1 -1
- package/react/{COoqtIAh.js → BX9GvyM-.js} +1 -1
- package/react/{Dh5Eu-W1.js → C1kBrsed.js} +2 -2
- package/react/{Bn45auOf.js → C27Sy5Nr.js} +1 -1
- package/react/{DFl0SJ9s.js → C5XgHCIU.js} +1 -1
- package/react/{iK-ZNjdx.js → CBpEkjwz.js} +1 -1
- package/react/{wO1wraLd.js → Cb66NH94.js} +1 -1
- package/react/{BsBPHCW1.js → Ck9enZ3e.js} +1 -1
- package/react/{ITOOpeUZ.js → CouLaMtF.js} +1 -1
- package/react/{CwiwOI7_.js → Cr9MgBeI.js} +1 -1
- package/react/{wsX3yzhl.js → DLUmYnVL.js} +1 -1
- package/react/{7-EU-j9r.js → DZqtPzMv.js} +1 -1
- package/react/{r_zvdjwU.js → Dhcvm9yI.js} +1 -1
- package/react/{B_kCg8Mg.js → DppB7lia.js} +1 -1
- package/react/{E7zPOMav.js → DqmSOLfe.js} +1 -1
- package/react/{CiAq8fSg.js → Dx52SzWS.js} +1 -1
- package/react/{DAjZbCDM.js → FcDLBnwX.js} +1 -1
- package/react/{BdDpLyOs.js → Ld9VPzmf.js} +2 -2
- package/react/{Cm0IpoCo.js → MZeQHhBV.js} +1 -1
- package/react/{BNG2dNZI.js → U0g8gQE-.js} +1 -1
- package/react/index.es.js +1 -1
- package/react/{BvSsH7bx.js → qwl23nTI.js} +1 -1
- package/react/{z1g_nsak.js → x0a0HaZy.js} +1 -1
- package/umd/web.umd.js +86 -86
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,u as r,T as o,J as n,k as a,i as t,a4 as s,P as l}from"./
|
|
1
|
+
import{j as e,u as r,T as o,J as n,k as a,i as t,a4 as s,P as l}from"./Ld9VPzmf.js";import i,{useState as c}from"react";import{I as d}from"./Dhcvm9yI.js";import{u,o as m,c as f,C as p,a as h,b as g}from"./HhCRmfOk.js";const v=({count:r=1,currentStep:o=0,disabled:n,onStepClick:a})=>{const t=n||!a;return e.jsx("ol",{role:"list",className:"qc:flex qc:items-center qc:space-x-4 qc:pl-1.5",children:Array.from({length:r}).map((r,n)=>e.jsx("li",{children:n<o?e.jsx("button",{className:"qc:bg-primary qc:block qc:size-3 qc:rounded-full",disabled:t,onClick:()=>a&&a(n)}):n===o?e.jsxs("button",{className:"qc:relative qc:flex qc:items-center qc:justify-center","aria-current":"step",disabled:t,onClick:()=>a&&a(n),children:[e.jsx("span",{className:"qc:absolute qc:flex qc:size-6 qc:p-px","aria-hidden":"true",children:e.jsx("span",{className:"qc:bg-primary qc:size-full qc:rounded-full qc:bg-opacity-40"})}),e.jsx("span",{className:"qc:bg-primary qc:relative qc:block qc:size-3 qc:rounded-full","aria-hidden":"true"})]}):e.jsx("button",{className:"qc:block qc:size-3 qc:rounded-full qc:bg-text-secondary-light",disabled:t,onClick:()=>a&&a(n)})},`progress-dot-${n}`))})},q={email:""},w=f().shape({email:h().required("Please enter your email").email("Enter a valid email")}),x=({onCodeSent:s})=>{const[l,i]=c(!1),[f,h]=c(null),{props:{organizationId:g}}=r(),{control:v,handleSubmit:x,formState:{errors:y}}=u({mode:"onSubmit",defaultValues:q,resolver:m(w)});return e.jsxs("div",{className:"w-full space-y-6",children:[e.jsx(o,{variant:"h5",align:"center",children:"Reset password"}),e.jsxs("form",{noValidate:!0,autoComplete:"off",className:"qc:w-full qc:space-y-4 qc:lg:space-y-8",onSubmit:x(async e=>{h(null),i(!0);try{await a.post(t.SEND_PASSWORD_RESET_CODE,{json:{email:e.email?.toLowerCase()},headers:{"x-org-id":g}}),s(e.email.toLowerCase())}catch(e){console.error("Error sending verification code:",e),h(e.message||e||"An error occurred while sending the code. Please try again.")}i(!1)}),children:[e.jsx(p,{name:"email",control:v,render:({field:{value:r,onChange:o,onBlur:n}})=>e.jsx(d,{label:"Email",disabled:l,type:"email",value:r,onChange:o,onBlur:n,error:y.email?.message})}),e.jsx(n,{fullWidth:!0,type:"submit",loading:l,children:"Send verification code"})]}),f&&e.jsx(o,{variant:"h3",align:"center",color:"color",children:f})]})};var y=function(e){return"object"==typeof e&&null!==e},b=function(e){var r=e.value,o=void 0===r?"":r,n=e.numInputs,a=void 0===n?4:n,t=e.onChange,s=e.onPaste,l=e.renderInput,c=e.shouldAutoFocus,d=void 0!==c&&c,u=e.inputType,m=void 0===u?"text":u,f=e.renderSeparator,p=e.placeholder,h=e.containerStyle,g=e.inputStyle,v=e.skipDefaultStyles,q=void 0!==v&&v,w=i.useState(0),x=w[0],b=w[1],j=i.useRef([]),S=function(){return o?o.toString().split(""):[]},C="number"===m||"tel"===m;i.useEffect(function(){j.current=j.current.slice(0,a)},[a]),i.useEffect(function(){var e;d&&(null===(e=j.current[0])||void 0===e||e.focus())},[d]);var P=function(){if("string"==typeof p){if(p.length===a)return p;p.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}},N=function(e){return(C?!isNaN(Number(e)):"string"==typeof e)&&1===e.trim().length},D=function(e){var r=e.target.value;N(r)&&(R(r),I(x+1))},E=function(e){var r=e.nativeEvent,o=e.target.value;if(!N(o)){if(o.length===a)o.split("").some(function(e){return!N(e)})||(O(o.split("")),I(a-1));null===r.data&&"deleteContentBackward"===r.inputType&&(e.preventDefault(),R(""),I(x-1)),e.target.value=""}},k=function(){b(x-1)},A=function(e){var r=S();[e.code,e.key].includes("Backspace")?(e.preventDefault(),R(""),I(x-1)):"Delete"===e.code?(e.preventDefault(),R("")):"ArrowLeft"===e.code?(e.preventDefault(),I(x-1)):"ArrowRight"===e.code||e.key===r[x]?(e.preventDefault(),I(x+1)):("Spacebar"===e.code||"Space"===e.code||"ArrowUp"===e.code||"ArrowDown"===e.code)&&e.preventDefault()},I=function(e){var r,o,n=Math.max(Math.min(a-1,e),0);j.current[n]&&(null===(r=j.current[n])||void 0===r||r.focus(),null===(o=j.current[n])||void 0===o||o.select(),b(n))},R=function(e){var r=S();r[x]=e[0],O(r)},O=function(e){var r=e.join("");t(r)},B=function(e){var r;e.preventDefault();var o=S(),n=x,t=e.clipboardData.getData("text/plain").slice(0,a-x).split("");if(!C||!t.some(function(e){return isNaN(Number(e))})){for(var s=0;s<a;++s)s>=x&&t.length>0&&(o[s]=null!==(r=t.shift())&&void 0!==r?r:"",n++);I(n),O(o)}};return i.createElement("div",{style:Object.assign({display:"flex",alignItems:"center"},y(h)&&h),className:"string"==typeof h?h:void 0,onPaste:s},Array.from({length:a},function(e,r){return r}).map(function(e){var r,o,n;return i.createElement(i.Fragment,{key:e},l({value:null!==(r=S()[e])&&void 0!==r?r:"",placeholder:null!==(n=null===(o=P())||void 0===o?void 0:o[e])&&void 0!==n?n:void 0,ref:function(r){return j.current[e]=r},onChange:D,onFocus:function(r){return function(e){return function(r){b(r),e.target.select()}}(r)(e)},onBlur:k,onKeyDown:A,onPaste:B,autoComplete:"off","aria-label":"Please enter OTP character ".concat(e+1),style:Object.assign(q?{}:{width:"1em",textAlign:"center"},y(g)?g:{}),className:"string"==typeof g?g:void 0,type:m,inputMode:C?"numeric":"text",onInput:E},e),e<a-1&&("function"==typeof f?f(e):f))}))};const j={code:""},S=f().shape({code:h().required("Please enter the code")}),C=({email:s,onCodeVerified:l})=>{const{props:{organizationId:i}}=r(),[d,f]=c(!1),[h,g]=c(null),{control:v,handleSubmit:q,watch:w}=u({mode:"onSubmit",defaultValues:j,resolver:m(S)});return e.jsxs("div",{className:"qc:space-y-4 qc:lg:space-y-8",children:[e.jsxs(o,{variant:"h5",align:"center",children:["Enter the code sent to ",e.jsx("span",{className:"qc:text-primary qc:font-medium",children:s})]}),e.jsxs("form",{noValidate:!0,autoComplete:"off",className:"qc:flex qc:w-full qc:flex-col qc:items-center qc:gap-4 qc:lg:gap-8",onSubmit:q(async e=>{g(null),f(!0);try{await a.post(t.VERIFY_PASSWORD_RESET_CODE,{json:{email:s,code:e.code},headers:{"x-org-id":i}}),l&&l()}catch(e){console.error(e.message),g("An error occurred while verifying the code. Please try again.")}f(!1)}),children:[e.jsx(p,{name:"code",control:v,render:({field:{value:r,onChange:o}})=>e.jsx(b,{value:r,onChange:o,numInputs:6,shouldAutoFocus:!0,inputType:"number",isInputNum:!0,containerStyle:"qc:flex qc:gap-4",inputStyle:"qc:rounded qc:border focus:qc:border-primary qc:text-foreground qc:bg-white disabled:qc:border-border disabled:qc:text-gray-400 otp-input qc:text-xl focus:qc:outline-none focus:qc:ring-0 focus:qc:boder-none",renderInput:r=>e.jsx("input",{...r})})}),e.jsx(n,{fullWidth:!0,type:"submit",disabled:w("code").length<6,loading:d,children:"Submit"})]}),h&&e.jsx(o,{variant:"h3",align:"center",color:"color",children:h})]})},P={password:"",confirmPassword:""},N=f().shape({password:h().required("Please enter your password").min(8,"Min password length is 8"),confirmPassword:h().required("Please confirm your password").min(8,"Min password length is 8").oneOf([g("password"),null],"Passwords do not match")}),D=({email:s,onPasswordReset:l})=>{const{props:{organizationId:i}}=r(),[f,h]=c({showPassword:!1,showConfirmPassword:!1}),[g,v]=c(!1),[q,w]=c(null),{control:x,handleSubmit:y,formState:{errors:b}}=u({defaultValues:P,mode:"onSubmit",resolver:m(N)});return e.jsxs("div",{className:"qc:w-full qc:space-y-4",children:[e.jsx(o,{variant:"h5",align:"center",children:"Set new password"}),e.jsxs("form",{noValidate:!0,autoComplete:"off",className:"qc:w-full qc:space-y-8",onSubmit:y(async e=>{w(null),v(!0);try{const r=await a.post(t.RESET_PASSWORD,{json:{email:s.toLowerCase(),password:e.password},headers:{"x-org-id":i}});r.error?w(r.error):l()}catch{w("An error occurred while resetting the password. Please try again.")}v(!1)}),children:[e.jsxs("div",{className:"qc:relative",children:[e.jsx(p,{name:"password",control:x,render:({field:{value:r,onChange:o,onBlur:n}})=>e.jsx(d,{label:"New password",disabled:g,type:f.showPassword?"text":"password",value:r,onChange:o,onBlur:n,error:b.password?.message})}),e.jsx(n,{variant:"ghost",color:"primary",className:"qc:absolute qc:-right-4 qc:top-7",icon:f.showPassword?"mdi:eye-outline":"mdi:eye-off-outline",onClick:()=>h({...f,showPassword:!f.showPassword})})]}),e.jsxs("div",{className:"qc:relative",children:[e.jsx(p,{name:"confirmPassword",control:x,render:({field:{value:r,onChange:o,onBlur:n}})=>e.jsx(d,{label:"Confirm new password",disabled:g,type:f.showConfirmPassword?"text":"password",value:r,onChange:o,onBlur:n,error:b.confirmPassword?.message})}),e.jsx(n,{variant:"ghost",color:"primary",className:"qc:absolute qc:-right-4 qc:top-7",icon:f.showConfirmPassword?"mdi:eye-outline":"mdi:eye-off-outline",onClick:()=>h({...f,showConfirmPassword:!f.showConfirmPassword})})]}),e.jsx(n,{fullWidth:!0,type:"submit",color:"primary",loading:g,children:"Reset password"})]}),q&&e.jsx(o,{variant:"h3",align:"center",color:"color",children:q})]})},E=()=>{const r=s(),[o,n]=c(null),[a,t]=c(0);return e.jsxs("div",{className:"space-y-9",children:[(({index:a})=>{switch(a){case 0:return e.jsx(x,{onCodeSent:e=>{n(e),t(1)}});case 1:return e.jsx(C,{email:o,onCodeVerified:()=>t(2)});case 2:return e.jsx(D,{email:o,onPasswordReset:()=>{r(l.LOGIN)}})}})({index:a}),e.jsx("div",{className:"qc:mt-8 qc:flex qc:justify-center",children:e.jsx(v,{count:3,currentStep:a})})]})};export{E as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as e,u as t,e as n,s as r,k as o,i,X as l,j as s,I as a,O as u,U as c,c as d,T as f,d as p,A as m,a as h,Z as g,y as v,P as y}from"./BdDpLyOs.js";import*as b from"react";import w,{useRef as E,useCallback as x,useEffect as T,useState as S,useMemo as O,useLayoutEffect as P,useContext as A,createContext as I,forwardRef as L,Fragment as R,isValidElement as C,cloneElement as F,createElement as M,useId as N,useSyncExternalStore as k}from"react";import{u as D,T as q}from"./z1g_nsak.js";import*as _ from"react-dom";import{createPortal as j,flushSync as H}from"react-dom";const V=s=>{const a=e(),{props:{organizationId:u}}=t(),{role:c,isSuper:d}=D(),{isLoading:f,data:p,isError:m,error:h}=n({queryKey:[r.EVENT_IN_REVIEW_COUNT(s?.slug)],queryFn:async()=>{try{const e=await o.get(i.GET_CONTENTS_COUNT,{searchParams:{eventSlug:s?.slug,filter:`status:${l.IN_REVIEW}`},headers:{"x-org-id":u}}).json();if(e.error)throw new Error(e.error);return e.data}catch(e){throw new Error(e?.message||e||"Failed to fetch in review count")}},staleTime:0,enabled:!!c||d});return{loading:f,inReviewCount:p,error:m?h:null,increment:()=>{a.setQueryData([r.EVENT_IN_REVIEW_COUNT(s?.slug)],e=>e+1)},decrement:()=>{a.setQueryData([r.EVENT_IN_REVIEW_COUNT(s?.slug)],e=>e-1)}}},B=e=>e&&e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",W=typeof document<"u"?w.useLayoutEffect:()=>{};var U;const G=null!==(U=w.useInsertionEffect)&&void 0!==U?U:W;const $=e=>{var t;return null!==(t=e?.ownerDocument)&&void 0!==t?t:document},K=e=>e&&"window"in e&&e.window===e?e:$(e).defaultView||window;function z(e,t){return!(!t||!e)&&e.contains(t)}const Y=(e=document)=>e.activeElement;function Q(e){return e.target}function X(e){var t;if(typeof window>"u"||null==window.navigator)return!1;let n=null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands;return Array.isArray(n)&&n.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function J(e){var t;return typeof window<"u"&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Z(e){if("test"===process.env.NODE_ENV)return e;let t=null;return()=>(null==t&&(t=e()),t)}const ee=Z(function(){return J(/^Mac/i)}),te=Z(function(){return J(/^iPhone/i)}),ne=Z(function(){return J(/^iPad/i)||ee()&&navigator.maxTouchPoints>1}),re=Z(function(){return te()||ne()});Z(function(){return ee()||re()}),Z(function(){return X(/AppleWebKit/i)&&!oe()});const oe=Z(function(){return X(/Chrome/i)}),ie=Z(function(){return X(/Android/i)});function le(){let e=E(new Map),t=x((t,n,r,o)=>{let i=o?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o}),t.addEventListener(n,i,o)},[]),n=x((t,n,r,o)=>{var i;let l=(null===(i=e.current.get(r))||void 0===i?void 0:i.fn)||r;t.removeEventListener(n,l,o),e.current.delete(r)},[]),r=x(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return T(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function se(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function ae(e){let t=E({isFocused:!1,observer:null});W(()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=function(e){const t=E(null);return G(()=>{t.current=e},[e]),x((...e)=>{const n=t.current;return n?.(...e)},[])}(t=>{e?.(t)});return x(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,o=e=>{if(t.current.isFocused=!1,r.disabled){let t=se(e);n(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}Z(function(){return X(/Firefox/i)});let ue=null,ce=new Set,de=new Map,fe=!1,pe=!1;const me={Tab:!0,Escape:!0};function he(e,t){for(let n of ce)n(e,t)}function ge(e){fe=!0,function(e){return!(e.metaKey||!ee()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(ue="keyboard",he("keyboard",e))}function ve(e){ue="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(fe=!0,he("pointer",e))}function ye(e){(function(e){return!(""!==e.pointerType||!e.isTrusted)||(ie()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)})(e)&&(fe=!0,ue="virtual")}function be(e){e.target===window||e.target===document||!e.isTrusted||(!fe&&!pe&&(ue="virtual",he("virtual",e)),fe=!1,pe=!1)}function we(){fe=!1,pe=!0}function Ee(e){if(typeof window>"u"||typeof document>"u"||de.get(K(e)))return;const t=K(e),n=$(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){fe=!0,r.apply(this,arguments)},n.addEventListener("keydown",ge,!0),n.addEventListener("keyup",ge,!0),n.addEventListener("click",ye,!0),t.addEventListener("focus",be,!0),t.addEventListener("blur",we,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ve,!0),n.addEventListener("pointermove",ve,!0),n.addEventListener("pointerup",ve,!0)):"test"===process.env.NODE_ENV&&(n.addEventListener("mousedown",ve,!0),n.addEventListener("mousemove",ve,!0),n.addEventListener("mouseup",ve,!0)),t.addEventListener("beforeunload",()=>{xe(e)},{once:!0}),de.set(t,{focus:r})}const xe=(e,t)=>{const n=K(e),r=$(e);t&&r.removeEventListener("DOMContentLoaded",t),de.has(n)&&(n.HTMLElement.prototype.focus=de.get(n).focus,r.removeEventListener("keydown",ge,!0),r.removeEventListener("keyup",ge,!0),r.removeEventListener("click",ye,!0),n.removeEventListener("focus",be,!0),n.removeEventListener("blur",we,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ve,!0),r.removeEventListener("pointermove",ve,!0),r.removeEventListener("pointerup",ve,!0)):"test"===process.env.NODE_ENV&&(r.removeEventListener("mousedown",ve,!0),r.removeEventListener("mousemove",ve,!0),r.removeEventListener("mouseup",ve,!0)),de.delete(n))};function Te(){return"pointer"!==ue}typeof document<"u"&&function(e){const t=$(e);let n;"loading"!==t.readyState?Ee(e):(n=()=>{Ee(e)},t.addEventListener("DOMContentLoaded",n))}();const Se=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Oe(e,t,n){Ee(),T(()=>{let t=(t,r)=>{(function(e,t,n){let r=$(n?.target);const o=typeof window<"u"?K(n?.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?K(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?K(n?.target).HTMLElement:HTMLElement,s=typeof window<"u"?K(n?.target).KeyboardEvent:KeyboardEvent;return!((e=e||r.activeElement instanceof o&&!Se.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof l&&r.activeElement.isContentEditable)&&"keyboard"===t&&n instanceof s&&!me[n.key])})(!!n?.isTextInput,t,r)&&e(Te())};return ce.add(t),()=>{ce.delete(t)}},t)}function Pe(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=E({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=le(),a=x(e=>{e.currentTarget.contains(e.target)&&i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(e),o&&o(!1))},[n,o,i,s]),u=ae(a),c=x(e=>{if(!e.currentTarget.contains(e.target))return;const t=$(e.target),n=Y(t);if(!i.current.isFocusWithin&&n===Q(e.nativeEvent)){r&&r(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let n=e.currentTarget;l(t,"focus",e=>{if(i.current.isFocusWithin&&!z(n,e.target)){let r=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});!function(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}(r,n);let o=se(r);a(o)}},{capture:!0})}},[r,o,u,l,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:a}}}let Ae=!1,Ie=0;function Le(){Ae=!0,setTimeout(()=>{Ae=!1},50)}function Re(e){"touch"===e.pointerType&&Le()}function Ce(){if(!(typeof document>"u"))return 0===Ie&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Re):"test"===process.env.NODE_ENV&&document.addEventListener("touchend",Le)),Ie++,()=>{Ie--,!(Ie>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Re):"test"===process.env.NODE_ENV&&document.removeEventListener("touchend",Le))}}function Fe(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=E({isFocused:!1,isFocusVisible:t||Te()}),[i,l]=S(!1),[s,a]=S(()=>o.current.isFocused&&o.current.isFocusVisible),u=x(()=>a(o.current.isFocused&&o.current.isFocusVisible),[]),c=x(e=>{o.current.isFocused=e,l(e),u()},[u]);Oe(e=>{o.current.isFocusVisible=e,u()},[],{isTextInput:n});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=x(e=>{if(e.target===e.currentTarget)return r&&r(e),o&&o(!1),!0},[r,o]),l=ae(i),s=x(e=>{const t=$(e.target),r=t?Y(t):Y();e.target===e.currentTarget&&r===Q(e.nativeEvent)&&(n&&n(e),o&&o(!0),l(e))},[o,n,l]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:t||!r&&!o?void 0:i}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:f}=Pe({isDisabled:!r,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:s,focusProps:r?f:d}}var Me=Object.defineProperty,Ne=(e,t,n)=>(((e,t,n)=>{t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let ke=new class{constructor(){Ne(this,"current",this.detect()),Ne(this,"handoffState","pending"),Ne(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function De(e){var t;return ke.isServer?null:null==e?document:null!=(t=e?.ownerDocument)?t:document}function qe(e){var t,n;return ke.isServer?null:null==e?document:null!=(n=null==(t=e?.getRootNode)?void 0:t.call(e))?n:document}function _e(e){var t,n;return null!=(n=null==(t=qe(e))?void 0:t.activeElement)?n:null}function je(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function He(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add(()=>e.removeEventListener(n,r,o))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame:(...e)=>t.requestAnimationFrame(()=>t.requestAnimationFrame(...e)),setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return je(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=He();return e(t),this.add(()=>t.dispose())},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Ve(){let[e]=S(He);return T(()=>()=>e.dispose(),[e]),e}let Be=(e,t)=>{ke.isServer?T(e,t):P(e,t)};function We(e){let t=E(e);return Be(()=>{t.current=e},[e]),t}let Ue=function(e){let t=We(e);return w.useCallback((...e)=>t.current(...e),[t])};function Ge(e){return O(()=>e,Object.values(e))}let $e=I(void 0);function Ke(){return A($e)}function ze(...e){return Array.from(new Set(e.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}function Ye(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ye),r}var Qe,Xe=((Qe=Xe||{})[Qe.None=0]="None",Qe[Qe.RenderStrategy=1]="RenderStrategy",Qe[Qe.Static=2]="Static",Qe),Je=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Je||{});function Ze(){let e=function(){let e=E([]),t=x(t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>null==e))return e.current=n,t}}();return x(t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??tt;let a=nt(t,e);if(i)return et(a,n,r,l,s);let u=o??0;if(2&u){let{static:e=!1,...t}=a;if(e)return et(t,n,r,l,s)}if(1&u){let{unmount:e=!0,...t}=a;return Ye(e?0:1,{0:()=>null,1:()=>et({...t,hidden:!0,style:{display:"none"}},n,r,l,s)})}return et(a,n,r,l,s)}({mergeRefs:e,...t}),[e])}function et(e,t={},n,r,o){let{as:i=n,children:l,refName:s="ref",...a}=lt(e,["unmount","static"]),u=void 0!==e.ref?{[s]:e.ref}:{},c="function"==typeof l?l(t):l;"className"in a&&a.className&&"function"==typeof a.className&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){d["data-headlessui-state"]=n.join(" ");for(let e of n)d[`data-${e}`]=""}}if(at(i)&&(Object.keys(it(a)).length>0||Object.keys(it(d)).length>0)){if(!(!C(c)||Array.isArray(c)&&c.length>1||function(e){return at(e.type)}(c))){let e=c.props,t=e?.className,n="function"==typeof t?(...e)=>ze(t(...e),a.className):ze(t,a.className),r=n?{className:n}:{},i=nt(c.props,it(lt(a,["ref"])));for(let e in d)e in i&&delete d[e];return F(c,Object.assign({},i,d,u,{ref:o(st(c),u.ref)},r))}if(Object.keys(it(a)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(it(a)).concat(Object.keys(it(d))).map(e=>` - ${e}`).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>` - ${e}`).join("\n")].join("\n"))}return M(i,Object.assign({},lt(a,["ref"]),!at(i)&&u,!at(i)&&d),c)}function tt(...e){return e.every(e=>null==e)?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function nt(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=e?.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||t?.nativeEvent instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function rt(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)e?.(...t)}});return t}function ot(e){var t;return Object.assign(L(e),{displayName:null!=(t=e.displayName)?t:e.name})}function it(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function lt(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function st(e){return w.version.split(".")[0]>="19"?e.props.ref:e.ref}function at(e){return e===R||e===Symbol.for("react.fragment")}let ut=I(void 0);function ct(e){return"object"==typeof e&&null!==e&&"nodeType"in e}function dt(e){return ct(e)&&"tagName"in e}function ft(e){return dt(e)&&"accessKey"in e}function pt(e){return dt(e)&&"tabIndex"in e}function mt(e){return ft(e)&&"INPUT"===e.nodeName}function ht(e){return ft(e)&&"LABEL"===e.nodeName}function gt(e){return ft(e)&&"FIELDSET"===e.nodeName}function vt(e){return ft(e)&&"LEGEND"===e.nodeName}function yt(e){let t=e.parentElement,n=null;for(;t&&!gt(t);)vt(t)&&(n=t),t=t.parentElement;let r=""===t?.getAttribute("disabled");return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(vt(t))return!1;t=t.previousElementSibling}return!0}(n))&&r}let bt=Symbol();function wt(...e){let t=E(e);T(()=>{t.current=e},[e]);let n=Ue(e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)});return e.every(e=>null==e||e?.[bt])?void 0:n}let Et=I(null);function xt(){let e=A(Et);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,xt),e}return e}Et.displayName="DescriptionContext";let Tt=ot(function(e,t){let n=N(),r=Ke(),{id:o=`headlessui-description-${n}`,...i}=e,l=xt(),s=wt(t);Be(()=>l.register(o),[o,l.register]);let a=Ge({...l.slot,disabled:r||!1}),u={ref:s,...l.props,id:o};return Ze()({ourProps:u,theirProps:i,slot:a,defaultTag:"p",name:l.name||"Description"})});Object.assign(Tt,{});var St=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(St||{});let Ot=I(null);function Pt(){let e=A(Ot);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Pt),e}return e}function At({inherit:e=!1}={}){let t=function(){var e,t;let n=null!=(t=null==(e=A(Ot))?void 0:e.value)?t:void 0;return n}(),[n,r]=S([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,O(()=>function(e){let t=Ue(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))),n=O(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return w.createElement(Ot.Provider,{value:n},e.children)},[r])]}Ot.displayName="LabelContext";let It=ot(function(e,t){var n;let r=N(),o=Pt(),i=A(ut),l=Ke(),{id:s=`headlessui-label-${r}`,htmlFor:a=i??(null==(n=o.props)?void 0:n.htmlFor),passive:u=!1,...c}=e,d=wt(t);Be(()=>o.register(s),[s,o.register]);let f=Ue(e=>{let t=e.currentTarget;if((e.target===e.currentTarget||!function(e){return!!dt(e)&&e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]')}(e.target))&&(ht(t)&&e.preventDefault(),o.props&&"onClick"in o.props&&"function"==typeof o.props.onClick&&o.props.onClick(e),ht(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(mt(e)&&("file"===e.type||"radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),p=Ge({...o.slot,disabled:l||!1}),m={ref:d,...o.props,id:s,htmlFor:a,onClick:f};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),Ze()({ourProps:m,theirProps:c,slot:p,defaultTag:a?"label":"div",name:o.name||"Label"})});function Lt(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Rt(e,t,n=!1){let[r,o]=S(()=>Lt(t));return Be(()=>{if(!t||!e)return;let n=He();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),o(e=>{let n=Lt(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}Object.assign(It,{});var Ct=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Ct||{});let Ft=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};var Mt,Nt,kt,Dt=Object.defineProperty,qt=(e,t,n)=>(((e,t,n)=>{t in e?Dt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,t+"",n),n),_t=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},jt=(e,t,n)=>(_t(e,t,"read from private field"),n?n.call(e):t.get(e)),Ht=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Vt=(e,t,n,r)=>(_t(e,t,"write to private field"),t.set(e,n),n);let Bt=class{constructor(e){Ht(this,Mt,{}),Ht(this,Nt,new Ft(()=>new Set)),Ht(this,kt,new Set),qt(this,"disposables",He()),Vt(this,Mt,e),ke.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return jt(this,Mt)}subscribe(e,t){if(ke.isServer)return()=>{};let n={selector:e,callback:t,current:e(jt(this,Mt))};return jt(this,kt).add(n),this.disposables.add(()=>{jt(this,kt).delete(n)})}on(e,t){return ke.isServer?()=>{}:(jt(this,Nt).get(e).add(t),this.disposables.add(()=>{jt(this,Nt).get(e).delete(t)}))}send(e){let t=this.reduce(jt(this,Mt),e);if(t!==jt(this,Mt)){Vt(this,Mt,t);for(let e of jt(this,kt)){let t=e.selector(jt(this,Mt));Wt(e.current,t)||(e.current=t,e.callback(t))}for(let t of jt(this,Nt).get(e.type))t(jt(this,Mt),e)}}};function Wt(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&Ut(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&Ut(e.entries(),t.entries()):!(!Gt(e)||!Gt(t))&&Ut(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function Ut(e,t){for(;;){let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}}function Gt(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function $t(e){let[t,n]=e(),r=He();return(...e)=>{t(...e),r.dispose(),r.microTask(n)}}Mt=new WeakMap,Nt=new WeakMap,kt=new WeakMap;var Kt=Object.defineProperty,zt=(e,t,n)=>(((e,t,n)=>{t in e?Kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),Yt=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Yt||{});let Qt={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(-1!==o){let t=e.stack.slice();return t.splice(o,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(-1===r)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},Xt=class e extends Bt{constructor(){super(...arguments),zt(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),zt(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new e({stack:[]})}reduce(e,t){return Ye(t.type,Qt,e,t)}};const Jt=new Ft(()=>Xt.new());var Zt,en={exports:{}},tn={};
|
|
1
|
+
import{R as e,u as t,e as n,s as r,k as o,i,X as l,j as s,I as a,O as u,U as c,c as d,T as f,d as p,A as m,a as h,Z as g,y as v,P as y}from"./Ld9VPzmf.js";import*as b from"react";import w,{useRef as E,useCallback as x,useEffect as T,useState as S,useMemo as O,useLayoutEffect as P,useContext as A,createContext as I,forwardRef as L,Fragment as R,isValidElement as C,cloneElement as F,createElement as M,useId as N,useSyncExternalStore as k}from"react";import{u as D,T as q}from"./x0a0HaZy.js";import*as _ from"react-dom";import{createPortal as j,flushSync as H}from"react-dom";const V=s=>{const a=e(),{props:{organizationId:u}}=t(),{role:c,isSuper:d}=D(),{isLoading:f,data:p,isError:m,error:h}=n({queryKey:[r.EVENT_IN_REVIEW_COUNT(s?.slug)],queryFn:async()=>{try{const e=await o.get(i.GET_CONTENTS_COUNT,{searchParams:{eventSlug:s?.slug,filter:`status:${l.IN_REVIEW}`},headers:{"x-org-id":u}}).json();if(e.error)throw new Error(e.error);return e.data}catch(e){throw new Error(e?.message||e||"Failed to fetch in review count")}},staleTime:0,enabled:!!c||d});return{loading:f,inReviewCount:p,error:m?h:null,increment:()=>{a.setQueryData([r.EVENT_IN_REVIEW_COUNT(s?.slug)],e=>e+1)},decrement:()=>{a.setQueryData([r.EVENT_IN_REVIEW_COUNT(s?.slug)],e=>e-1)}}},B=e=>e&&e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",W=typeof document<"u"?w.useLayoutEffect:()=>{};var U;const G=null!==(U=w.useInsertionEffect)&&void 0!==U?U:W;const $=e=>{var t;return null!==(t=e?.ownerDocument)&&void 0!==t?t:document},K=e=>e&&"window"in e&&e.window===e?e:$(e).defaultView||window;function z(e,t){return!(!t||!e)&&e.contains(t)}const Y=(e=document)=>e.activeElement;function Q(e){return e.target}function X(e){var t;if(typeof window>"u"||null==window.navigator)return!1;let n=null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands;return Array.isArray(n)&&n.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function J(e){var t;return typeof window<"u"&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Z(e){if("test"===process.env.NODE_ENV)return e;let t=null;return()=>(null==t&&(t=e()),t)}const ee=Z(function(){return J(/^Mac/i)}),te=Z(function(){return J(/^iPhone/i)}),ne=Z(function(){return J(/^iPad/i)||ee()&&navigator.maxTouchPoints>1}),re=Z(function(){return te()||ne()});Z(function(){return ee()||re()}),Z(function(){return X(/AppleWebKit/i)&&!oe()});const oe=Z(function(){return X(/Chrome/i)}),ie=Z(function(){return X(/Android/i)});function le(){let e=E(new Map),t=x((t,n,r,o)=>{let i=o?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o}),t.addEventListener(n,i,o)},[]),n=x((t,n,r,o)=>{var i;let l=(null===(i=e.current.get(r))||void 0===i?void 0:i.fn)||r;t.removeEventListener(n,l,o),e.current.delete(r)},[]),r=x(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return T(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function se(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function ae(e){let t=E({isFocused:!1,observer:null});W(()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=function(e){const t=E(null);return G(()=>{t.current=e},[e]),x((...e)=>{const n=t.current;return n?.(...e)},[])}(t=>{e?.(t)});return x(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,o=e=>{if(t.current.isFocused=!1,r.disabled){let t=se(e);n(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}Z(function(){return X(/Firefox/i)});let ue=null,ce=new Set,de=new Map,fe=!1,pe=!1;const me={Tab:!0,Escape:!0};function he(e,t){for(let n of ce)n(e,t)}function ge(e){fe=!0,function(e){return!(e.metaKey||!ee()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(ue="keyboard",he("keyboard",e))}function ve(e){ue="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(fe=!0,he("pointer",e))}function ye(e){(function(e){return!(""!==e.pointerType||!e.isTrusted)||(ie()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)})(e)&&(fe=!0,ue="virtual")}function be(e){e.target===window||e.target===document||!e.isTrusted||(!fe&&!pe&&(ue="virtual",he("virtual",e)),fe=!1,pe=!1)}function we(){fe=!1,pe=!0}function Ee(e){if(typeof window>"u"||typeof document>"u"||de.get(K(e)))return;const t=K(e),n=$(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){fe=!0,r.apply(this,arguments)},n.addEventListener("keydown",ge,!0),n.addEventListener("keyup",ge,!0),n.addEventListener("click",ye,!0),t.addEventListener("focus",be,!0),t.addEventListener("blur",we,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ve,!0),n.addEventListener("pointermove",ve,!0),n.addEventListener("pointerup",ve,!0)):"test"===process.env.NODE_ENV&&(n.addEventListener("mousedown",ve,!0),n.addEventListener("mousemove",ve,!0),n.addEventListener("mouseup",ve,!0)),t.addEventListener("beforeunload",()=>{xe(e)},{once:!0}),de.set(t,{focus:r})}const xe=(e,t)=>{const n=K(e),r=$(e);t&&r.removeEventListener("DOMContentLoaded",t),de.has(n)&&(n.HTMLElement.prototype.focus=de.get(n).focus,r.removeEventListener("keydown",ge,!0),r.removeEventListener("keyup",ge,!0),r.removeEventListener("click",ye,!0),n.removeEventListener("focus",be,!0),n.removeEventListener("blur",we,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ve,!0),r.removeEventListener("pointermove",ve,!0),r.removeEventListener("pointerup",ve,!0)):"test"===process.env.NODE_ENV&&(r.removeEventListener("mousedown",ve,!0),r.removeEventListener("mousemove",ve,!0),r.removeEventListener("mouseup",ve,!0)),de.delete(n))};function Te(){return"pointer"!==ue}typeof document<"u"&&function(e){const t=$(e);let n;"loading"!==t.readyState?Ee(e):(n=()=>{Ee(e)},t.addEventListener("DOMContentLoaded",n))}();const Se=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Oe(e,t,n){Ee(),T(()=>{let t=(t,r)=>{(function(e,t,n){let r=$(n?.target);const o=typeof window<"u"?K(n?.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?K(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?K(n?.target).HTMLElement:HTMLElement,s=typeof window<"u"?K(n?.target).KeyboardEvent:KeyboardEvent;return!((e=e||r.activeElement instanceof o&&!Se.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof l&&r.activeElement.isContentEditable)&&"keyboard"===t&&n instanceof s&&!me[n.key])})(!!n?.isTextInput,t,r)&&e(Te())};return ce.add(t),()=>{ce.delete(t)}},t)}function Pe(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=E({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=le(),a=x(e=>{e.currentTarget.contains(e.target)&&i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(e),o&&o(!1))},[n,o,i,s]),u=ae(a),c=x(e=>{if(!e.currentTarget.contains(e.target))return;const t=$(e.target),n=Y(t);if(!i.current.isFocusWithin&&n===Q(e.nativeEvent)){r&&r(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let n=e.currentTarget;l(t,"focus",e=>{if(i.current.isFocusWithin&&!z(n,e.target)){let r=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});!function(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}(r,n);let o=se(r);a(o)}},{capture:!0})}},[r,o,u,l,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:a}}}let Ae=!1,Ie=0;function Le(){Ae=!0,setTimeout(()=>{Ae=!1},50)}function Re(e){"touch"===e.pointerType&&Le()}function Ce(){if(!(typeof document>"u"))return 0===Ie&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Re):"test"===process.env.NODE_ENV&&document.addEventListener("touchend",Le)),Ie++,()=>{Ie--,!(Ie>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Re):"test"===process.env.NODE_ENV&&document.removeEventListener("touchend",Le))}}function Fe(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=E({isFocused:!1,isFocusVisible:t||Te()}),[i,l]=S(!1),[s,a]=S(()=>o.current.isFocused&&o.current.isFocusVisible),u=x(()=>a(o.current.isFocused&&o.current.isFocusVisible),[]),c=x(e=>{o.current.isFocused=e,l(e),u()},[u]);Oe(e=>{o.current.isFocusVisible=e,u()},[],{isTextInput:n});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=x(e=>{if(e.target===e.currentTarget)return r&&r(e),o&&o(!1),!0},[r,o]),l=ae(i),s=x(e=>{const t=$(e.target),r=t?Y(t):Y();e.target===e.currentTarget&&r===Q(e.nativeEvent)&&(n&&n(e),o&&o(!0),l(e))},[o,n,l]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:t||!r&&!o?void 0:i}}}({isDisabled:r,onFocusChange:c}),{focusWithinProps:f}=Pe({isDisabled:!r,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:s,focusProps:r?f:d}}var Me=Object.defineProperty,Ne=(e,t,n)=>(((e,t,n)=>{t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let ke=new class{constructor(){Ne(this,"current",this.detect()),Ne(this,"handoffState","pending"),Ne(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function De(e){var t;return ke.isServer?null:null==e?document:null!=(t=e?.ownerDocument)?t:document}function qe(e){var t,n;return ke.isServer?null:null==e?document:null!=(n=null==(t=e?.getRootNode)?void 0:t.call(e))?n:document}function _e(e){var t,n;return null!=(n=null==(t=qe(e))?void 0:t.activeElement)?n:null}function je(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function He(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add(()=>e.removeEventListener(n,r,o))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame:(...e)=>t.requestAnimationFrame(()=>t.requestAnimationFrame(...e)),setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return je(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=He();return e(t),this.add(()=>t.dispose())},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Ve(){let[e]=S(He);return T(()=>()=>e.dispose(),[e]),e}let Be=(e,t)=>{ke.isServer?T(e,t):P(e,t)};function We(e){let t=E(e);return Be(()=>{t.current=e},[e]),t}let Ue=function(e){let t=We(e);return w.useCallback((...e)=>t.current(...e),[t])};function Ge(e){return O(()=>e,Object.values(e))}let $e=I(void 0);function Ke(){return A($e)}function ze(...e){return Array.from(new Set(e.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}function Ye(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ye),r}var Qe,Xe=((Qe=Xe||{})[Qe.None=0]="None",Qe[Qe.RenderStrategy=1]="RenderStrategy",Qe[Qe.Static=2]="Static",Qe),Je=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Je||{});function Ze(){let e=function(){let e=E([]),t=x(t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>null==e))return e.current=n,t}}();return x(t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??tt;let a=nt(t,e);if(i)return et(a,n,r,l,s);let u=o??0;if(2&u){let{static:e=!1,...t}=a;if(e)return et(t,n,r,l,s)}if(1&u){let{unmount:e=!0,...t}=a;return Ye(e?0:1,{0:()=>null,1:()=>et({...t,hidden:!0,style:{display:"none"}},n,r,l,s)})}return et(a,n,r,l,s)}({mergeRefs:e,...t}),[e])}function et(e,t={},n,r,o){let{as:i=n,children:l,refName:s="ref",...a}=lt(e,["unmount","static"]),u=void 0!==e.ref?{[s]:e.ref}:{},c="function"==typeof l?l(t):l;"className"in a&&a.className&&"function"==typeof a.className&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){d["data-headlessui-state"]=n.join(" ");for(let e of n)d[`data-${e}`]=""}}if(at(i)&&(Object.keys(it(a)).length>0||Object.keys(it(d)).length>0)){if(!(!C(c)||Array.isArray(c)&&c.length>1||function(e){return at(e.type)}(c))){let e=c.props,t=e?.className,n="function"==typeof t?(...e)=>ze(t(...e),a.className):ze(t,a.className),r=n?{className:n}:{},i=nt(c.props,it(lt(a,["ref"])));for(let e in d)e in i&&delete d[e];return F(c,Object.assign({},i,d,u,{ref:o(st(c),u.ref)},r))}if(Object.keys(it(a)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(it(a)).concat(Object.keys(it(d))).map(e=>` - ${e}`).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>` - ${e}`).join("\n")].join("\n"))}return M(i,Object.assign({},lt(a,["ref"]),!at(i)&&u,!at(i)&&d),c)}function tt(...e){return e.every(e=>null==e)?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function nt(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=e?.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||t?.nativeEvent instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function rt(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)e?.(...t)}});return t}function ot(e){var t;return Object.assign(L(e),{displayName:null!=(t=e.displayName)?t:e.name})}function it(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function lt(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function st(e){return w.version.split(".")[0]>="19"?e.props.ref:e.ref}function at(e){return e===R||e===Symbol.for("react.fragment")}let ut=I(void 0);function ct(e){return"object"==typeof e&&null!==e&&"nodeType"in e}function dt(e){return ct(e)&&"tagName"in e}function ft(e){return dt(e)&&"accessKey"in e}function pt(e){return dt(e)&&"tabIndex"in e}function mt(e){return ft(e)&&"INPUT"===e.nodeName}function ht(e){return ft(e)&&"LABEL"===e.nodeName}function gt(e){return ft(e)&&"FIELDSET"===e.nodeName}function vt(e){return ft(e)&&"LEGEND"===e.nodeName}function yt(e){let t=e.parentElement,n=null;for(;t&&!gt(t);)vt(t)&&(n=t),t=t.parentElement;let r=""===t?.getAttribute("disabled");return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(vt(t))return!1;t=t.previousElementSibling}return!0}(n))&&r}let bt=Symbol();function wt(...e){let t=E(e);T(()=>{t.current=e},[e]);let n=Ue(e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)});return e.every(e=>null==e||e?.[bt])?void 0:n}let Et=I(null);function xt(){let e=A(Et);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,xt),e}return e}Et.displayName="DescriptionContext";let Tt=ot(function(e,t){let n=N(),r=Ke(),{id:o=`headlessui-description-${n}`,...i}=e,l=xt(),s=wt(t);Be(()=>l.register(o),[o,l.register]);let a=Ge({...l.slot,disabled:r||!1}),u={ref:s,...l.props,id:o};return Ze()({ourProps:u,theirProps:i,slot:a,defaultTag:"p",name:l.name||"Description"})});Object.assign(Tt,{});var St=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(St||{});let Ot=I(null);function Pt(){let e=A(Ot);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Pt),e}return e}function At({inherit:e=!1}={}){let t=function(){var e,t;let n=null!=(t=null==(e=A(Ot))?void 0:e.value)?t:void 0;return n}(),[n,r]=S([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,O(()=>function(e){let t=Ue(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))),n=O(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return w.createElement(Ot.Provider,{value:n},e.children)},[r])]}Ot.displayName="LabelContext";let It=ot(function(e,t){var n;let r=N(),o=Pt(),i=A(ut),l=Ke(),{id:s=`headlessui-label-${r}`,htmlFor:a=i??(null==(n=o.props)?void 0:n.htmlFor),passive:u=!1,...c}=e,d=wt(t);Be(()=>o.register(s),[s,o.register]);let f=Ue(e=>{let t=e.currentTarget;if((e.target===e.currentTarget||!function(e){return!!dt(e)&&e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]')}(e.target))&&(ht(t)&&e.preventDefault(),o.props&&"onClick"in o.props&&"function"==typeof o.props.onClick&&o.props.onClick(e),ht(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(mt(e)&&("file"===e.type||"radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),p=Ge({...o.slot,disabled:l||!1}),m={ref:d,...o.props,id:s,htmlFor:a,onClick:f};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),Ze()({ourProps:m,theirProps:c,slot:p,defaultTag:a?"label":"div",name:o.name||"Label"})});function Lt(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Rt(e,t,n=!1){let[r,o]=S(()=>Lt(t));return Be(()=>{if(!t||!e)return;let n=He();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),o(e=>{let n=Lt(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}Object.assign(It,{});var Ct=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Ct||{});let Ft=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};var Mt,Nt,kt,Dt=Object.defineProperty,qt=(e,t,n)=>(((e,t,n)=>{t in e?Dt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,t+"",n),n),_t=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},jt=(e,t,n)=>(_t(e,t,"read from private field"),n?n.call(e):t.get(e)),Ht=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Vt=(e,t,n,r)=>(_t(e,t,"write to private field"),t.set(e,n),n);let Bt=class{constructor(e){Ht(this,Mt,{}),Ht(this,Nt,new Ft(()=>new Set)),Ht(this,kt,new Set),qt(this,"disposables",He()),Vt(this,Mt,e),ke.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return jt(this,Mt)}subscribe(e,t){if(ke.isServer)return()=>{};let n={selector:e,callback:t,current:e(jt(this,Mt))};return jt(this,kt).add(n),this.disposables.add(()=>{jt(this,kt).delete(n)})}on(e,t){return ke.isServer?()=>{}:(jt(this,Nt).get(e).add(t),this.disposables.add(()=>{jt(this,Nt).get(e).delete(t)}))}send(e){let t=this.reduce(jt(this,Mt),e);if(t!==jt(this,Mt)){Vt(this,Mt,t);for(let e of jt(this,kt)){let t=e.selector(jt(this,Mt));Wt(e.current,t)||(e.current=t,e.callback(t))}for(let t of jt(this,Nt).get(e.type))t(jt(this,Mt),e)}}};function Wt(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&Ut(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&Ut(e.entries(),t.entries()):!(!Gt(e)||!Gt(t))&&Ut(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function Ut(e,t){for(;;){let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}}function Gt(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function $t(e){let[t,n]=e(),r=He();return(...e)=>{t(...e),r.dispose(),r.microTask(n)}}Mt=new WeakMap,Nt=new WeakMap,kt=new WeakMap;var Kt=Object.defineProperty,zt=(e,t,n)=>(((e,t,n)=>{t in e?Kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),Yt=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Yt||{});let Qt={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(-1!==o){let t=e.stack.slice();return t.splice(o,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(-1===r)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},Xt=class e extends Bt{constructor(){super(...arguments),zt(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),zt(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new e({stack:[]})}reduce(e,t){return Ye(t.type,Qt,e,t)}};const Jt=new Ft(()=>Xt.new());var Zt,en={exports:{}},tn={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* use-sync-external-store-with-selector.production.js
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,c as e}from"./
|
|
1
|
+
import{j as t,c as e}from"./Ld9VPzmf.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{P as e,j as s,I as r,g as a,T as o}from"./
|
|
1
|
+
import{P as e,j as s,I as r,g as a,T as o}from"./Ld9VPzmf.js";const c=(s,r)=>{const a=new Map;s?.forEach(e=>{a.set(e._id,e)});const o=[];let c=a.get(r);for(;c;)o.unshift({_id:c._id,name:c.name,href:e.FOLDER_EVENTS(c?._id),color:c.color}),c=a.get(c.parentFolderId);return o},l=({folder:e})=>s.jsxs("li",{className:"qc:flex qc:items-center",children:[s.jsx(r,{name:"material-symbols:arrow-forward-ios-rounded"}),s.jsxs(a,{to:e.href,className:"qc:flex qc:items-center qc:gap-2 qc:rounded qc:bg-background-primary-dark qc:bg-opacity-0 qc:px-4 qc:py-1 hover:qc:bg-opacity-10",children:[s.jsx(r,{name:"material-symbols:folder",size:"xl",style:{color:e.color}}),s.jsx(o,{variant:"h4",color:"secondary",className:"qc:whitespace-nowrap",children:e.name})]})]},e.name),n=({homeLink:e,data:o})=>s.jsxs("ol",{role:"list",className:"scrollbar-hide qc:flex qc:max-w-full qc:items-center qc:space-x-3 qc:overflow-y-scroll",children:[s.jsx("li",{children:s.jsxs(a,{to:e,className:"qc:text-foreground hover:qc:text-muted",children:[s.jsx(r,{name:"material-symbols:home-outline-rounded",color:"secondary",size:"xl"}),s.jsx("span",{className:"qc:sr-only",children:"Home"})]})}),o?.map(e=>s.jsx(l,{folder:e},e._id))]});export{n as F,c as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e,j as c,c as t}from"./
|
|
1
|
+
import{u as e,j as c,c as t}from"./Ld9VPzmf.js";const r=({label:r,type:s="text",step:o=1,disabled:q,error:a,info:d,iconSVG:i,className:l="",...n})=>{const{props:{textClassName:m}}=e();return c.jsxs("div",{className:"qc:relative",children:[r&&c.jsx("div",{className:"qc:mb-1 qc:flex qc:items-center qc:gap-1",children:c.jsx("label",{className:t("qc:select-none qc:text-sm qc:font-medium",m,q?"qc:text-muted":"qc:text-foreground"),children:r})}),c.jsx("input",{type:s,disabled:q,step:"number"===s?o:void 0,"aria-invalid":!!a,className:t("qc:text-foreground qc:border-border qc:shadow-outer focus:qc:border-primary focus:qc:ring-primary qc:peer qc:w-full qc:rounded qc:border qc:p-2 focus:qc:outline-none",q?"qc:text-muted qc:bg-transparent":"qc:text-foreground qc:bg-white",a?"qc:border-destructive":"qc:border-border",i?"qc:pl-9":"",m,l),...n}),c.jsx("div",{className:t("qc:text-destructive qc:absolute qc:left-0 qc:flex qc:items-center qc:gap-1 qc:text-xs qc:transition-all qc:duration-300 qc:md:text-sm",a?"qc:-bottom-5 qc:opacity-100":"qc:-bottom-1 qc:opacity-0",m),children:c.jsx("label",{children:a})})]})};export{r as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,T as r,P as t,a,D as o,Q as s}from"./
|
|
1
|
+
import{c as e,T as r,P as t,a,D as o,Q as s}from"./Dx52SzWS.js";import{a5 as l,a6 as n,a7 as c}from"./Ld9VPzmf.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 +1 @@
|
|
|
1
|
-
import{u as e,j as s,J as a,T as r,g as o,P as l}from"./
|
|
1
|
+
import{u as e,j as s,J as a,T as r,g as o,P as l}from"./Ld9VPzmf.js";import{useState as i}from"react";import{I as n}from"./Dhcvm9yI.js";import{S as d}from"./C27Sy5Nr.js";import{u as t,C as m,o as c,c as u,a as g,b as p}from"./HhCRmfOk.js";const h={fname:"",lname:"",email:"",password:"",confirmPassword:""},w=u().shape({fname:g().required("First name is required"),lname:g().required("Last name is required"),email:g().required("Please enter your Email").email("Enter a valid Email"),password:g().required("Please enter your password").min(8,"Min password length is 8"),confirmPassword:g().required("Please confirm your password").oneOf([p("password"),null],"Passwords do not match")}),f=()=>{const[u,g]=i(null),[p,f]=i(!1),[j,x]=i({google:!1,apple:!1}),[q,v]=i({showPassword:!1,showConfirmPassword:!1}),{registerUsingEmail:y,loginWithGoogle:C,loginWithApple:P}=e(),b=async(e,s)=>{x(s=>({...s,[e]:!0})),g(null);try{await s()}catch(s){g(s.message||`Failed to sign up with ${e.charAt(0).toUpperCase()+e.slice(1)}`)}finally{x(s=>({...s,[e]:!1}))}},{control:N,handleSubmit:B,formState:{errors:S}}=t({defaultValues:h,mode:"onSubmit",resolver:c(w)});return s.jsxs("div",{className:"qc:w-full qc:space-y-8",children:[s.jsxs("form",{noValidate:!0,autoComplete:"off",onSubmit:B(async e=>{const{email:s,password:a,fname:r,lname:o}=e;f(!0);try{const e=await y(s.toLowerCase(),a,r,o);e?.error&&g(e.error)}catch(e){g(e)}finally{f(!1)}}),className:"qc:space-y-4",children:[s.jsxs("div",{className:"qc:grid qc:grid-cols-2 qc:gap-4",children:[s.jsx(m,{name:"fname",control:N,render:({field:{value:e,onChange:a,onBlur:r}})=>s.jsx(n,{label:"First name",disabled:p,type:"text",value:e,onChange:a,onBlur:r,error:S.fname?.message})}),s.jsx(m,{name:"lname",control:N,render:({field:{value:e,onChange:a,onBlur:r}})=>s.jsx(n,{label:"Last name",disabled:p,type:"text",value:e,onChange:a,onBlur:r,error:S.lname?.message})})]}),s.jsx(m,{name:"email",control:N,render:({field:{value:e,onChange:a,onBlur:r}})=>s.jsx(n,{label:"Email",disabled:p,type:"email",value:e,onChange:a,onBlur:r,error:S.email?.message})}),s.jsxs("div",{className:"qc:relative",children:[s.jsx(m,{name:"password",control:N,render:({field:{value:e,onChange:a,onBlur:r}})=>s.jsx(n,{label:"Password",disabled:p,type:q.showPassword?"text":"password",value:e,onChange:a,onBlur:r,error:S.password?.message})}),s.jsx(a,{variant:"ghost",color:"primary",className:"qc:absolute qc:-right-5 qc:top-7",icon:q.showPassword?"mdi:eye-outline":"mdi:eye-off-outline",onClick:()=>v({...q,showPassword:!q.showPassword})})]}),s.jsxs("div",{className:"qc:relative",children:[s.jsx(m,{name:"confirmPassword",control:N,render:({field:{value:e,onChange:a,onBlur:r}})=>s.jsx(n,{label:"Confirm password",disabled:p,type:q.showConfirmPassword?"text":"password",value:e,onChange:a,onBlur:r,error:S.confirmPassword?.message})}),s.jsx(a,{variant:"ghost",color:"primary",className:"qc:absolute qc:-right-5 qc:top-7",icon:q.showConfirmPassword?"mdi:eye-outline":"mdi:eye-off-outline",onClick:()=>v({...q,showConfirmPassword:!q.showConfirmPassword})})]}),u&&s.jsx(r,{weight:"medium",color:"error",align:"center",children:u}),u&&s.jsx(r,{weight:"medium",color:"error",align:"center",children:u}),s.jsx("div",{className:"qc:flex qc:justify-end",children:s.jsx(o,{to:l.FORGOT_PASSWORD,state:location?.state,children:s.jsx(r,{variant:"h6",className:"qc:w-fit",children:"Forgot password?"})})}),s.jsx(a,{type:"submit",color:"primary",className:"qc:w-full",disabled:p,loading:p,children:"Register"})]}),s.jsxs("div",{className:"qc:grid qc:grid-cols-2 qc:gap-2",children:[s.jsx(d,{disabled:p||j.google||j.apple,loading:j.google,onClick:()=>b("google",C),provider:"google"}),s.jsx(d,{disabled:p||j.google||j.apple,loading:j.apple,onClick:()=>b("apple",P),provider:"apple"})]})]})};export{f as default};
|