vendor: 4,226 bytes, lines 1-9
1var fD=Object.defineProperty;var A_=e=>{throw TypeError(e)};var hD=(e,t,n)=>t in e?fD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var It=(e,t,n)=>hD(e,typeof t!="symbol"?t+"":t,n),_g=(e,t,n)=>t.has(e)||A_("Cannot "+n);var Z=(e,t,n)=>(_g(e,t,"read from private field"),n?n.call(e):t.get(e)),qe=(e,t,n)=>t.has(e)?A_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ke=(e,t,n,r)=>(_g(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),tt=(e,t,n)=>(_g(e,t,"access private method"),n);var bf=(e,t,n,r)=>({set _(i){ke(e,t,i,n)},get _(){return Z(e,t,r)}});function mD(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pD(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ng={exports:{}},Lc={},Sg={exports:{}},vt={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var R_;function gD(){if(R_)return vt;R_=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),f=Symbol.iterator;function m(B){return B===null||typeof B!="object"?null:(B=f&&B[f]||B["@@iterator"],typeof B=="function"?B:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function v(B,V,q){this.props=B,this.context=V,this.refs=x,this.updater=q||p}v.prototype.isReactComponent={},v.prototype.setState=function(B,V){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,V,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function y(){}y.prototype=v.prototype;function j(B,V,q){this.props=B,this.context=V,this.refs=x,this.updater=q||p}var _=j.prototype=new y;_.constructor=j,w(_,v.prototype),_.isPureReactComponent=!0;var N=Array.isArray,C=Object.prototype.hasOwnProperty,S={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function R(B,V,q){var J,te={},K=null,Q=null;if(V!=null)for(J in V.ref!==void 0&&(Q=V.ref),V.key!==void 0&&(K=""+V.key),V
vendor: 11,904 bytes, lines 9-33
9)C.call(V,J)&&!P.hasOwnProperty(J)&&(te[J]=V[J]);var ne=arguments.length-2;if(ne===1)te.children=q;else if(1<ne){for(var se=Array(ne),ce=0;ce<ne;ce++)se[ce]=arguments[ce+2];te.children=se}if(B&&B.defaultProps)for(J in ne=B.defaultProps,ne)te[J]===void 0&&(te[J]=ne[J]);return{$$typeof:e,type:B,key:K,ref:Q,props:te,_owner:S.current}}function L(B,V){return{$$typeof:e,type:B.type,key:V,ref:B.ref,props:B.props,_owner:B._owner}}function D(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function T(B){var V={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(q){return V[q]})}var O=/\/+/g;function M(B,V){return typeof B=="object"&&B!==null&&B.key!=null?T(""+B.key):V.toString(36)}function U(B,V,q,J,te){var K=typeof B;(K==="undefined"||K==="boolean")&&(B=null);var Q=!1;if(B===null)Q=!0;else switch(K){case"string":case"number":Q=!0;break;case"object":switch(B.$$typeof){case e:case t:Q=!0}}if(Q)return Q=B,te=te(Q),B=J===""?"."+M(Q,0):J,N(te)?(q="",B!=null&&(q=B.replace(O,"$&/")+"/"),U(te,V,q,"",function(ce){return ce})):te!=null&&(D(te)&&(te=L(te,q+(!te.key||Q&&Q.key===te.key?"":(""+te.key).replace(O,"$&/")+"/")+B)),V.push(te)),1;if(Q=0,J=J===""?".":J+":",N(B))for(var ne=0;ne<B.length;ne++){K=B[ne];var se=J+M(K,ne);Q+=U(K,V,q,se,te)}else if(se=m(B),typeof se=="function")for(B=se.call(B),ne=0;!(K=B.next()).done;)K=K.value,se=J+M(K,ne++),Q+=U(K,V,q,se,te);else if(K==="object")throw V=String(B),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return Q}function z(B,V,q){if(B==null)return B;var J=[],te=0;return U(B,J,"","",function(K){return V.call(q,K,te++)}),J}function H(B){if(B._status===-1){var V=B._result;V=V(),V.then(function(q){(B._status===0||B._status===-1)&&(B._status=1,B._result=q)},function(q){(B._status===0||B._status===-1)&&(B._status=2,B._result=q)}),B._status===-1&&(B._status=0,B._result=V)}if(B._status===1)return B._result.default;throw B._result}var Y={current:null},G={transition:null},$={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:G,ReactCurrentOwner:S};function I(){throw Error("act(...) is not supported in production builds of React.")}return vt.Children={map:z,forEach:function(B,V,q){z(B,function(){V.apply(this,arguments)},q)},count:function(B){var V=0;return z(B,function(){V++}),V},toArray:function(B){return z(B,function(V){return V})||[]},only:function(B){if(!D(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},vt.Component=v,vt.Fragment=n,vt.Profiler=i,vt.PureComponent=j,vt.StrictMode=r,vt.Suspense=d,vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,vt.act=I,vt.cloneElement=function(B,V,q){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var J=w({},B.props),te=B.key,K=B.ref,Q=B._owner;if(V!=null){if(V.ref!==void 0&&(K=V.ref,Q=S.current),V.key!==void 0&&(te=""+V.key),B.type&&B.type.defaultProps)var ne=B.type.defaultProps;for(se in V)C.call(V,se)&&!P.hasOwnProperty(se)&&(J[se]=V[se]===void 0&&ne!==void 0?ne[se]:V[se])}var se=arguments.length-2;if(se===1)J.children=q;else if(1<se){ne=Array(se);for(var ce=0;ce<se;ce++)ne[ce]=arguments[ce+2];J.children=ne}return{$$typeof:e,type:B.type,key:te,ref:K,props:J,_owner:Q}},vt.createContext=function(B){return B={$$typeof:o,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:a,_context:B},B.Consumer=B},vt.createElement=R,vt.createFactory=function(B){var V=R.bind(null,B);return V.type=B,V},vt.createRef=function(){return{current:null}},vt.forwardRef=function(B){return{$$typeof:c,render:B}},vt.isValidElement=D,vt.lazy=function(B){return{$$typeof:g,_payload:{_status:-1,_result:B},_init:H}},vt.memo=function(B,V){return{$$typeof:h,type:B,compare:V===void 0?null:V}},vt.startTransition=function(B){var V=G.transition;G.transition={};try{B()}finally{G.transition=V}},vt.unstable_act=I,vt.useCallback=function(B,V){return Y.current.useCallback(B,V)},vt.useContext=function(B){return Y.current.useContext(B)},vt.useDebugValue=function(){},vt.useDeferredValue=function(B){return Y.current.useDeferredValue(B)},vt.useEffect=function(B,V){return Y.current.useEffect(B,V)},vt.useId=function(){return Y.current.useId()},vt.useImperativeHandle=function(B,V,q){return Y.current.useImperativeHandle(B,V,q)},vt.useInsertionEffect=function(B,V){return Y.current.useInsertionEffect(B,V)},vt.useLayoutEffect=function(B,V){return Y.current.useLayoutEffect(B,V)},vt.useMemo=function(B,V){return Y.current.useMemo(B,V)},vt.useReducer=function(B,V,q){return Y.current.useReducer(B,V,q)},vt.useRef=function(B){return Y.current.useRef(B)},vt.useState=function(B){return Y.current.useState(B)},vt.useSyncExternalStore=function(B,V,q){return Y.current.useSyncExternalStore(B,V,q)},vt.useTransition=function(){return Y.current.useTransition()},vt.version="18.3.1",vt}var O_;function qu(){return O_||(O_=1,Sg.exports=gD()),Sg.exports}/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var M_;function yD(){if(M_)return Lc;M_=1;var e=qu(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(c,d,h){var g,f={},m=null,p=null;h!==void 0&&(m=""+h),d.key!==void 0&&(m=""+d.key),d.ref!==void 0&&(p=d.ref);for(g in d)r.call(d,g)&&!a.hasOwnProperty(g)&&(f[g]=d[g]);if(c&&c.defaultProps)for(g in d=c.defaultProps,d)f[g]===void 0&&(f[g]=d[g]);return{$$typeof:t,type:c,key:m,ref:p,props:f,_owner:i.current}}return Lc.Fragment=n,Lc.jsx=o,Lc.jsxs=o,Lc}var L_;function xD(){return L_||(L_=1,Ng.exports=yD()),Ng.exports}var s=xD(),E=qu();const Ce=Dl(E),G0=mD({__proto__:null,default:Ce},[E]);var jf={},kg={exports:{}},ar={},Cg={exports:{}},Eg={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var D_;function vD(){return D_||(D_=1,(function(e){function t(G,$){var I=G.length;G.push($);e:for(;0<I;){var B=I-1>>>1,V=G[B];if(0<i(V,$))G[B]=$,G[I]=V,I=B;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var $=G[0],I=G.pop();if(I!==$){G[0]=I;e:for(var B=0,V=G.length,q=V>>>1;B<q;){var J=2*(B+1)-1,te=G[J],K=J+1,Q=G[K];if(0>i(te,I))K<V&&0>i(Q,te)?(G[B]=Q,G[K]=I,B=K):(G[B]=te,G[J]=I,B=J);else if(K<V&&0>i(Q,I))G[B]=Q,G[K]=I,B=K;else break e}}return $}function i(G,$){var I=G.sortIndex-$.sortIndex;return I!==0?I:G.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,c=o.now();e.unstable_now=function(){return o.now()-c}}var d=[],h=[],g=1,f=null,m=3,p=!1,w=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(G){for(var $=n(h);$!==null;){if($.callback===null)r(h);else if($.startTime<=G)r(h),$.sortIndex=$.expirationTime,t(d,$);else break;$=n(h)}}function N(G){if(x=!1,_(G),!w)if(n(d)!==null)w=!0,H(C);else{var $=n(h);$!==null&&Y(N,$.startTime-G)}}function C(G,$){w=!1,x&&(x=!1,y(R),R=-1),p=!0;var I=m;try{for(_($),f=n(d);f!==null&&(!(f.expirationTime>$)||G&&!T());){var B=f.callback;if(typeof B=="function"){f.callback=null,m=f.priorityLevel;var V=B(f.expirationTime<=$);$=e.unstable_now(),typeof V=="function"?f.callback=V:f===n(d)&&r(d),_($)}else r(d);f=n(d)}if(f!==null)var q=!0;else{var J=n(h);J!==null&&Y(N,J.startTime-$),q=!1}return q}finally{f=null,m=I,p=!1}}var S=!1,P=null,R=-1,L=5,D=-1;function T(){return!(e.unstable_now()-D<L)}function O(){if(P!==null){var G=e.unstable_now();D=G;var $=!0;try{$=P(!0,G)}finally{$?M():(S=!1,P=null)}}else S=!1}var M;if(typeof j=="function")M=function(){j(O)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,z=U.port2;U.port1.onmessage=O,M=function(){z.postMessage(null)}}else M=function(){v(O,0)};function H(G){P=G,S||(S=!0,M())}function Y(G,$){R=v(function(){G(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){w||p||(w=!0,H(C))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(G){switch(m){case 1:case 2:case 3:var $=3;break;default:$=m}var I=m;m=$;try{return G()}finally{m=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,$){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var I=m;m=G;try{return $()}finally{m=I}},e.unstable_scheduleCallback=function(G,$,I){var B=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?B+I:B):I=B,G){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=I+V,G={id:g++,callback:$,priorityLevel:G,startTime:I,expirationTime:V,sortIndex:-1},I>B?(G.sortIndex=I,t(h,G),n(d)===null&&G===n(h)&&(x?(y(R),R=-1):x=!0,Y(N,I-B))):(G.sortIndex=V,t(d,G),w||p||(w=!0,H(C))),G},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(G){var $=m;return function(){var I=m;m=$;try{return G.apply(this,arguments)}finally{m=I}}}})(Eg)),Eg}var I_;function bD(){return I_||(I_=1,Cg.exports=vD()),Cg.exports}/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var F_;function wD(){if(F_)return ar;F_=1;var e=qu(),t=bD();function n(l){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+l,b=1;b<arguments.length;b++)u+="&args[]="+encodeURIComponent(arguments[b]);return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function a(l,u){o(l,u),o(l+"Capture",u)}function o(l,u){for(i[l]=u,l=0;l<u.length;l++)r.add(u[l])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},f={};function m(l){return d.call(f,l)?!0:d.call(g,l)?!1:h.test(l)?f[l]=!0:(g[l]=!0,!1)}function p(l,u,b,k){if(b!==null&&b.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return k?!1:b!==null?!b.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function w(l,u,b,k){if(u===null||typeof u>"u"||p(l,u,b,k))return!0;
vendor: 40,847 bytes, lines 33-37
33if(k)return!1;if(b!==null)switch(b.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function x(l,u,b,k,A,F,W){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=k,this.attributeNamespace=A,this.mustUseProperty=b,this.propertyName=l,this.type=u,this.sanitizeURL=F,this.removeEmptyString=W}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){v[l]=new x(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var u=l[0];v[u]=new x(u,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){v[l]=new x(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){v[l]=new x(l,2,!1,l,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(l){v[l]=new x(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){v[l]=new x(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){v[l]=new x(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){v[l]=new x(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){v[l]=new x(l,5,!1,l.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function j(l){return l[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(l){var u=l.replace(y,j);v[u]=new x(u,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var u=l.replace(y,j);v[u]=new x(u,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var u=l.replace(y,j);v[u]=new x(u,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){v[l]=new x(l,1,!1,l.toLowerCase(),null,!1,!1)}),v.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){v[l]=new x(l,1,!1,l.toLowerCase(),null,!0,!0)});function _(l,u,b,k){var A=v.hasOwnProperty(u)?v[u]:null;(A!==null?A.type!==0:k||!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(w(u,b,A,k)&&(b=null),k||A===null?m(u)&&(b===null?l.removeAttribute(u):l.setAttribute(u,""+b)):A.mustUseProperty?l[A.propertyName]=b===null?A.type===3?!1:"":b:(u=A.attributeName,k=A.attributeNamespace,b===null?l.removeAttribute(u):(A=A.type,b=A===3||A===4&&b===!0?"":""+b,k?l.setAttributeNS(k,u,b):l.setAttribute(u,b))))}var N=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for("react.element"),S=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),G=Symbol.iterator;function $(l){return l===null||typeof l!="object"?null:(l=G&&l[G]||l["@@iterator"],typeof l=="function"?l:null)}var I=Object.assign,B;function V(l){if(B===void 0)try{throw Error()}catch(b){var u=b.stack.trim().match(/\n( *(at )?)/);B=u&&u[1]||""}return` 34`+B+l}var q=!1;function J(l,u){if(!l||q)return"";q=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(fe){var k=fe}Reflect.construct(l,[],u)}else{try{u.call()}catch(fe){k=fe}l.call(u.prototype)}else{try{throw Error()}catch(fe){k=fe}l()}}catch(fe){if(fe&&k&&typeof fe.stack=="string"){for(var A=fe.stack.split(` 35`),F=k.stack.split(` 36`),W=A.length-1,X=F.length-1;1<=W&&0<=X&&A[W]!==F[X];)X--;for(;1<=W&&0<=X;W--,X--)if(A[W]!==F[X]){if(W!==1||X!==1)do if(W--,X--,0>X||A[W]!==F[X]){var re=` 37`+A[W].replace(" at new "," at ");return l.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",l.displayName)),re}while(1<=W&&0<=X);break}}}finally{q=!1,Error.prepareStackTrace=b}return(l=l?l.displayName||l.name:"")?V(l):""}function te(l){switch(l.tag){case 5:return V(l.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return l=J(l.type,!1),l;case 11:return l=J(l.type.render,!1),l;case 1:return l=J(l.type,!0),l;default:return""}}function K(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case P:return"Fragment";case S:return"Portal";case L:return"Profiler";case R:return"StrictMode";case M:return"Suspense";case U:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case T:return(l.displayName||"Context")+".Consumer";case D:return(l._context.displayName||"Context")+".Provider";case O:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case z:return u=l.displayName||null,u!==null?u:K(l.type)||"Memo";case H:u=l._payload,l=l._init;try{return K(l(u))}catch{}}return null}function Q(l){var u=l.type;switch(l.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=u.render,l=l.displayName||l.name||"",u.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return K(u);case 8:return u===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function ne(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function se(l){var u=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function ce(l){var u=se(l)?"checked":"value",b=Object.getOwnPropertyDescriptor(l.constructor.prototype,u),k=""+l[u];if(!l.hasOwnProperty(u)&&typeof b<"u"&&typeof b.get=="function"&&typeof b.set=="function"){var A=b.get,F=b.set;return Object.defineProperty(l,u,{configurable:!0,get:function(){return A.call(this)},set:function(W){k=""+W,F.call(this,W)}}),Object.defineProperty(l,u,{enumerable:b.enumerable}),{getValue:function(){return k},setValue:function(W){k=""+W},stopTracking:function(){l._valueTracker=null,delete l[u]}}}}function ye(l){l._valueTracker||(l._valueTracker=ce(l))}function je(l){if(!l)return!1;var u=l._valueTracker;if(!u)return!0;var b=u.getValue(),k="";return l&&(k=se(l)?l.checked?"true":"false":l.value),l=k,l!==b?(u.setValue(l),!0):!1}function Fe(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function Ye(l,u){var b=u.checked;return I({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:b??l._wrapperState.initialChecked})}function et(l,u){var b=u.defaultValue==null?"":u.defaultValue,k=u.checked!=null?u.checked:u.defaultChecked;b=ne(u.value!=null?u.value:b),l._wrapperState={initialChecked:k,initialValue:b,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function Le(l,u){u=u.checked,u!=null&&_(l,"checked",u,!1)}function at(l,u){Le(l,u);var b=ne(u.value),k=u.type;if(b!=null)k==="number"?(b===0&&l.value===""||l.value!=b)&&(l.value=""+b):l.value!==""+b&&(l.value=""+b);else if(k==="submit"||k==="reset"){l.removeAttribute("value");return}u.hasOwnProperty("value")?me(l,u.type,b):u.hasOwnProperty("defaultValue")&&me(l,u.type,ne(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(l.defaultChecked=!!u.defaultChecked)}function he(l,u,b){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var k=u.type;if(!(k!=="submit"&&k!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+l._wrapperState.initialValue,b||u===l.value||(l.value=u),l.defaultValue=u}b=l.name,b!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,b!==""&&(l.name=b)}function me(l,u,b){(u!=="number"||Fe(l.ownerDocument)!==l)&&(b==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+b&&(l.defaultValue=""+b))}var Ee=Array.isArray;function Pe(l,u,b,k){if(l=l.options,u){u={};for(var A=0;A<b.length;A++)u["$"+b[A]]=!0;for(b=0;b<l.length;b++)A=u.hasOwnProperty("$"+l[b].value),l[b].selected!==A&&(l[b].selected=A),A&&k&&(l[b].defaultSelected=!0)}else{for(b=""+ne(b),u=null,A=0;A<l.length;A++){if(l[A].value===b){l[A].selected=!0,k&&(l[A].defaultSelected=!0);return}u!==null||l[A].disabled||(u=l[A])}u!==null&&(u.selected=!0)}}function xe(l,u){if(u.dangerouslySetInnerHTML!=null)throw Error(n(91));return I({},u,{value:void 0,defaultValue:void 0,children:""+l._wrapperState.initialValue})}function ot(l,u){var b=u.value;if(b==null){if(b=u.children,u=u.defaultValue,b!=null){if(u!=null)throw Error(n(92));if(Ee(b)){if(1<b.length)throw Error(n(93));b=b[0]}u=b}u==null&&(u=""),b=u}l._wrapperState={initialValue:ne(b)}}function lt(l,u){var b=ne(u.value),k=ne(u.defaultValue);b!=null&&(b=""+b,b!==l.value&&(l.value=b),u.defaultValue==null&&l.defaultValue!==b&&(l.defaultValue=b)),k!=null&&(l.defaultValue=""+k)}function ct(l){var u=l.textContent;u===l._wrapperState.initialValue&&u!==""&&u!==null&&(l.value=u)}function pe(l){switch(l){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function _e(l,u){return l==null||l==="http://www.w3.org/1999/xhtml"?pe(u):l==="http://www.w3.org/2000/svg"&&u==="foreignObject"?"http://www.w3.org/1999/xhtml":l}var Oe,ht=(function(l){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(u,b,k,A){MSApp.execUnsafeLocalFunction(function(){return l(u,b,k,A)})}:l})(function(l,u){if(l.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in l)l.innerHTML=u;else{for(Oe=Oe||document.createElement("div"),Oe.innerHTML="<svg>"+u.valueOf().toString()+"</svg>",u=Oe.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;u.firstChild;)l.appendChild(u.firstChild)}});function Qe(l,u){if(u){var b=l.firstChild;if(b&&b===l.lastChild&&b.nodeType===3){b.nodeValue=u;return}}l.textContent=u}var Lt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Hs=["Webkit","ms","Moz","O"];Object.keys(Lt).forEach(function(l){Hs.forEach(function(u){u=u+l.charAt(0).toUpperCase()+l.substring(1),Lt[u]=Lt[l]})});function Ar(l,u,b){return u==null||typeof u=="boolean"||u===""?"":b||typeof u!="number"||u===0||Lt.hasOwnProperty(l)&&Lt[l]?(""+u).trim():u+"px"}function ji(l,u){l=l.style;for(var b in u)if(u.hasOwnProperty(b)){var k=b.indexOf("--")===0,A=Ar(b,u[b],k);b==="float"&&(b="cssFloat"),k?l.setProperty(b,A):l[b]=A}}var ja=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Pn(l,u){if(u){if(ja[l]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(n(137,l));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(n(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(n(61))}if(u.style!=null&&typeof u.style!="object")throw Error(n(62))}}function ys(l,u){if(l.indexOf("-")===-1)return typeof u.is=="string";switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pr=null;function Fm(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var Bm=null,jo=null,_o=null;function Gw(l){if(l=bc(l)){if(typeof Bm!="function")throw Error(n(280));var u=l.stateNode;u&&(u=Md(u),Bm(l.stateNode,l.type,u))}}function Yw(l){jo?_o?_o.push(l):_o=[l]:jo=l}function Qw(){if(jo){var l=jo,u=_o;if(_o=jo=null,Gw(l),u)for(l=0;l<u.length;l++)Gw(u[l])}}function Xw(l,u){return l(u)}function Jw(){}var qm=!1;function Zw(l,u,b){if(qm)return l(u,b);qm=!0;try{return Xw(l,u,b)}finally{qm=!1,(jo!==null||_o!==null)&&(Jw(),Qw())}}function Zl(l,u){var b=l.stateNode;if(b===null)return null;var k=Md(b);if(k===null)return null;b=k[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(k=!k.disabled)||(l=l.type,k=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!k;break e;default:l=!1}if(l)return null;if(b&&typeof b!="function")throw Error(n(231,u,typeof b));return b}var Um=!1;if(c)try{var ec={};Object.defineProperty(ec,"passive",{get:function(){Um=!0}}),window.addEventListener("test",ec,ec),window.removeEventListener("test",ec,ec)}catch{Um=!1}function x3(l,u,b,k,A,F,W,X,re){var fe=Array.prototype.slice.call(arguments,3);try{u.apply(b,fe)}catch(be){this.onError(be)}}var tc=!1,fd=null,hd=!1,$m=null,v3={onError:function(l){tc=!0,fd=l}};function b3(l,u,b,k,A,F,W,X,re){tc=!1,fd=null,x3.apply(v3,arguments)}function w3(l,u,b,k,A,F,W,X,re){if(b3.apply(this,arguments),tc){if(tc){var fe=fd;tc=!1,fd=null}else throw Error(n(198));hd||(hd=!0,$m=fe)}}function _a(l){var u=l,b=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,(u.flags&4098)!==0&&(b=u.return),l=u.return;while(l)}return u.tag===3?b:null}function e1(l){if(l.tag===13){var u=l.memoizedState;if(u===null&&(l=l.alternate,l!==null&&(u=l.memoizedState)),u!==null)return u.dehydrated}return null}function t1(l){if(_a(l)!==l)throw Error(n(188))}function j3(l){var u=l.alternate;if(!u){if(u=_a(l),u===null)throw Error(n(188));return u!==l?null:l}for(var b=l,k=u;;){var A=b.return;if(A===null)break;var F=A.alternate;if(F===null){if(k=A.return,k!==null){b=k;continue}break}if(A.child===F.child){for(F=A.child;F;){if(F===b)return t1(A),l;if(F===k)return t1(A),u;F=F.sibling}throw Error(n(188))}if(b.return!==k.return)b=A,k=F;else{for(var W=!1,X=A.child;X;){if(X===b){W=!0,b=A,k=F;break}if(X===k){W=!0,k=A,b=F;break}X=X.sibling}if(!W){for(X=F.child;X;){if(X===b){W=!0,b=F,k=A;break}if(X===k){W=!0,k=F,b=A;break}X=X.sibling}if(!W)throw Error(n(189))}}if(b.alternate!==k)throw Error(n(190))}if(b.tag!==3)throw Error(n(188));return b.stateNode.current===b?l:u}function n1(l){return l=j3(l),l!==null?r1(l):null}function r1(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var u=r1(l);if(u!==null)return u;l=l.sibling}return null}var s1=t.unstable_scheduleCallback,i1=t.unstable_cancelCallback,_3=t.unstable_shouldYield,N3=t.unstable_requestPaint,tn=t.unstable_now,S3=t.unstable_getCurrentPriorityLevel,zm=t.unstable_ImmediatePriority,a1=t.unstable_UserBlockingPriority,md=t.unstable_NormalPriority,k3=t.unstable_LowPriority,o1=t.unstable_IdlePriority,pd=null,xs=null;function C3(l){if(xs&&typeof xs.onCommitFiberRoot=="function")try{xs.onCommitFiberRoot(pd,l,void 0,(l.current.flags&128)===128)}catch{}}var Gr=Math.clz32?Math.clz32:P3,E3=Math.log,T3=Math.LN2;function P3(l){return l>>>=0,l===0?32:31-(E3(l)/T3|0)|0}var gd=64,yd=4194304;function nc(l){switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function xd(l,u){var b=l.pendingLanes;if(b===0)return 0;var k=0,A=l.suspendedLanes,F=l.pingedLanes,W=b&268435455;if(W!==0){var X=W&~A;X!==0?k=nc(X):(F&=W,F!==0&&(k=nc(F)))}else W=b&~A,W!==0?k=nc(W):F!==0&&(k=nc(F));if(k===0)return 0;if(u!==0&&u!==k&&(u&A)===0&&(A=k&-k,F=u&-u,A>=F||A===16&&(F&4194240)!==0))return u;if((k&4)!==0&&(k|=b&16),u=l.entangledLanes,u!==0)for(l=l.entanglements,u&=k;0<u;)b=31-Gr(u),A=1<<b,k|=l[b],u&=~A;return k}function A3(l,u){switch(l){case 1:case 2:case 4:return u+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function R3(l,u){for(var b=l.suspendedLanes,k=l.pingedLanes,A=l.expirationTimes,F=l.pendingLanes;0<F;){var W=31-Gr(F),X=1<<W,re=A[W];re===-1?((X&b)===0||(X&k)!==0)&&(A[W]=A3(X,u)):re<=u&&(l.expiredLanes|=X),F&=~X}}function Vm(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function l1(){var l=gd;return gd<<=1,(gd&4194240)===0&&(gd=64),l}function Hm(l){for(var u=[],b=0;31>b;b++)u.push(l);return u}function rc(l,u,b){l.pendingLanes|=u,u!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,u=31-Gr(u),l[u]=b}function O3(l,u){var b=l.pendingLanes&~u;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=u,l.mutableReadLanes&=u,l.entangledLanes&=u,u=l.entanglements;var k=l.eventTimes;for(l=l.expirationTimes;0<b;){var A=31-Gr(b),F=1<<A;u[A]=0,k[A]=-1,l[A]=-1,b&=~F}}function Wm(l,u){var b=l.entangledLanes|=u;for(l=l.entanglements;b;){var k=31-Gr(b),A=1<<k;A&u|l[k]&u&&(l[k]|=u),b&=~A}}var Pt=0;function c1(l){return l&=-l,1<l?4<l?(l&268435455)!==0?16:536870912:4:1}var u1,Km,d1,f1,h1,Gm=!1,vd=[],_i=null,Ni=null,Si=null,sc=new Map,ic=new Map,ki=[],M3="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function m1(l,u){switch(l){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Ni=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":sc.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":ic.delete(u.pointerId)}}function ac(l,u,b,k,A,F){return l===null||l.nativeEvent!==F?(l={blockedOn:u,domEventName:b,eventSystemFlags:k,nativeEvent:F,targetContainers:[A]},u!==null&&(u=bc(u),u!==null&&Km(u)),l):(l.eventSystemFlags|=k,u=l.targetContainers,A!==null&&u.indexOf(A)===-1&&u.push(A),l)}function L3(l,u,b,k,A){switch(u){case"focusin":return _i=ac(_i,l,u,b,k,A),!0;case"dragenter":return Ni=ac(Ni,l,u,b,k,A),!0;case"mouseover":return Si=ac(Si,l,u,b,k,A),!0;case"pointerover":var F=A.pointerId;return sc.set(F,ac(sc.get(F)||null,l,u,b,k,A)),!0;case"gotpointercapture":return F=A.pointerId,ic.set(F,ac(ic.get(F)||null,l,u,b,k,A)),!0}return!1}function p1(l){var u=Na(l.target);if(u!==null){var b=_a(u);if(b!==null){if(u=b.tag,u===13){if(u=e1(b),u!==null){l.blockedOn=u,h1(l.priority,function(){d1(b)});return}}else if(u===3&&b.stateNode.current.memoizedState.isDehydrated){l.blockedOn=b.tag===3?b.stateNode.containerInfo:null;return}}}l.blockedOn=null}function bd(l){if(l.blockedOn!==null)return!1;for(var u=l.targetContainers;0<u.length;){var b=Qm(l.domEventName,l.eventSystemFlags,u[0],l.nativeEvent);if(b===null){b=l.nativeEvent;var k=new b.constructor(b.type,b);pr=k,b.target.dispatchEvent(k),pr=null}else return u=bc(b),u!==null&&Km(u),l.blockedOn=b,!1;u.shift()}return!0}function g1(l,u,b){bd(l)&&b.delete(u)}function D3(){Gm=!1,_i!==null&&bd(_i)&&(_i=null),Ni!==null&&bd(Ni)&&(Ni=null),Si!==null&&bd(Si)&&(Si=null),sc.forEach(g1),ic.forEach(g1)}function oc(l,u){l.blockedOn===u&&(l.blockedOn=null,Gm||(Gm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,D3)))}function lc(l){function u(A){return oc(A,l)}if(0<vd.length){oc(vd[0],l);for(var b=1;b<vd.length;b++){var k=vd[b];k.blockedOn===l&&(k.blockedOn=null)}}for(_i!==null&&oc(_i,l),Ni!==null&&oc(Ni,l),Si!==null&&oc(Si,l),sc.forEach(u),ic.forEach(u),b=0;b<ki.length;b++)k=ki[b],k.blockedOn===l&&(k.blockedOn=null);for(;0<ki.length&&(b=ki[0],b.blockedOn===null);)p1(b),b.blockedOn===null&&ki.shift()}var No=N.ReactCurrentBatchConfig,wd=!0;function I3(l,u,b,k){var A=Pt,F=No.transition;No.transition=null;try{Pt=1,Ym(l,u,b,k)}finally{Pt=A,No.transition=F}}function F3(l,u,b,k){var A=Pt,F=No.transition;No.transition=null;try{Pt=4,Ym(l,u,b,k)}finally{Pt=A,No.transition=F}}function Ym(l,u,b,k){if(wd){var A=Qm(l,u,b,k);if(A===null)hp(l,u,k,jd,b),m1(l,k);else if(L3(A,l,u,b,k))k.stopPropagation();else if(m1(l,k),u&4&&-1<M3.indexOf(l)){for(;A!==null;){var F=bc(A);if(F!==null&&u1(F),F=Qm(l,u,b,k),F===null&&hp(l,u,k,jd,b),F===A)break;A=F}A!==null&&k.stopPropagation()}else hp(l,u,k,null,b)}}var jd=null;function Qm(l,u,b,k){if(jd=null,l=Fm(k),l=Na(l),l!==null)if(u=_a(l),u===null)l=null;else if(b=u.tag,b===13){if(l=e1(u),l!==null)return l;l=null}else if(b===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;l=null}else u!==l&&(l=null);return jd=l,null}function y1(l){switch(l){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(S3()){case zm:return 1;case a1:return 4;case md:case k3:return 16;case o1:return 536870912;default:return 16}default:return 16}}var Ci=null,Xm=null,_d=null;function x1(){if(_d)return _d;var l,u=Xm,b=u.length,k,A="value"in Ci?Ci.value:Ci.textContent,F=A.length;for(l=0;l<b&&u[l]===A[l];l++);var W=b-l;for(k=1;k<=W&&u[b-k]===A[F-k];k++);return _d=A.slice(l,1<k?1-k:void 0)}function Nd(l){var u=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&u===13&&(l=13)):l=u,l===10&&(l=13),32<=l||l===13?l:0}function Sd(){return!0}function v1(){return!1}function gr(l){function u(b,k,A,F,W){this._reactName=b,this._targetInst=A,this.type=k,this.nativeEvent=F,this.target=W,this.currentTarget=null;for(var X in l)l.hasOwnProperty(X)&&(b=l[X],this[X]=b?b(F):F[X]);return this.isDefaultPrevented=(F.defaultPrevented!=null?F.defaultPrevented:F.returnValue===!1)?Sd:v1,this.isPropagationStopped=v1,this}return I(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var b=this.nativeEvent;b&&(b.preventDefault?b.preventDefault():typeof b.returnValue!="unknown"&&(b.returnValue=!1),this.isDefaultPrevented=Sd)},stopPropagation:function(){var b=this.nativeEvent;b&&(b.stopPropagation?b.stopPropagation():typeof b.cancelBubble!="unknown"&&(b.cancelBubble=!0),this.isPropagationStopped=Sd)},persist:function(){},isPersistent:Sd}),u}var So={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jm=gr(So),cc=I({},So,{view:0,detail:0}),B3=gr(cc),Zm,ep,uc,kd=I({},cc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:np,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==uc&&(uc&&l.type==="mousemove"?(Zm=l.screenX-uc.screenX,ep=l.screenY-uc.screenY):ep=Zm=0,uc=l),Zm)},movementY:function(l){return"movementY"in l?l.movementY:ep}}),b1=gr(kd),q3=I({},kd,{dataTransfer:0}),U3=gr(q3),$3=I({},cc,{relatedTarget:0}),tp=gr($3),z3=I({},So,{animationName:0,elapsedTime:0,pseudoElement:0}),V3=gr(z3),H3=I({},So,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),W3=gr(H3),K3=I({},So,{data:0}),w1=gr(K3),G3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y3={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Q3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X3(l){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(l):(l=Q3[l])?!!u[l]:!1}function np(){return X3}var J3=I({},cc,{key:function(l){if(l.key){var u=G3[l.key]||l.key;if(u!=="Unidentified")return u}return l.type==="keypress"?(l=Nd(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?Y3[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:np,charCode:function(l){return l.type==="keypress"?Nd(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?Nd(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),Z3=gr(J3),eL=I({},kd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j1=gr(eL),tL=I({},cc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:np}),nL=gr(tL),rL=I({},So,{propertyName:0,elapsedTime:0,pseudoElement:0}),sL=gr(rL),iL=I({},kd,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),aL=gr(iL),oL=[9,13,27,32],rp=c&&"CompositionEvent"in window,dc=null;c&&"documentMode"in document&&(dc=document.documentMode);var lL=c&&"TextEvent"in window&&!dc,_1=c&&(!rp||dc&&8<dc&&11>=dc),N1=" ",S1=!1;function k1(l,u){switch(l){case"keyup":return oL.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function C1(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var ko=!1;function cL(l,u){switch(l){case"compositionend":return C1(u);case"keypress":return u.which!==32?null:(S1=!0,N1);case"textInput":return l=u.data,l===N1&&S1?null:l;default:return null}}function uL(l,u){if(ko)return l==="compositionend"||!rp&&k1(l,u)?(l=x1(),_d=Xm=Ci=null,ko=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return _1&&u.locale!=="ko"?null:u.data;default:return null}}var dL={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function E1(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u==="input"?!!dL[l.type]:u==="textarea"}function T1(l,u,b,k){Yw(k),u=Ad(u,"onChange"),0<u.length&&(b=new Jm("onChange","change",null,b,k),l.push({event:b,listeners:u}))}var fc=null,hc=null;function fL(l){K1(l,0)}function Cd(l){var u=Ao(l);if(je(u))return l}function hL(l,u){if(l==="change")return u}var P1=!1;if(c){var sp;if(c){var ip="oninput"in document;if(!ip){var A1=document.createElement("div");A1.setAttribute("oninput","return;"),ip=typeof A1.oninput=="function"}sp=ip}else sp=!1;P1=sp&&(!document.documentMode||9<document.documentMode)}function R1(){fc&&(fc.detachEvent("onpropertychange",O1),hc=fc=null)}function O1(l){if(l.propertyName==="value"&&Cd(hc)){var u=[];T1(u,hc,l,Fm(l)),Zw(fL,u)}}function mL(l,u,b){l==="focusin"?(R1(),fc=u,hc=b,fc.attachEvent("onpropertychange",O1)):l==="focusout"&&R1()}function pL(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return Cd(hc)}function gL(l,u){if(l==="click")return Cd(u)}function yL(l,u){if(l==="input"||l==="change")return Cd(u)}function xL(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var Yr=typeof Object.is=="function"?Object.is:xL;function mc(l,u){if(Yr(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var b=Object.keys(l),k=Object.keys(u);if(b.length!==k.length)return!1;for(k=0;k<b.length;k++){var A=b[k];if(!d.call(u,A)||!Yr(l[A],u[A]))return!1}return!0}function M1(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function L1(l,u){var b=M1(l);l=0;for(var k;b;){if(b.nodeType===3){if(k=l+b.textContent.length,l<=u&&k>=u)return{node:b,offset:u-l};l=k}e:{for(;b;){if(b.nextSibling){b=b.nextSibling;break e}b=b.parentNode}b=void 0}b=M1(b)}}function D1(l,u){return l&&u?l===u?!0:l&&l.nodeType===3?!1:u&&u.nodeType===3?D1(l,u.parentNode):"contains"in l?l.contains(u):l.compareDocumentPosition?!!(l.compareDocumentPosition(u)&16):!1:!1}function I1(){for(var l=window,u=Fe();u instanceof l.HTMLIFrameElement;){try{var b=typeof u.contentWindow.location.href=="string"}catch{b=!1}if(b)l=u.contentWindow;else break;u=Fe(l.document)}return u}function ap(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u&&(u==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||u==="textarea"||l.contentEditable==="true")}function vL(l){var u=I1(),b=l.focusedElem,k=l.selectionRange;if(u!==b&&b&&b.ownerDocument&&D1(b.ownerDocument.documentElement,b)){if(k!==null&&ap(b)){if(u=k.start,l=k.end,l===void 0&&(l=u),"selectionStart"in b)b.selectionStart=u,b.selectionEnd=Math.min(l,b.value.length);else if(l=(u=b.ownerDocument||document)&&u.defaultView||window,l.getSelection){l=l.getSelection();var A=b.textContent.length,F=Math.min(k.start,A);k=k.end===void 0?F:Math.min(k.end,A),!l.extend&&F>k&&(A=k,k=F,F=A),A=L1(b,F);var W=L1(b,k);A&&W&&(l.rangeCount!==1||l.anchorNode!==A.node||l.anchorOffset!==A.offset||l.focusNode!==W.node||l.focusOffset!==W.offset)&&(u=u.createRange(),u.setStart(A.node,A.offset),l.removeAllRanges(),F>k?(l.addRange(u),l.extend(W.node,W.offset)):(u.setEnd(W.node,W.offset),l.addRange(u)))}}for(u=[],l=b;l=l.parentNode;)l.nodeType===1&&u.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<u.length;b++)l=u[b],l.element.scrollLeft=l.left,l.element.scrollTop=l.top}}var bL=c&&"documentMode"in document&&11>=document.documentMode,Co=null,op=null,pc=null,lp=!1;function F1(l,u,b){var k=b.window===b?b.document:b.nodeType===9?b:b.ownerDocument;lp||Co==null||Co!==Fe(k)||(k=Co,"selectionStart"in k&&ap(k)?k={start:k.selectionStart,end:k.selectionEnd}:(k=(k.ownerDocument&&k.ownerDocument.defaultView||window).getSelection(),k={anchorNode:k.anchorNode,anchorOffset:k.anchorOffset,focusNode:k.focusNode,focusOffset:k.focusOffset}),pc&&mc(pc,k)||(pc=k,k=Ad(op,"onSelect"),0<k.length&&(u=new Jm("onSelect","select",null,u,b),l.push({event:u,listeners:k}),u.target=Co)))}function Ed(l,u){var b={};return b[l.toLowerCase()]=u.toLowerCase(),b["Webkit"+l]="webkit"+u,b["Moz"+l]="moz"+u,b}var Eo={animationend:Ed("Animation","AnimationEnd"),animationiteration:Ed("Animation","AnimationIteration"),animationstart:Ed("Animation","AnimationStart"),transitionend:Ed("Transition","TransitionEnd")},cp={},B1={};c&&(B1=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);function Td(l){if(cp[l])return cp[l];if(!Eo[l])return l;var u=Eo[l],b;for(b in u)if(u.hasOwnProperty(b)&&b in B1)return cp[l]=u[b];return l}var q1=Td("animationend"),U1=Td("animationiteration"),$1=Td("animationstart"),z1=Td("transitionend"),V1=new Map,H1="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ei(l,u){V1.set(l,u),a(u,[l])}for(var up=0;up<H1.length;up++){var dp=H1[up],wL=dp.toLowerCase(),jL=dp[0].toUpperCase()+dp.slice(1);Ei(wL,"on"+jL)}Ei(q1,"onAnimationEnd"),Ei(U1,"onAnimationIteration"),Ei($1,"onAnimationStart"),Ei("dblclick","onDoubleClick"),Ei("focusin","onFocus"),Ei("focusout","onBlur"),Ei(z1,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_L=new Set("cancel close invalid load scroll toggle".split(" ").concat(gc));function W1(l,u,b){var k=l.type||"unknown-event";l.currentTarget=b,w3(k,u,void 0,l),l.currentTarget=null}function K1(l,u){u=(u&4)!==0;for(var b=0;b<l.length;b++){var k=l[b],A=k.event;k=k.listeners;e:{var F=void 0;if(u)for(var W=k.length-1;0<=W;W--){var X=k[W],re=X.instance,fe=X.currentTarget;if(X=X.listener,re!==F&&A.isPropagationStopped())break e;W1(A,X,fe),F=re}else for(W=0;W<k.length;W++){if(X=k[W],re=X.instance,fe=X.currentTarget,X=X.listener,re!==F&&A.isPropagationStopped())break e;W1(A,X,fe),F=re}}}if(hd)throw l=$m,hd=!1,$m=null,l}function qt(l,u){var b=u[vp];b===void 0&&(b=u[vp]=new Set);var k=l+"__bubble";b.has(k)||(G1(u,l,2,!1),b.add(k))}function fp(l,u,b){var k=0;u&&(k|=4),G1(b,l,k,u)}var Pd="_reactListening"+Math.random().toString(36).slice(2);function yc(l){if(!l[Pd]){l[Pd]=!0,r.forEach(function(b){b!=="selectionchange"&&(_L.has(b)||fp(b,!1,l),fp(b,!0,l))});var u=l.nodeType===9?l:l.ownerDocument;u===null||u[Pd]||(u[Pd]=!0,fp("selectionchange",!1,u))}}function G1(l,u,b,k){switch(y1(u)){case 1:var A=I3;break;case 4:A=F3;break;default:A=Ym}b=A.bind(null,u,b,l),A=void 0,!Um||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(A=!0),k?A!==void 0?l.addEventListener(u,b,{capture:!0,passive:A}):l.addEventListener(u,b,!0):A!==void 0?l.addEventListener(u,b,{passive:A}):l.addEventListener(u,b,!1)}function hp(l,u,b,k,A){var F=k;if((u&1)===0&&(u&2)===0&&k!==null)e:for(;;){if(k===null)return;var W=k.tag;if(W===3||W===4){var X=k.stateNode.containerInfo;if(X===A||X.nodeType===8&&X.parentNode===A)break;if(W===4)for(W=k.return;W!==null;){var re=W.tag;if((re===3||re===4)&&(re=W.stateNode.containerInfo,re===A||re.nodeType===8&&re.parentNode===A))return;W=W.return}for(;X!==null;){if(W=Na(X),W===null)return;if(re=W.tag,re===5||re===6){k=F=W;continue e}X=X.parentNode}}k=k.return}Zw(function(){var fe=F,be=Fm(b),we=[];e:{var ve=V1.get(l);if(ve!==void 0){var Me=Jm,Ue=l;switch(l){case"keypress":if(Nd(b)===0)break e;case"keydown":case"keyup":Me=Z3;break;case"focusin":Ue="focus",Me=tp;break;case"focusout":Ue="blur",Me=tp;break;case"beforeblur":case"afterblur":Me=tp;break;case"click":if(b.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Me=b1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Me=U3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Me=nL;break;case q1:case U1:case $1:Me=V3;break;case z1:Me=sL;break;case"scroll":Me=B3;break;case"wheel":Me=aL;break;case"copy":case"cut":case"paste":Me=W3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Me=j1}var Ve=(u&4)!==0,nn=!Ve&&l==="scroll",le=Ve?ve!==null?ve+"Capture":null:ve;Ve=[];for(var ae=fe,ue;ae!==null;){ue=ae;var Se=ue.stateNode;if(ue.tag===5&&Se!==null&&(ue=Se,le!==null&&(Se=Zl(ae,le),Se!=null&&Ve.push(xc(ae,Se,ue)))),nn)break;ae=ae.return}0<Ve.length&&(ve=new Me(ve,Ue,null,b,be),we.push({event:ve,listeners:Ve}))}}if((u&7)===0){e:{if(ve=l==="mouseover"||l==="pointerover",Me=l==="mouseout"||l==="pointerout",ve&&b!==pr&&(Ue=b.relatedTarget||b.fromElement)&&(Na(Ue)||Ue[Ws]))break e;if((Me||ve)&&(ve=be.window===be?be:(ve=be.ownerDocument)?ve.defaultView||ve.parentWindow:window,Me?(Ue=b.relatedTarget||b.toElement,Me=fe,Ue=Ue?Na(Ue):null,Ue!==null&&(nn=_a(Ue),Ue!==nn||Ue.tag!==5&&Ue.tag!==6)&&(Ue=null)):(Me=null,Ue=fe),Me!==Ue)){if(Ve=b1,Se="onMouseLeave",le="onMouseEnter",ae="mouse",(l==="pointerout"||l==="pointerover")&&(Ve=j1,Se="onPointerLeave",le="onPointerEnter",ae="pointer"),nn=Me==null?ve:Ao(Me),ue=Ue==null?ve:Ao(Ue),ve=new Ve(Se,ae+"leave",Me,b,be),ve.target=nn,ve.relatedTarget=ue,Se=null,Na(be)===fe&&(Ve=new Ve(le,ae+"enter",Ue,b,be),Ve.target=ue,Ve.relatedTarget=nn,Se=Ve),nn=Se,Me&&Ue)t:{for(Ve=Me,le=Ue,ae=0,ue=Ve;ue;ue=To(ue))ae++;for(ue=0,Se=le;Se;Se=To(Se))ue++;for(;0<ae-ue;)Ve=To(Ve),ae--;for(;0<ue-ae;)le=To(le),ue--;for(;ae--;){if(Ve===le||le!==null&&Ve===le.alternate)break t;Ve=To(Ve),le=To(le)}
vendor: 15,004 bytes, lines 37-38
37Ve=null}else Ve=null;Me!==null&&Y1(we,ve,Me,Ve,!1),Ue!==null&&nn!==null&&Y1(we,nn,Ue,Ve,!0)}}e:{if(ve=fe?Ao(fe):window,Me=ve.nodeName&&ve.nodeName.toLowerCase(),Me==="select"||Me==="input"&&ve.type==="file")var We=hL;else if(E1(ve))if(P1)We=yL;else{We=pL;var Xe=mL}else(Me=ve.nodeName)&&Me.toLowerCase()==="input"&&(ve.type==="checkbox"||ve.type==="radio")&&(We=gL);if(We&&(We=We(l,fe))){T1(we,We,b,be);break e}Xe&&Xe(l,ve,fe),l==="focusout"&&(Xe=ve._wrapperState)&&Xe.controlled&&ve.type==="number"&&me(ve,"number",ve.value)}switch(Xe=fe?Ao(fe):window,l){case"focusin":(E1(Xe)||Xe.contentEditable==="true")&&(Co=Xe,op=fe,pc=null);break;case"focusout":pc=op=Co=null;break;case"mousedown":lp=!0;break;case"contextmenu":case"mouseup":case"dragend":lp=!1,F1(we,b,be);break;case"selectionchange":if(bL)break;case"keydown":case"keyup":F1(we,b,be)}var Je;if(rp)e:{switch(l){case"compositionstart":var st="onCompositionStart";break e;case"compositionend":st="onCompositionEnd";break e;case"compositionupdate":st="onCompositionUpdate";break e}st=void 0}else ko?k1(l,b)&&(st="onCompositionEnd"):l==="keydown"&&b.keyCode===229&&(st="onCompositionStart");st&&(_1&&b.locale!=="ko"&&(ko||st!=="onCompositionStart"?st==="onCompositionEnd"&&ko&&(Je=x1()):(Ci=be,Xm="value"in Ci?Ci.value:Ci.textContent,ko=!0)),Xe=Ad(fe,st),0<Xe.length&&(st=new w1(st,l,null,b,be),we.push({event:st,listeners:Xe}),Je?st.data=Je:(Je=C1(b),Je!==null&&(st.data=Je)))),(Je=lL?cL(l,b):uL(l,b))&&(fe=Ad(fe,"onBeforeInput"),0<fe.length&&(be=new w1("onBeforeInput","beforeinput",null,b,be),we.push({event:be,listeners:fe}),be.data=Je))}K1(we,u)})}function xc(l,u,b){return{instance:l,listener:u,currentTarget:b}}function Ad(l,u){for(var b=u+"Capture",k=[];l!==null;){var A=l,F=A.stateNode;A.tag===5&&F!==null&&(A=F,F=Zl(l,b),F!=null&&k.unshift(xc(l,F,A)),F=Zl(l,u),F!=null&&k.push(xc(l,F,A))),l=l.return}return k}function To(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5);return l||null}function Y1(l,u,b,k,A){for(var F=u._reactName,W=[];b!==null&&b!==k;){var X=b,re=X.alternate,fe=X.stateNode;if(re!==null&&re===k)break;X.tag===5&&fe!==null&&(X=fe,A?(re=Zl(b,F),re!=null&&W.unshift(xc(b,re,X))):A||(re=Zl(b,F),re!=null&&W.push(xc(b,re,X)))),b=b.return}W.length!==0&&l.push({event:u,listeners:W})}var NL=/\r\n?/g,SL=/\u0000|\uFFFD/g;function Q1(l){return(typeof l=="string"?l:""+l).replace(NL,` 38`).replace(SL,"")}function Rd(l,u,b){if(u=Q1(u),Q1(l)!==u&&b)throw Error(n(425))}function Od(){}var mp=null,pp=null;function gp(l,u){return l==="textarea"||l==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var yp=typeof setTimeout=="function"?setTimeout:void 0,kL=typeof clearTimeout=="function"?clearTimeout:void 0,X1=typeof Promise=="function"?Promise:void 0,CL=typeof queueMicrotask=="function"?queueMicrotask:typeof X1<"u"?function(l){return X1.resolve(null).then(l).catch(EL)}:yp;function EL(l){setTimeout(function(){throw l})}function xp(l,u){var b=u,k=0;do{var A=b.nextSibling;if(l.removeChild(b),A&&A.nodeType===8)if(b=A.data,b==="/$"){if(k===0){l.removeChild(A),lc(u);return}k--}else b!=="$"&&b!=="$?"&&b!=="$!"||k++;b=A}while(b);lc(u)}function Ti(l){for(;l!=null;l=l.nextSibling){var u=l.nodeType;if(u===1||u===3)break;if(u===8){if(u=l.data,u==="$"||u==="$!"||u==="$?")break;if(u==="/$")return null}}return l}function J1(l){l=l.previousSibling;for(var u=0;l;){if(l.nodeType===8){var b=l.data;if(b==="$"||b==="$!"||b==="$?"){if(u===0)return l;u--}else b==="/$"&&u++}l=l.previousSibling}return null}var Po=Math.random().toString(36).slice(2),vs="__reactFiber$"+Po,vc="__reactProps$"+Po,Ws="__reactContainer$"+Po,vp="__reactEvents$"+Po,TL="__reactListeners$"+Po,PL="__reactHandles$"+Po;function Na(l){var u=l[vs];if(u)return u;for(var b=l.parentNode;b;){if(u=b[Ws]||b[vs]){if(b=u.alternate,u.child!==null||b!==null&&b.child!==null)for(l=J1(l);l!==null;){if(b=l[vs])return b;l=J1(l)}return u}l=b,b=l.parentNode}return null}function bc(l){return l=l[vs]||l[Ws],!l||l.tag!==5&&l.tag!==6&&l.tag!==13&&l.tag!==3?null:l}function Ao(l){if(l.tag===5||l.tag===6)return l.stateNode;throw Error(n(33))}function Md(l){return l[vc]||null}var bp=[],Ro=-1;function Pi(l){return{current:l}}function Ut(l){0>Ro||(l.current=bp[Ro],bp[Ro]=null,Ro--)}function Dt(l,u){Ro++,bp[Ro]=l.current,l.current=u}var Ai={},In=Pi(Ai),tr=Pi(!1),Sa=Ai;function Oo(l,u){var b=l.type.contextTypes;if(!b)return Ai;var k=l.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===u)return k.__reactInternalMemoizedMaskedChildContext;var A={},F;for(F in b)A[F]=u[F];return k&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=u,l.__reactInternalMemoizedMaskedChildContext=A),A}function nr(l){return l=l.childContextTypes,l!=null}function Ld(){Ut(tr),Ut(In)}function Z1(l,u,b){if(In.current!==Ai)throw Error(n(168));Dt(In,u),Dt(tr,b)}function ej(l,u,b){var k=l.stateNode;if(u=u.childContextTypes,typeof k.getChildContext!="function")return b;k=k.getChildContext();for(var A in k)if(!(A in u))throw Error(n(108,Q(l)||"Unknown",A));return I({},b,k)}function Dd(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Ai,Sa=In.current,Dt(In,l),Dt(tr,tr.current),!0}function tj(l,u,b){var k=l.stateNode;if(!k)throw Error(n(169));b?(l=ej(l,u,Sa),k.__reactInternalMemoizedMergedChildContext=l,Ut(tr),Ut(In),Dt(In,l)):Ut(tr),Dt(tr,b)}var Ks=null,Id=!1,wp=!1;function nj(l){Ks===null?Ks=[l]:Ks.push(l)}function AL(l){Id=!0,nj(l)}function Ri(){if(!wp&&Ks!==null){wp=!0;var l=0,u=Pt;try{var b=Ks;for(Pt=1;l<b.length;l++){var k=b[l];do k=k(!0);while(k!==null)}Ks=null,Id=!1}catch(A){throw Ks!==null&&(Ks=Ks.slice(l+1)),s1(zm,Ri),A}finally{Pt=u,wp=!1}}return null}var Mo=[],Lo=0,Fd=null,Bd=0,Rr=[],Or=0,ka=null,Gs=1,Ys="";function Ca(l,u){Mo[Lo++]=Bd,Mo[Lo++]=Fd,Fd=l,Bd=u}function rj(l,u,b){Rr[Or++]=Gs,Rr[Or++]=Ys,Rr[Or++]=ka,ka=l;var k=Gs;l=Ys;var A=32-Gr(k)-1;k&=~(1<<A),b+=1;var F=32-Gr(u)+A;if(30<F){var W=A-A%5;F=(k&(1<<W)-1).toString(32),k>>=W,A-=W,Gs=1<<32-Gr(u)+A|b<<A|k,Ys=F+l}else Gs=1<<F|b<<A|k,Ys=l}function jp(l){l.return!==null&&(Ca(l,1),rj(l,1,0))}function _p(l){for(;l===Fd;)Fd=Mo[--Lo],Mo[Lo]=null,Bd=Mo[--Lo],Mo[Lo]=null;for(;l===ka;)ka=Rr[--Or],Rr[Or]=null,Ys=Rr[--Or],Rr[Or]=null,Gs=Rr[--Or],Rr[Or]=null}var yr=null,xr=null,zt=!1,Qr=null;function sj(l,u){var b=Ir(5,null,null,0);b.elementType="DELETED",b.stateNode=u,b.return=l,u=l.deletions,u===null?(l.deletions=[b],l.flags|=16):u.push(b)}function ij(l,u){switch(l.tag){case 5:var b=l.type;return u=u.nodeType!==1||b.toLowerCase()!==u.nodeName.toLowerCase()?null:u,u!==null?(l.stateNode=u,yr=l,xr=Ti(u.firstChild),!0):!1;case 6:return u=l.pendingProps===""||u.nodeType!==3?null:u,u!==null?(l.stateNode=u,yr=l,xr=null,!0):!1;case 13:return u=u.nodeType!==8?null:u,u!==null?(b=ka!==null?{id:Gs,overflow:Ys}:null,l.memoizedState={dehydrated:u,treeContext:b,retryLane:1073741824},b=Ir(18,null,null,0),b.stateNode=u,b.return=l,l.child=b,yr=l,xr=null,!0):!1;default:return!1}}function Np(l){return(l.mode&1)!==0&&(l.flags&128)===0}function Sp(l){if(zt){var u=xr;if(u){var b=u;if(!ij(l,u)){if(Np(l))throw Error(n(418));u=Ti(b.nextSibling);var k=yr;u&&ij(l,u)?sj(k,b):(l.flags=l.flags&-4097|2,zt=!1,yr=l)}}else{if(Np(l))throw Error(n(418));l.flags=l.flags&-4097|2,zt=!1,yr=l}}}function aj(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;yr=l}function qd(l){if(l!==yr)return!1;if(!zt)return aj(l),zt=!0,!1;var u;if((u=l.tag!==3)&&!(u=l.tag!==5)&&(u=l.type,u=u!=="head"&&u!=="body"&&!gp(l.type,l.memoizedProps)),u&&(u=xr)){if(Np(l))throw oj(),Error(n(418));for(;u;)sj(l,u),u=Ti(u.nextSibling)}if(aj(l),l.tag===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(n(317));e:{for(l=l.nextSibling,u=0;l;){if(l.nodeType===8){var b=l.data;if(b==="/$"){if(u===0){xr=Ti(l.nextSibling);break e}u--}else b!=="$"&&b!=="$!"&&b!=="$?"||u++}l=l.nextSibling}xr=null}}else xr=yr?Ti(l.stateNode.nextSibling):null;return!0}function oj(){for(var l=xr;l;)l=Ti(l.nextSibling)}function Do(){xr=yr=null,zt=!1}function kp(l){Qr===null?Qr=[l]:Qr.push(l)}var RL=N.ReactCurrentBatchConfig;function wc(l,u,b){if(l=b.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(b._owner){if(b=b._owner,b){if(b.tag!==1)throw Error(n(309));var k=b.stateNode}if(!k)throw Error(n(147,l));var A=k,F=""+l;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===F?u.ref:(u=function(W){var X=A.refs;W===null?delete X[F]:X[F]=W},u._stringRef=F,u)}if(typeof l!="string")throw Error(n(284));if(!b._owner)throw Error(n(290,l))}return l}function Ud(l,u){throw l=Object.prototype.toString.call(u),Error(n(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l))}function lj(l){var u=l._init;return u(l._payload)}function cj(l){function u(le,ae){if(l){var ue=le.deletions;ue===null?(le.deletions=[ae],le.flags|=16):ue.push(ae)}}function b(le,ae){if(!l)return null;for(;ae!==null;)u(le,ae),ae=ae.sibling;return null}function k(le,ae){for(le=new Map;ae!==null;)ae.key!==null?le.set(ae.key,ae):le.set(ae.index,ae),ae=ae.sibling;return le}function A(le,ae){return le=qi(le,ae),le.index=0,le.sibling=null,le}function F(le,ae,ue){return le.index=ue,l?(ue=le.alternate,ue!==null?(ue=ue.index,ue<ae?(le.flags|=2,ae):ue):(le.flags|=2,ae)):(le.flags|=1048576,ae)}function W(le){return l&&le.alternate===null&&(le.flags|=2),le}function X(le,ae,ue,Se){return ae===null||ae.tag!==6?(ae=yg(ue,le.mode,Se),ae.return=le,ae):(ae=A(ae,ue),ae.return=le,ae)}function re(le,ae,ue,Se){var We=ue.type;return We===P?be(le,ae,ue.props.children,Se,ue.key):ae!==null&&(ae.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===H&&lj(We)===ae.type)?(Se=A(ae,ue.props),Se.ref=wc(le,ae,ue),Se.return=le,Se):(Se=ff(ue.type,ue.key,ue.props,null,le.mode,Se),Se.ref=wc(le,ae,ue),Se.return=le,Se)}function fe(le,ae,ue,Se){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==ue.containerInfo||ae.stateNode.implementation!==ue.implementation?(ae=xg(ue,le.mode,Se),ae.return=le,ae):(ae=A(ae,ue.children||[]),ae.return=le,ae)}function be(le,ae,ue,Se,We){return ae===null||ae.tag!==7?(ae=La(ue,le.mode,Se,We),ae.return=le,ae):(ae=A(ae,ue),ae.return=le,ae)}function we(le,ae,ue){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return ae=yg(""+ae,le.mode,ue),ae.return=le,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case C:return ue=ff(ae.type,ae.key,ae.props,null,le.mode,ue),ue.ref=wc(le,null,ae),ue.return=le,ue;case S:return ae=xg(ae,le.mode,ue),ae.return=le,ae;case H:var Se=ae._init;return we(le,Se(ae._payload),ue)}if(Ee(ae)||$(ae))return ae=La(ae,le.mode,ue,null),ae.return=le,ae;Ud(le,ae)}return null}function ve(le,ae,ue,Se){var We=ae!==null?ae.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number")return We!==null?null:X(le,ae,""+ue,Se);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case C:return ue.key===We?re(le,ae,ue,Se):null;case S:return ue.key===We?fe(le,ae,ue,Se):null;case H:return We=ue._init,ve(le,ae,We(ue._payload),Se)}if(Ee(ue)||$(ue))return We!==null?null:be(le,ae,ue,Se,null);Ud(le,ue)}return null}function Me(le,ae,ue,Se,We){if(typeof Se=="string"&&Se!==""||typeof Se=="number")return le=le.get(ue)||null,X(ae,le,""+Se,We);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case C:return le=le.get(Se.key===null?ue:Se.key)||null,re(ae,le,Se,We);case S:return le=le.get(Se.key===null?ue:Se.key)||null,fe(ae,le,Se,We);case H:var Xe=Se._init;return Me(le,ae,ue,Xe(Se._payload),We)}if(Ee(Se)||$(Se))return le=le.get(ue)||null,be(ae,le,Se,We,null);Ud(ae,Se)}return null}function Ue(le,ae,ue,Se){for(var We=null,Xe=null,Je=ae,st=ae=0,Sn=null;Je!==null&&st<ue.length;st++){Je.index>st?(Sn=Je,Je=null):Sn=Je.sibling;var Nt=ve(le,Je,ue[st],Se);if(Nt===null){Je===null&&(Je=Sn);break}l&&Je&&Nt.alternate===null&&u(le,Je),ae=F(Nt,ae,st),Xe===null?We=Nt:Xe.sibling=Nt,Xe=Nt,Je=Sn}if(st===ue.length)return b(le,Je),zt&&Ca(le,st),We;if(Je===null){for(;st<ue.length;st++)Je=we(le,ue[st],Se),Je!==null&&(ae=F(Je,ae,st),Xe===null?We=Je:Xe.sibling=Je,Xe=Je);return zt&&Ca(le,st),We}for(Je=k(le,Je);st<ue.length;st++)Sn=Me(Je,le,st,ue[st],Se),Sn!==null&&(l&&Sn.alternate!==null&&Je.delete(Sn.key===null?st:Sn.key),ae=F(Sn,ae,st),Xe===null?We=Sn:Xe.sibling=Sn,Xe=Sn);return l&&Je.forEach(function(Ui){return u(le,Ui)}),zt&&Ca(le,st),We}function Ve(le,ae,ue,Se){var We=$(ue);if(typeof We!="function")throw Error(n(150));if(ue=We.call(ue),ue==null)throw Error(n(151));for(var Xe=We=null,Je=ae,st=ae=0,Sn=null,Nt=ue.next();Je!==null&&!Nt.done;st++,Nt=ue.next()){Je.index>st?(Sn=Je,Je=null):Sn=Je.sibling;var Ui=ve(le,Je,Nt.value,Se);if(Ui===null){Je===null&&(Je=Sn);break}l&&Je&&Ui.alternate===null&&u(le,Je),ae=F(Ui,ae,st),Xe===null?We=Ui:Xe.sibling=Ui,Xe=Ui,Je=Sn}if(Nt.done)return b(le,Je),zt&&Ca(le,st),We;if(Je===null){for(;!Nt.done;st++,Nt=ue.next())Nt=we(le,Nt.value,Se),Nt!==null&&(ae=F(Nt,ae,st),Xe===null?We=Nt:Xe.sibling=Nt,Xe=Nt);return zt&&Ca(le,st),We}for(Je=k(le,Je);!Nt.done;st++,Nt=ue.next())Nt=Me(Je,le,st,Nt.value,Se),Nt!==null&&(l&&Nt.alternate!==null&&Je.delete(Nt.key===null?st:Nt.key),ae=F(Nt,ae,st),Xe===null?We=Nt:Xe.sibling=Nt,Xe=Nt);return l&&Je.forEach(function(dD){return u(le,dD)}),zt&&Ca(le,st),We}function nn(le,ae,ue,Se){if(typeof ue=="object"&&ue!==null&&ue.type===P&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case C:e:{for(var We=ue.key,Xe=ae;Xe!==null;){if(Xe.key===We){if(We=ue.type,We===P){if(Xe.tag===7){b(le,Xe.sibling),ae=A(Xe,ue.props.children),ae.return=le,le=ae;break e}}else if(Xe.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===H&&lj(We)===Xe.type){b(le,Xe.sibling),ae=A(Xe,ue.props),ae.ref=wc(le,Xe,ue),ae.return=le,le=ae;break e}b(le,Xe);break}else u(le,Xe);Xe=Xe.sibling}ue.type===P?(ae=La(ue.props.children,le.mode,Se,ue.key),ae.return=le,le=ae):(Se=ff(ue.type,ue.key,ue.props,null,le.mode,Se),Se.ref=wc(le,ae,ue),Se.return=le,le=Se)}return W(le);case S:e:{for(Xe=ue.key;ae!==null;){if(ae.key===Xe)if(ae.tag===4&&ae.stateNode.containerInfo===ue.containerInfo&&ae.stateNode.implementation===ue.implementation){b(le,ae.sibling),ae=A(ae,ue.children||[]),ae.return=le,le=ae;break e}else{b(le,ae);break}else u(le,ae);ae=ae.sibling}ae=xg(ue,le.mode,Se),ae.return=le,le=ae}return W(le);case H:return Xe=ue._init,nn(le,ae,Xe(ue._payload),Se)}if(Ee(ue))return Ue(le,ae,ue,Se);if($(ue))return Ve(le,ae,ue,Se);Ud(le,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"?(ue=""+ue,ae!==null&&ae.tag===6?(b(le,ae.sibling),ae=A(ae,ue),ae.return=le,le=ae):(b(le,ae),ae=yg(ue,le.mode,Se),ae.return=le,le=ae),W(le)):b(le,ae)}return nn}var Io=cj(!0),uj=cj(!1),$d=Pi(null),zd=null,Fo=null,Cp=null;function Ep(){Cp=Fo=zd=null}function Tp(l){var u=$d.current;Ut($d),l._currentValue=u}function Pp(l,u,b){for(;l!==null;){var k=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,k!==null&&(k.childLanes|=u)):k!==null&&(k.childLanes&u)!==u&&(k.childLanes|=u),l===b)break;l=l.return}}
vendor: 6,675 bytes, line 38
38function Bo(l,u){zd=l,Cp=Fo=null,l=l.dependencies,l!==null&&l.firstContext!==null&&((l.lanes&u)!==0&&(rr=!0),l.firstContext=null)}function Mr(l){var u=l._currentValue;if(Cp!==l)if(l={context:l,memoizedValue:u,next:null},Fo===null){if(zd===null)throw Error(n(308));Fo=l,zd.dependencies={lanes:0,firstContext:l}}else Fo=Fo.next=l;return u}var Ea=null;function Ap(l){Ea===null?Ea=[l]:Ea.push(l)}function dj(l,u,b,k){var A=u.interleaved;return A===null?(b.next=b,Ap(u)):(b.next=A.next,A.next=b),u.interleaved=b,Qs(l,k)}function Qs(l,u){l.lanes|=u;var b=l.alternate;for(b!==null&&(b.lanes|=u),b=l,l=l.return;l!==null;)l.childLanes|=u,b=l.alternate,b!==null&&(b.childLanes|=u),b=l,l=l.return;return b.tag===3?b.stateNode:null}var Oi=!1;function Rp(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fj(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function Xs(l,u){return{eventTime:l,lane:u,tag:0,payload:null,callback:null,next:null}}function Mi(l,u,b){var k=l.updateQueue;if(k===null)return null;if(k=k.shared,(_t&2)!==0){var A=k.pending;return A===null?u.next=u:(u.next=A.next,A.next=u),k.pending=u,Qs(l,b)}return A=k.interleaved,A===null?(u.next=u,Ap(k)):(u.next=A.next,A.next=u),k.interleaved=u,Qs(l,b)}function Vd(l,u,b){if(u=u.updateQueue,u!==null&&(u=u.shared,(b&4194240)!==0)){var k=u.lanes;k&=l.pendingLanes,b|=k,u.lanes=b,Wm(l,b)}}function hj(l,u){var b=l.updateQueue,k=l.alternate;if(k!==null&&(k=k.updateQueue,b===k)){var A=null,F=null;if(b=b.firstBaseUpdate,b!==null){do{var W={eventTime:b.eventTime,lane:b.lane,tag:b.tag,payload:b.payload,callback:b.callback,next:null};F===null?A=F=W:F=F.next=W,b=b.next}while(b!==null);F===null?A=F=u:F=F.next=u}else A=F=u;b={baseState:k.baseState,firstBaseUpdate:A,lastBaseUpdate:F,shared:k.shared,effects:k.effects},l.updateQueue=b;return}l=b.lastBaseUpdate,l===null?b.firstBaseUpdate=u:l.next=u,b.lastBaseUpdate=u}function Hd(l,u,b,k){var A=l.updateQueue;Oi=!1;var F=A.firstBaseUpdate,W=A.lastBaseUpdate,X=A.shared.pending;if(X!==null){A.shared.pending=null;var re=X,fe=re.next;re.next=null,W===null?F=fe:W.next=fe,W=re;var be=l.alternate;be!==null&&(be=be.updateQueue,X=be.lastBaseUpdate,X!==W&&(X===null?be.firstBaseUpdate=fe:X.next=fe,be.lastBaseUpdate=re))}if(F!==null){var we=A.baseState;W=0,be=fe=re=null,X=F;do{var ve=X.lane,Me=X.eventTime;if((k&ve)===ve){be!==null&&(be=be.next={eventTime:Me,lane:0,tag:X.tag,payload:X.payload,callback:X.callback,next:null});e:{var Ue=l,Ve=X;switch(ve=u,Me=b,Ve.tag){case 1:if(Ue=Ve.payload,typeof Ue=="function"){we=Ue.call(Me,we,ve);break e}we=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=Ve.payload,ve=typeof Ue=="function"?Ue.call(Me,we,ve):Ue,ve==null)break e;we=I({},we,ve);break e;case 2:Oi=!0}}X.callback!==null&&X.lane!==0&&(l.flags|=64,ve=A.effects,ve===null?A.effects=[X]:ve.push(X))}else Me={eventTime:Me,lane:ve,tag:X.tag,payload:X.payload,callback:X.callback,next:null},be===null?(fe=be=Me,re=we):be=be.next=Me,W|=ve;if(X=X.next,X===null){if(X=A.shared.pending,X===null)break;ve=X,X=ve.next,ve.next=null,A.lastBaseUpdate=ve,A.shared.pending=null}}while(!0);if(be===null&&(re=we),A.baseState=re,A.firstBaseUpdate=fe,A.lastBaseUpdate=be,u=A.shared.interleaved,u!==null){A=u;do W|=A.lane,A=A.next;while(A!==u)}else F===null&&(A.shared.lanes=0);Aa|=W,l.lanes=W,l.memoizedState=we}}function mj(l,u,b){if(l=u.effects,u.effects=null,l!==null)for(u=0;u<l.length;u++){var k=l[u],A=k.callback;if(A!==null){if(k.callback=null,k=b,typeof A!="function")throw Error(n(191,A));A.call(k)}}}var jc={},bs=Pi(jc),_c=Pi(jc),Nc=Pi(jc);function Ta(l){if(l===jc)throw Error(n(174));return l}function Op(l,u){switch(Dt(Nc,u),Dt(_c,l),Dt(bs,jc),l=u.nodeType,l){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:_e(null,"");break;default:l=l===8?u.parentNode:u,u=l.namespaceURI||null,l=l.tagName,u=_e(u,l)}Ut(bs),Dt(bs,u)}function qo(){Ut(bs),Ut(_c),Ut(Nc)}function pj(l){Ta(Nc.current);var u=Ta(bs.current),b=_e(u,l.type);u!==b&&(Dt(_c,l),Dt(bs,b))}function Mp(l){_c.current===l&&(Ut(bs),Ut(_c))}var Ht=Pi(0);function Wd(l){for(var u=l;u!==null;){if(u.tag===13){var b=u.memoizedState;if(b!==null&&(b=b.dehydrated,b===null||b.data==="$?"||b.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Lp=[];function Dp(){for(var l=0;l<Lp.length;l++)Lp[l]._workInProgressVersionPrimary=null;Lp.length=0}var Kd=N.ReactCurrentDispatcher,Ip=N.ReactCurrentBatchConfig,Pa=0,Wt=null,yn=null,_n=null,Gd=!1,Sc=!1,kc=0,OL=0;function Fn(){throw Error(n(321))}function Fp(l,u){if(u===null)return!1;for(var b=0;b<u.length&&b<l.length;b++)if(!Yr(l[b],u[b]))return!1;return!0}function Bp(l,u,b,k,A,F){if(Pa=F,Wt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Kd.current=l===null||l.memoizedState===null?IL:FL,l=b(k,A),Sc){F=0;do{if(Sc=!1,kc=0,25<=F)throw Error(n(301));F+=1,_n=yn=null,u.updateQueue=null,Kd.current=BL,l=b(k,A)}while(Sc)}if(Kd.current=Xd,u=yn!==null&&yn.next!==null,Pa=0,_n=yn=Wt=null,Gd=!1,u)throw Error(n(300));return l}function qp(){var l=kc!==0;return kc=0,l}function ws(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _n===null?Wt.memoizedState=_n=l:_n=_n.next=l,_n}function Lr(){if(yn===null){var l=Wt.alternate;l=l!==null?l.memoizedState:null}else l=yn.next;var u=_n===null?Wt.memoizedState:_n.next;if(u!==null)_n=u,yn=l;else{if(l===null)throw Error(n(310));yn=l,l={memoizedState:yn.memoizedState,baseState:yn.baseState,baseQueue:yn.baseQueue,queue:yn.queue,next:null},_n===null?Wt.memoizedState=_n=l:_n=_n.next=l}return _n}function Cc(l,u){return typeof u=="function"?u(l):u}function Up(l){var u=Lr(),b=u.queue;if(b===null)throw Error(n(311));b.lastRenderedReducer=l;var k=yn,A=k.baseQueue,F=b.pending;if(F!==null){if(A!==null){var W=A.next;A.next=F.next,F.next=W}k.baseQueue=A=F,b.pending=null}if(A!==null){F=A.next,k=k.baseState;var X=W=null,re=null,fe=F;do{var be=fe.lane;if((Pa&be)===be)re!==null&&(re=re.next={lane:0,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),k=fe.hasEagerState?fe.eagerState:l(k,fe.action);else{var we={lane:be,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null};re===null?(X=re=we,W=k):re=re.next=we,Wt.lanes|=be,Aa|=be}fe=fe.next}
vendor: 5,182 bytes, line 38
38while(fe!==null&&fe!==F);re===null?W=k:re.next=X,Yr(k,u.memoizedState)||(rr=!0),u.memoizedState=k,u.baseState=W,u.baseQueue=re,b.lastRenderedState=k}if(l=b.interleaved,l!==null){A=l;do F=A.lane,Wt.lanes|=F,Aa|=F,A=A.next;while(A!==l)}else A===null&&(b.lanes=0);return[u.memoizedState,b.dispatch]}function $p(l){var u=Lr(),b=u.queue;if(b===null)throw Error(n(311));b.lastRenderedReducer=l;var k=b.dispatch,A=b.pending,F=u.memoizedState;if(A!==null){b.pending=null;var W=A=A.next;do F=l(F,W.action),W=W.next;while(W!==A);Yr(F,u.memoizedState)||(rr=!0),u.memoizedState=F,u.baseQueue===null&&(u.baseState=F),b.lastRenderedState=F}return[F,k]}function gj(){}function yj(l,u){var b=Wt,k=Lr(),A=u(),F=!Yr(k.memoizedState,A);if(F&&(k.memoizedState=A,rr=!0),k=k.queue,zp(bj.bind(null,b,k,l),[l]),k.getSnapshot!==u||F||_n!==null&&_n.memoizedState.tag&1){if(b.flags|=2048,Ec(9,vj.bind(null,b,k,A,u),void 0,null),Nn===null)throw Error(n(349));(Pa&30)!==0||xj(b,u,A)}return A}function xj(l,u,b){l.flags|=16384,l={getSnapshot:u,value:b},u=Wt.updateQueue,u===null?(u={lastEffect:null,stores:null},Wt.updateQueue=u,u.stores=[l]):(b=u.stores,b===null?u.stores=[l]:b.push(l))}function vj(l,u,b,k){u.value=b,u.getSnapshot=k,wj(u)&&jj(l)}function bj(l,u,b){return b(function(){wj(u)&&jj(l)})}function wj(l){var u=l.getSnapshot;l=l.value;try{var b=u();return!Yr(l,b)}catch{return!0}}function jj(l){var u=Qs(l,1);u!==null&&es(u,l,1,-1)}function _j(l){var u=ws();return typeof l=="function"&&(l=l()),u.memoizedState=u.baseState=l,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cc,lastRenderedState:l},u.queue=l,l=l.dispatch=DL.bind(null,Wt,l),[u.memoizedState,l]}function Ec(l,u,b,k){return l={tag:l,create:u,destroy:b,deps:k,next:null},u=Wt.updateQueue,u===null?(u={lastEffect:null,stores:null},Wt.updateQueue=u,u.lastEffect=l.next=l):(b=u.lastEffect,b===null?u.lastEffect=l.next=l:(k=b.next,b.next=l,l.next=k,u.lastEffect=l)),l}function Nj(){return Lr().memoizedState}function Yd(l,u,b,k){var A=ws();Wt.flags|=l,A.memoizedState=Ec(1|u,b,void 0,k===void 0?null:k)}function Qd(l,u,b,k){var A=Lr();k=k===void 0?null:k;var F=void 0;if(yn!==null){var W=yn.memoizedState;if(F=W.destroy,k!==null&&Fp(k,W.deps)){A.memoizedState=Ec(u,b,F,k);return}}Wt.flags|=l,A.memoizedState=Ec(1|u,b,F,k)}function Sj(l,u){return Yd(8390656,8,l,u)}function zp(l,u){return Qd(2048,8,l,u)}function kj(l,u){return Qd(4,2,l,u)}function Cj(l,u){return Qd(4,4,l,u)}function Ej(l,u){if(typeof u=="function")return l=l(),u(l),function(){u(null)};if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function Tj(l,u,b){return b=b!=null?b.concat([l]):null,Qd(4,4,Ej.bind(null,u,l),b)}function Vp(){}function Pj(l,u){var b=Lr();u=u===void 0?null:u;var k=b.memoizedState;return k!==null&&u!==null&&Fp(u,k[1])?k[0]:(b.memoizedState=[l,u],l)}function Aj(l,u){var b=Lr();u=u===void 0?null:u;var k=b.memoizedState;return k!==null&&u!==null&&Fp(u,k[1])?k[0]:(l=l(),b.memoizedState=[l,u],l)}function Rj(l,u,b){return(Pa&21)===0?(l.baseState&&(l.baseState=!1,rr=!0),l.memoizedState=b):(Yr(b,u)||(b=l1(),Wt.lanes|=b,Aa|=b,l.baseState=!0),u)}function ML(l,u){var b=Pt;Pt=b!==0&&4>b?b:4,l(!0);var k=Ip.transition;Ip.transition={};try{l(!1),u()}finally{Pt=b,Ip.transition=k}}function Oj(){return Lr().memoizedState}function LL(l,u,b){var k=Fi(l);if(b={lane:k,action:b,hasEagerState:!1,eagerState:null,next:null},Mj(l))Lj(u,b);else if(b=dj(l,u,b,k),b!==null){var A=Qn();es(b,l,k,A),Dj(b,u,k)}}function DL(l,u,b){var k=Fi(l),A={lane:k,action:b,hasEagerState:!1,eagerState:null,next:null};if(Mj(l))Lj(u,A);else{var F=l.alternate;if(l.lanes===0&&(F===null||F.lanes===0)&&(F=u.lastRenderedReducer,F!==null))try{var W=u.lastRenderedState,X=F(W,b);if(A.hasEagerState=!0,A.eagerState=X,Yr(X,W)){var re=u.interleaved;re===null?(A.next=A,Ap(u)):(A.next=re.next,re.next=A),u.interleaved=A;return}}catch{}finally{}b=dj(l,u,A,k),b!==null&&(A=Qn(),es(b,l,k,A),Dj(b,u,k))}}function Mj(l){var u=l.alternate;return l===Wt||u!==null&&u===Wt}function Lj(l,u){Sc=Gd=!0;var b=l.pending;b===null?u.next=u:(u.next=b.next,b.next=u),l.pending=u}function Dj(l,u,b){if((b&4194240)!==0){var k=u.lanes;k&=l.pendingLanes,b|=k,u.lanes=b,Wm(l,b)}}var Xd={readContext:Mr,useCallback:Fn,useContext:Fn,useEffect:Fn,useImperativeHandle:Fn,useInsertionEffect:Fn,useLayoutEffect:Fn,useMemo:Fn,useReducer:Fn,useRef:Fn,useState:Fn,useDebugValue:Fn,useDeferredValue:Fn,useTransition:Fn,useMutableSource:Fn,useSyncExternalStore:Fn,useId:Fn,unstable_isNewReconciler:!1},IL={readContext:Mr,useCallback:function(l,u){return ws().memoizedState=[l,u===void 0?null:u],l},useContext:Mr,useEffect:Sj,useImperativeHandle:function(l,u,b){return b=b!=null?b.concat([l]):null,Yd(4194308,4,Ej.bind(null,u,l),b)},useLayoutEffect:function(l,u){return Yd(4194308,4,l,u)},useInsertionEffect:function(l,u){return Yd(4,2,l,u)},useMemo:function(l,u){var b=ws();return u=u===void 0?null:u,l=l(),b.memoizedState=[l,u],l},useReducer:function(l,u,b){var k=ws();return u=b!==void 0?b(u):u,k.memoizedState=k.baseState=u,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},k.queue=l,l=l.dispatch=LL.bind(null,Wt,l),[k.memoizedState,l]}
vendor: 6,402 bytes, lines 38-40
38,useRef:function(l){var u=ws();return l={current:l},u.memoizedState=l},useState:_j,useDebugValue:Vp,useDeferredValue:function(l){return ws().memoizedState=l},useTransition:function(){var l=_j(!1),u=l[0];return l=ML.bind(null,l[1]),ws().memoizedState=l,[u,l]},useMutableSource:function(){},useSyncExternalStore:function(l,u,b){var k=Wt,A=ws();if(zt){if(b===void 0)throw Error(n(407));b=b()}else{if(b=u(),Nn===null)throw Error(n(349));(Pa&30)!==0||xj(k,u,b)}A.memoizedState=b;var F={value:b,getSnapshot:u};return A.queue=F,Sj(bj.bind(null,k,F,l),[l]),k.flags|=2048,Ec(9,vj.bind(null,k,F,b,u),void 0,null),b},useId:function(){var l=ws(),u=Nn.identifierPrefix;if(zt){var b=Ys,k=Gs;b=(k&~(1<<32-Gr(k)-1)).toString(32)+b,u=":"+u+"R"+b,b=kc++,0<b&&(u+="H"+b.toString(32)),u+=":"}else b=OL++,u=":"+u+"r"+b.toString(32)+":";return l.memoizedState=u},unstable_isNewReconciler:!1},FL={readContext:Mr,useCallback:Pj,useContext:Mr,useEffect:zp,useImperativeHandle:Tj,useInsertionEffect:kj,useLayoutEffect:Cj,useMemo:Aj,useReducer:Up,useRef:Nj,useState:function(){return Up(Cc)},useDebugValue:Vp,useDeferredValue:function(l){var u=Lr();return Rj(u,yn.memoizedState,l)},useTransition:function(){var l=Up(Cc)[0],u=Lr().memoizedState;return[l,u]},useMutableSource:gj,useSyncExternalStore:yj,useId:Oj,unstable_isNewReconciler:!1},BL={readContext:Mr,useCallback:Pj,useContext:Mr,useEffect:zp,useImperativeHandle:Tj,useInsertionEffect:kj,useLayoutEffect:Cj,useMemo:Aj,useReducer:$p,useRef:Nj,useState:function(){return $p(Cc)},useDebugValue:Vp,useDeferredValue:function(l){var u=Lr();return yn===null?u.memoizedState=l:Rj(u,yn.memoizedState,l)},useTransition:function(){var l=$p(Cc)[0],u=Lr().memoizedState;return[l,u]},useMutableSource:gj,useSyncExternalStore:yj,useId:Oj,unstable_isNewReconciler:!1};function Xr(l,u){if(l&&l.defaultProps){u=I({},u),l=l.defaultProps;for(var b in l)u[b]===void 0&&(u[b]=l[b]);return u}return u}function Hp(l,u,b,k){u=l.memoizedState,b=b(k,u),b=b==null?u:I({},u,b),l.memoizedState=b,l.lanes===0&&(l.updateQueue.baseState=b)}var Jd={isMounted:function(l){return(l=l._reactInternals)?_a(l)===l:!1},enqueueSetState:function(l,u,b){l=l._reactInternals;var k=Qn(),A=Fi(l),F=Xs(k,A);F.payload=u,b!=null&&(F.callback=b),u=Mi(l,F,A),u!==null&&(es(u,l,A,k),Vd(u,l,A))},enqueueReplaceState:function(l,u,b){l=l._reactInternals;var k=Qn(),A=Fi(l),F=Xs(k,A);F.tag=1,F.payload=u,b!=null&&(F.callback=b),u=Mi(l,F,A),u!==null&&(es(u,l,A,k),Vd(u,l,A))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var b=Qn(),k=Fi(l),A=Xs(b,k);A.tag=2,u!=null&&(A.callback=u),u=Mi(l,A,k),u!==null&&(es(u,l,k,b),Vd(u,l,k))}};function Ij(l,u,b,k,A,F,W){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(k,F,W):u.prototype&&u.prototype.isPureReactComponent?!mc(b,k)||!mc(A,F):!0}function Fj(l,u,b){var k=!1,A=Ai,F=u.contextType;return typeof F=="object"&&F!==null?F=Mr(F):(A=nr(u)?Sa:In.current,k=u.contextTypes,F=(k=k!=null)?Oo(l,A):Ai),u=new u(b,F),l.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Jd,l.stateNode=u,u._reactInternals=l,k&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=A,l.__reactInternalMemoizedMaskedChildContext=F),u}function Bj(l,u,b,k){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(b,k),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(b,k),u.state!==l&&Jd.enqueueReplaceState(u,u.state,null)}function Wp(l,u,b,k){var A=l.stateNode;A.props=b,A.state=l.memoizedState,A.refs={},Rp(l);var F=u.contextType;typeof F=="object"&&F!==null?A.context=Mr(F):(F=nr(u)?Sa:In.current,A.context=Oo(l,F)),A.state=l.memoizedState,F=u.getDerivedStateFromProps,typeof F=="function"&&(Hp(l,u,F,b),A.state=l.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(u=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),u!==A.state&&Jd.enqueueReplaceState(A,A.state,null),Hd(l,b,A,k),A.state=l.memoizedState),typeof A.componentDidMount=="function"&&(l.flags|=4194308)}function Uo(l,u){try{var b="",k=u;do b+=te(k),k=k.return;while(k);var A=b}catch(F){A=` 39Error generating stack: `+F.message+` 40`+F.stack}return{value:l,source:u,stack:A,digest:null}}function Kp(l,u,b){return{value:l,source:null,stack:b??null,digest:u??null}}function Gp(l,u){try{console.error(u.value)}catch(b){setTimeout(function(){throw b})}}var qL=typeof WeakMap=="function"?WeakMap:Map;function qj(l,u,b){b=Xs(-1,b),b.tag=3,b.payload={element:null};var k=u.value;return b.callback=function(){af||(af=!0,cg=k),Gp(l,u)},b}function Uj(l,u,b){b=Xs(-1,b),b.tag=3;var k=l.type.getDerivedStateFromError;if(typeof k=="function"){var A=u.value;b.payload=function(){return k(A)},b.callback=function(){Gp(l,u)}}var F=l.stateNode;return F!==null&&typeof F.componentDidCatch=="function"&&(b.callback=function(){Gp(l,u),typeof k!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var W=u.stack;this.componentDidCatch(u.value,{componentStack:W!==null?W:""})}),b}function $j(l,u,b){var k=l.pingCache;if(k===null){k=l.pingCache=new qL;var A=new Set;k.set(u,A)}else A=k.get(u),A===void 0&&(A=new Set,k.set(u,A));A.has(b)||(A.add(b),l=eD.bind(null,l,u,b),u.then(l,l))}function zj(l){do{var u;if((u=l.tag===13)&&(u=l.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return l;l=l.return}while(l!==null);return null}function Vj(l,u,b,k,A){return(l.mode&1)===0?(l===u?l.flags|=65536:(l.flags|=128,b.flags|=131072,b.flags&=-52805,b.tag===1&&(b.alternate===null?b.tag=17:(u=Xs(-1,1),u.tag=2,Mi(b,u,1))),b.lanes|=1),l):(l.flags|=65536,l.lanes=A,l)}var UL=N.ReactCurrentOwner,rr=!1;function Yn(l,u,b,k){u.child=l===null?uj(u,null,b,k):Io(u,l.child,b,k)}function Hj(l,u,b,k,A){b=b.render;var F=u.ref;return Bo(u,A),k=Bp(l,u,b,k,F,A),b=qp(),l!==null&&!rr?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~A,Js(l,u,A)):(zt&&b&&jp(u),u.flags|=1,Yn(l,u,k,A),u.child)}function Wj(l,u,b,k,A){if(l===null){var F=b.type;return typeof F=="function"&&!gg(F)&&F.defaultProps===void 0&&b.compare===null&&b.defaultProps===void 0?(u.tag=15,u.type=F,Kj(l,u,F,k,A)):(l=ff(b.type,null,k,u,u.mode,A),l.ref=u.ref,l.return=u,u.child=l)}if(F=l.child,(l.lanes&A)===0){var W=F.memoizedProps;
vendor: 42,224 bytes, line 40
40if(b=b.compare,b=b!==null?b:mc,b(W,k)&&l.ref===u.ref)return Js(l,u,A)}return u.flags|=1,l=qi(F,k),l.ref=u.ref,l.return=u,u.child=l}function Kj(l,u,b,k,A){if(l!==null){var F=l.memoizedProps;if(mc(F,k)&&l.ref===u.ref)if(rr=!1,u.pendingProps=k=F,(l.lanes&A)!==0)(l.flags&131072)!==0&&(rr=!0);else return u.lanes=l.lanes,Js(l,u,A)}return Yp(l,u,b,k,A)}function Gj(l,u,b){var k=u.pendingProps,A=k.children,F=l!==null?l.memoizedState:null;if(k.mode==="hidden")if((u.mode&1)===0)u.memoizedState={baseLanes:0,cachePool:null,transitions:null},Dt(zo,vr),vr|=b;else{if((b&1073741824)===0)return l=F!==null?F.baseLanes|b:b,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:l,cachePool:null,transitions:null},u.updateQueue=null,Dt(zo,vr),vr|=l,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},k=F!==null?F.baseLanes:b,Dt(zo,vr),vr|=k}else F!==null?(k=F.baseLanes|b,u.memoizedState=null):k=b,Dt(zo,vr),vr|=k;return Yn(l,u,A,b),u.child}function Yj(l,u){var b=u.ref;(l===null&&b!==null||l!==null&&l.ref!==b)&&(u.flags|=512,u.flags|=2097152)}function Yp(l,u,b,k,A){var F=nr(b)?Sa:In.current;return F=Oo(u,F),Bo(u,A),b=Bp(l,u,b,k,F,A),k=qp(),l!==null&&!rr?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~A,Js(l,u,A)):(zt&&k&&jp(u),u.flags|=1,Yn(l,u,b,A),u.child)}function Qj(l,u,b,k,A){if(nr(b)){var F=!0;Dd(u)}else F=!1;if(Bo(u,A),u.stateNode===null)ef(l,u),Fj(u,b,k),Wp(u,b,k,A),k=!0;else if(l===null){var W=u.stateNode,X=u.memoizedProps;W.props=X;var re=W.context,fe=b.contextType;typeof fe=="object"&&fe!==null?fe=Mr(fe):(fe=nr(b)?Sa:In.current,fe=Oo(u,fe));var be=b.getDerivedStateFromProps,we=typeof be=="function"||typeof W.getSnapshotBeforeUpdate=="function";we||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(X!==k||re!==fe)&&Bj(u,W,k,fe),Oi=!1;var ve=u.memoizedState;W.state=ve,Hd(u,k,W,A),re=u.memoizedState,X!==k||ve!==re||tr.current||Oi?(typeof be=="function"&&(Hp(u,b,be,k),re=u.memoizedState),(X=Oi||Ij(u,b,X,k,ve,re,fe))?(we||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount()),typeof W.componentDidMount=="function"&&(u.flags|=4194308)):(typeof W.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=k,u.memoizedState=re),W.props=k,W.state=re,W.context=fe,k=X):(typeof W.componentDidMount=="function"&&(u.flags|=4194308),k=!1)}else{W=u.stateNode,fj(l,u),X=u.memoizedProps,fe=u.type===u.elementType?X:Xr(u.type,X),W.props=fe,we=u.pendingProps,ve=W.context,re=b.contextType,typeof re=="object"&&re!==null?re=Mr(re):(re=nr(b)?Sa:In.current,re=Oo(u,re));var Me=b.getDerivedStateFromProps;(be=typeof Me=="function"||typeof W.getSnapshotBeforeUpdate=="function")||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(X!==we||ve!==re)&&Bj(u,W,k,re),Oi=!1,ve=u.memoizedState,W.state=ve,Hd(u,k,W,A);var Ue=u.memoizedState;X!==we||ve!==Ue||tr.current||Oi?(typeof Me=="function"&&(Hp(u,b,Me,k),Ue=u.memoizedState),(fe=Oi||Ij(u,b,fe,k,ve,Ue,re)||!1)?(be||typeof W.UNSAFE_componentWillUpdate!="function"&&typeof W.componentWillUpdate!="function"||(typeof W.componentWillUpdate=="function"&&W.componentWillUpdate(k,Ue,re),typeof W.UNSAFE_componentWillUpdate=="function"&&W.UNSAFE_componentWillUpdate(k,Ue,re)),typeof W.componentDidUpdate=="function"&&(u.flags|=4),typeof W.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof W.componentDidUpdate!="function"||X===l.memoizedProps&&ve===l.memoizedState||(u.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||X===l.memoizedProps&&ve===l.memoizedState||(u.flags|=1024),u.memoizedProps=k,u.memoizedState=Ue),W.props=k,W.state=Ue,W.context=re,k=fe):(typeof W.componentDidUpdate!="function"||X===l.memoizedProps&&ve===l.memoizedState||(u.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||X===l.memoizedProps&&ve===l.memoizedState||(u.flags|=1024),k=!1)}return Qp(l,u,b,k,F,A)}function Qp(l,u,b,k,A,F){Yj(l,u);var W=(u.flags&128)!==0;if(!k&&!W)return A&&tj(u,b,!1),Js(l,u,F);k=u.stateNode,UL.current=u;var X=W&&typeof b.getDerivedStateFromError!="function"?null:k.render();return u.flags|=1,l!==null&&W?(u.child=Io(u,l.child,null,F),u.child=Io(u,null,X,F)):Yn(l,u,X,F),u.memoizedState=k.state,A&&tj(u,b,!0),u.child}function Xj(l){var u=l.stateNode;u.pendingContext?Z1(l,u.pendingContext,u.pendingContext!==u.context):u.context&&Z1(l,u.context,!1),Op(l,u.containerInfo)}function Jj(l,u,b,k,A){return Do(),kp(A),u.flags|=256,Yn(l,u,b,k),u.child}var Xp={dehydrated:null,treeContext:null,retryLane:0};function Jp(l){return{baseLanes:l,cachePool:null,transitions:null}}function Zj(l,u,b){var k=u.pendingProps,A=Ht.current,F=!1,W=(u.flags&128)!==0,X;if((X=W)||(X=l!==null&&l.memoizedState===null?!1:(A&2)!==0),X?(F=!0,u.flags&=-129):(l===null||l.memoizedState!==null)&&(A|=1),Dt(Ht,A&1),l===null)return Sp(u),l=u.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?((u.mode&1)===0?u.lanes=1:l.data==="$!"?u.lanes=8:u.lanes=1073741824,null):(W=k.children,l=k.fallback,F?(k=u.mode,F=u.child,W={mode:"hidden",children:W},(k&1)===0&&F!==null?(F.childLanes=0,F.pendingProps=W):F=hf(W,k,0,null),l=La(l,k,b,null),F.return=u,l.return=u,F.sibling=l,u.child=F,u.child.memoizedState=Jp(b),u.memoizedState=Xp,l):Zp(u,W));if(A=l.memoizedState,A!==null&&(X=A.dehydrated,X!==null))return $L(l,u,W,k,X,A,b);if(F){F=k.fallback,W=u.mode,A=l.child,X=A.sibling;var re={mode:"hidden",children:k.children};return(W&1)===0&&u.child!==A?(k=u.child,k.childLanes=0,k.pendingProps=re,u.deletions=null):(k=qi(A,re),k.subtreeFlags=A.subtreeFlags&14680064),X!==null?F=qi(X,F):(F=La(F,W,b,null),F.flags|=2),F.return=u,k.return=u,k.sibling=F,u.child=k,k=F,F=u.child,W=l.child.memoizedState,W=W===null?Jp(b):{baseLanes:W.baseLanes|b,cachePool:null,transitions:W.transitions},F.memoizedState=W,F.childLanes=l.childLanes&~b,u.memoizedState=Xp,k}return F=l.child,l=F.sibling,k=qi(F,{mode:"visible",children:k.children}),(u.mode&1)===0&&(k.lanes=b),k.return=u,k.sibling=null,l!==null&&(b=u.deletions,b===null?(u.deletions=[l],u.flags|=16):b.push(l)),u.child=k,u.memoizedState=null,k}function Zp(l,u){return u=hf({mode:"visible",children:u},l.mode,0,null),u.return=l,l.child=u}function Zd(l,u,b,k){return k!==null&&kp(k),Io(u,l.child,null,b),l=Zp(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function $L(l,u,b,k,A,F,W){if(b)return u.flags&256?(u.flags&=-257,k=Kp(Error(n(422))),Zd(l,u,W,k)):u.memoizedState!==null?(u.child=l.child,u.flags|=128,null):(F=k.fallback,A=u.mode,k=hf({mode:"visible",children:k.children},A,0,null),F=La(F,A,W,null),F.flags|=2,k.return=u,F.return=u,k.sibling=F,u.child=k,(u.mode&1)!==0&&Io(u,l.child,null,W),u.child.memoizedState=Jp(W),u.memoizedState=Xp,F);if((u.mode&1)===0)return Zd(l,u,W,null);if(A.data==="$!"){if(k=A.nextSibling&&A.nextSibling.dataset,k)var X=k.dgst;return k=X,F=Error(n(419)),k=Kp(F,k,void 0),Zd(l,u,W,k)}if(X=(W&l.childLanes)!==0,rr||X){if(k=Nn,k!==null){switch(W&-W){case 4:A=2;break;case 16:A=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:A=32;break;case 536870912:A=268435456;break;default:A=0}A=(A&(k.suspendedLanes|W))!==0?0:A,A!==0&&A!==F.retryLane&&(F.retryLane=A,Qs(l,A),es(k,l,A,-1))}return pg(),k=Kp(Error(n(421))),Zd(l,u,W,k)}return A.data==="$?"?(u.flags|=128,u.child=l.child,u=tD.bind(null,l),A._reactRetry=u,null):(l=F.treeContext,xr=Ti(A.nextSibling),yr=u,zt=!0,Qr=null,l!==null&&(Rr[Or++]=Gs,Rr[Or++]=Ys,Rr[Or++]=ka,Gs=l.id,Ys=l.overflow,ka=u),u=Zp(u,k.children),u.flags|=4096,u)}function e_(l,u,b){l.lanes|=u;var k=l.alternate;k!==null&&(k.lanes|=u),Pp(l.return,u,b)}function eg(l,u,b,k,A){var F=l.memoizedState;F===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:k,tail:b,tailMode:A}:(F.isBackwards=u,F.rendering=null,F.renderingStartTime=0,F.last=k,F.tail=b,F.tailMode=A)}function t_(l,u,b){var k=u.pendingProps,A=k.revealOrder,F=k.tail;if(Yn(l,u,k.children,b),k=Ht.current,(k&2)!==0)k=k&1|2,u.flags|=128;else{if(l!==null&&(l.flags&128)!==0)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&e_(l,b,u);else if(l.tag===19)e_(l,b,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}k&=1}if(Dt(Ht,k),(u.mode&1)===0)u.memoizedState=null;else switch(A){case"forwards":for(b=u.child,A=null;b!==null;)l=b.alternate,l!==null&&Wd(l)===null&&(A=b),b=b.sibling;b=A,b===null?(A=u.child,u.child=null):(A=b.sibling,b.sibling=null),eg(u,!1,A,b,F);break;case"backwards":for(b=null,A=u.child,u.child=null;A!==null;){if(l=A.alternate,l!==null&&Wd(l)===null){u.child=A;break}l=A.sibling,A.sibling=b,b=A,A=l}eg(u,!0,b,null,F);break;case"together":eg(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function ef(l,u){(u.mode&1)===0&&l!==null&&(l.alternate=null,u.alternate=null,u.flags|=2)}function Js(l,u,b){if(l!==null&&(u.dependencies=l.dependencies),Aa|=u.lanes,(b&u.childLanes)===0)return null;if(l!==null&&u.child!==l.child)throw Error(n(153));if(u.child!==null){for(l=u.child,b=qi(l,l.pendingProps),u.child=b,b.return=u;l.sibling!==null;)l=l.sibling,b=b.sibling=qi(l,l.pendingProps),b.return=u;b.sibling=null}return u.child}function zL(l,u,b){switch(u.tag){case 3:Xj(u),Do();break;case 5:pj(u);break;case 1:nr(u.type)&&Dd(u);break;case 4:Op(u,u.stateNode.containerInfo);break;case 10:var k=u.type._context,A=u.memoizedProps.value;Dt($d,k._currentValue),k._currentValue=A;break;case 13:if(k=u.memoizedState,k!==null)return k.dehydrated!==null?(Dt(Ht,Ht.current&1),u.flags|=128,null):(b&u.child.childLanes)!==0?Zj(l,u,b):(Dt(Ht,Ht.current&1),l=Js(l,u,b),l!==null?l.sibling:null);Dt(Ht,Ht.current&1);break;case 19:if(k=(b&u.childLanes)!==0,(l.flags&128)!==0){if(k)return t_(l,u,b);u.flags|=128}if(A=u.memoizedState,A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),Dt(Ht,Ht.current),k)break;return null;case 22:case 23:return u.lanes=0,Gj(l,u,b)}return Js(l,u,b)}var n_,tg,r_,s_;n_=function(l,u){for(var b=u.child;b!==null;){if(b.tag===5||b.tag===6)l.appendChild(b.stateNode);else if(b.tag!==4&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===u)break;for(;b.sibling===null;){if(b.return===null||b.return===u)return;b=b.return}b.sibling.return=b.return,b=b.sibling}},tg=function(){},r_=function(l,u,b,k){var A=l.memoizedProps;if(A!==k){l=u.stateNode,Ta(bs.current);var F=null;switch(b){case"input":A=Ye(l,A),k=Ye(l,k),F=[];break;case"select":A=I({},A,{value:void 0}),k=I({},k,{value:void 0}),F=[];break;case"textarea":A=xe(l,A),k=xe(l,k),F=[];break;default:typeof A.onClick!="function"&&typeof k.onClick=="function"&&(l.onclick=Od)}Pn(b,k);var W;b=null;for(fe in A)if(!k.hasOwnProperty(fe)&&A.hasOwnProperty(fe)&&A[fe]!=null)if(fe==="style"){var X=A[fe];for(W in X)X.hasOwnProperty(W)&&(b||(b={}),b[W]="")}else fe!=="dangerouslySetInnerHTML"&&fe!=="children"&&fe!=="suppressContentEditableWarning"&&fe!=="suppressHydrationWarning"&&fe!=="autoFocus"&&(i.hasOwnProperty(fe)?F||(F=[]):(F=F||[]).push(fe,null));for(fe in k){var re=k[fe];if(X=A!=null?A[fe]:void 0,k.hasOwnProperty(fe)&&re!==X&&(re!=null||X!=null))if(fe==="style")if(X){for(W in X)!X.hasOwnProperty(W)||re&&re.hasOwnProperty(W)||(b||(b={}),b[W]="");for(W in re)re.hasOwnProperty(W)&&X[W]!==re[W]&&(b||(b={}),b[W]=re[W])}else b||(F||(F=[]),F.push(fe,b)),b=re;else fe==="dangerouslySetInnerHTML"?(re=re?re.__html:void 0,X=X?X.__html:void 0,re!=null&&X!==re&&(F=F||[]).push(fe,re)):fe==="children"?typeof re!="string"&&typeof re!="number"||(F=F||[]).push(fe,""+re):fe!=="suppressContentEditableWarning"&&fe!=="suppressHydrationWarning"&&(i.hasOwnProperty(fe)?(re!=null&&fe==="onScroll"&&qt("scroll",l),F||X===re||(F=[])):(F=F||[]).push(fe,re))}b&&(F=F||[]).push("style",b);var fe=F;(u.updateQueue=fe)&&(u.flags|=4)}},s_=function(l,u,b,k){b!==k&&(u.flags|=4)};function Tc(l,u){if(!zt)switch(l.tailMode){case"hidden":u=l.tail;for(var b=null;u!==null;)u.alternate!==null&&(b=u),u=u.sibling;b===null?l.tail=null:b.sibling=null;break;case"collapsed":b=l.tail;for(var k=null;b!==null;)b.alternate!==null&&(k=b),b=b.sibling;k===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:k.sibling=null}}function Bn(l){var u=l.alternate!==null&&l.alternate.child===l.child,b=0,k=0;if(u)for(var A=l.child;A!==null;)b|=A.lanes|A.childLanes,k|=A.subtreeFlags&14680064,k|=A.flags&14680064,A.return=l,A=A.sibling;else for(A=l.child;A!==null;)b|=A.lanes|A.childLanes,k|=A.subtreeFlags,k|=A.flags,A.return=l,A=A.sibling;return l.subtreeFlags|=k,l.childLanes=b,u}function VL(l,u,b){var k=u.pendingProps;switch(_p(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bn(u),null;case 1:return nr(u.type)&&Ld(),Bn(u),null;case 3:return k=u.stateNode,qo(),Ut(tr),Ut(In),Dp(),k.pendingContext&&(k.context=k.pendingContext,k.pendingContext=null),(l===null||l.child===null)&&(qd(u)?u.flags|=4:l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Qr!==null&&(fg(Qr),Qr=null))),tg(l,u),Bn(u),null;case 5:Mp(u);var A=Ta(Nc.current);if(b=u.type,l!==null&&u.stateNode!=null)r_(l,u,b,k,A),l.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!k){if(u.stateNode===null)throw Error(n(166));return Bn(u),null}if(l=Ta(bs.current),qd(u)){k=u.stateNode,b=u.type;var F=u.memoizedProps;switch(k[vs]=u,k[vc]=F,l=(u.mode&1)!==0,b){case"dialog":qt("cancel",k),qt("close",k);break;case"iframe":case"object":case"embed":qt("load",k);break;case"video":case"audio":for(A=0;A<gc.length;A++)qt(gc[A],k);break;case"source":qt("error",k);break;case"img":case"image":case"link":qt("error",k),qt("load",k);break;case"details":qt("toggle",k);break;case"input":et(k,F),qt("invalid",k);break;case"select":k._wrapperState={wasMultiple:!!F.multiple},qt("invalid",k);break;case"textarea":ot(k,F),qt("invalid",k)}Pn(b,F),A=null;for(var W in F)if(F.hasOwnProperty(W)){var X=F[W];W==="children"?typeof X=="string"?k.textContent!==X&&(F.suppressHydrationWarning!==!0&&Rd(k.textContent,X,l),A=["children",X]):typeof X=="number"&&k.textContent!==""+X&&(F.suppressHydrationWarning!==!0&&Rd(k.textContent,X,l),A=["children",""+X]):i.hasOwnProperty(W)&&X!=null&&W==="onScroll"&&qt("scroll",k)}switch(b){case"input":ye(k),he(k,F,!0);break;case"textarea":ye(k),ct(k);break;case"select":case"option":break;default:typeof F.onClick=="function"&&(k.onclick=Od)}k=A,u.updateQueue=k,k!==null&&(u.flags|=4)}else{W=A.nodeType===9?A:A.ownerDocument,l==="http://www.w3.org/1999/xhtml"&&(l=pe(b)),l==="http://www.w3.org/1999/xhtml"?b==="script"?(l=W.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild)):typeof k.is=="string"?l=W.createElement(b,{is:k.is}):(l=W.createElement(b),b==="select"&&(W=l,k.multiple?W.multiple=!0:k.size&&(W.size=k.size))):l=W.createElementNS(l,b),l[vs]=u,l[vc]=k,n_(l,u,!1,!1),u.stateNode=l;e:{switch(W=ys(b,k),b){case"dialog":qt("cancel",l),qt("close",l),A=k;break;case"iframe":case"object":case"embed":qt("load",l),A=k;break;case"video":case"audio":for(A=0;A<gc.length;A++)qt(gc[A],l);A=k;break;case"source":qt("error",l),A=k;break;case"img":case"image":case"link":qt("error",l),qt("load",l),A=k;break;case"details":qt("toggle",l),A=k;break;case"input":et(l,k),A=Ye(l,k),qt("invalid",l);break;case"option":A=k;break;case"select":l._wrapperState={wasMultiple:!!k.multiple},A=I({},k,{value:void 0}),qt("invalid",l);break;case"textarea":ot(l,k),A=xe(l,k),qt("invalid",l);break;default:A=k}Pn(b,A),X=A;for(F in X)if(X.hasOwnProperty(F)){var re=X[F];F==="style"?ji(l,re):F==="dangerouslySetInnerHTML"?(re=re?re.__html:void 0,re!=null&&ht(l,re)):F==="children"?typeof re=="string"?(b!=="textarea"||re!=="")&&Qe(l,re):typeof re=="number"&&Qe(l,""+re):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(i.hasOwnProperty(F)?re!=null&&F==="onScroll"&&qt("scroll",l):re!=null&&_(l,F,re,W))}switch(b){case"input":ye(l),he(l,k,!1);break;case"textarea":ye(l),ct(l);break;case"option":k.value!=null&&l.setAttribute("value",""+ne(k.value));break;case"select":l.multiple=!!k.multiple,F=k.value,F!=null?Pe(l,!!k.multiple,F,!1):k.defaultValue!=null&&Pe(l,!!k.multiple,k.defaultValue,!0);break;default:typeof A.onClick=="function"&&(l.onclick=Od)}switch(b){case"button":case"input":case"select":case"textarea":k=!!k.autoFocus;break e;case"img":k=!0;break e;default:k=!1}}k&&(u.flags|=4)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return Bn(u),null;case 6:if(l&&u.stateNode!=null)s_(l,u,l.memoizedProps,k);else{if(typeof k!="string"&&u.stateNode===null)throw Error(n(166));if(b=Ta(Nc.current),Ta(bs.current),qd(u)){if(k=u.stateNode,b=u.memoizedProps,k[vs]=u,(F=k.nodeValue!==b)&&(l=yr,l!==null))switch(l.tag){case 3:Rd(k.nodeValue,b,(l.mode&1)!==0);break;case 5:l.memoizedProps.suppressHydrationWarning!==!0&&Rd(k.nodeValue,b,(l.mode&1)!==0)}F&&(u.flags|=4)}else k=(b.nodeType===9?b:b.ownerDocument).createTextNode(k),k[vs]=u,u.stateNode=k}return Bn(u),null;case 13:if(Ut(Ht),k=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(zt&&xr!==null&&(u.mode&1)!==0&&(u.flags&128)===0)oj(),Do(),u.flags|=98560,F=!1;else if(F=qd(u),k!==null&&k.dehydrated!==null){if(l===null){if(!F)throw Error(n(318));if(F=u.memoizedState,F=F!==null?F.dehydrated:null,!F)throw Error(n(317));F[vs]=u}else Do(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Bn(u),F=!1}else Qr!==null&&(fg(Qr),Qr=null),F=!0;if(!F)return u.flags&65536?u:null}return(u.flags&128)!==0?(u.lanes=b,u):(k=k!==null,k!==(l!==null&&l.memoizedState!==null)&&k&&(u.child.flags|=8192,(u.mode&1)!==0&&(l===null||(Ht.current&1)!==0?xn===0&&(xn=3):pg())),u.updateQueue!==null&&(u.flags|=4),Bn(u),null);case 4:return qo(),tg(l,u),l===null&&yc(u.stateNode.containerInfo),Bn(u),null;case 10:return Tp(u.type._context),Bn(u),null;case 17:return nr(u.type)&&Ld(),Bn(u),null;case 19:if(Ut(Ht),F=u.memoizedState,F===null)return Bn(u),null;if(k=(u.flags&128)!==0,W=F.rendering,W===null)if(k)Tc(F,!1);else{if(xn!==0||l!==null&&(l.flags&128)!==0)for(l=u.child;l!==null;){if(W=Wd(l),W!==null){for(u.flags|=128,Tc(F,!1),k=W.updateQueue,k!==null&&(u.updateQueue=k,u.flags|=4),u.subtreeFlags=0,k=b,b=u.child;b!==null;)F=b,l=k,F.flags&=14680066,W=F.alternate,W===null?(F.childLanes=0,F.lanes=l,F.child=null,F.subtreeFlags=0,F.memoizedProps=null,F.memoizedState=null,F.updateQueue=null,F.dependencies=null,F.stateNode=null):(F.childLanes=W.childLanes,F.lanes=W.lanes,F.child=W.child,F.subtreeFlags=0,F.deletions=null,F.memoizedProps=W.memoizedProps,F.memoizedState=W.memoizedState,F.updateQueue=W.updateQueue,F.type=W.type,l=W.dependencies,F.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),b=b.sibling;return Dt(Ht,Ht.current&1|2),u.child}l=l.sibling}F.tail!==null&&tn()>Vo&&(u.flags|=128,k=!0,Tc(F,!1),u.lanes=4194304)}else{if(!k)if(l=Wd(W),l!==null){if(u.flags|=128,k=!0,b=l.updateQueue,b!==null&&(u.updateQueue=b,u.flags|=4),Tc(F,!0),F.tail===null&&F.tailMode==="hidden"&&!W.alternate&&!zt)return Bn(u),null}else 2*tn()-F.renderingStartTime>Vo&&b!==1073741824&&(u.flags|=128,k=!0,Tc(F,!1),u.lanes=4194304);F.isBackwards?(W.sibling=u.child,u.child=W):(b=F.last,b!==null?b.sibling=W:u.child=W,F.last=W)}return F.tail!==null?(u=F.tail,F.rendering=u,F.tail=u.sibling,F.renderingStartTime=tn(),u.sibling=null,b=Ht.current,Dt(Ht,k?b&1|2:b&1),u):(Bn(u),null);case 22:case 23:return mg(),k=u.memoizedState!==null,l!==null&&l.memoizedState!==null!==k&&(u.flags|=8192),k&&(u.mode&1)!==0?(vr&1073741824)!==0&&(Bn(u),u.subtreeFlags&6&&(u.flags|=8192)):Bn(u),null;case 24:return null;case 25:return null}throw Error(n(156,u.tag))}function HL(l,u){switch(_p(u),u.tag){case 1:return nr(u.type)&&Ld(),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return qo(),Ut(tr),Ut(In),Dp(),l=u.flags,(l&65536)!==0&&(l&128)===0?(u.flags=l&-65537|128,u):null;case 5:return Mp(u),null;case 13:if(Ut(Ht),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(n(340));Do()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return Ut(Ht),null;case 4:return qo(),null;case 10:return Tp(u.type._context),null;case 22:case 23:return mg(),null;case 24:return null;default:return null}}var tf=!1,qn=!1,WL=typeof WeakSet=="function"?WeakSet:Set,Be=null;function $o(l,u){var b=l.ref;if(b!==null)if(typeof b=="function")try{b(null)}catch(k){Qt(l,u,k)}else b.current=null}function ng(l,u,b){try{b()}catch(k){Qt(l,u,k)}}var i_=!1;function KL(l,u){if(mp=wd,l=I1(),ap(l)){if("selectionStart"in l)var b={start:l.selectionStart,end:l.selectionEnd};else e:{b=(b=l.ownerDocument)&&b.defaultView||window;var k=b.getSelection&&b.getSelection();if(k&&k.rangeCount!==0){b=k.anchorNode;var A=k.anchorOffset,F=k.focusNode;k=k.focusOffset;try{b.nodeType,F.nodeType}catch{b=null;break e}var W=0,X=-1,re=-1,fe=0,be=0,we=l,ve=null;t:for(;;){for(var Me;we!==b||A!==0&&we.nodeType!==3||(X=W+A),we!==F||k!==0&&we.nodeType!==3||(re=W+k),we.nodeType===3&&(W+=we.nodeValue.length),(Me=we.firstChild)!==null;)ve=we,we=Me;for(;;){if(we===l)break t;if(ve===b&&++fe===A&&(X=W),ve===F&&++be===k&&(re=W),(Me=we.nextSibling)!==null)break;we=ve,ve=we.parentNode}we=Me}b=X===-1||re===-1?null:{start:X,end:re}}else b=null}b=b||{start:0,end:0}}else b=null;for(pp={focusedElem:l,selectionRange:b},wd=!1,Be=u;Be!==null;)if(u=Be,l=u.child,(u.subtreeFlags&1028)!==0&&l!==null)l.return=u,Be=l;else for(;Be!==null;){u=Be;try{var Ue=u.alternate;if((u.flags&1024)!==0)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Ue!==null){var Ve=Ue.memoizedProps,nn=Ue.memoizedState,le=u.stateNode,ae=le.getSnapshotBeforeUpdate(u.elementType===u.type?Ve:Xr(u.type,Ve),nn);le.__reactInternalSnapshotBeforeUpdate=ae}break;case 3:var ue=u.stateNode.containerInfo;ue.nodeType===1?ue.textContent="":ue.nodeType===9&&ue.documentElement&&ue.removeChild(ue.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Se){Qt(u,u.return,Se)}if(l=u.sibling,l!==null){l.return=u.return,Be=l;break}Be=u.return}return Ue=i_,i_=!1,Ue}function Pc(l,u,b){var k=u.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var A=k=k.next;do{if((A.tag&l)===l){var F=A.destroy;A.destroy=void 0,F!==void 0&&ng(u,b,F)}A=A.next}while(A!==k)}}function nf(l,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var b=u=u.next;do{if((b.tag&l)===l){var k=b.create;b.destroy=k()}b=b.next}while(b!==u)}}function rg(l){var u=l.ref;if(u!==null){var b=l.stateNode;switch(l.tag){case 5:l=b;break;default:l=b}typeof u=="function"?u(l):u.current=l}}function a_(l){var u=l.alternate;u!==null&&(l.alternate=null,a_(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&(delete u[vs],delete u[vc],delete u[vp],delete u[TL],delete u[PL])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function o_(l){return l.tag===5||l.tag===3||l.tag===4}function l_(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||o_(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function sg(l,u,b){var k=l.tag;if(k===5||k===6)l=l.stateNode,u?b.nodeType===8?b.parentNode.insertBefore(l,u):b.insertBefore(l,u):(b.nodeType===8?(u=b.parentNode,u.insertBefore(l,b)):(u=b,u.appendChild(l)),b=b._reactRootContainer,b!=null||u.onclick!==null||(u.onclick=Od));else if(k!==4&&(l=l.child,l!==null))for(sg(l,u,b),l=l.sibling;l!==null;)sg(l,u,b),l=l.sibling}function ig(l,u,b){var k=l.tag;if(k===5||k===6)l=l.stateNode,u?b.insertBefore(l,u):b.appendChild(l);else if(k!==4&&(l=l.child,l!==null))for(ig(l,u,b),l=l.sibling;l!==null;)ig(l,u,b),l=l.sibling}var An=null,Jr=!1;function Li(l,u,b){for(b=b.child;b!==null;)c_(l,u,b),b=b.sibling}function c_(l,u,b){if(xs&&typeof xs.onCommitFiberUnmount=="function")try{xs.onCommitFiberUnmount(pd,b)}catch{}switch(b.tag){case 5:qn||$o(b,u);case 6:var k=An,A=Jr;An=null,Li(l,u,b),An=k,Jr=A,An!==null&&(Jr?(l=An,b=b.stateNode,l.nodeType===8?l.parentNode.removeChild(b):l.removeChild(b)):An.removeChild(b.stateNode));break;case 18:An!==null&&(Jr?(l=An,b=b.stateNode,l.nodeType===8?xp(l.parentNode,b):l.nodeType===1&&xp(l,b),lc(l)):xp(An,b.stateNode));break;case 4:k=An,A=Jr,An=b.stateNode.containerInfo,Jr=!0,Li(l,u,b),An=k,Jr=A;break;case 0:case 11:case 14:case 15:if(!qn&&(k=b.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){A=k=k.next;do{var F=A,W=F.destroy;F=F.tag,W!==void 0&&((F&2)!==0||(F&4)!==0)&&ng(b,u,W),A=A.next}while(A!==k)}Li(l,u,b);break;case 1:if(!qn&&($o(b,u),k=b.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=b.memoizedProps,k.state=b.memoizedState,k.componentWillUnmount()}catch(X){Qt(b,u,X)}Li(l,u,b);break;case 21:Li(l,u,b);break;case 22:b.mode&1?(qn=(k=qn)||b.memoizedState!==null,Li(l,u,b),qn=k):Li(l,u,b);break;default:Li(l,u,b)}}function u_(l){var u=l.updateQueue;if(u!==null){l.updateQueue=null;var b=l.stateNode;b===null&&(b=l.stateNode=new WL),u.forEach(function(k){var A=nD.bind(null,l,k);b.has(k)||(b.add(k),k.then(A,A))})}}function Zr(l,u){var b=u.deletions;if(b!==null)for(var k=0;k<b.length;k++){var A=b[k];try{var F=l,W=u,X=W;e:for(;X!==null;){switch(X.tag){case 5:An=X.stateNode,Jr=!1;break e;case 3:An=X.stateNode.containerInfo,Jr=!0;break e;case 4:An=X.stateNode.containerInfo,Jr=!0;break e}X=X.return}if(An===null)throw Error(n(160));c_(F,W,A),An=null,Jr=!1;var re=A.alternate;re!==null&&(re.return=null),A.return=null}catch(fe){Qt(A,u,fe)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)d_(u,l),u=u.sibling}function d_(l,u){var b=l.alternate,k=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:if(Zr(u,l),js(l),k&4){try{Pc(3,l,l.return),nf(3,l)}catch(Ve){Qt(l,l.return,Ve)}try{Pc(5,l,l.return)}catch(Ve){Qt(l,l.return,Ve)}}break;case 1:Zr(u,l),js(l),k&512&&b!==null&&$o(b,b.return);break;case 5:if(Zr(u,l),js(l),k&512&&b!==null&&$o(b,b.return),l.flags&32){var A=l.stateNode;try{Qe(A,"")}catch(Ve){Qt(l,l.return,Ve)}}if(k&4&&(A=l.stateNode,A!=null)){var F=l.memoizedProps,W=b!==null?b.memoizedProps:F,X=l.type,re=l.updateQueue;if(l.updateQueue=null,re!==null)try{X==="input"&&F.type==="radio"&&F.name!=null&&Le(A,F),ys(X,W);var fe=ys(X,F);for(W=0;W<re.length;W+=2){var be=re[W],we=re[W+1];be==="style"?ji(A,we):be==="dangerouslySetInnerHTML"?ht(A,we):be==="children"?Qe(A,we):_(A,be,we,fe)}switch(X){case"input":at(A,F);break;case"textarea":lt(A,F);break;case"select":var ve=A._wrapperState.wasMultiple;A._wrapperState.wasMultiple=!!F.multiple;var Me=F.value;Me!=null?Pe(A,!!F.multiple,Me,!1):ve!==!!F.multiple&&(F.defaultValue!=null?Pe(A,!!F.multiple,F.defaultValue,!0):Pe(A,!!F.multiple,F.multiple?[]:"",!1))}A[vc]=F}catch(Ve){Qt(l,l.return,Ve)}}break;case 6:if(Zr(u,l),js(l),k&4){if(l.stateNode===null)throw Error(n(162));A=l.stateNode,F=l.memoizedProps;try{A.nodeValue=F}catch(Ve){Qt(l,l.return,Ve)}}break;case 3:if(Zr(u,l),js(l),k&4&&b!==null&&b.memoizedState.isDehydrated)try{lc(u.containerInfo)}catch(Ve){Qt(l,l.return,Ve)}break;case 4:Zr(u,l),js(l);break;case 13:Zr(u,l),js(l),A=l.child,A.flags&8192&&(F=A.memoizedState!==null,A.stateNode.isHidden=F,!F||A.alternate!==null&&A.alternate.memoizedState!==null||(lg=tn())),k&4&&u_(l);break;case 22:if(be=b!==null&&b.memoizedState!==null,l.mode&1?(qn=(fe=qn)||be,Zr(u,l),qn=fe):Zr(u,l),js(l),k&8192){if(fe=l.memoizedState!==null,(l.stateNode.isHidden=fe)&&!be&&(l.mode&1)!==0)for(Be=l,be=l.child;be!==null;){for(we=Be=be;Be!==null;){switch(ve=Be,Me=ve.child,ve.tag){case 0:case 11:case 14:case 15:Pc(4,ve,ve.return);break;case 1:$o(ve,ve.return);var Ue=ve.stateNode;if(typeof Ue.componentWillUnmount=="function"){k=ve,b=ve.return;try{u=k,Ue.props=u.memoizedProps,Ue.state=u.memoizedState,Ue.componentWillUnmount()}catch(Ve){Qt(k,b,Ve)}}break;case 5:$o(ve,ve.return);break;case 22:if(ve.memoizedState!==null){m_(we);continue}}Me!==null?(Me.return=ve,Be=Me):m_(we)}be=be.sibling}e:for(be=null,we=l;;){if(we.tag===5){if(be===null){be=we;try{A=we.stateNode,fe?(F=A.style,typeof F.setProperty=="function"?F.setProperty("display","none","important"):F.display="none"):(X=we.stateNode,re=we.memoizedProps.style,W=re!=null&&re.hasOwnProperty("display")?re.display:null,X.style.display=Ar("display",W))}catch(Ve){Qt(l,l.return,Ve)}}}else if(we.tag===6){if(be===null)try{we.stateNode.nodeValue=fe?"":we.memoizedProps}catch(Ve){Qt(l,l.return,Ve)}}else if((we.tag!==22&&we.tag!==23||we.memoizedState===null||we===l)&&we.child!==null){we.child.return=we,we=we.child;continue}if(we===l)break e;for(;we.sibling===null;){if(we.return===null||we.return===l)break e;be===we&&(be=null),we=we.return}be===we&&(be=null),we.sibling.return=we.return,we=we.sibling}}break;case 19:Zr(u,l),js(l),k&4&&u_(l);break;case 21:break;default:Zr(u,l),js(l)}}function js(l){var u=l.flags;if(u&2){try{e:{for(var b=l.return;b!==null;){if(o_(b)){var k=b;break e}b=b.return}throw Error(n(160))}switch(k.tag){case 5:var A=k.stateNode;k.flags&32&&(Qe(A,""),k.flags&=-33);var F=l_(l);ig(l,F,A);break;case 3:case 4:var W=k.stateNode.containerInfo,X=l_(l);sg(l,X,W);break;default:throw Error(n(161))}}catch(re){Qt(l,l.return,re)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function GL(l,u,b){Be=l,f_(l)}function f_(l,u,b){for(var k=(l.mode&1)!==0;Be!==null;){var A=Be,F=A.child;if(A.tag===22&&k){var W=A.memoizedState!==null||tf;if(!W){var X=A.alternate,re=X!==null&&X.memoizedState!==null||qn;X=tf;var fe=qn;if(tf=W,(qn=re)&&!fe)for(Be=A;Be!==null;)W=Be,re=W.child,W.tag===22&&W.memoizedState!==null?p_(A):re!==null?(re.return=W,Be=re):p_(A);for(;F!==null;)Be=F,f_(F),F=F.sibling;Be=A,tf=X,qn=fe}h_(l)}else(A.subtreeFlags&8772)!==0&&F!==null?(F.return=A,Be=F):h_(l)}}function h_(l){for(;Be!==null;){var u=Be;if((u.flags&8772)!==0){var b=u.alternate;try{if((u.flags&8772)!==0)switch(u.tag){case 0:case 11:case 15:qn||nf(5,u);break;case 1:var k=u.stateNode;if(u.flags&4&&!qn)if(b===null)k.componentDidMount();else{var A=u.elementType===u.type?b.memoizedProps:Xr(u.type,b.memoizedProps);k.componentDidUpdate(A,b.memoizedState,k.__reactInternalSnapshotBeforeUpdate)}var F=u.updateQueue;F!==null&&mj(u,F,k);break;case 3:var W=u.updateQueue;if(W!==null){if(b=null,u.child!==null)switch(u.child.tag){case 5:b=u.child.stateNode;break;case 1:b=u.child.stateNode}mj(u,W,b)}break;case 5:var X=u.stateNode;if(b===null&&u.flags&4){b=X;var re=u.memoizedProps;switch(u.type){case"button":case"input":case"select":case"textarea":re.autoFocus&&b.focus();break;case"img":re.src&&(b.src=re.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(u.memoizedState===null){var fe=u.alternate;if(fe!==null){var be=fe.memoizedState;if(be!==null){var we=be.dehydrated;we!==null&&lc(we)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}qn||u.flags&512&&rg(u)}catch(ve){Qt(u,u.return,ve)}}if(u===l){Be=null;break}if(b=u.sibling,b!==null){b.return=u.return,Be=b;break}Be=u.return}}function m_(l){for(;Be!==null;){var u=Be;if(u===l){Be=null;break}var b=u.sibling;if(b!==null){b.return=u.return,Be=b;break}Be=u.return}}function p_(l){for(;Be!==null;){var u=Be;try{switch(u.tag){case 0:case 11:case 15:var b=u.return;try{nf(4,u)}catch(re){Qt(u,b,re)}break;case 1:var k=u.stateNode;if(typeof k.componentDidMount=="function"){var A=u.return;try{k.componentDidMount()}catch(re){Qt(u,A,re)}}var F=u.return;try{rg(u)}catch(re){Qt(u,F,re)}break;case 5:var W=u.return;try{rg(u)}catch(re){Qt(u,W,re)}}}catch(re){Qt(u,u.return,re)}if(u===l){Be=null;break}var X=u.sibling;if(X!==null){X.return=u.return,Be=X;break}Be=u.return}}var YL=Math.ceil,rf=N.ReactCurrentDispatcher,ag=N.ReactCurrentOwner,Dr=N.ReactCurrentBatchConfig,_t=0,Nn=null,fn=null,Rn=0,vr=0,zo=Pi(0),xn=0,Ac=null,Aa=0,sf=0,og=0,Rc=null,sr=null,lg=0,Vo=1/0,Zs=null,af=!1,cg=null,Di=null,of=!1,Ii=null,lf=0,Oc=0,ug=null,cf=-1,uf=0;function Qn(){return(_t&6)!==0?tn():cf!==-1?cf:cf=tn()}function Fi(l){return(l.mode&1)===0?1:(_t&2)!==0&&Rn!==0?Rn&-Rn:RL.transition!==null?(uf===0&&(uf=l1()),uf):(l=Pt,l!==0||(l=window.event,l=l===void 0?16:y1(l.type)),l)}function es(l,u,b,k){if(50<Oc)throw Oc=0,ug=null,Error(n(185));rc(l,b,k),((_t&2)===0||l!==Nn)&&(l===Nn&&((_t&2)===0&&(sf|=b),xn===4&&Bi(l,Rn)),ir(l,k),b===1&&_t===0&&(u.mode&1)===0&&(Vo=tn()+500,Id&&Ri()))}function ir(l,u){var b=l.callbackNode;R3(l,u);var k=xd(l,l===Nn?Rn:0);if(k===0)b!==null&&i1(b),l.callbackNode=null,l.callbackPriority=0;else if(u=k&-k,l.callbackPriority!==u){if(b!=null&&i1(b),u===1)l.tag===0?AL(y_.bind(null,l)):nj(y_.bind(null,l)),CL(function(){(_t&6)===0&&Ri()}),b=null;else{switch(c1(k)){case 1:b=zm;break;case 4:b=a1;break;case 16:b=md;break;case 536870912:b=o1;break;default:b=md}b=S_(b,g_.bind(null,l))}l.callbackPriority=u,l.callbackNode=b}}function g_(l,u){if(cf=-1,uf=0,(_t&6)!==0)throw Error(n(327));var b=l.callbackNode;if(Ho()&&l.callbackNode!==b)return null;var k=xd(l,l===Nn?Rn:0);if(k===0)return null;if((k&30)!==0||(k&l.expiredLanes)!==0||u)u=df(l,k);else{u=k;var A=_t;_t|=2;var F=v_();(Nn!==l||Rn!==u)&&(Zs=null,Vo=tn()+500,Oa(l,u));do try{JL();break}catch(X){x_(l,X)}while(!0);Ep(),rf.current=F,_t=A,fn!==null?u=0:(Nn=null,Rn=0,u=xn)}if(u!==0){if(u===2&&(A=Vm(l),A!==0&&(k=A,u=dg(l,A))),u===1)throw b=Ac,Oa(l,0),Bi(l,k),ir(l,tn()),b;if(u===6)Bi(l,k);else{if(A=l.current.alternate,(k&30)===0&&!QL(A)&&(u=df(l,k),u===2&&(F=Vm(l),F!==0&&(k=F,u=dg(l,F))),u===1))throw b=Ac,Oa(l,0),Bi(l,k),ir(l,tn()),b;switch(l.finishedWork=A,l.finishedLanes=k,u){case 0:case 1:throw Error(n(345));case 2:Ma(l,sr,Zs);break;case 3:if(Bi(l,k),(k&130023424)===k&&(u=lg+500-tn(),10<u)){if(xd(l,0)!==0)break;if(A=l.suspendedLanes,(A&k)!==k){Qn(),l.pingedLanes|=l.suspendedLanes&A;break}l.timeoutHandle=yp(Ma.bind(null,l,sr,Zs),u);break}Ma(l,sr,Zs);break;case 4:if(Bi(l,k),(k&4194240)===k)break;for(u=l.eventTimes,A=-1;0<k;){var W=31-Gr(k);F=1<<W,W=u[W],W>A&&(A=W),k&=~F}if(k=A,k=tn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*YL(k/1960))-k,10<k){l.timeoutHandle=yp(Ma.bind(null,l,sr,Zs),k);break}Ma(l,sr,Zs);break;case 5:Ma(l,sr,Zs);break;default:throw Error(n(329))}}}return ir(l,tn()),l.callbackNode===b?g_.bind(null,l):null}function dg(l,u){var b=Rc;return l.current.memoizedState.isDehydrated&&(Oa(l,u).flags|=256),l=df(l,u),l!==2&&(u=sr,sr=b,u!==null&&fg(u)),l}function fg(l){sr===null?sr=l:sr.push.apply(sr,l)}function QL(l){for(var u=l;;){if(u.flags&16384){var b=u.updateQueue;if(b!==null&&(b=b.stores,b!==null))for(var k=0;k<b.length;k++){var A=b[k],F=A.getSnapshot;A=A.value;try{if(!Yr(F(),A))return!1}catch{return!1}}}if(b=u.child,u.subtreeFlags&16384&&b!==null)b.return=u,u=b;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Bi(l,u){for(u&=~og,u&=~sf,l.suspendedLanes|=u,l.pingedLanes&=~u,l=l.expirationTimes;0<u;){var b=31-Gr(u),k=1<<b;l[b]=-1,u&=~k}}function y_(l){if((_t&6)!==0)throw Error(n(327));Ho();var u=xd(l,0);if((u&1)===0)return ir(l,tn()),null;var b=df(l,u);if(l.tag!==0&&b===2){var k=Vm(l);k!==0&&(u=k,b=dg(l,k))}if(b===1)throw b=Ac,Oa(l,0),Bi(l,u),ir(l,tn()),b;if(b===6)throw Error(n(345));return l.finishedWork=l.current.alternate,l.finishedLanes=u,Ma(l,sr,Zs),ir(l,tn()),null}function hg(l,u){var b=_t;_t|=1;try{return l(u)}finally{_t=b,_t===0&&(Vo=tn()+500,Id&&Ri())}}function Ra(l){Ii!==null&&Ii.tag===0&&(_t&6)===0&&Ho();var u=_t;_t|=1;var b=Dr.transition,k=Pt;try{if(Dr.transition=null,Pt=1,l)return l()}finally{Pt=k,Dr.transition=b,_t=u,(_t&6)===0&&Ri()}}function mg(){vr=zo.current,Ut(zo)}function Oa(l,u){l.finishedWork=null,l.finishedLanes=0;var b=l.timeoutHandle;if(b!==-1&&(l.timeoutHandle=-1,kL(b)),fn!==null)for(b=fn.return;b!==null;){var k=b;switch(_p(k),k.tag){case 1:k=k.type.childContextTypes,k!=null&&Ld();break;case 3:qo(),Ut(tr),Ut(In),Dp();break;case 5:Mp(k);break;case 4:qo();break;case 13:Ut(Ht);break;case 19:Ut(Ht);break;case 10:Tp(k.type._context);break;case 22:case 23:mg()}b=b.return}if(Nn=l,fn=l=qi(l.current,null),Rn=vr=u,xn=0,Ac=null,og=sf=Aa=0,sr=Rc=null,Ea!==null){for(u=0;u<Ea.length;u++)if(b=Ea[u],k=b.interleaved,k!==null){b.interleaved=null;var A=k.next,F=b.pending;if(F!==null){var W=F.next;F.next=A,k.next=W}b.pending=k}Ea=null}return l}function x_(l,u){do{var b=fn;try{if(Ep(),Kd.current=Xd,Gd){for(var k=Wt.memoizedState;k!==null;){var A=k.queue;A!==null&&(A.pending=null),k=k.next}Gd=!1}if(Pa=0,_n=yn=Wt=null,Sc=!1,kc=0,ag.current=null,b===null||b.return===null){xn=1,Ac=u,fn=null;break}e:{var F=l,W=b.return,X=b,re=u;if(u=Rn,X.flags|=32768,re!==null&&typeof re=="object"&&typeof re.then=="function"){var fe=re,be=X,we=be.tag;if((be.mode&1)===0&&(we===0||we===11||we===15)){var ve=be.alternate;ve?(be.updateQueue=ve.updateQueue,be.memoizedState=ve.memoizedState,be.lanes=ve.lanes):(be.updateQueue=null,be.memoizedState=null)}var Me=zj(W);if(Me!==null){Me.flags&=-257,Vj(Me,W,X,F,u),Me.mode&1&&$j(F,fe,u),u=Me,re=fe;var Ue=u.updateQueue;if(Ue===null){var Ve=new Set;Ve.add(re),u.updateQueue=Ve}else Ue.add(re);break e}else{if((u&1)===0){$j(F,fe,u),pg();break e}re=Error(n(426))}}else if(zt&&X.mode&1){var nn=zj(W);if(nn!==null){(nn.flags&65536)===0&&(nn.flags|=256),Vj(nn,W,X,F,u),kp(Uo(re,X));break e}}F=re=Uo(re,X),xn!==4&&(xn=2),Rc===null?Rc=[F]:Rc.push(F),F=W;do{switch(F.tag){case 3:F.flags|=65536,u&=-u,F.lanes|=u;var le=qj(F,re,u);hj(F,le);break e;case 1:X=re;var ae=F.type,ue=F.stateNode;if((F.flags&128)===0&&(typeof ae.getDerivedStateFromError=="function"||ue!==null&&typeof ue.componentDidCatch=="function"&&(Di===null||!Di.has(ue)))){F.flags|=65536,u&=-u,F.lanes|=u;var Se=Uj(F,X,u);hj(F,Se);break e}}F=F.return}while(F!==null)}w_(b)}catch(We){u=We,fn===b&&b!==null&&(fn=b=b.return);continue}break}while(!0)}function v_(){var l=rf.current;return rf.current=Xd,l===null?Xd:l}function pg(){(xn===0||xn===3||xn===2)&&(xn=4),Nn===null||(Aa&268435455)===0&&(sf&268435455)===0||Bi(Nn,Rn)}function df(l,u){var b=_t;_t|=2;var k=v_();(Nn!==l||Rn!==u)&&(Zs=null,Oa(l,u));do try{XL();break}catch(A){x_(l,A)}while(!0);if(Ep(),_t=b,rf.current=k,fn!==null)throw Error(n(261));return Nn=null,Rn=0,xn}function XL(){for(;fn!==null;)b_(fn)}function JL(){for(;fn!==null&&!_3();)b_(fn)}function b_(l){var u=N_(l.alternate,l,vr);l.memoizedProps=l.pendingProps,u===null?w_(l):fn=u,ag.current=null}function w_(l){var u=l;do{var b=u.alternate;if(l=u.return,(u.flags&32768)===0){if(b=VL(b,u,vr),b!==null){fn=b;return}}else{if(b=HL(b,u),b!==null){b.flags&=32767,fn=b;return}if(l!==null)l.flags|=32768,l.subtreeFlags=0,l.deletions=null;else{xn=6,fn=null;return}}if(u=u.sibling,u!==null){fn=u;return}fn=u=l}while(u!==null);xn===0&&(xn=5)}function Ma(l,u,b){var k=Pt,A=Dr.transition;try{Dr.transition=null,Pt=1,ZL(l,u,b,k)}finally{Dr.transition=A,Pt=k}return null}function ZL(l,u,b,k){do Ho();while(Ii!==null);if((_t&6)!==0)throw Error(n(327));b=l.finishedWork;var A=l.finishedLanes;if(b===null)return null;if(l.finishedWork=null,l.finishedLanes=0,b===l.current)throw Error(n(177));l.callbackNode=null,l.callbackPriority=0;var F=b.lanes|b.childLanes;if(O3(l,F),l===Nn&&(fn=Nn=null,Rn=0),(b.subtreeFlags&2064)===0&&(b.flags&2064)===0||of||(of=!0,S_(md,function(){return Ho(),null})),F=(b.flags&15990)!==0,(b.subtreeFlags&15990)!==0||F){F=Dr.transition,Dr.transition=null;var W=Pt;Pt=1;var X=_t;_t|=4,ag.current=null,KL(l,b),d_(b,l),vL(pp),wd=!!mp,pp=mp=null,l.current=b,GL(b),N3(),_t=X,Pt=W,Dr.transition=F}else l.current=b;if(of&&(of=!1,Ii=l,lf=A),F=l.pendingLanes,F===0&&(Di=null),C3(b.stateNode),ir(l,tn()),u!==null)for(k=l.onRecoverableError,b=0;b<u.length;b++)A=u[b],k(A.value,{componentStack:A.stack,digest:A.digest});if(af)throw af=!1,l=cg,cg=null,l;return(lf&1)!==0&&l.tag!==0&&Ho(),F=l.pendingLanes,(F&1)!==0?l===ug?Oc++:(Oc=0,ug=l):Oc=0,Ri(),null}function Ho(){if(Ii!==null){var l=c1(lf),u=Dr.transition,b=Pt;try{if(Dr.transition=null,Pt=16>l?16:l,Ii===null)var k=!1;else{if(l=Ii,Ii=null,lf=0,(_t&6)!==0)throw Error(n(331));var A=_t;for(_t|=4,Be=l.current;Be!==null;){var F=Be,W=F.child;if((Be.flags&16)!==0){var X=F.deletions;if(X!==null){for(var re=0;re<X.length;re++){var fe=X[re];for(Be=fe;Be!==null;){var be=Be;switch(be.tag){case 0:case 11:case 15:Pc(8,be,F)}var we=be.child;if(we!==null)we.return=be,Be=we;else for(;Be!==null;){be=Be;var ve=be.sibling,Me=be.return;if(a_(be),be===fe){Be=null;break}if(ve!==null){ve.return=Me,Be=ve;break}Be=Me}}}var Ue=F.alternate;if(Ue!==null){var Ve=Ue.child;if(Ve!==null){Ue.child=null;do{var nn=Ve.sibling;Ve.sibling=null,Ve=nn}while(Ve!==null)}}Be=F}}if((F.subtreeFlags&2064)!==0&&W!==null)W.return=F,Be=W;else e:for(;Be!==null;){if(F=Be,(F.flags&2048)!==0)switch(F.tag){case 0:case 11:case 15:Pc(9,F,F.return)}var le=F.sibling;if(le!==null){le.return=F.return,Be=le;break e}Be=F.return}}var ae=l.current;for(Be=ae;Be!==null;){W=Be;var ue=W.child;if((W.subtreeFlags&2064)!==0&&ue!==null)ue.return=W,Be=ue;else e:for(W=ae;Be!==null;){if(X=Be,(X.flags&2048)!==0)try{switch(X.tag){case 0:case 11:case 15:nf(9,X)}}catch(We){Qt(X,X.return,We)}if(X===W){Be=null;break e}var Se=X.sibling;if(Se!==null){Se.return=X.return,Be=Se;break e}Be=X.return}}if(_t=A,Ri(),xs&&typeof xs.onPostCommitFiberRoot=="function")try{xs.onPostCommitFiberRoot(pd,l)}catch{}k=!0}return k}finally{Pt=b,Dr.transition=u}}return!1}function j_(l,u,b){u=Uo(b,u),u=qj(l,u,1),l=Mi(l,u,1),u=Qn(),l!==null&&(rc(l,1,u),ir(l,u))}function Qt(l,u,b){if(l.tag===3)j_(l,l,b);else for(;u!==null;){if(u.tag===3){j_(u,l,b);break}else if(u.tag===1){var k=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof k.componentDidCatch=="function"&&(Di===null||!Di.has(k))){l=Uo(b,l),l=Uj(u,l,1),u=Mi(u,l,1),l=Qn(),u!==null&&(rc(u,1,l),ir(u,l));break}}u=u.return}}function eD(l,u,b){var k=l.pingCache;k!==null&&k.delete(u),u=Qn(),l.pingedLanes|=l.suspendedLanes&b,Nn===l&&(Rn&b)===b&&(xn===4||xn===3&&(Rn&130023424)===Rn&&500>tn()-lg?Oa(l,0):og|=b),ir(l,u)}function __(l,u){u===0&&((l.mode&1)===0?u=1:(u=yd,yd<<=1,(yd&130023424)===0&&(yd=4194304)));var b=Qn();l=Qs(l,u),l!==null&&(rc(l,u,b),ir(l,b))}
vendor: 4,359 bytes, line 40
40function tD(l){var u=l.memoizedState,b=0;u!==null&&(b=u.retryLane),__(l,b)}function nD(l,u){var b=0;switch(l.tag){case 13:var k=l.stateNode,A=l.memoizedState;A!==null&&(b=A.retryLane);break;case 19:k=l.stateNode;break;default:throw Error(n(314))}k!==null&&k.delete(u),__(l,b)}var N_;N_=function(l,u,b){if(l!==null)if(l.memoizedProps!==u.pendingProps||tr.current)rr=!0;else{if((l.lanes&b)===0&&(u.flags&128)===0)return rr=!1,zL(l,u,b);rr=(l.flags&131072)!==0}else rr=!1,zt&&(u.flags&1048576)!==0&&rj(u,Bd,u.index);switch(u.lanes=0,u.tag){case 2:var k=u.type;ef(l,u),l=u.pendingProps;var A=Oo(u,In.current);Bo(u,b),A=Bp(null,u,k,l,A,b);var F=qp();return u.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,nr(k)?(F=!0,Dd(u)):F=!1,u.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,Rp(u),A.updater=Jd,u.stateNode=A,A._reactInternals=u,Wp(u,k,l,b),u=Qp(null,u,k,!0,F,b)):(u.tag=0,zt&&F&&jp(u),Yn(null,u,A,b),u=u.child),u;case 16:k=u.elementType;e:{switch(ef(l,u),l=u.pendingProps,A=k._init,k=A(k._payload),u.type=k,A=u.tag=sD(k),l=Xr(k,l),A){case 0:u=Yp(null,u,k,l,b);break e;case 1:u=Qj(null,u,k,l,b);break e;case 11:u=Hj(null,u,k,l,b);break e;case 14:u=Wj(null,u,k,Xr(k.type,l),b);break e}throw Error(n(306,k,""))}return u;case 0:return k=u.type,A=u.pendingProps,A=u.elementType===k?A:Xr(k,A),Yp(l,u,k,A,b);case 1:return k=u.type,A=u.pendingProps,A=u.elementType===k?A:Xr(k,A),Qj(l,u,k,A,b);case 3:e:{if(Xj(u),l===null)throw Error(n(387));k=u.pendingProps,F=u.memoizedState,A=F.element,fj(l,u),Hd(u,k,null,b);var W=u.memoizedState;if(k=W.element,F.isDehydrated)if(F={element:k,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},u.updateQueue.baseState=F,u.memoizedState=F,u.flags&256){A=Uo(Error(n(423)),u),u=Jj(l,u,k,b,A);break e}else if(k!==A){A=Uo(Error(n(424)),u),u=Jj(l,u,k,b,A);break e}else for(xr=Ti(u.stateNode.containerInfo.firstChild),yr=u,zt=!0,Qr=null,b=uj(u,null,k,b),u.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling;else{if(Do(),k===A){u=Js(l,u,b);break e}Yn(l,u,k,b)}u=u.child}return u;case 5:return pj(u),l===null&&Sp(u),k=u.type,A=u.pendingProps,F=l!==null?l.memoizedProps:null,W=A.children,gp(k,A)?W=null:F!==null&&gp(k,F)&&(u.flags|=32),Yj(l,u),Yn(l,u,W,b),u.child;case 6:return l===null&&Sp(u),null;case 13:return Zj(l,u,b);case 4:return Op(u,u.stateNode.containerInfo),k=u.pendingProps,l===null?u.child=Io(u,null,k,b):Yn(l,u,k,b),u.child;case 11:return k=u.type,A=u.pendingProps,A=u.elementType===k?A:Xr(k,A),Hj(l,u,k,A,b);case 7:return Yn(l,u,u.pendingProps,b),u.child;case 8:return Yn(l,u,u.pendingProps.children,b),u.child;case 12:return Yn(l,u,u.pendingProps.children,b),u.child;case 10:e:{if(k=u.type._context,A=u.pendingProps,F=u.memoizedProps,W=A.value,Dt($d,k._currentValue),k._currentValue=W,F!==null)if(Yr(F.value,W)){if(F.children===A.children&&!tr.current){u=Js(l,u,b);break e}}else for(F=u.child,F!==null&&(F.return=u);F!==null;){var X=F.dependencies;if(X!==null){W=F.child;for(var re=X.firstContext;re!==null;){if(re.context===k){if(F.tag===1){re=Xs(-1,b&-b),re.tag=2;var fe=F.updateQueue;if(fe!==null){fe=fe.shared;var be=fe.pending;be===null?re.next=re:(re.next=be.next,be.next=re),fe.pending=re}}F.lanes|=b,re=F.alternate,re!==null&&(re.lanes|=b),Pp(F.return,b,u),X.lanes|=b;break}re=re.next}}else if(F.tag===10)W=F.type===u.type?null:F.child;else if(F.tag===18){if(W=F.return,W===null)throw Error(n(341));W.lanes|=b,X=W.alternate,X!==null&&(X.lanes|=b),Pp(W,b,u),W=F.sibling}else W=F.child;if(W!==null)W.return=F;else for(W=F;W!==null;){if(W===u){W=null;break}if(F=W.sibling,F!==null){F.return=W.return,W=F;break}W=W.return}F=W}Yn(l,u,A.children,b),u=u.child}return u;case 9:return A=u.type,k=u.pendingProps.children,Bo(u,b),A=Mr(A),k=k(A),u.flags|=1,Yn(l,u,k,b),u.child;case 14:return k=u.type,A=Xr(k,u.pendingProps),A=Xr(k.type,A),Wj(l,u,k,A,b);case 15:return Kj(l,u,u.type,u.pendingProps,b);case 17:return k=u.type,A=u.pendingProps,A=u.elementType===k?A:Xr(k,A),ef(l,u),u.tag=1,nr(k)?(l=!0,Dd(u)):l=!1,Bo(u,b),Fj(u,k,A),Wp(u,k,A,b),Qp(null,u,k,!0,l,b);case 19:return t_(l,u,b);case 22:return Gj(l,u,b)}throw Error(n(156,u.tag))};function S_(l,u){return s1(l,u)}function rD(l,u,b,k){this.tag=l,this.key=b,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 5,684 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ir(l,u,b,k){return new rD(l,u,b,k)}function gg(l){return l=l.prototype,!(!l||!l.isReactComponent)}function sD(l){if(typeof l=="function")return gg(l)?1:0;if(l!=null){if(l=l.$$typeof,l===O)return 11;if(l===z)return 14}return 2}function qi(l,u){var b=l.alternate;return b===null?(b=Ir(l.tag,u,l.key,l.mode),b.elementType=l.elementType,b.type=l.type,b.stateNode=l.stateNode,b.alternate=l,l.alternate=b):(b.pendingProps=u,b.type=l.type,b.flags=0,b.subtreeFlags=0,b.deletions=null),b.flags=l.flags&14680064,b.childLanes=l.childLanes,b.lanes=l.lanes,b.child=l.child,b.memoizedProps=l.memoizedProps,b.memoizedState=l.memoizedState,b.updateQueue=l.updateQueue,u=l.dependencies,b.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},b.sibling=l.sibling,b.index=l.index,b.ref=l.ref,b}function ff(l,u,b,k,A,F){var W=2;if(k=l,typeof l=="function")gg(l)&&(W=1);else if(typeof l=="string")W=5;else e:switch(l){case P:return La(b.children,A,F,u);case R:W=8,A|=8;break;case L:return l=Ir(12,b,u,A|2),l.elementType=L,l.lanes=F,l;case M:return l=Ir(13,b,u,A),l.elementType=M,l.lanes=F,l;case U:return l=Ir(19,b,u,A),l.elementType=U,l.lanes=F,l;case Y:return hf(b,A,F,u);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case D:W=10;break e;case T:W=9;break e;case O:W=11;break e;case z:W=14;break e;case H:W=16,k=null;break e}throw Error(n(130,l==null?l:typeof l,""))}return u=Ir(W,b,u,A),u.elementType=l,u.type=k,u.lanes=F,u}function La(l,u,b,k){return l=Ir(7,l,k,u),l.lanes=b,l}function hf(l,u,b,k){return l=Ir(22,l,k,u),l.elementType=Y,l.lanes=b,l.stateNode={isHidden:!1},l}function yg(l,u,b){return l=Ir(6,l,null,u),l.lanes=b,l}function xg(l,u,b){return u=Ir(4,l.children!==null?l.children:[],l.key,u),u.lanes=b,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function iD(l,u,b,k,A){this.tag=u,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hm(0),this.expirationTimes=Hm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hm(0),this.identifierPrefix=k,this.onRecoverableError=A,this.mutableSourceEagerHydrationData=null}function vg(l,u,b,k,A,F,W,X,re){return l=new iD(l,u,b,X,re),u===1?(u=1,F===!0&&(u|=8)):u=0,F=Ir(3,null,null,u),l.current=F,F.stateNode=l,F.memoizedState={element:k,isDehydrated:b,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rp(F),l}function aD(l,u,b){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:S,key:k==null?null:""+k,children:l,containerInfo:u,implementation:b}}function k_(l){if(!l)return Ai;l=l._reactInternals;e:{if(_a(l)!==l||l.tag!==1)throw Error(n(170));var u=l;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(nr(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(n(171))}if(l.tag===1){var b=l.type;if(nr(b))return ej(l,b,u)}return u}function C_(l,u,b,k,A,F,W,X,re){return l=vg(b,k,!0,l,A,F,W,X,re),l.context=k_(null),b=l.current,k=Qn(),A=Fi(b),F=Xs(k,A),F.callback=u??null,Mi(b,F,A),l.current.lanes=A,rc(l,A,k),ir(l,k),l}function mf(l,u,b,k){var A=u.current,F=Qn(),W=Fi(A);return b=k_(b),u.context===null?u.context=b:u.pendingContext=b,u=Xs(F,W),u.payload={element:l},k=k===void 0?null:k,k!==null&&(u.callback=k),l=Mi(A,u,W),l!==null&&(es(l,A,W,F),Vd(l,A,W)),W}function pf(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return l.child.stateNode;default:return l.child.stateNode}}function E_(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var b=l.retryLane;l.retryLane=b!==0&&b<u?b:u}}function bg(l,u){E_(l,u),(l=l.alternate)&&E_(l,u)}function oD(){return null}var T_=typeof reportError=="function"?reportError:function(l){console.error(l)};function wg(l){this._internalRoot=l}gf.prototype.render=wg.prototype.render=function(l){var u=this._internalRoot;if(u===null)throw Error(n(409));mf(l,u,null,null)},gf.prototype.unmount=wg.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var u=l.containerInfo;Ra(function(){mf(null,l,null,null)}),u[Ws]=null}};function gf(l){this._internalRoot=l}gf.prototype.unstable_scheduleHydration=function(l){if(l){var u=f1();l={blockedOn:null,target:l,priority:u};for(var b=0;b<ki.length&&u!==0&&u<ki[b].priority;b++);ki.splice(b,0,l),b===0&&p1(l)}};function jg(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function yf(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11&&(l.nodeType!==8||l.nodeValue!==" react-mount-point-unstable "))}function P_(){}function lD(l,u,b,k,A){if(A){if(typeof k=="function"){var F=k;k=function(){var fe=pf(W);F.call(fe)}}var W=C_(u,k,l,0,null,!1,!1,"",P_);return l._reactRootContainer=W,l[Ws]=W.current,yc(l.nodeType===8?l.parentNode:l),Ra(),W}for(;A=l.lastChild;)l.removeChild(A);if(typeof k=="function"){var X=k;k=function(){var fe=pf(re);X.call(fe)}}var re=vg(l,0,!1,null,null,!1,!1,"",P_);return l._reactRootContainer=re,l[Ws]=re.current,yc(l.nodeType===8?l.parentNode:l),Ra(function(){mf(u,re,b,k)}),re}function xf(l,u,b,k,A){var F=b._reactRootContainer;if(F){var W=F;if(typeof A=="function"){var X=A;A=function(){var re=pf(W);X.call(re)}}mf(u,W,l,A)}
vendor: 5,007 bytes, line 40
40else W=lD(b,u,l,A,k);return pf(W)}u1=function(l){switch(l.tag){case 3:var u=l.stateNode;if(u.current.memoizedState.isDehydrated){var b=nc(u.pendingLanes);b!==0&&(Wm(u,b|1),ir(u,tn()),(_t&6)===0&&(Vo=tn()+500,Ri()))}break;case 13:Ra(function(){var k=Qs(l,1);if(k!==null){var A=Qn();es(k,l,1,A)}}),bg(l,1)}},Km=function(l){if(l.tag===13){var u=Qs(l,134217728);if(u!==null){var b=Qn();es(u,l,134217728,b)}bg(l,134217728)}},d1=function(l){if(l.tag===13){var u=Fi(l),b=Qs(l,u);if(b!==null){var k=Qn();es(b,l,u,k)}bg(l,u)}},f1=function(){return Pt},h1=function(l,u){var b=Pt;try{return Pt=l,u()}finally{Pt=b}},Bm=function(l,u,b){switch(u){case"input":if(at(l,b),u=b.name,b.type==="radio"&&u!=null){for(b=l;b.parentNode;)b=b.parentNode;for(b=b.querySelectorAll("input[name="+JSON.stringify(""+u)+'][type="radio"]'),u=0;u<b.length;u++){var k=b[u];if(k!==l&&k.form===l.form){var A=Md(k);if(!A)throw Error(n(90));je(k),at(k,A)}}}break;case"textarea":lt(l,b);break;case"select":u=b.value,u!=null&&Pe(l,!!b.multiple,u,!1)}},Xw=hg,Jw=Ra;var cD={usingClientEntryPoint:!1,Events:[bc,Ao,Md,Yw,Qw,hg]},Mc={findFiberByHostInstance:Na,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uD={bundleType:Mc.bundleType,version:Mc.version,rendererPackageName:Mc.rendererPackageName,rendererConfig:Mc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:N.ReactCurrentDispatcher,findHostInstanceByFiber:function(l){return l=n1(l),l===null?null:l.stateNode},findFiberByHostInstance:Mc.findFiberByHostInstance||oD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vf.isDisabled&&vf.supportsFiber)try{pd=vf.inject(uD),xs=vf}catch{}}return ar.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cD,ar.createPortal=function(l,u){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jg(u))throw Error(n(200));return aD(l,u,null,b)},ar.createRoot=function(l,u){if(!jg(l))throw Error(n(299));var b=!1,k="",A=T_;return u!=null&&(u.unstable_strictMode===!0&&(b=!0),u.identifierPrefix!==void 0&&(k=u.identifierPrefix),u.onRecoverableError!==void 0&&(A=u.onRecoverableError)),u=vg(l,1,!1,null,null,b,!1,k,A),l[Ws]=u.current,yc(l.nodeType===8?l.parentNode:l),new wg(u)},ar.findDOMNode=function(l){if(l==null)return null;if(l.nodeType===1)return l;var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(n(188)):(l=Object.keys(l).join(","),Error(n(268,l)));return l=n1(u),l=l===null?null:l.stateNode,l},ar.flushSync=function(l){return Ra(l)},ar.hydrate=function(l,u,b){if(!yf(u))throw Error(n(200));return xf(null,l,u,!0,b)},ar.hydrateRoot=function(l,u,b){if(!jg(l))throw Error(n(405));var k=b!=null&&b.hydratedSources||null,A=!1,F="",W=T_;if(b!=null&&(b.unstable_strictMode===!0&&(A=!0),b.identifierPrefix!==void 0&&(F=b.identifierPrefix),b.onRecoverableError!==void 0&&(W=b.onRecoverableError)),u=C_(u,null,l,1,b??null,A,!1,F,W),l[Ws]=u.current,yc(l),k)for(l=0;l<k.length;l++)b=k[l],A=b._getVersion,A=A(b._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[b,A]:u.mutableSourceEagerHydrationData.push(b,A);return new gf(u)},ar.render=function(l,u,b){if(!yf(u))throw Error(n(200));return xf(null,l,u,!1,b)},ar.unmountComponentAtNode=function(l){if(!yf(l))throw Error(n(40));return l._reactRootContainer?(Ra(function(){xf(null,null,l,!1,function(){l._reactRootContainer=null,l[Ws]=null})}),!0):!1},ar.unstable_batchedUpdates=hg,ar.unstable_renderSubtreeIntoContainer=function(l,u,b,k){if(!yf(b))throw Error(n(200));if(l==null||l._reactInternals===void 0)throw Error(n(38));return xf(l,u,b,!1,k)},ar.version="18.3.1-next-f1338f8080-20240426",ar}var B_;function Y0(){if(B_)return kg.exports;B_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),kg.exports=wD(),kg.exports}var q_;function jD(){if(q_)return jf;q_=1;var e=Y0();return jf.createRoot=e.createRoot,jf.hydrateRoot=e.hydrateRoot,jf}var _D=jD();const ND=Dl(_D),SD=20,kD=1e6,ai={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Tg=0;function CD(){return Tg=(Tg+1)%Number.MAX_VALUE,Tg.toString()}const Pg=new Map,U_=e=>{if(Pg.has(e))return;const t=setTimeout(()=>{Pg.delete(e),iu({type:ai.REMOVE_TOAST,toastId:e})},kD);Pg.set(e,t)},ED=(e,t)=>{switch(t.type){case ai.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,SD)};case ai.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case ai.DISMISS_TOAST:{const{toastId:n}=t;
40return n?U_(n):e.toasts.forEach(r=>{U_(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case ai.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Hf=[];let Wf={toasts:[]};function iu(e){Wf=ED(Wf,e),Hf.forEach(t=>{t(Wf)})}function TD({...e}){const t=CD(),n=i=>iu({type:ai.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>iu({type:ai.DISMISS_TOAST,toastId:t});return iu({type:ai.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function PD(){const[e,t]=E.useState(Wf);return E.useEffect(()=>(Hf.push(t),()=>{const n=Hf.indexOf(t);n>-1&&Hf.splice(n,1)}),[e]),{...e,toast:TD,dismiss:n=>iu({type:ai.DISMISS_TOAST,toastId:n})}}function HE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=HE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function WE(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=HE(e))&&(r&&(r+=" "),r+=t);return r}const $_=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,z_=WE,Uu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return z_(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(h=>{const g=n==null?void 0:n[h],f=a==null?void 0:a[h];if(g===null)return null;const m=$_(g)||$_(f);return i[h][m]}),c=n&&Object.entries(n).reduce((h,g)=>{let[f,m]=g;return m===void 0||(h[f]=m),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,g)=>{let{class:f,className:m,...p}=g;return Object.entries(p).every(w=>{let[x,v]=w;return Array.isArray(v)?v.includes({...a,...c}[x]):{...a,...c}[x]===v})?[...h,f,m]:h},[]);return z_(e,o,d,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.475.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const AD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),KE=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.475.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var RD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.475.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const OD=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...c},d)=>E.createElement("svg",{ref:d,...RD,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:KE("lucide",i),...c},[...o.map(([h,g])=>E.createElement(h,g)),...Array.isArray(a)?a:[a]]));/** 56 * @license lucide-react v0.475.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const Te=(e,t)=>
60{const n=E.forwardRef(({className:r,...i},a)=>E.createElement(OD,{ref:a,iconNode:t,className:KE(`lucide-${AD(e)}`,r),...i}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.475.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const MD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],LD=Te("ArrowDown",MD);/** 66 * @license lucide-react v0.475.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const DD=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],fr=Te("ArrowLeft",DD);/** 71 * @license lucide-react v0.475.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const ID=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Wr=Te("ArrowRight",ID);/** 76 * @license lucide-react v0.475.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const FD=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],BD=Te("ArrowUpRight",FD);/** 81 * @license lucide-react v0.475.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const qD=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],UD=Te("ArrowUp",qD);/** 86 * @license lucide-react v0.475.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const $D=[["path",{d:"M10 4 8 6",key:"1rru8s"}],["path",{d:"M17 19v2",key:"ts1sot"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M7 19v2",key:"12npes"}],["path",{d:"M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5",key:"14ym8i"}]],GE=Te("Bath",$D);/** 91 * @license lucide-react v0.475.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const zD=[["path",{d:"M2 4v16",key:"vw9hq8"}],["path",{d:"M2 8h18a2 2 0 0 1 2 2v10",key:"1dgv2r"}],["path",{d:"M2 17h20",key:"18nfp3"}],["path",{d:"M6 8v9",key:"1yriud"}]],YE=Te("Bed",zD);/** 96 * @license lucide-react v0.475.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const VD=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],HD=Te("BookOpen",VD);/** 101 * @license lucide-react v0.475.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const WD=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],Zn=Te("Building2",WD);/** 106 * @license lucide-react v0.475.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const KD=[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],QE=Te("CalendarClock",KD);/** 111 * @license lucide-react v0.475.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const GD=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],YD=Te("CalendarDays",GD);/** 116 * @license lucide-react v0.475.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const QD=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],an=Te("Calendar",QD);/** 121 * @license lucide-react v0.475.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const XD=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],XE=Te("Car",XD);/** 126 * @license lucide-react v0.475.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const JD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ds=Te("Check",JD);/** 131 * @license lucide-react v0.475.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const ZD=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ih=Te("ChevronDown",ZD);/** 136 * @license lucide-react v0.475.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const eI=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Fh=Te("ChevronLeft",eI);/** 141 * @license lucide-react v0.475.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const tI=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$u=Te("ChevronRight",tI);/** 146 * @license lucide-react v0.475.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const nI=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],rI=Te("ChevronUp",nI);/** 151 * @license lucide-react v0.475.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const sI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],V_=Te("CircleAlert",sI);/** 156 * @license lucide-react v0.475.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const iI=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],cs=Te("CircleCheckBig",iI);/** 161 * @license lucide-react v0.475.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const aI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],vv=Te("CircleCheck",aI);/** 166 * @license lucide-react v0.475.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const oI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],lI=Te("Circle",oI);/** 171 * @license lucide-react v0.475.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const cI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Q0=Te("Clock",cI);/** 176 * @license lucide-react v0.475.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const uI=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],JE=Te("Coffee",uI);/** 181 * @license lucide-react v0.475.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const dI=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
185y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],bv=Te("Compass",dI);/** 186 * @license lucide-react v0.475.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const fI=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],hI=Te("DollarSign",fI);/** 191 * @license lucide-react v0.475.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const mI=[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]],ZE=Te("Dumbbell",mI);/** 196 * @license lucide-react v0.475.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const pI=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],eT=Te("ExternalLink",pI);/** 201 * @license lucide-react v0.475.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const gI=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],yI=Te("EyeOff",gI);/** 206 * @license lucide-react v0.475.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const xI=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],zu=Te("Eye",xI);/** 211 * @license lucide-react v0.475.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const vI=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],bI=Te("Gift",vI);/** 216 * @license lucide-react v0.475.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const wI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Vu=Te("Globe",wI);/** 221 * @license lucide-react v0.475.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const jI=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],_I=Te("GripVertical",jI);/** 226 * @license lucide-react v0.475.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const NI=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],tT=Te("Heart",NI);/** 231 * @license lucide-react v0.475.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const SI=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],kI=Te("History",SI);/** 236 * @license lucide-react v0.475.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const CI=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],El=Te("House",CI);/** 241 * @license lucide-react v0.475.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const EI=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],TI=Te("Image",EI);/** 246 * @license lucide-react v0.475.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const PI=[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]],AI=Te("Images",PI);/** 251 * @license lucide-react v0.475.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const RI=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],wv=Te("Key",RI);/** 256 * @license lucide-react v0.475.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const OI=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]],MI=Te("LayoutTemplate",OI);/** 261 * @license lucide-react v0.475.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const LI=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ke=Te("LoaderCircle",LI);/** 266 * @license lucide-react v0.475.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const DI=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],H_=Te("LogOut",DI);/** 271 * @license lucide-react v0.475.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const II=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Hu=Te("Mail",II);/** 276 * @license lucide-react v0.475.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const FI=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],pn=Te("MapPin",FI);/** 281 * @license lucide-react v0.475.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const BI=[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]],nT=Te("Megaphone",BI);/** 286 * @license lucide-react v0.475.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const qI=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],UI=Te("Menu",qI);/** 291 * @license lucide-react v0.475.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const $I=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],zI=Te("Moon",$I);/** 296 * @license lucide-react v0.475.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const VI=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.
300074z",key:"s0h3yz"}]],HI=Te("MousePointerClick",VI);/** 301 * @license lucide-react v0.475.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const WI=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],rT=Te("Music",WI);/** 306 * @license lucide-react v0.475.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const KI=[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]],fi=Te("Newspaper",KI);/** 311 * @license lucide-react v0.475.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const GI=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],sT=Te("Palette",GI);/** 316 * @license lucide-react v0.475.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const YI=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],QI=Te("PenLine",YI);/** 321 * @license lucide-react v0.475.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const XI=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Il=Te("Pencil",XI);/** 326 * @license lucide-react v0.475.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const JI=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],ro=Te("Phone",JI);/** 331 * @license lucide-react v0.475.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const ZI=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Cr=Te("Plus",ZI);/** 336 * @license lucide-react v0.475.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const e6=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],t6=Te("RefreshCw",e6);/** 341 * @license lucide-react v0.475.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const n6=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],us=Te("Search",n6);/** 346 * @license lucide-react v0.475.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const r6=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],s6=Te("Send",r6);/** 351 * @license lucide-react v0.475.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const i6=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
355y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],a6=Te("ShieldAlert",i6);/** 356 * @license lucide-react v0.475.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const o6=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],W_=Te("ShieldCheck",o6);/** 361 * @license lucide-react v0.475.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const l6=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],iT=Te("Shield",l6);/** 366 * @license lucide-react v0.475.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const c6=[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]],aT=Te("ShoppingBag",c6);/** 371 * @license lucide-react v0.475.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const u6=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],ln=Te("Sparkles",u6);/** 376 * @license lucide-react v0.475.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const d6=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],X0=Te("SquarePen",d6);/** 381 * @license lucide-react v0.475.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const f6=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],mu=Te("Star",f6);/** 386 * @license lucide-react v0.475.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const h6=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],m6=Te("Tag",h6);/** 391 * @license lucide-react v0.475.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const p6=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]],ch=Te("Ticket",p6);/** 396 * @license lucide-react v0.475.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const g6=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]],y6=Te("ToggleLeft",g6);/** 401 * @license lucide-react v0.475.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const x6=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]],v6=Te("ToggleRight",x6);/** 406 * @license lucide-react v0.475.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const b6=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
410],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Us=Te("Trash2",b6);/** 411 * @license lucide-react v0.475.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const w6=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],oT=Te("Trash",w6);/** 416 * @license lucide-react v0.475.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const j6=[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]],lT=Te("Trees",j6);/** 421 * @license lucide-react v0.475.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const _6=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],N6=Te("TrendingUp",_6);/** 426 * @license lucide-react v0.475.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const S6=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],J0=Te("TriangleAlert",S6);/** 431 * @license lucide-react v0.475.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const k6=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],li=Te("Upload",k6);/** 436 * @license lucide-react v0.475.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const C6=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Is=Te("User",C6);/** 441 * @license lucide-react v0.475.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const E6=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],ll=Te("Users",E6);/** 446 * @license lucide-react v0.475.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const T6=[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]],cT=Te("UtensilsCrossed",T6);/** 451 * @license lucide-react v0.475.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const P6=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],A6=Te("WandSparkles",P6);/** 456 * @license lucide-react v0.475.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const R6=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 1,527 bytes, lines 460-465
460],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kt=Te("X",R6);/** 461 * @license lucide-react v0.475.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const O6=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],M6=Te("Zap",O6),Z0="-",L6=e=>{const t=I6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const c=o.split(Z0);return c[0]===""&&c.length!==1&&c.shift(),uT(c,t)||D6(o)},getConflictingClassGroupIds:(o,c)=>{const d=n[o]||[];return c&&r[o]?[...d,...r[o]]:d}}},uT=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?uT(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Z0);return(o=t.validators.find(({validator:c})=>c(a)))==null?void 0:o.classGroupId},K_=/^\[(.+)\]$/,D6=e=>{if(K_.test(e)){const t=K_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},I6=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)jv(n[i],r,i,t);return r},jv=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:G_(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(F6(i)){jv(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{jv(o,G_(t,a),n,r)})})},G_=(e,t)=>{let n=e;
vendor: 6,379 bytes, line 465
465return t.split(Z0).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},F6=e=>e.isThemeGetter,B6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},_v="!",Nv=":",q6=Nv.length,U6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let o=0,c=0,d=0,h;for(let w=0;w<i.length;w++){let x=i[w];if(o===0&&c===0){if(x===Nv){a.push(i.slice(d,w)),d=w+q6;continue}if(x==="/"){h=w;continue}}x==="["?o++:x==="]"?o--:x==="("?c++:x===")"&&c--}const g=a.length===0?i:i.substring(d),f=$6(g),m=f!==g,p=h&&h>d?h-d:void 0;return{modifiers:a,hasImportantModifier:m,baseClassName:f,maybePostfixModifierPosition:p}};if(t){const i=t+Nv,a=r;r=o=>o.startsWith(i)?a(o.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},$6=e=>e.endsWith(_v)?e.substring(0,e.length-1):e.startsWith(_v)?e.substring(1):e,z6=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let a=[];return r.forEach(o=>{o[0]==="["||t[o]?(i.push(...a.sort(),o),a=[]):a.push(o)}),i.push(...a.sort()),i}},V6=e=>({cache:B6(e.cacheSize),parseClassName:U6(e),sortModifiers:z6(e),...L6(e)}),H6=/\s+/,W6=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],c=e.trim().split(H6);let d="";for(let h=c.length-1;h>=0;h-=1){const g=c[h],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:x}=n(g);if(f){d=g+(d.length>0?" "+d:d);continue}let v=!!x,y=r(v?w.substring(0,x):w);if(!y){if(!v){d=g+(d.length>0?" "+d:d);continue}if(y=r(w),!y){d=g+(d.length>0?" "+d:d);continue}v=!1}const j=a(m).join(":"),_=p?j+_v:j,N=_+y;if(o.includes(N))continue;o.push(N);const C=i(y,v);for(let S=0;S<C.length;++S){const P=C[S];o.push(_+P)}d=g+(d.length>0?" "+d:d)}return d};function K6(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=dT(t))&&(r&&(r+=" "),r+=n);return r}const dT=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=dT(e[r]))&&(n&&(n+=" "),n+=t);return n};function G6(e,...t){let n,r,i,a=o;function o(d){const h=t.reduce((g,f)=>f(g),e());return n=V6(h),r=n.cache.get,i=n.cache.set,a=c,c(d)}function c(d){const h=r(d);if(h)return h;const g=W6(d,n);return i(d,g),g}return function(){return a(K6.apply(null,arguments))}}const vn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},fT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,hT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Y6=/^\d+\/\d+$/,Q6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X6=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,J6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Z6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wo=e=>Y6.test(e),yt=e=>!!e&&!Number.isNaN(Number(e)),$i=e=>!!e&&Number.isInteger(Number(e)),Ag=e=>e.endsWith("%")&&yt(e.slice(0,-1)),ei=e=>Q6.test(e),tF=()=>!0,nF=e=>X6.test(e)&&!J6.test(e),mT=()=>!1,rF=e=>Z6.test(e),sF=e=>eF.test(e),iF=e=>!$e(e)&&!ze(e),aF=e=>Fl(e,yT,mT),$e=e=>fT.test(e),Da=e=>Fl(e,xT,nF),Rg=e=>Fl(e,dF,yt),Y_=e=>Fl(e,pT,mT),oF=e=>Fl(e,gT,sF),_f=e=>Fl(e,vT,rF),ze=e=>hT.test(e),Dc=e=>Bl(e,xT),lF=e=>Bl(e,fF),Q_=e=>Bl(e,pT),cF=e=>Bl(e,yT),uF=e=>Bl(e,gT),Nf=e=>Bl(e,vT,!0),Fl=(e,t,n)=>{const r=fT.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Bl=(e,t,n=!1)=>{const r=hT.exec(e);return r?r[1]?t(r[1]):n:!1},pT=e=>e==="position"||e==="percentage",gT=e=>e==="image"||e==="url",yT=e=>e==="length"||e==="size"||e==="bg-size",xT=e=>e==="length",dF=e=>e==="number",fF=e=>e==="family-name",vT=e=>e==="shadow",hF=()=>{const e=vn("color"),t=vn("font"),n=vn("text"),r=vn("font-weight"),i=vn("tracking"),a=vn("leading"),o=vn("breakpoint"),c=vn("container"),d=vn("spacing"),h=vn("radius"),g=vn("shadow"),f=vn("inset-shadow"),m=vn("text-shadow"),p=vn("drop-shadow"),w=vn("blur"),x=vn("perspective"),v=vn("aspect"),y=vn("ease"),j=vn("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...N(),ze,$e],S=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],R=()=>[ze,$e,d],L=()=>[Wo,"full","auto",...R()],D=()=>[$i,"none","subgrid",ze,$e],T=()=>["auto",{span:["full",$i,ze,$e]},$i,ze,$e],O=()=>[$i,"auto",ze,$e],M=()=>["auto","min","max","fr",ze,$e],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...R()],Y=()=>[Wo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],G=()=>[e,ze,$e],$=()=>[...N(),Q_,Y_,{position:[ze,$e]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",cF,aF,{size:[ze,$e]}],V=()=>[Ag,Dc,Da],q=()=>["","none","full",h,ze,$e],J=()=>["",yt,Dc,Da],te=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[yt,Ag,Q_,Y_],ne=()=>["","none",w,ze,$e],se=()=>["none",yt,ze,$e],ce=()=>["none",yt,ze,$e],ye=()=>[yt,ze,$e],je=()=>[Wo,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ei],breakpoint:[ei],color:[tF],container:[ei],"drop-shadow":[ei],ease:["in","out","in-out"],font:[iF],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ei],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ei],shadow:[ei],spacing:["px",yt],text:[ei],"text-shadow":[ei],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Wo,$e,ze,v]}
vendor: 12,824 bytes, line 465
465],container:["container"],columns:[{columns:[yt,$e,ze,c]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[$i,"auto",ze,$e]}],basis:[{basis:[Wo,"full","auto",c,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,Wo,"auto","initial","none",$e]}],grow:[{grow:["",yt,ze,$e]}],shrink:[{shrink:["",yt,ze,$e]}],order:[{order:[$i,"first","last","none",ze,$e]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[c,"screen",...Y()]}],"min-w":[{"min-w":[c,"screen","none",...Y()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[o]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,Dc,Da]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ze,Rg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ag,$e]}],"font-family":[{font:[lF,$e,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ze,$e]}],"line-clamp":[{"line-clamp":[yt,"none",ze,Rg]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",ze,$e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,$e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",ze,Da]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[yt,"auto",ze,$e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze,$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ze,$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$i,ze,$e],radial:["",ze,$e],conic:[$i,ze,$e]},uF,oF]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,ze,$e]}],"outline-w":[{outline:["",yt,Dc,Da]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",g,Nf,_f]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",f,Nf,_f]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[yt,Da]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",m,Nf,_f]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[yt,ze,$e]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[yt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[ze,$e]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[yt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,$e]}],filter:[{filter:["","none",ze,$e]}],blur:[{blur:ne()}],brightness:[{brightness:[yt,ze,$e]}],contrast:[{contrast:[yt,ze,$e]}],"drop-shadow":[{"drop-shadow":["","none",p,Nf,_f]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",yt,ze,$e]}],"hue-rotate":[{"hue-rotate":[yt,ze,$e]}],invert:[{invert:["",yt,ze,$e]}],saturate:[{saturate:[yt,ze,$e]}],sepia:[{sepia:["",yt,ze,$e]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,$e]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[yt,ze,$e]}],"backdrop-contrast":[{"backdrop-contrast":[yt,ze,$e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,ze,$e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,ze,$e]}],"backdrop-invert":[{"backdrop-invert":["",yt,ze,$e]}],"backdrop-opacity":[{"backdrop-opacity":[yt,ze,$e]}],"backdrop-saturate":[{"backdrop-saturate":[yt,ze,$e]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,ze,$e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ze,$e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",ze,$e]}],ease:[{ease:["linear","initial",y,ze,$e]}],delay:[{delay:[yt,ze,$e]}],animate:[{animate:["none",j,ze,$e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ze,$e]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[ze,$e,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:je()}],"translate-x":[{"translate-x":je()}],"translate-y":[{"translate-y":je()}],"translate-z":[{"translate-z":je()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}
vendor: 6,657 bytes, line 465
465],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ze,$e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ze,$e]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[yt,Dc,Da,Rg]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},bT=G6(hF);function He(...e){return bT(WE(e))}const wT=E.forwardRef(({...e},t)=>s.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));wT.displayName="ToastProvider";const jT=E.forwardRef(({...e},t)=>s.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));jT.displayName="ToastViewport";const mF=Uu("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),_T=E.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,className:He(mF({variant:t}),e),...n}));_T.displayName="Toast";const pF=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));pF.displayName="ToastAction";const NT=E.forwardRef(({className:e,...t},n)=>s.jsx("button",{ref:n,className:He("absolute right-2 top-2 rounded-md p-1 text-foreground
465/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(kt,{className:"h-4 w-4"})}));NT.displayName="ToastClose";const ST=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("text-sm font-semibold",e),...t}));ST.displayName="ToastTitle";const kT=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("text-sm opacity-90",e),...t}));kT.displayName="ToastDescription";function gF(){const{toasts:e}=PD();return s.jsxs(wT,{children:[e.map(function({id:t,title:n,description:r,action:i,...a}){return s.jsxs(_T,{...a,children:[s.jsxs("div",{className:"grid gap-1",children:[n&&s.jsx(ST,{children:n}),r&&s.jsx(kT,{children:r})]}),i,s.jsx(NT,{})]},t)}),s.jsx(jT,{})]})}var mo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yF={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Gi,K0,RE,xF=(RE=class{constructor(){qe(this,Gi,yF);qe(this,K0,!1)}setTimeoutProvider(e){ke(this,Gi,e)}setTimeout(e,t){return Z(this,Gi).setTimeout(e,t)}clearTimeout(e){Z(this,Gi).clearTimeout(e)}setInterval(e,t){return Z(this,Gi).setInterval(e,t)}clearInterval(e){Z(this,Gi).clearInterval(e)}},Gi=new WeakMap,K0=new WeakMap,RE),za=new xF;function vF(e){setTimeout(e,0)}var so=typeof window>"u"||"Deno"in globalThis;function Vn(){}function bF(e,t){return typeof e=="function"?e(t):e}function Sv(e){return typeof e=="number"&&e>=0&&e!==1/0}function CT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ia(e,t){return typeof e=="function"?e(t):e}function $r(e,t){return typeof e=="function"?e(t):e}function X_(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:c}=e;if(o){if(r){if(t.queryHash!==eb(o,t.options))return!1}else if(!pu(t.queryKey,o))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||a&&!a(t))}function J_(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(io(t.options.mutationKey)!==io(a))return!1}else if(!pu(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function eb(e,t){return((t==null?void 0:t.queryKeyHashFn)||io)(e)}function io(e){return JSON.stringify(e,(t,n)=>kv(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function pu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>pu(e[n],t[n])):!1}var wF=Object.prototype.hasOwnProperty;function tb(e,t){if(e===t)return e;const n=Z_(e)&&Z_(t);if(!n&&!(kv(e)&&kv(t)))return t;const i=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,c=n?new Array(o):{};let d=0;for(let h=0;h<o;h++){const g=n?h:a[h],f=e[g],m=t[g];if(f===m){c[g]=f,(n?h<i:wF.call(e,g))&&d++;continue}if(f===null||m===null||typeof f!="object"||typeof m!="object"){c[g]=m;continue}const p=tb(f,m);c[g]=p,p===f&&d++}return i===o&&d===i?e:c}function gu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Z_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function kv(e){if(!eN(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!eN(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function eN(e){return Object.prototype.toString.call(e)==="[object Object]"}function jF(e){return new Promise(t=>{za.setTimeout(t,e)})}function Cv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?tb(e,t):t}function _F(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function NF(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var nb=Symbol();function ET(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===nb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function TT(e,t){return typeof e=="function"?e(...t):!!e}var Wa,Yi,hl,OE,SF=(OE=class extends mo{constructor(){super();qe(this,Wa);qe(this,Yi);qe(this,hl);ke(this,hl,t=>{if(!so&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Z(this,Yi)||this.setEventListener(Z(this,hl))}onUnsubscribe(){var t;this.hasListeners()||((t=Z(this,Yi))==null||t.call(this),ke(this,Yi,void 0))}setEventListener(t){var n;ke(this,hl,t),(n=Z(this,Yi))==null||n.call(this),ke(this,Yi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Z(this,Wa)!==t&&(ke(this,Wa,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 2,453 bytes, line 465
465this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Z(this,Wa)=="boolean"?Z(this,Wa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Wa=new WeakMap,Yi=new WeakMap,hl=new WeakMap,OE),rb=new SF;function Ev(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var kF=vF;function CF(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=kF;const a=c=>{t?e.push(c):i(()=>{n(c)})},o=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||o()}return d},batchCalls:c=>(...d)=>{a(()=>{c(...d)})},schedule:a,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var en=CF(),ml,Qi,pl,ME,EF=(ME=class extends mo{constructor(){super();qe(this,ml,!0);qe(this,Qi);qe(this,pl);ke(this,pl,t=>{if(!so&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Z(this,Qi)||this.setEventListener(Z(this,pl))}onUnsubscribe(){var t;this.hasListeners()||((t=Z(this,Qi))==null||t.call(this),ke(this,Qi,void 0))}setEventListener(t){var n;ke(this,pl,t),(n=Z(this,Qi))==null||n.call(this),ke(this,Qi,t(this.setOnline.bind(this)))}setOnline(t){Z(this,ml)!==t&&(ke(this,ml,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Z(this,ml)}},ml=new WeakMap,Qi=new WeakMap,pl=new WeakMap,ME),uh=new EF;function TF(e){return Math.min(1e3*2**e,3e4)}function PT(e){return(e??"online")==="online"?uh.isOnline():!0}var Tv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function AT(e){let t=!1,n=0,r;const i=Ev(),a=()=>i.status!=="pending",o=x=>{var v;if(!a()){const y=new Tv(x);m(y),(v=e.onCancel)==null||v.call(e,y)}},c=()=>{t=!0},d=()=>{t=!1},h=()=>rb.isFocused()&&(e.networkMode==="always"||uh.isOnline())&&e.canRun(),g=()=>PT(e.networkMode)&&e.canRun(),f=x=>{a()||(r==null||r(),i.resolve(x))},m=x=>{a()||(r==null||r(),i.reject(x))},p=()=>new Promise(x=>{var v;r=y=>{(a()||h())&&x(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var x;r=void 0,a()||(x=e.onContinue)==null||x.call(e)}),w=()=>
vendor: 4,060 bytes, line 465
465{if(a())return;let x;const v=n===0?e.initialPromise:void 0;try{x=v??e.fn()}catch(y){x=Promise.reject(y)}Promise.resolve(x).then(f).catch(y=>{var S;if(a())return;const j=e.retry??(so?0:3),_=e.retryDelay??TF,N=typeof _=="function"?_(n,y):_,C=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,y);if(t||!C){m(y);return}n++,(S=e.onFail)==null||S.call(e,n,y),jF(N).then(()=>h()?void 0:p()).then(()=>{t?m(y):w()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:c,continueRetry:d,canStart:g,start:()=>(g()?w():p().then(w),i)}}var Ka,LE,RT=(LE=class{constructor(){qe(this,Ka)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sv(this.gcTime)&&ke(this,Ka,za.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(so?1/0:300*1e3))}clearGcTimeout(){Z(this,Ka)&&(za.clearTimeout(Z(this,Ka)),ke(this,Ka,void 0))}},Ka=new WeakMap,LE),Ga,gl,qr,Ya,kn,Ru,Qa,as,ti,DE,PF=(DE=class extends RT{constructor(t){super();qe(this,as);qe(this,Ga);qe(this,gl);qe(this,qr);qe(this,Ya);qe(this,kn);qe(this,Ru);qe(this,Qa);ke(this,Qa,!1),ke(this,Ru,t.defaultOptions),this.setOptions(t.options),this.observers=[],ke(this,Ya,t.client),ke(this,qr,Z(this,Ya).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ke(this,Ga,tN(this.options)),this.state=t.state??Z(this,Ga),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Z(this,kn))==null?void 0:t.promise}setOptions(t){if(this.options={...Z(this,Ru),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=tN(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),ke(this,Ga,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Z(this,qr).remove(this)}setData(t,n){const r=Cv(this.state.data,t,this.options);return tt(this,as,ti).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){tt(this,as,ti).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=Z(this,kn))==null?void 0:r.promise;return(i=Z(this,kn))==null||i.cancel(t),n?n.then(Vn).catch(Vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Z(this,Ga))}isActive(){return this.observers.some(t=>$r(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ia(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!CT(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Z(this,kn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Z(this,kn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Z(this,qr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Z(this,kn)&&(Z(this,Qa)?Z(this,kn).cancel({revert:!0}):Z(this,kn).cancelRetry()),this.scheduleGc()),Z(this,qr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,as,ti).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,g,f,m,p,w,x,v,y,j,_;if(this.state.fetchStatus!=="idle"&&((d=Z(this,kn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});
465else if(Z(this,kn))return Z(this,kn).continueRetry(),Z(this,kn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const N=this.observers.find(C=>C.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,i=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(ke(this,Qa,!0),r.signal)})},a=()=>{const N=ET(this.options,n),S=(()=>{const P={client:Z(this,Ya),queryKey:this.queryKey,meta:this.meta};return i(P),P})();return ke(this,Qa,!1),this.options.persister?this.options.persister(N,S,this):N(S)},c=(()=>{const N={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Z(this,Ya),state:this.state,fetchFn:a};return i(N),N})();(h=this.options.behavior)==null||h.onFetch(c,this),ke(this,gl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=c.fetchOptions)==null?void 0:g.meta))&&tt(this,as,ti).call(this,{type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta}),ke(this,kn,AT({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:N=>{N instanceof Tv&&N.revert&&this.setState({...Z(this,gl),fetchStatus:"idle"}),r.abort()},onFail:(N,C)=>{tt(this,as,ti).call(this,{type:"failed",failureCount:N,error:C})},onPause:()=>{tt(this,as,ti).call(this,{type:"pause"})},onContinue:()=>{tt(this,as,ti).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const N=await Z(this,kn).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(p=(m=Z(this,qr).config).onSuccess)==null||p.call(m,N,this),(x=(w=Z(this,qr).config).onSettled)==null||x.call(w,N,this.state.error,this),N}catch(N){if(N instanceof Tv){if(N.silent)return Z(this,kn).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw tt(this,as,ti).call(this,{type:"error",error:N}),(y=(v=Z(this,qr).config).onError)==null||y.call(v,N,this),(_=(j=Z(this,qr).config).onSettled)==null||_.call(j,this.state.data,N,this),N}finally{this.scheduleGc()}}},Ga=new WeakMap,gl=new WeakMap,qr=new WeakMap,Ya=new WeakMap,kn=new WeakMap,Ru=new WeakMap,Qa=new WeakMap,as=new WeakSet,ti=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...OT(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ke(this,gl,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),en.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Z(this,qr).notify({query:this,type:"updated",action:t})})},DE);function OT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:PT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function tN(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var lr,jt,Ou,Xn,Xa,yl,ni,Xi,Mu,xl,vl,Ja,Za,Ji,bl,Tt,Yc,Pv,Av,Rv,Ov,Mv,Lv,Dv,MT,IE,sb=(IE=class extends mo{constructor(t,n){super();qe(this,Tt);qe(this,lr);qe(this,jt);qe(this,Ou);qe(this,Xn);qe(this,Xa);qe(this,yl);qe(this,ni);qe(this,Xi);qe(this,Mu);qe(this,xl);qe(this,vl);qe(this,Ja);qe(this,Za);qe(this,Ji);qe(this,bl,new Set);this.options=n,ke(this,lr,t),ke(this,Xi,null),ke(this,ni,Ev()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Z(this,jt).addObserver(this),nN(Z(this,jt),this.options)?tt(this,Tt,Yc).call(this):this.updateResult(),tt(this,Tt,Ov).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Iv(Z(this,jt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Iv(Z(this,jt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,Tt,Mv).call(this),tt(this,Tt,Lv).call(this),Z(this,jt).removeObserver(this)}setOptions(t){const n=this.options,r=Z(this,jt);if(this.options=Z(this,lr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof $r(this.options.enabled,Z(this,jt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,Tt,Dv).call(this),Z(this,jt).setOptions(this.options),n._defaulted&&!gu(this.options,n)&&Z(this,lr).getQueryCache().notify({type:"observerOptionsUpdated",query:Z(this,jt),observer:this});const i=this.hasListeners();i&&rN(Z(this,jt),r,this.options,n)&&tt(this,Tt,Yc).call(this),this.updateResult(),i&&(Z(this,jt)!==r||$r(this.options.enabled,Z(this,jt))!==$r(n.enabled,Z(this,jt))||ia(this.options.staleTime,Z(this,jt))!==ia(n.staleTime,Z(this,jt)))&&tt(this,Tt,Pv).call(this);const a=tt(this,Tt,Av).call(this);i&&(Z(this,jt)!==r||$r(this.options.enabled,Z(this,jt))!==$r(n.enabled,Z(this,jt))||a!==Z(this,Ji))&&tt(this,Tt,Rv).call(this,a)}getOptimisticResult(t){const n=Z(this,lr).getQueryCache().build(Z(this,lr),t),r=this.createResult(n,t);return RF(this,r)&&(ke(this,Xn,r),ke(this,yl,this.options),ke(this,Xa,Z(this,jt).state)),r}getCurrentResult(){return Z(this,Xn)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&!this.options.experimental_prefetchInRender&&Z(this,ni).status==="pending"&&Z(this,ni).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,i))})}trackProp(t){Z(this,bl).add(t)}getCurrentQuery(){return Z(this,jt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Z(this,lr).defaultQueryOptions(t),r=Z(this,lr).getQueryCache().build(Z(this,lr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return tt(this,Tt,Yc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Z(this,Xn)))}createResult(t,n){var L;const r=Z(this,jt),i=this.options,a=Z(this,Xn),o=Z(this,Xa),c=Z(this,yl),h=t!==r?t.state:Z(this,Ou),{state:g}=t;let f={...g},m=!1,p;if(n._optimisticResults){const D=this.hasListeners(),T=!D&&nN(t,n),O=D&&rN(t,r,n,i);(T||O)&&(f={...f,...OT(g.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:w,errorUpdatedAt:x,status:v}=f;p=f.data;let y=!1;if(n.placeholderData!==void 0&&p===void 0&&v==="pending"){let D;a!=null&&a.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(D=a.data,y=!0):D=typeof n.placeholderData=="function"?n.placeholderData((L=Z(this,vl))==null?void 0:L.state.data,Z(this,vl)):n.placeholderData,D!==void 0&&(v="success",p=Cv(a==null?void 0:a.data,D,n),m=!0)}if(n.select&&p!==void 0&&!y)if(a&&p===(o==null?void 0:o.data)&&n.select===Z(this,Mu))p=Z(this,xl);else try{ke(this,Mu,n.select),p=n.select(p),p=Cv(a==null?void 0:a.data,p,n),ke(this,xl,p),ke(this,Xi,null)}catch(D){ke(this,Xi,D)}Z(this,Xi)&&(w=Z(this,Xi),p=Z(this,xl),x=Date.now(),v="error");const j=f.fetchStatus==="fetching",_=v==="pending",N=v==="error",C=_&&j,S=p!==void 0,R={status:v,fetchStatus:f.fetchStatus,isPending:_,isSuccess:v==="success",isError:N,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:f.dataUpdatedAt,error:w,errorUpdatedAt:x,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdate
vendor: 8,429 bytes, line 465
465Count:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>h.dataUpdateCount||f.errorUpdateCount>h.errorUpdateCount,isFetching:j,isRefetching:j&&!_,isLoadingError:N&&!S,isPaused:f.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:N&&S,isStale:ib(t,n),refetch:this.refetch,promise:Z(this,ni),isEnabled:$r(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=M=>{R.status==="error"?M.reject(R.error):R.data!==void 0&&M.resolve(R.data)},T=()=>{const M=ke(this,ni,R.promise=Ev());D(M)},O=Z(this,ni);switch(O.status){case"pending":t.queryHash===r.queryHash&&D(O);break;case"fulfilled":(R.status==="error"||R.data!==O.value)&&T();break;case"rejected":(R.status!=="error"||R.error!==O.reason)&&T();break}}return R}updateResult(){const t=Z(this,Xn),n=this.createResult(Z(this,jt),this.options);if(ke(this,Xa,Z(this,jt).state),ke(this,yl,this.options),Z(this,Xa).data!==void 0&&ke(this,vl,Z(this,jt)),gu(n,t))return;ke(this,Xn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!Z(this,bl).size)return!0;const o=new Set(a??Z(this,bl));return this.options.throwOnError&&o.add("error"),Object.keys(Z(this,Xn)).some(c=>{const d=c;return Z(this,Xn)[d]!==t[d]&&o.has(d)})};tt(this,Tt,MT).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,Tt,Ov).call(this)}},lr=new WeakMap,jt=new WeakMap,Ou=new WeakMap,Xn=new WeakMap,Xa=new WeakMap,yl=new WeakMap,ni=new WeakMap,Xi=new WeakMap,Mu=new WeakMap,xl=new WeakMap,vl=new WeakMap,Ja=new WeakMap,Za=new WeakMap,Ji=new WeakMap,bl=new WeakMap,Tt=new WeakSet,Yc=function(t){tt(this,Tt,Dv).call(this);let n=Z(this,jt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Vn)),n},Pv=function(){tt(this,Tt,Mv).call(this);const t=ia(this.options.staleTime,Z(this,jt));if(so||Z(this,Xn).isStale||!Sv(t))return;const r=CT(Z(this,Xn).dataUpdatedAt,t)+1;ke(this,Ja,za.setTimeout(()=>{Z(this,Xn).isStale||this.updateResult()},r))},Av=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Z(this,jt)):this.options.refetchInterval)??!1},Rv=function(t){tt(this,Tt,Lv).call(this),ke(this,Ji,t),!(so||$r(this.options.enabled,Z(this,jt))===!1||!Sv(Z(this,Ji))||Z(this,Ji)===0)&&ke(this,Za,za.setInterval(()=>{(this.options.refetchIntervalInBackground||rb.isFocused())&&tt(this,Tt,Yc).call(this)},Z(this,Ji)))},Ov=function(){tt(this,Tt,Pv).call(this),tt(this,Tt,Rv).call(this,tt(this,Tt,Av).call(this))},Mv=function(){Z(this,Ja)&&(za.clearTimeout(Z(this,Ja)),ke(this,Ja,void 0))},Lv=function(){Z(this,Za)&&(za.clearInterval(Z(this,Za)),ke(this,Za,void 0))},Dv=function(){const t=Z(this,lr).getQueryCache().build(Z(this,lr),this.options);if(t===Z(this,jt))return;const n=Z(this,jt);ke(this,jt,t),ke(this,Ou,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},MT=function(t){en.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Z(this,Xn))}),Z(this,lr).getQueryCache().notify({query:Z(this,jt),type:"observerResultsUpdated"})})},IE);function AF(e,t){return $r(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function nN(e,t){return AF(e,t)||e.state.data!==void 0&&Iv(e,t,t.refetchOnMount)}function Iv(e,t,n){if($r(t.enabled,e)!==!1&&ia(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ib(e,t)}return!1}function rN(e,t,n,r){return(e!==t||$r(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ib(e,n)}function ib(e,t){return $r(t.enabled,e)!==!1&&e.isStaleByTime(ia(t.staleTime,e))}function RF(e,t){return!gu(e.getCurrentResult(),t)}function sN(e){return{onFetch:(t,n)=>{var g,f,m,p,w;const r=t.options,i=(m=(f=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:f.fetchMore)==null?void 0:m.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},d=0;const h=async()=>{let x=!1;const v=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},y=ET(t.options,t.fetchOptions),j=async(_,N,C)=>{if(x)return Promise.reject();if(N==null&&_.pages.length)return Promise.resolve(_);const P=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:N,direction:C?"backward":"forward",meta:t.options.meta};return v(T),T})(),R=await y(P),{maxPages:L}=t.options,D=C?NF:_F;return{pages:D(_.pages,R,L),pageParams:D(_.pageParams,N,L)}};if(i&&a.length){const _=i==="backward",N=_?OF:iN,C={pages:a,pageParams:o},S=N(r,C);c=await j(C,S,_)}else{const _=e??a.length;do{const N=d===0?o[0]??r.initialPageParam:iN(r,c);if(d>0&&N==null)break;c=await j(c,N),d++}while(d<_)}return c};t.options.persister?t.fetchFn=()=>{var x,v;return(v=(x=t.options).persister)==null?void 0:v.call(x,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function iN(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function OF(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Lu,Ns,Jn,eo,Ss,Hi,FE,MF=(FE=class extends RT{constructor(t){super();qe(this,Ss);qe(this,Lu);qe(this,Ns);qe(this,Jn);qe(this,eo);ke(this,Lu,t.client),this.mutationId=t.mutationId,ke(this,Jn,t.mutationCache),ke(this,Ns,[]),this.state=t.state||LT(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Z(this,Ns).includes(t)||(Z(this,Ns).push(t),this.clearGcTimeout(),Z(this,Jn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ke(this,Ns,Z(this,Ns).filter(n=>n!==t)),this.scheduleGc(),Z(this,Jn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Z(this,Ns).length||(this.state.status==="pending"?this.scheduleGc():Z(this,Jn).remove(this))}continue(){var t;return((t=Z(this,eo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,c,d,h,g,f,m,p,w,x,v,y,j,_,N,C,S,P,R,L;const n=()=>{tt(this,Ss,Hi).call(this,{type:"continue"})},r={client:Z(this,Lu),meta:this.options.meta,mutationKey:this.options.mutationKey};ke(this,eo,AT({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(D,T)=>{tt(this,Ss,Hi).call(this,{type:"failed",failureCount:D,error:T})},onPause:()=>{tt(this,Ss,Hi).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Z(this,Jn).canRun(this)}));const i=this.state.status==="pending",a=!Z(this,eo).canStart();try{if(i)n();else{tt(this,Ss,Hi).call(this,{type:"pending",variables:t,isPaused:a}),await((c=(o=Z(this,Jn).config).onMutate)==null?void 0:c.call(o,t,this,r));const T=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,r));T!==this.state.context&&tt(this,Ss,Hi).call(this,{type:"pending",context:T,variables:t,isPaused:a})}const D=await Z(this,eo).start();return await((f=(g=Z(this,Jn).config).onSuccess)==null?void 0:f.call(g,D,t,this.state.context,this,r)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,D,t,this.state.context,r)),await((x=(w=Z(this,Jn).config).onSettled)==null?void 0:x.call(w,D,null,this.state.variables,this.state.context,this,r)),await((y=(v=this.options).onSettled)==null?void 0:y.call(v,D,null,t,this.state.context,r)),tt(this,Ss,Hi).call(this,{type:"success",data:D}),D}catch(D){try{throw await((_=(j=Z(this,Jn).config).onError)==null?void 0:_.call(j,D,t,this.state.context,this,r)),await((C=(N=this.options).onError)==null?void 0:C.call(N,D,t,this.state.context,r)),await((P=(S=Z(this,Jn).config).onSettled)==null?void 0:P.call(S,void 0,D,this.state.variables,this.state.context,this,r)),await((L=(R=this.options).onSettled)==null?void 0:L.call(R,void 0,D,t,this.state.context,r)),D}finally{tt(this,Ss,Hi).call(this,{type:"error",error:D})}}finally{Z(this,Jn).runNext(this)}}},Lu=new WeakMap,Ns=new WeakMap,Jn=new WeakMap,eo=new WeakMap,Ss=new WeakSet,Hi=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};
465case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),en.batch(()=>{Z(this,Ns).forEach(r=>{r.onMutationUpdate(t)}),Z(this,Jn).notify({mutation:this,type:"updated",action:t})})},FE);function LT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ri,os,Du,BE,LF=(BE=class extends mo{constructor(t={}){super();qe(this,ri);qe(this,os);qe(this,Du);this.config=t,ke(this,ri,new Set),ke(this,os,new Map),ke(this,Du,0)}build(t,n,r){const i=new MF({client:t,mutationCache:this,mutationId:++bf(this,Du)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){Z(this,ri).add(t);const n=Sf(t);if(typeof n=="string"){const r=Z(this,os).get(n);r?r.push(t):Z(this,os).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Z(this,ri).delete(t)){const n=Sf(t);if(typeof n=="string"){const r=Z(this,os).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&Z(this,os).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sf(t);if(typeof n=="string"){const r=Z(this,os).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Sf(t);if(typeof n=="string"){const i=(r=Z(this,os).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){en.batch(()=>{Z(this,ri).forEach(t=>{this.notify({type:"removed",mutation:t})}),Z(this,ri).clear(),Z(this,os).clear()})}getAll(){return Array.from(Z(this,ri))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>J_(n,r))}findAll(t={}){return this.getAll().filter(n=>J_(t,n))}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return en.batch(()=>Promise.all(t.map(n=>n.continue().catch(Vn))))}},ri=new WeakMap,os=new WeakMap,Du=new WeakMap,BE);function Sf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var si,Zi,cr,ii,di,Kf,Fv,qE,DF=(qE=class extends mo{constructor(n,r){super();qe(this,di);qe(this,si);qe(this,Zi);qe(this,cr);qe(this,ii);ke(this,si,n),this.setOptions(r),this.bindMethods(),tt(this,di,Kf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=Z(this,si).defaultMutationOptions(n),gu(this.options,r)||Z(this,si).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Z(this,cr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&io(r.mutationKey)!==io(this.options.mutationKey)?this.reset():((i=Z(this,cr))==null?void 0:i.state.status)==="pending"&&Z(this,cr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Z(this,cr))==null||n.removeObserver(this)}onMutationUpdate(n){tt(this,di,Kf).call(this),tt(this,di,Fv).call(this,n)}getCurrentResult(){return Z(this,Zi)}reset(){var n;(n=Z(this,cr))==null||n.removeObserver(this),ke(this,cr,void 0),tt(this,di,Kf).call(this),tt(this,di,Fv).call(this)}mutate(n,r){var i;return ke(this,ii,r),(i=Z(this,cr))==null||i.removeObserver(this),ke(this,cr,Z(this,si).getMutationCache().build(Z(this,si),this.options)),Z(this,cr).addObserver(this),Z(this,cr).execute(n)}},si=new WeakMap,Zi=new WeakMap,cr=new WeakMap,ii=new WeakMap,di=new WeakSet,Kf=function(){var r;const n=((r=Z(this,cr))==null?void 0:r.state)??LT();ke(this,Zi,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Fv=function(n){en.batch(()=>{var r,i,a,o,c,d,h,g;if(Z(this,ii)&&this.hasListeners()){const f=Z(this,Zi).variables,m=Z(this,Zi).context,p={client:Z(this,si),meta:this.options.meta,mutationKey:this.options.mutationKey};(n==null?void 0:n.type)==="success"?((i=(r=Z(this,ii)).onSuccess)==null||i.call(r,n.data,f,m,p),(o=(a=Z(this,ii)).onSettled)==null||o.call(a,n.data,null,f,m,p)):(n==null?void 0:n.type)==="error"&&((d=(c=Z(this,ii)).onError)==null||d.call(c,n.error,f,m,p),(g=(h=Z(this,ii)).onSettled)==null||g.call(h,void 0,n.error,f,m,p))}
465this.listeners.forEach(f=>{f(Z(this,Zi))})})},qE);function aN(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function IF(e,t,n){const r=e.slice(0);return r[t]=n,r}var wl,wr,jl,_l,Ur,ea,Iu,Fu,Bu,Dn,Bv,qv,Uv,$v,zv,UE,FF=(UE=class extends mo{constructor(t,n,r){super();qe(this,Dn);qe(this,wl);qe(this,wr);qe(this,jl);qe(this,_l);qe(this,Ur);qe(this,ea);qe(this,Iu);qe(this,Fu);qe(this,Bu,[]);ke(this,wl,t),ke(this,_l,r),ke(this,jl,[]),ke(this,Ur,[]),ke(this,wr,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&Z(this,Ur).forEach(t=>{t.subscribe(n=>{tt(this,Dn,$v).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,Z(this,Ur).forEach(t=>{t.destroy()})}setQueries(t,n){ke(this,jl,t),ke(this,_l,n),en.batch(()=>{const r=Z(this,Ur),i=tt(this,Dn,Uv).call(this,Z(this,jl));ke(this,Bu,i),i.forEach(f=>f.observer.setOptions(f.defaultedQueryOptions));const a=i.map(f=>f.observer),o=a.map(f=>f.getCurrentResult()),c=r.length!==a.length,d=a.some((f,m)=>f!==r[m]),h=c||d,g=h?!0:o.some((f,m)=>{const p=Z(this,wr)[m];return!p||!gu(f,p)});!h&&!g||(h&&ke(this,Ur,a),ke(this,wr,o),this.hasListeners()&&(h&&(aN(r,a).forEach(f=>{f.destroy()}),aN(a,r).forEach(f=>{f.subscribe(m=>{tt(this,Dn,$v).call(this,f,m)})})),tt(this,Dn,zv).call(this)))})}getCurrentResult(){return Z(this,wr)}getQueries(){return Z(this,Ur).map(t=>t.getCurrentQuery())}getObservers(){return Z(this,Ur)}getOptimisticResult(t,n){const r=tt(this,Dn,Uv).call(this,t),i=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions));return[i,a=>tt(this,Dn,qv).call(this,a??i,n),()=>tt(this,Dn,Bv).call(this,i,r)]}},wl=new WeakMap,wr=new WeakMap,jl=new WeakMap,_l=new WeakMap,Ur=new WeakMap,ea=new WeakMap,Iu=new WeakMap,Fu=new WeakMap,Bu=new WeakMap,Dn=new WeakSet,Bv=function(t,n){return n.map((r,i)=>{const a=t[i];return r.defaultedQueryOptions.notifyOnChangeProps?a:r.observer.trackResult(a,o=>{n.forEach(c=>{c.observer.trackProp(o)})})})},qv=function(t,n){return n?((!Z(this,ea)||Z(this,wr)!==Z(this,Fu)||n!==Z(this,Iu))&&(ke(this,Iu,n),ke(this,Fu,Z(this,wr)),ke(this,ea,tb(Z(this,ea),n(t)))),Z(this,ea)):t},Uv=function(t){const n=new Map(Z(this,Ur).map(i=>[i.options.queryHash,i])),r=[];return t.forEach(i=>{const a=Z(this,wl).defaultQueryOptions(i),o=n.get(a.queryHash);o?r.push({defaultedQueryOptions:a,observer:o}):r.push({defaultedQueryOptions:a,observer:new sb(Z(this,wl),a)})}),r},$v=function(t,n){const r=Z(this,Ur).indexOf(t);r!==-1&&(ke(this,wr,IF(Z(this,wr),r,n)),tt(this,Dn,zv).call(this))},zv=function(){var t;if(this.hasListeners()){const n=Z(this,ea),r=tt(this,Dn,Bv).call(this,Z(this,wr),Z(this,Bu)),i=tt(this,Dn,qv).call(this,r,(t=Z(this,_l))==null?void 0:t.combine);n!==i&&en.batch(()=>{this.listeners.forEach(a=>{a(Z(this,wr))})})}},UE),ks,$E,BF=($E=class extends mo{constructor(t={}){super();qe(this,ks);this.config=t,ke(this,ks,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??eb(i,n);let o=this.get(a);return o||(o=new PF({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){Z(this,ks).has(t.queryHash)||(Z(this,ks).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Z(this,ks).get(t.queryHash);n&&(t.destroy(),n===t&&Z(this,ks).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Z(this,ks).get(t)}getAll(){return[...Z(this,ks).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>X_(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>X_(t,r)):n}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){en.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){en.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ks=new WeakMap,$E),Xt,ta,na,Nl,Sl,ra,kl,Cl,zE,qF=(zE=class{constructor(e={}){qe(this,Xt);qe(this,ta);qe(this,na);qe(this,Nl);qe(this,Sl);qe(this,ra);qe(this,kl);qe(this,Cl);ke(this,Xt,e.queryCache||new BF),ke(this,ta,e.mutationCache||new LF),ke(this,na,e.defaultOptions||{}),ke(this,Nl,new Map),ke(this,Sl,new Map),ke(this,ra,0)}mount(){bf(this,ra)._++,Z(this,ra)===1&&(ke(this,kl,rb.subscribe(async e=>{e&&(await this.resumePausedMutations(),Z(this,Xt).onFocus())})),ke(this,Cl,uh.subscribe(async e=>{e&&(await this.resumePausedMutations(),Z(this,Xt).onOnline())})))}unmount(){var e,t;bf(this,ra)._--,Z(this,ra)===0&&((e=Z(this,kl))==null||e.call(this),ke(this,kl,void 0),(t=Z(this,Cl))==null||t.call(this),ke(this,Cl,void 0))}isFetching(e){return Z(this,Xt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Z(this,ta).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Z(this,Xt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Z(this,Xt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ia(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return Z(this,Xt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=Z(this,Xt).get(r.queryHash),a=i==null?void 0:i.state.data,o=bF(t,a);if(o!==void 0)return Z(this,Xt).build(this,r).setData(o,{...n,manual:!0})}
465setQueriesData(e,t,n){return en.batch(()=>Z(this,Xt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Z(this,Xt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Z(this,Xt);en.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Z(this,Xt);return en.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=en.batch(()=>Z(this,Xt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Vn).catch(Vn)}invalidateQueries(e,t={}){return en.batch(()=>(Z(this,Xt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=en.batch(()=>Z(this,Xt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Vn)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Vn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Z(this,Xt).build(this,t);return n.isStaleByTime(ia(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vn).catch(Vn)}fetchInfiniteQuery(e){return e.behavior=sN(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vn).catch(Vn)}ensureInfiniteQueryData(e){return e.behavior=sN(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return uh.isOnline()?Z(this,ta).resumePausedMutations():Promise.resolve()}getQueryCache(){return Z(this,Xt)}getMutationCache(){return Z(this,ta)}getDefaultOptions(){return Z(this,na)}setDefaultOptions(e){ke(this,na,e)}setQueryDefaults(e,t){Z(this,Nl).set(io(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Z(this,Nl).values()],n={};return t.forEach(r=>{pu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){Z(this,Sl).set(io(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Z(this,Sl).values()],n={};return t.forEach(r=>{pu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Z(this,na).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=eb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===nb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Z(this,na).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Z(this,Xt).clear(),Z(this,ta).clear()}},Xt=new WeakMap,ta=new WeakMap,na=new WeakMap,Nl=new WeakMap,Sl=new WeakMap,ra=new WeakMap,kl=new WeakMap,Cl=new WeakMap,zE),DT=E.createContext(void 0),dn=e=>{const t=E.useContext(DT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},UF=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(DT.Provider,{value:e,children:t})),IT=E.createContext(!1),FT=()=>E.useContext(IT);IT.Provider;function $F(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zF=E.createContext($F()),BT=()=>E.useContext(zF),qT=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},UT=e=>{E.useEffect(()=>{e.clearReset()},[e])},$T=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||TT(n,[e.error,r])),zT=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},VT=(e,t)=>e.isLoading&&e.isFetching&&!t,Vv=(e,t)=>
465(e==null?void 0:e.suspense)&&t.isPending,dh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function VF({queries:e,...t},n){const r=dn(),i=FT(),a=BT(),o=E.useMemo(()=>e.map(x=>{const v=r.defaultQueryOptions(x);return v._optimisticResults=i?"isRestoring":"optimistic",v}),[e,r,i]);o.forEach(x=>{zT(x),qT(x,a)}),UT(a);const[c]=E.useState(()=>new FF(r,o,t)),[d,h,g]=c.getOptimisticResult(o,t.combine),f=!i&&t.subscribed!==!1;E.useSyncExternalStore(E.useCallback(x=>f?c.subscribe(en.batchCalls(x)):Vn,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),E.useEffect(()=>{c.setQueries(o,t)},[o,t,c]);const p=d.some((x,v)=>Vv(o[v],x))?d.flatMap((x,v)=>{const y=o[v];if(y){const j=new sb(r,y);if(Vv(y,x))return dh(y,j,a);VT(x,i)&&dh(y,j,a)}return[]}):[];if(p.length>0)throw Promise.all(p);const w=d.find((x,v)=>{const y=o[v];return y&&$T({result:x,errorResetBoundary:a,throwOnError:y.throwOnError,query:r.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(w!=null&&w.error)throw w.error;return h(g())}function HF(e,t,n){var f,m,p,w,x;const r=FT(),i=BT(),a=dn(),o=a.defaultQueryOptions(e);(m=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||m.call(f,o),o._optimisticResults=r?"isRestoring":"optimistic",zT(o),qT(o,i),UT(i);const c=!a.getQueryCache().get(o.queryHash),[d]=E.useState(()=>new t(a,o)),h=d.getOptimisticResult(o),g=!r&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(v=>{const y=g?d.subscribe(en.batchCalls(v)):Vn;return d.updateResult(),y},[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),E.useEffect(()=>{d.setOptions(o)},[o,d]),Vv(o,h))throw dh(o,d,i);if($T({result:h,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw h.error;if((w=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||w.call(p,o,h),o.experimental_prefetchInRender&&!so&&VT(h,r)){const v=c?dh(o,d,i):(x=a.getQueryCache().get(o.queryHash))==null?void 0:x.promise;v==null||v.catch(Vn).finally(()=>{d.updateResult()})}return o.notifyOnChangeProps?h:d.trackResult(h)}function De(e,t){return HF(e,sb)}function Ct(e,t){const n=dn(),[r]=E.useState(()=>new DF(n,e));E.useEffect(()=>{r.setOptions(e)},[r,e]);const i=E.useSyncExternalStore(E.useCallback(o=>r.subscribe(en.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=E.useCallback((o,c)=>{r.mutate(o,c).catch(Vn)},[r]);if(i.error&&TT(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}const WF=new qF({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});function KF(){const[e,t]=E.useState(!1),n=E.useRef(!1),[r,i]=E.useState(!1),a=E.useRef(!1),[o,c]=E.useState(!1),d=E.useRef(!1),h=E.useRef([]),g=E.useRef([]),f=E.useRef([]),m=E.useRef(null),p=(R=!1)=>{const L=document.createElement("div");return L.style.position="absolute",L.style.pointerEvents="none",L.style.transition="all 0.1s ease-in-out",L.style.zIndex="9999",R?L.style.border="2px solid #2563EB":(L.style.border="2px solid #95a5fc",L.style.backgroundColor="rgba(99, 102, 241, 0.05)"),L},w=(R,L,D=!1)=>{if(!L||!n.current)return;L.offsetWidth;const T=L.getBoundingClientRect();R.style.top=`${T.top+window.scrollY}px`,R.style.left=`${T.left+window.scrollX}px`,R.style.width=`${T.width}px`,R.style.height=`${T.height}px`;let O=R.querySelector("div");O||(O=document.createElement("div"),O.textContent=L.tagName.toLowerCase(),O.style.position="absolute",O.style.top="-27px",O.style.left="-2px",O.style.padding="2px 8px",O.style.fontSize="11px",O.style.fontWeight=D?"500":"400",O.style.color=D?"#ffffff":"#526cff",O.style.backgroundColor=D?"#526cff":"#DBEAFE",O.style.borderRadius="3px",O.style.boxShadow="none",O.style.minWidth="24px",O.style.textAlign="center",R.appendChild(O))},x=R=>{if(!R)return[];const L=[...document.querySelectorAll(`[data-source-location="${R}"]`)];return L.length>0?L:[...document.querySelectorAll(`[data-visual-selector-id="${R}"]`)]},v=()=>{h.current.forEach(R=>{R&&R.parentNode&&R.remove()}),h.current=[],f.current=[]},y=R=>{if(!n.current||a.current)return;if(d.current){v();return}if(R.target.tagName.toLowerCase()==="path"){v();return}const L=R.target.closest("[data-source-location], [data-visual-selector-id]");if(!L){v();return}const D=L.dataset.sourceLocation||L.dataset.visualSelectorId;if(L.dataset.sourceLocation,m.current===D){v();return}const T=x(D);v(),T.forEach(O=>{const M=p(!1);document.body.appendChild(M),h.current.push(M),w(M,O)}),f.current=T},j=()=>{a.current||v()},_=R=>{var z;if(!n.current)return;if(d.current){R.preventDefault(),R.stopPropagation(),R.stopImmediatePropagation(),window.parent.postMessage({type:"close-dropdowns"},"*");return}if(R.target.tagName.toLowerCase()==="path")return;R.preventDefault(),R.stopPropagation(),R.stopImmediatePropagation();const L=R.target.closest("[data-source-location], [data-visual-selector-id]");if(!L)return;const D=L.dataset.sourceLocation||L.dataset.visualSelectorId;L.dataset.sourceLocation,g.current.forEach(H=>{H&&H.parentNode&&H.remove()}
465),g.current=[],x(D).forEach(H=>{const Y=p(!0);document.body.appendChild(Y),g.current.push(Y),w(Y,H,!0)}),m.current=D,v();const O=L.getBoundingClientRect(),M={top:O.top,left:O.left,right:O.right,bottom:O.bottom,width:O.width,height:O.height,centerX:O.left+O.width/2,centerY:O.top+O.height/2},U={type:"element-selected",tagName:L.tagName,classes:((z=L.className)==null?void 0:z.baseVal)||L.className||"",visualSelectorId:D,content:L.innerText,dataSourceLocation:L.dataset.sourceLocation,isDynamicContent:L.dataset.dynamicContent==="true",linenumber:L.dataset.linenumber,filename:L.dataset.filename,position:M};window.parent.postMessage(U,"*")},N=()=>{g.current.forEach(R=>{R&&R.parentNode&&R.remove()}),g.current=[],m.current=null},C=(R,L,D=!1)=>{const T=x(R);T.length!==0&&(T.forEach(O=>{var M;if(D)O.className=L;else{const U=((M=O.className)==null?void 0:M.baseVal)||O.className||"";O.className=bT(U,L)}}),setTimeout(()=>{var O,M;m.current===R&&g.current.forEach((U,z)=>{z<T.length&&w(U,T[z])}),f.current.length>0&&((M=(O=f.current[0])==null?void 0:O.dataset)==null?void 0:M.visualSelectorId)===R&&h.current.forEach((z,H)=>{H<f.current.length&&w(z,f.current[H])})},50))},S=(R,L)=>{const D=x(R);D.length!==0&&(D.forEach(T=>{T.innerText=L}),setTimeout(()=>{m.current===R&&g.current.forEach((T,O)=>{O<D.length&&w(T,D[O])})},50))},P=R=>{t(R),n.current=R,R?(document.body.style.cursor="crosshair",document.addEventListener("mouseover",y),document.addEventListener("mouseout",j),document.addEventListener("click",_,!0)):(v(),g.current.forEach(L=>{L&&L.parentNode&&L.remove()}),g.current=[],f.current=[],m.current=null,document.body.style.cursor="default",document.removeEventListener("mouseover",y),document.removeEventListener("mouseout",j),document.removeEventListener("click",_,!0))};return E.useEffect(()=>{document.querySelectorAll("[data-linenumber]:not([data-visual-selector-id])").forEach((T,O)=>{const M=`visual-id-${T.dataset.filename}-${T.dataset.linenumber}-${O}`;T.dataset.visualSelectorId=M});const L=()=>
465{if(m.current){const T=x(m.current);if(T.length>0){const M=T[0].getBoundingClientRect(),U=window.innerHeight,z=window.innerWidth,H=M.top<U&&M.bottom>0&&M.left<z&&M.right>0,Y={top:M.top,left:M.left,right:M.right,bottom:M.bottom,width:M.width,height:M.height,centerX:M.left+M.width/2,centerY:M.top+M.height/2};window.parent.postMessage({type:"element-position-update",position:Y,isInViewport:H,visualSelectorId:m.current},"*")}}},D=T=>{const O=T.data;switch(O.type){case"toggle-visual-edit-mode":P(O.data.enabled);break;case"update-classes":O.data&&O.data.classes!==void 0?C(O.data.visualSelectorId,O.data.classes,O.data.replace||!1):console.warn("[Agent] Invalid update-classes message:",O);break;case"unselect-element":N();break;case"refresh-page":window.location.reload();break;case"update-content":O.data&&O.data.content!==void 0?S(O.data.visualSelectorId,O.data.content):console.warn("[Agent] Invalid update-content message:",O);break;case"request-element-position":if(m.current){const M=x(m.current);if(M.length>0){const z=M[0].getBoundingClientRect(),H=window.innerHeight,Y=window.innerWidth,G=z.top<H&&z.bottom>0&&z.left<Y&&z.right>0,$={top:z.top,left:z.left,right:z.right,bottom:z.bottom,width:z.width,height:z.height,centerX:z.left+z.width/2,centerY:z.top+z.height/2};window.parent.postMessage({type:"element-position-update",position:$,isInViewport:G,visualSelectorId:m.current},"*")}}break;case"popover-drag-state":O.data&&O.data.isDragging!==void 0&&(i(O.data.isDragging),a.current=O.data.isDragging,O.data.isDragging&&v());break;case"dropdown-state":O.data&&O.data.isOpen!==void 0&&(c(O.data.isOpen),d.current=O.data.isOpen,O.data.isOpen&&v());break}};return window.addEventListener("message",D),window.addEventListener("scroll",L,!0),document.addEventListener("scroll",L,!0),window.parent.postMessage({type:"visual-edit-agent-ready"},"*"),()=>{window.removeEventListener("message",D),window.removeEventListener("scroll",L,!0),document.removeEventListener("scroll",L,!0),document.removeEventListener("mouseover",y),document.removeEventListener("mouseout",j),document.removeEventListener("click",_,!0),v(),g.current.forEach(T=>{T&&T.parentNode&&T.remove()})}},[]),E.useEffect(()=>{n.current=e},[e]),E.useEffect(()=>{a.current=r},[r]),E.useEffect(()=>{d.current=o},[o]),E.useEffect(()=>{const R=()=>{if(m.current){const D=x(m.current);g.current.forEach((T,O)=>{O<D.length&&w(T,D[O])})}f.current.length>0&&h.current.forEach((D,T)=>{T<f.current.length&&w(D,f.current[T])})},L=new MutationObserver(D=>{D.some(O=>{const M=z=>{if(z.nodeType===Node.ELEMENT_NODE){if(z.dataset&&z.dataset.visualSelectorId)return!0;for(let H=0;H<z.children.length;H++)if(M(z.children[H]))return!0}return!1};return O.type==="attributes"&&(O.attributeName==="style"||O.attributeName==="class"||O.attributeName==="width"||O.attributeName==="height")&&M(O.target)})&&setTimeout(R,50)});return L.observe(document.body,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["style","class","width","height"]}),window.addEventListener("resize",R),window.addEventListener("scroll",R),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",R),L.disconnect()}},[]),null}var Wu=Y0();const GF=Dl(Wu);/** 466 * @remix-run/router v1.23.0 467 * 468 * Copyright (c) Remix Software Inc. 469 * 470 * This source code is licensed under the MIT license found in the 471 * LICENSE.md file in the root directory of this source tree. 472 * 473 * @license MIT 474 */function yu(){return yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yu.apply(this,arguments)}var sa;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(sa||(sa={}));const oN="popstate";function YF(e){e===void 0&&(e={});function t(r,i){let{pathname:a,search:o,hash:c}=r.location;return Hv("",{pathname:a,search:o,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:fh(i)}return XF(t,n,null,e)}function on(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function HT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function QF(){return Math.random().toString(36).substr(2,8)}function lN(e,t){return{usr:e.state,key:e.key,idx:t}}function Hv(e,t,n,r){return n===void 0&&(n=null),yu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ql(t):t,{state:n,key:t&&t.key||r||QF()})}function fh(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ql(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function XF(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,c=sa.Pop,d=null,h=g();h==null&&(h=0,o.replaceState(yu({},o.state,{idx:h}),""));function g(){return(o.state||{idx:null}).idx}function f(){c=sa.Pop;let v=g(),y=v==null?null:v-h;h=v,d&&d({action:c,location:x.location,delta:y})}function m(v,y){c=sa.Push;let j=Hv(x.location,v,y);h=g()+1;let _=lN(j,h),N=x.createHref(j);try{o.pushState(_,"",N)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(N)}a&&d&&d({action:c,location:x.location,delta:1})}function p(v,y){c=sa.Replace;let j=Hv(x.location,v,y);h=g();let _=lN(j,h),N=x.createHref(j);o.replaceState(_,"",N),a&&d&&d({action:c,location:x.location,delta:0})}function w(v){let y=i.location.origin!=="null"?i.location.origin:i.location.href,j=typeof v=="string"?v:fh(v);return j=j.replace(/ $/,"%20"),on(y,"No window.location.(origin|href) available to create URL for href: "+j),new URL(j,y)}let x={get action(){return c},get location(){return e(i,o)},listen(v){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(oN,f),d=v,()=>{i.removeEventListener(oN,f),d=null}},createHref(v){return t(i,v)},createURL:w,encodeLocation(v){let y=w(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:m,replace:p,go(v){return o.go(v)}};return x}var cN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(cN||(cN={}));function JF(e,t,n){return n===void 0&&(n="/"),ZF(e,t,n)}function ZF(e,t,n,r){let i=typeof t=="string"?ql(t):t,a=ab(i.pathname||"/",n);if(a==null)return null;let o=WT(e);eB(o);let c=null;for(let d=0;c==null&&d<o.length;++d){let h=fB(a);c=cB(o[d],h)}return c}function WT(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,o,c)=>{let d={relativePath:c===void 0?a.path||"":c,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};d.relativePath.startsWith("/")&&(on(d.relativePath.startsWith(r),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+r+'" is not val
474id. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(r.length));let h=aa([r,d.relativePath]),g=n.concat(d);a.children&&a.children.length>0&&(on(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),WT(a.children,t,g,h)),!(a.path==null&&!a.index)&&t.push({path:h,score:oB(h,a.index),routesMeta:g})};return e.forEach((a,o)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))i(a,o);else for(let d of KT(a.path))i(a,o,d)}),t}function KT(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=KT(r.join("/")),c=[];return c.push(...o.map(d=>d===""?a:[a,d].join("/"))),i&&c.push(...o),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function eB(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:lB(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const tB=/^:[\w-]+$/,nB=3,rB=2,sB=1,iB=10,aB=-2,uN=e=>e==="*";function oB(e,t){let n=e.split("/"),r=n.length;return n.some(uN)&&(r+=aB),t&&(r+=rB),n.filter(i=>!uN(i)).reduce((i,a)=>i+(tB.test(a)?nB:a===""?sB:iB),r)}function lB(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function cB(e,t,n){let{routesMeta:r}=e,i={},a="/",o=[];for(let c=0;c<r.length;++c){let d=r[c],h=c===r.length-1,g=a==="/"?t:t.slice(a.length)||"/",f=uB({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},g),m=d.route;if(!f)return null;
vendor: 9,516 bytes, lines 474-483
474Object.assign(i,f.params),o.push({params:i,pathname:aa([a,f.pathname]),pathnameBase:gB(aa([a,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(a=aa([a,f.pathnameBase]))}return o}function uB(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=dB(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((h,g,f)=>{let{paramName:m,isOptional:p}=g;if(m==="*"){let x=c[f]||"";o=a.slice(0,a.length-x.length).replace(/(.)\/+$/,"$1")}const w=c[f];return p&&!w?h[m]=void 0:h[m]=(w||"").replace(/%2F/g,"/"),h},{}),pathname:a,pathnameBase:o,pattern:e}}function dB(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),HT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,d)=>(r.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function fB(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return HT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ab(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function hB(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ql(e):e;return{pathname:n?n.startsWith("/")?n:mB(n,t):t,search:yB(r),hash:xB(i)}}function mB(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Og(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function pB(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ob(e,t){let n=pB(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function lb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ql(e):(i=yu({},e),on(!i.pathname||!i.pathname.includes("?"),Og("?","pathname","search",i)),on(!i.pathname||!i.pathname.includes("#"),Og("#","pathname","hash",i)),on(!i.search||!i.search.includes("#"),Og("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,c;if(o==null)c=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),f-=1;i.pathname=m.join("/")}c=f>=0?t[f]:"/"}let d=hB(i,c),h=o&&o!=="/"&&o.endsWith("/"),g=(a||o===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||g)&&(d.pathname+="/"),d}const aa=e=>e.join("/").replace(/\/\/+/g,"/"),gB=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yB=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xB=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function vB(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const GT=["post","put","patch","delete"];new Set(GT);const bB=["get",...GT];new Set(bB);/** 475 * React Router v6.30.1 476 * 477 * Copyright (c) Remix Software Inc. 478 * 479 * This source code is licensed under the MIT license found in the 480 * LICENSE.md file in the root directory of this source tree. 481 * 482 * @license MIT 483 */function xu(){return xu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xu.apply(this,arguments)}const cb=E.createContext(null),wB=E.createContext(null),ha=E.createContext(null),Bh=E.createContext(null),yi=E.createContext({outlet:null,matches:[],isDataRoute:!1}),YT=E.createContext(null);function jB(e,t){let{relative:n}=t===void 0?{}:t;Ul()||on(!1);let{basename:r,navigator:i}=E.useContext(ha),{hash:a,pathname:o,search:c}=XT(e,{relative:n}),d=o;return r!=="/"&&(d=o==="/"?r:aa([r,o])),i.createHref({pathname:d,search:c,hash:a})}function Ul(){return E.useContext(Bh)!=null}function hr(){return Ul()||on(!1),E.useContext(Bh).location}function QT(e){E.useContext(ha).static||E.useLayoutEffect(e)}function wt(){let{isDataRoute:e}=E.useContext(yi);return e?LB():_B()}function _B(){Ul()||on(!1);let e=E.useContext(cb),{basename:t,future:n,navigator:r}=E.useContext(ha),{matches:i}=E.useContext(yi),{pathname:a}=hr(),o=JSON.stringify(ob(i,n.v7_relativeSplatPath)),c=E.useRef(!1);return QT(()=>{c.current=!0}),E.useCallback(function(h,g){if(g===void 0&&(g={}),!c.current)return;if(typeof h=="number"){r.go(h);return}let f=lb(h,JSON.parse(o),a,g.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:aa([t,f.pathname])),(g.replace?r.replace:r.push)(f,g.state,g)},[t,r,o,a,e])}function xi(){let{matches:e}=E.useContext(yi),t=e[e.length-1];return t?t.params:{}}function XT(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=E.useContext(ha),{matches:i}=E.useContext(yi),{pathname:a}=hr(),o=JSON.stringify(ob(i,r.v7_relativeSplatPath));return E.useMemo(()=>lb(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function NB(e,t){return SB(e,t)}function SB(e,t,n,r){Ul()||on(!1);let{navigator:i}=E.useContext(ha),{matches:a}=E.useContext(yi),o=a[a.length-1],c=o?o.params:{};o&&o.pathname;let d=o?o.pathnameBase:"/";o&&o.route;let h=hr(),g;if(t){var f;let v=typeof t=="string"?ql(t):t;d==="/"||(f=v.pathname)!=null&&f.startsWith(d)||on(!1),g=v}else g=h;let m=g.pathname||"/",p=m;if(d!=="/"){let v=d.replace(/^\//,"").split("/");p="/"+m.replace(/^\//,"").split("/").slice(v.length).join("/")}let w=JF(e,{pathname:p}),x=PB(w&&w.map(v=>Object.assign({},v,{params:Object.assign({},c,v.params),pathname:aa([d,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?d:aa([d,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,n,r);return t&&x?E.createElement(Bh.Provider,{value:{location:xu({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:sa.Pop}},x):x}function kB(){let e=MB(),t=vB(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:i},n):null,null)}const CB=E.createElement(kB,null);class EB extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?E.createElement(yi.Provider,{value:this.props.routeContext},E.createElement(YT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function TB(e){let{routeContext:t,match:n,children:r}=e,i=E.useContext(cb);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(yi.Provider,{value:t},r)}function PB(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,c=(i=n)==null?void 0:i.errors;if(c!=null){let g=o.findIndex(f=>f.route.id&&(c==null?void 0:c[f.route.id])!==void 0);g>=0||on(!1),o=o.slice(0,Math.min(o.length,g+1))}let d=!1,h=-1;if(n&&r&&r.v7_partialHydration)for(let g=0;g<o.length;g++){let f=o[g];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(h=g),f.route.id){let{loaderData:m,errors:p}=n,w=f.route.loader&&m[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||w){d=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((g,f,m)=>{let p,w=!1,x=null,v=null;n&&(p=c&&f.route.id?c[f.route.id]:void 0,x=f.route.errorElement||CB,d&&(h<0&&m===0?(DB("route-fallback"),w=!0,v=null):h===m&&(w=!0,v=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,m+1)),j=()=>{let _;return p?_=x:w?_=v:f.route.Component?_=E.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=g,E.createElement(TB,{match:f,routeContext:{outlet:g,matches:y,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?E.createElement(EB,{location:n.location,revalidation:n.revalidation,component:x,error:p,children:j(),routeC
483ontext:{outlet:null,matches:y,isDataRoute:!0}}):j()},null)}var JT=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(JT||{}),ZT=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(ZT||{});function AB(e){let t=E.useContext(cb);return t||on(!1),t}function RB(e){let t=E.useContext(wB);return t||on(!1),t}function OB(e){let t=E.useContext(yi);return t||on(!1),t}function eP(e){let t=OB(),n=t.matches[t.matches.length-1];return n.route.id||on(!1),n.route.id}function MB(){var e;let t=E.useContext(YT),n=RB(),r=eP();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function LB(){let{router:e}=AB(JT.UseNavigateStable),t=eP(ZT.UseNavigateStable),n=E.useRef(!1);return QT(()=>{n.current=!0}),E.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,xu({fromRouteId:t},a)))},[e,t])}const dN={};function DB(e,t,n){dN[e]||(dN[e]=!0)}function IB(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Wv(e){let{to:t,replace:n,state:r,relative:i}=e;Ul()||on(!1);let{future:a,static:o}=E.useContext(ha),{matches:c}=E.useContext(yi),{pathname:d}=hr(),h=wt(),g=lb(t,ob(c,a.v7_relativeSplatPath),d,i==="path"),f=JSON.stringify(g);return E.useEffect(()=>h(JSON.parse(f),{replace:n,state:r,relative:i}),[h,f,i,n,r]),null}function Vt(e){on(!1)}function FB(e){let{basename:t="/",children:n=null,location:r,navigationType:i=sa.Pop,navigator:a,static:o=!1,future:c}=e;Ul()&&on(!1);let d=t.replace(/^\/*/,"/"),h=E.useMemo(()=>({basename:d,navigator:a,static:o,future:xu({v7_relativeSplatPath:!1},c)}),[d,c,a,o]);typeof r=="string"&&(r=ql(r));let{pathname:g="/",search:f="",hash:m="",state:p=null,key:w="default"}=r,x=E.useMemo(()=>{let v=ab(g,d);return v==null?null:{location:{pathname:v,search:f,hash:m,state:p,key:w},navigationType:i}},[d,g,f,m,p,w,i]);return x==null?null:E.createElement(ha.Provider,{value:h},E.createElement(Bh.Provider,{children:n,value:x}))}function BB(e){let{children:t,location:n}=e;return NB(Kv(t),n)}new Promise(()=>{});function Kv(e,t){t===void 0&&(t=[]);let n=[];return E.Children.forEach(e,(r,i)=>{if(!E.isValidElement(r))return;let a=[...t,i];if(r.type===E.Fragment){n.push.apply(n,Kv(r.props.children,a));return}r.type!==Vt&&on(!1),!r.props.index||!r.props.children||on(!1);let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Kv(r.props.children,a)),n.push(o)}),n}/** 484 * React Router DOM v6.30.1 485 * 486 * Copyright (c) Remix Software Inc. 487 * 488 * This source code is licensed under the MIT license found in the 489 * LICENSE.md file in the root directory of this source tree. 490 * 491 * @license MIT 492 */function Gv(){return Gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gv.apply(this,arguments)}function qB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function UB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $B(e,t){return e.button===0&&(!t||t==="_self")&&!UB(e)}const zB=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],VB="6";try{window.__reactRouterVersion=VB}catch{}const HB="startTransition",fN=G0[HB];function WB(e){let{basename:t,children:n,future:r,window:i}=e,a=E.useRef();a.current==null&&(a.current=YF({window:i,v5Compat:!0}));let o=a.current,[c,d]=E.useState({action:o.action,location:o.location}),{v7_startTransition:h}=r||{},g=E.useCallback(f=>{h&&fN?fN(()=>d(f)):d(f)},[d,h]);return E.useLayoutEffect(()=>o.listen(g),[o,g]),E.useEffect(()=>IB(r),[r]),E.createElement(FB,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:o,future:r})}const KB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",GB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jt=E.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:c,target:d,to:h,preventScrollReset:g,viewTransition:f}=t,m=qB(t,zB),{basename:p}=E.useContext(ha),w,x=!1;if(typeof h=="string"&&GB.test(h)&&(w=h,KB))try{let _=new URL(window.location.href),N=h.startsWith("//")?new URL(_.protocol+h):new URL(h),C=ab(N.pathname,p);N.origin===_.origin&&C!=null?h=C+N.search+N.hash:x=!0}catch{}let v=jB(h,{relative:i}),y=YB(h,{replace:o,state:c,target:d,preventScrollReset:g,relative:i,viewTransition:f});function j(_){r&&r(_),_.defaultPrevented||y(_)}return E.createElement("a",Gv({},m,{href:w||v,onClick:x||a?r:j,ref:n,target:d}))});var hN;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(hN||(hN={}));var mN;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mN||(mN={}));function YB(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:c}=t===void 0?{}:t,d=wt(),h=hr(),g=XT(e,{relative:o});return E.useCallback(f=>{if($B(f,n)){f.preventDefault();let m=r!==void 0?r:fh(h)===fh(g);d(e,{replace:m,state:i,preventScrollReset:a,relative:o,viewTransition:c})}},[h,d,g,r,i,n,e,a,o,c])}function tP(e,t){return function(){return e.apply(t,arguments)}}const{toString:QB}=Object.prototype,{getPrototypeOf:Tl}=Object,{iterator:Ku,toStringTag:nP}=Symbol,hh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),vu=(e,t)=>
vendor: 10,551 bytes, lines 492-494
492{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),hh(n,t))return!0;n=Tl(n)}return!1},XB=(e,t)=>e!=null&&vu(e,t)?e[t]:void 0,ub=(e=>t=>{const n=QB.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ps=e=>(e=e.toLowerCase(),t=>ub(t)===e),qh=e=>t=>typeof t===e,{isArray:ao}=Array,Pl=qh("undefined");function $l(e){return e!==null&&!Pl(e)&&e.constructor!==null&&!Pl(e.constructor)&&ur(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rP=ps("ArrayBuffer");function JB(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rP(e.buffer),t}const ZB=qh("string"),ur=qh("function"),sP=qh("number"),zl=e=>e!==null&&typeof e=="object",eq=e=>e===!0||e===!1,Gf=e=>{if(!zl(e))return!1;const t=Tl(e);return(t===null||t===Object.prototype||Tl(t)===null)&&!vu(e,nP)&&!vu(e,Ku)},tq=e=>{if(!zl(e)||$l(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},nq=ps("Date"),rq=ps("File"),sq=e=>!!(e&&typeof e.uri<"u"),iq=e=>e&&typeof e.getParts<"u",aq=ps("Blob"),oq=ps("FileList"),lq=e=>zl(e)&&ur(e.pipe);function cq(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const pN=cq(),gN=typeof pN.FormData<"u"?pN.FormData:void 0,uq=e=>{if(!e)return!1;if(gN&&e instanceof gN)return!0;const t=Tl(e);if(!t||t===Object.prototype||!ur(e.append))return!1;const n=ub(e);return n==="formdata"||n==="object"&&ur(e.toString)&&e.toString()==="[object FormData]"},dq=ps("URLSearchParams"),[fq,hq,mq,pq]=["ReadableStream","Request","Response","Headers"].map(ps),gq=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gu(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ao(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if($l(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let c;for(r=0;r<o;r++)c=a[r],t.call(null,e[c],c,e)}}function iP(e,t){if($l(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Va=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,aP=e=>!Pl(e)&&e!==Va;function Yv(...e){const{caseless:t,skipUndefined:n}=aP(this)&&this||{},r={},i=(a,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const c=t&&typeof o=="string"&&iP(r,o)||o,d=hh(r,c)?r[c]:void 0;Gf(d)&&Gf(a)?r[c]=Yv(d,a):Gf(a)?r[c]=Yv({},a):ao(a)?r[c]=a.slice():(!n||!Pl(a))&&(r[c]=a)};for(let a=0,o=e.length;a<o;a++){const c=e[a];if(!c||$l(c)||(Gu(c,i),typeof c!="object"||ao(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let h=0;h<d.length;h++){const g=d[h];Eq.call(c,g)&&i(c[g],g)}}return r}const yq=(e,t,n,{allOwnKeys:r}={})=>(Gu(t,(i,a)=>{n&&ur(i)?Object.defineProperty(e,a,{__proto__:null,value:tP(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),xq=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vq=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},bq=(e,t,n,r)=>{let i,a,o;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Tl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},wq=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},jq=e=>{if(!e)return null;if(ao(e))return e;let t=e.length;if(!sP(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},_q=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Tl(Uint8Array)),Nq=(e,t)=>{const r=(e&&e[Ku]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Sq=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},kq=ps("HTMLFormElement"),Cq=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:Eq}=Object.prototype,Tq=ps("RegExp"),oP=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Gu(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},Pq=e=>{oP(e,(t,n)=>{if(ur(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(ur(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Aq=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return ao(e)?r(e):r(String(e).split(t)),n},Rq=()=>{},Oq=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Mq(e){return!!(e&&ur(e.append)&&e[nP]==="FormData"&&e[Ku])}const Lq=e=>{const t=new WeakSet,n=r=>{if(zl(r)){if(t.has(r))return;if($l(r))return r;if(!("toJSON"in r)){t.add(r);const i=ao(r)?[]:{};return Gu(r,(a,o)=>{const c=n(a);!Pl(c)&&(i[o]=c)}),t.delete(r),i}}return r};return n(e)},Dq=ps("AsyncFunction"),Iq=e=>e&&(zl(e)||ur(e))&&ur(e.then)&&ur(e.catch),lP=((e,t)=>e?setImmediate:t?((n,r)=>(Va.addEventListener("message",({source:i,data:a})=>{i===Va&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Va.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ur(Va.postMessage)),Fq=typeof queueMicrotask<"u"?queueMicrotask.bind(Va):typeof process<"u"&&process.nextTick||lP,cP=e=>e!=null&&ur(e[Ku]),Bq=e=>e!=null&&vu(e,Ku)&&cP(e),oe={isArray:ao,isArrayBuffer:rP,isBuffer:$l,isFormData:uq,isArrayBufferView:JB,isString:ZB,isNumber:sP,isBoolean:eq,isObject:zl,isPlainObject:Gf,isEmptyObject:tq,isReadableStream:fq,isRequest:hq,isResponse:mq,isHeaders:pq,isUndefined:Pl,isDate:nq,isFile:rq,isReactNativeBlob:sq,isReactNative:iq,isBlob:aq,isRegExp:Tq,isFunction:ur,isStream:lq,isURLSearchParams:dq,isTypedArray:_q,isFileList:oq,forEach:Gu,merge:Yv,extend:yq,trim:gq,stripBOM:xq,inherits:vq,toFlatObject:bq,kindOf:ub,kindOfTest:ps,endsWith:wq,toArray:jq,forEachEntry:Nq,matchAll:Sq,isHTMLForm:kq,hasOwnProperty:hh,hasOwnProp:hh,hasOwnInPrototypeChain:vu,getSafeProp:XB,reduceDescriptors:oP,freezeMethods:Pq,toObjectSet:Aq,toCamelCase:Cq,noop:Rq,toFiniteNumber:Oq,findKey:iP,global:Va,isContextDefined:aP,isSpecCompliantForm:Mq,toJSONObject:Lq,isAsyncFn:Dq,isThenable:Iq,setImmediate:lP,asap:Fq,isIterable:cP,isSafeIterable:Bq},qq=oe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Uq=e=>{const t={};let n,r,i;return e&&e.split(` 493`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&qq[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function $q(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const zq=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Vq=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function db(e,t){return oe.isArray(e)?e.map(n=>db(n,t)):$q(String(e).replace(t,""))}const Hq=e=>db(e,zq),Wq=e=>db(e,Vq);function uP(e){const t=Object.create(null);return oe.forEach(e.toJSON(),(n,r)=>{t[r]=Wq(n)}),t}const yN=Symbol("internals");function Ic(e){return e&&String(e).trim().toLowerCase()}function Yf(e){return e===!1||e==null?e:oe.isArray(e)?e.map(Yf):Hq(String(e))}function Kq(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Gq=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Mg(e,t,n,r,i){if(oe.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!oe.isString(t)){if(oe.isString(r))return t.indexOf(r)!==-1;if(oe.isRegExp(r))return r.test(t)}}function Yq(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Qq(e,t){const n=oe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}let Kn=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(c,d,h){const g=Ic(d);if(!g)return;const f=oe.findKey(i,g);(!f||i[f]===void 0||h===!0||h===void 0&&i[f]!==!1)&&(i[f||d]=Yf(c))}const o=(c,d)=>oe.forEach(c,(h,g)=>a(h,g,d));if(oe.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(oe.isString(t)&&(t=t.trim())&&!Gq(t))o(Uq(t),n);else if(oe.isObject(t)&&oe.isSafeIterable(t)){let c=Object.create(null),d,h;for(const g of t){if(!oe.isArray(g))throw new TypeError("Object iterator must return a key-value pair");h=g[0],oe.hasOwnProp(c,h)?(d=c[h],c[h]=oe.isArray(d)?[...d,g[1]]:[d,g[1]]):c[h]=g[1]}o(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Ic(t),t){const r=oe.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Kq(i);if(oe.isFunction(n))return n.call(this,i,r);if(oe.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ic(t),t){const r=oe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Mg(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Ic(o),o){const c=oe.findKey(r,o);c&&(!n||Mg(r,r[c],c,n))&&(delete r[c],i=!0)}}return oe.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||Mg(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return oe.forEach(this,(i,a)=>{const o=oe.findKey(r,a);if(o){n[o]=Yf(i),delete n[a];return}const c=t?Yq(a):String(a).trim();c!==a&&delete n[a],n[c]=Yf(i),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return oe.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&oe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` 494`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);
vendor: 4,524 bytes, line 494
494return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[yN]=this[yN]={accessors:{}}).accessors,i=this.prototype;function a(o){const c=Ic(o);r[c]||(Qq(i,o),r[c]=!0)}return oe.isArray(t)?t.forEach(a):a(t),this}};Kn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);oe.reduceDescriptors(Kn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});oe.freezeMethods(Kn);const Xq="[REDACTED ****]";function Jq(e){if(oe.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(oe.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Zq(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],i=a=>{if(a===null||typeof a!="object"||oe.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Kn&&(a=a.toJSON()),r.push(a);let o;if(oe.isArray(a))o=[],a.forEach((c,d)=>{const h=i(c);oe.isUndefined(h)||(o[d]=h)});else{if(!oe.isPlainObject(a)&&Jq(a))return r.pop(),a;o=Object.create(null);for(const[c,d]of Object.entries(a)){const h=n.has(c.toLowerCase())?Xq:i(d);oe.isUndefined(h)||(o[c]=h)}}return r.pop(),o};return i(e)}let Re=class dP extends Error{static from(t,n,r,i,a,o){const c=new dP(t.message,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(t,n,r,i,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&oe.hasOwnProp(t,"redact")?t.redact:void 0,r=oe.isArray(n)&&n.length>0?Zq(t,n):oe.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Re.ERR_BAD_OPTION="ERR_BAD_OPTION";Re.ECONNABORTED="ECONNABORTED";Re.ETIMEDOUT="ETIMEDOUT";Re.ECONNREFUSED="ECONNREFUSED";Re.ERR_NETWORK="ERR_NETWORK";Re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Re.ERR_DEPRECATED="ERR_DEPRECATED";Re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Re.ERR_CANCELED="ERR_CANCELED";Re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Re.ERR_INVALID_URL="ERR_INVALID_URL";Re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const e8=null,fP=100;function Qv(e){return oe.isPlainObject(e)||oe.isArray(e)}function hP(e){return oe.endsWith(e,"[]")?e.slice(0,-2):e}function Lg(e,t,n){return e?e.concat(t).map(function(i,a){return i=hP(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function t8(e){return oe.isArray(e)&&!e.some(Qv)}const n8=oe.toFlatObject(oe,{},null,function(t){return/^is[A-Z]/.test(t)});function Uh(e,t,n){if(!oe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=oe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,_){return!oe.isUndefined(_[j])});const r=n.metaTokens,i=n.visitor||w,a=n.dots,o=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,d=n.maxDepth===void 0?fP:n.maxDepth,h=c&&oe.isSpecCompliantForm(t),g=[];if(!oe.isFunction(i))throw new TypeError("visitor must be a function");function f(y){if(y===null)return"";if(oe.isDate(y))return y.toISOString();if(oe.isBoolean(y))return y.toString();if(!h&&oe.isBlob(y))throw new Re("Blob is not supported. Use a Buffer instead.");if(oe.isArrayBuffer(y)||oe.isTypedArray(y)){if(h&&typeof c=="function")return new c([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new Re("Blob is not supported. Use a Buffer instead.",Re.ERR_NOT_SUPPORT)}return y}function m(y){if(y>d)throw new Re("Object is too deeply nested ("+y+" levels). Max depth: "+d,Re.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(y,j){if(d===1/0)return JSON.stringify(y);const _=[];return JSON.stringify(y,function(C,S){if(!oe.isObject(S))return S;for(;_.length&&_[_.length-1]!==this;)_.pop();return _.push(S),m(j+_.length-1),S})}function w(y,j,_){let N=y;if(oe.isReactNative(t)&&oe.isReactNativeBlob(y))return t.append(Lg(_,j,a),f(y)),!1;if(y&&!_&&typeof y=="object"){if(oe.endsWith(j,"{}"))j=r?j:j.slice(0,-2),y=p(y,1);else if(oe.isArray(y)&&t8(y)||(oe.isFileList(y)||oe.endsWith(j,"[]"))&&(N=oe.toArray(y)))return j=hP(j),N.forEac
vendor: 4,197 bytes, line 494
494h(function(S,P){!(oe.isUndefined(S)||S===null)&&t.append(o===!0?Lg([j],P,a):o===null?j:j+"[]",f(S))}),!1}return Qv(y)?!0:(t.append(Lg(_,j,a),f(y)),!1)}const x=Object.assign(n8,{defaultVisitor:w,convertValue:f,isVisitable:Qv});function v(y,j,_=0){if(!oe.isUndefined(y)){if(m(_),g.indexOf(y)!==-1)throw new Error("Circular reference detected in "+j.join("."));g.push(y),oe.forEach(y,function(C,S){(!(oe.isUndefined(C)||C===null)&&i.call(t,C,oe.isString(S)?S.trim():S,j,x))===!0&&v(C,j?j.concat(S):[S],_+1)}),g.pop()}}if(!oe.isObject(e))throw new TypeError("data must be an object");return v(e),t}function xN(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function fb(e,t){this._pairs=[],e&&Uh(e,this,t)}const mP=fb.prototype;mP.append=function(t,n){this._pairs.push([t,n])};mP.toString=function(t){const n=t?r=>t.call(this,r,xN):xN;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function r8(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function pP(e,t,n){if(!t)return e;e=e||"";const r=oe.isFunction(n)?{serialize:n}:n,i=oe.getSafeProp(r,"encode")||r8,a=oe.getSafeProp(r,"serialize");let o;if(a?o=a(t,r):o=oe.isURLSearchParams(t)?t.toString():new fb(t,r).toString(i),o){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class vN{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){oe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const hb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},s8=typeof URLSearchParams<"u"?URLSearchParams:fb,i8=typeof FormData<"u"?FormData:null,a8=typeof Blob<"u"?Blob:null,o8={isBrowser:!0,classes:{URLSearchParams:s8,FormData:i8,Blob:a8},protocols:["http","https","file","blob","url","data"]},mb=typeof window<"u"&&typeof document<"u",Xv=typeof navigator=="object"&&navigator||void 0,l8=mb&&(!Xv||["ReactNative","NativeScript","NS"].indexOf(Xv.product)<0),c8=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",u8=mb&&window.location.href||"http://localhost",d8=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mb,hasStandardBrowserEnv:l8,hasStandardBrowserWebWorkerEnv:c8,navigator:Xv,origin:u8},Symbol.toStringTag,{value:"Module"})),Ln={...d8,...o8};function f8(e,t){return Uh(e,new Ln.classes.URLSearchParams,{visitor:function(n,r,i,a){return Ln.isNode&&oe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}const bN=fP;function gP(e){if(e>bN)throw new Re("FormData field is too deeply nested ("+e+" levels). Max depth: "+bN,Re.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h8(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)gP(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function m8(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function yP(e){function t(n,r,i,a){gP(a);let o=n[a++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),d=a>=n.length;return o=!o&&oe.isArray(i)?i.length:o,d?(oe.hasOwnProp(i,o)?i[o]=oe.isArray(i[o])?i[o].concat(r):[i[o],r]:i[o]=r,!c):((!oe.hasOwnProp(i,o)||!oe.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&oe.isArray(i[o])&&(i[o]=m8(i[o])),!c)}if(oe.isFormData(e)&&oe.isFunction(e.entries)){const n={};return oe.forEachEntry(e,(r,i)=>{t(h8(r),i,n,0)}),n}return null}const Ko=(e,t)=>e!=null&&oe.hasOwnProp(e,t)?e[t]:void 0;function p8(e,t,n){if(oe.isString(e))try{return(t||JSON.parse)(e),oe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Yu={transitional:hb,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=oe.isObject(t);
vendor: 10,502 bytes, line 494
494if(a&&oe.isHTMLForm(t)&&(t=new FormData(t)),oe.isFormData(t))return i?JSON.stringify(yP(t)):t;if(oe.isArrayBuffer(t)||oe.isBuffer(t)||oe.isStream(t)||oe.isFile(t)||oe.isBlob(t)||oe.isReadableStream(t))return t;if(oe.isArrayBufferView(t))return t.buffer;if(oe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Ko(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return f8(t,d).toString();if((c=oe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=Ko(this,"env"),g=h&&h.FormData;return Uh(c?{"files[]":t}:t,g&&new g,d)}}return a||i?(n.setContentType("application/json",!1),p8(t)):t}],transformResponse:[function(t){const n=Ko(this,"transitional")||Yu.transitional,r=n&&n.forcedJSONParsing,i=Ko(this,"responseType"),a=i==="json";if(oe.isResponse(t)||oe.isReadableStream(t))return t;if(t&&oe.isString(t)&&(r&&!i||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Ko(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Re.from(d,Re.ERR_BAD_RESPONSE,this,null,Ko(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ln.classes.FormData,Blob:Ln.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};oe.forEach(["delete","get","head","post","put","patch","query"],e=>{Yu.headers[e]={}});function Dg(e,t){const n=this||Yu,r=t||n,i=Kn.from(r.headers);let a=r.data;return oe.forEach(e,function(c){a=c.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function xP(e){return!!(e&&e.__CANCEL__)}let Qu=class extends Re{constructor(t,n,r){super(t??"canceled",Re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function vP(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Re("Request failed with status code "+n.status,n.status>=400&&n.status<500?Re.ERR_BAD_REQUEST:Re.ERR_BAD_RESPONSE,n.config,n.request,n))}function g8(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function y8(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),g=r[a];o||(o=h),n[i]=d,r[i]=h;let f=a,m=0;for(;f!==i;)m+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),h-o<t)return;const p=g&&h-g;return p?Math.round(m*1e3/p):void 0}}function x8(e,t){let n=0,r=1e3/t,i,a;const o=(h,g=Date.now())=>{n=g,i=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const g=Date.now(),f=g-n;f>=r?o(h,g):(i=h,a||(a=setTimeout(()=>{a=null,o(i)},r-f)))},()=>i&&o(i)]}const mh=(e,t,n=3)=>{let r=0;const i=y8(50,250);return x8(a=>{if(!a||typeof a.loaded!="number")return;const o=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(o,c):o,h=Math.max(0,d-r),g=i(h);r=Math.max(r,d);const f={loaded:d,total:c,progress:c?d/c:void 0,bytes:h,rate:g||void 0,estimated:g&&c?(c-d)/g:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},n)},wN=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},jN=e=>(...t)=>oe.asap(()=>e(...t)),v8=Ln.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ln.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ln.origin),Ln.navigator&&/(msie|trident)/i.test(Ln.navigator.userAgent)):()=>!0,b8=Ln.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];oe.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),oe.isString(r)&&c.push(`path=${r}`),oe.isString(i)&&c.push(`domain=${i}`),a===!0&&c.push("secure"),oe.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function w8(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function j8(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const _8=/^https?:(?!\/\/)/i,N8=/[\t\n\r]/g;function S8(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function k8(e){return S8(e).replace(N8,"")}function _N(e,t){if(typeof e=="string"&&_8.test(k8(e)))throw new Re('Invalid URL: missing "//" after protocol',Re.ERR_INVALID_URL,t)}function bP(e,t,n,r){_N(t,r);let i=!w8(t);return e&&(i||n===!1)?(_N(e,r),j8(e,t)):t}const NN=e=>e instanceof Kn?{...e}:e;function oo(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(g,f,m,p){return oe.isPlainObject(g)&&oe.isPlainObject(f)?oe.merge.call({caseless:p},g,f):oe.isPlainObject(f)?oe.merge({},f):oe.isArray(f)?f.slice():f}function i(g,f,m,p){if(oe.isUndefined(f)){if(!oe.isUndefined(g))return r(void 0,g,m,p)}else return r(g,f,m,p)}function a(g,f){if(!oe.isUndefined(f))return r(void 0,f)}function o(g,f){if(oe.isUndefined(f)){if(!oe.isUndefined(g))return r(void 0,g)}else return r(void 0,f)}function c(g){const f=oe.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!oe.isUndefined(f))if(oe.isPlainObject(f)){if(oe.hasOwnProp(f,g))return f[g]}else return;const m=oe.hasOwnProp(e,"transitional")?e.transitional:void 0;if(oe.isPlainObject(m)&&oe.hasOwnProp(m,g))return m[g]}function d(g,f,m){if(oe.hasOwnProp(t,m))return r(g,f);if(oe.hasOwnProp(e,m))return r(void 0,g)}const h={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:d,headers:(g,f,m)=>i(NN(g),NN(f),m,!0)};return oe.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const m=oe.hasOwnProp(h,f)?h[f]:i,p=oe.hasOwnProp(e,f)?e[f]:void 0,w=oe.hasOwnProp(t,f)?t[f]:void 0,x=m(p,w,f);oe.isUndefined(x)&&m!==d||(n[f]=x)}),oe.hasOwnProp(t,"validateStatus")&&oe.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(oe.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const C8=["content-type","content-length"];function E8(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{C8.includes(r.toLowerCase())&&e.set(r,i)})}const T8=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function wP(e){const t=oo({},e),n=m=>oe.hasOwnProp(t,m)?t[m]:void 0,r=n("data");let i=n("withXSRFToken");const a=n("xsrfHeaderName"),o=n("xsrfCookieName");let c=n("headers");const d=n("auth"),h=n("baseURL"),g=n("allowAbsoluteUrls"),f=n("url");if(t.headers=c=Kn.from(c),t.url=pP(bP(h,f,g,t),n("params"),n("paramsSerializer")),d){const m=oe.getSafeProp(d,"username")||"",p=oe.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(m+":"+(p?T8(p):"")))}catch(w){throw Re.from(w,Re.ERR_BAD_OPTION_VALUE,e)}}if(oe.isFormData(r)&&(Ln.hasStandardBrowserEnv||Ln.hasStandardBrowserWebWorkerEnv||oe.isReactNative(r)?c.setContentType(void 0):oe.isFunction(r.getHeaders)&&E8(c,r.getHeaders(),n("formDataHeaderPolicy"))),Ln.hasStandardBrowserEnv&&(oe.isFunction(i)&&(i=i(t)),i===!0||i==null&&v8(t.url))){const p=a&&o&&b8.read(o);p&&c.set(a,p)}return t}const P8=typeof XMLHttpRequest<"u",A8=P8&&function(e){return new Promise(function(n,r){const i=wP(e);let a=i.data;const o=Kn.from(i.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=i,g,f,m,p,w;function x(){p&&p(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(g),i.signal&&i.signal.removeEventListener("abort",g)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function y(){if(!v)return;const _=Kn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),C={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};vP(function(P){n(P),x()},function(P){r(P),x()},C),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(y)},v.onabort=function(){v&&(r(new Re("Request aborted",Re.ECONNABORTED,e,v)),x(),v=null)},v.onerror=function(N){const C=N&&N.message?N.message:"Network Error",S=new Re(C,Re.ERR_NETWORK,e,v);S.event=N||null,r(S),x(),v=null},v.ontimeout=function(){let N=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||hb;i.timeoutErrorMessage&&(N=i.timeoutErrorMessage),r(new Re(N,C.clarifyTimeoutError?Re.ETIMEDOUT:Re.ECONNABORTED,e,v)),x(),v=null},a===void 0&&o.setContentType(null),"setRequestHeader"in v&&oe.forEach(uP(o),function(N,C){v.setRequestHeader(C,N)}),oe.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),c&&c!=="json"&&(v.responseType=i.responseType),h&&([m,w]=mh(h,!0),v.addEventListener("progress",m)),d&&v.upload&&([f,p]=mh(d),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(g=_=>{v&&(r(!_||_.type?new Qu(null,e,v):_),v.abort(),x(),v=null)},i.cancelToken&&i.cancelToken.subscribe(g),i.signal&&(i.signal.aborted?g():i.signal.addEventListener("abort",g)));const j=g8(i.url);if(j&&!Ln.protocols.includes(j)){r(new Re("Unsupported protocol "+j+":",Re.ERR_BAD_REQUEST,e)),x();return}v.send(a||null)})},R8=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(d){if(!r){r=!0,o();const h=d instanceof Error?d:this.reason;n.abort(h instanceof Re?h:new Qu(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,i(new Re(`timeout of ${t}ms exceeded`,Re.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>
vendor: 3,081 bytes, line 494
494oe.asap(o),c},O8=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},M8=async function*(e,t){for await(const n of L8(e))yield*O8(n,t)},L8=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},SN=(e,t,n,r)=>{const i=M8(e,t);let a=0,o,c=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:h,value:g}=await i.next();if(h){c(),d.close();return}let f=g.byteLength;if(n){let m=a+=f;n(m)}d.enqueue(new Uint8Array(g))}catch(h){throw c(h),h}},cancel(d){return c(d),i.return()}},{highWaterMark:2})},ph=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,D8=(e,t,n)=>t+2<n&&ph(e.charCodeAt(t+1))&&ph(e.charCodeAt(t+2));function I8(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let o=r.length;const c=r.length;for(let p=0;p<c;p++)if(r.charCodeAt(p)===37&&p+2<c){const w=r.charCodeAt(p+1),x=r.charCodeAt(p+2);ph(w)&&ph(x)&&(o-=2,p+=2)}let d=0,h=c-1;const g=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);h>=0&&(r.charCodeAt(h)===61?(d++,h--):g(h)&&(d++,h-=3)),d===1&&h>=0&&(r.charCodeAt(h)===61||g(h))&&d++;const m=Math.floor(o/4)*3-(d||0);return m>0?m:0}let a=0;for(let o=0,c=r.length;o<c;o++){const d=r.charCodeAt(o);if(d===37&&D8(r,o,c))a+=1,o+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&o+1<c){const h=r.charCodeAt(o+1);h>=56320&&h<=57343?(a+=4,o++):a+=3}else a+=3}return a}const pb="1.18.1",kN=64*1024,{isFunction:kf}=oe,F8=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),CN=e=>{if(!oe.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},EN=(e,...t)=>{try{return!!e(...t)}catch{return!1}},B8=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},q8=e=>{const t=oe.global!==void 0&&oe.global!==null?oe.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=oe.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:a,Response:o}=e,c=i?kf(i):typeof fetch=="function",d=kf(a),h=kf(o);if(!c)return!1;const g=c&&kf(n),f=c&&(typeof r=="function"?(y=>j=>y.encode(j))(new r):async y=>new Uint8Array(await new a(y).arrayBuffer())),m=d&&g&&EN(()=>{let y=!1;const j=new a(Ln.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),_=j.headers.has("Content-Type");return j.body!=null&&j.body.cancel(),y&&!_}),p=h&&g&&EN(()=>oe.isReadableStream(new o("").body)),w={stream:p&&(y=>y.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!w[y]&&(w[y]=(j,_)=>{let N=j&&j[y];if(N)return N.call(j);throw new Re(`Response type '${y}' is not supported`,Re.ERR_NOT_SUPPORT,_)})});const x=async y=>{if(y==null)return 0;if(oe.isBlob(y))return y.size;if(oe.isSpecCompliantForm(y))return(await new a(Ln.origin,{method:"POST",body:y}
vendor: 10,700 bytes, lines 494-500
494).arrayBuffer()).byteLength;if(oe.isArrayBufferView(y)||oe.isArrayBuffer(y))return y.byteLength;if(oe.isURLSearchParams(y)&&(y=y+""),oe.isString(y))return(await f(y)).byteLength},v=async(y,j)=>{const _=oe.toFiniteNumber(y.getContentLength());return _??x(j)};return async y=>{let{url:j,method:_,data:N,signal:C,cancelToken:S,timeout:P,onDownloadProgress:R,onUploadProgress:L,responseType:D,headers:T,withCredentials:O="same-origin",fetchOptions:M,maxContentLength:U,maxBodyLength:z}=wP(y);const H=oe.isNumber(U)&&U>-1,Y=oe.isNumber(z)&&z>-1,G=K=>oe.hasOwnProp(y,K)?y[K]:void 0;let $=i||fetch;D=D?(D+"").toLowerCase():"text";let I=R8([C,S&&S.toAbortSignal()],P),B=null;const V=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let q,J=null;const te=()=>new Re("Request body larger than maxBodyLength limit",Re.ERR_BAD_REQUEST,y,B);try{let K;const Q=G("auth");if(Q){const Le=oe.getSafeProp(Q,"username")||"",at=oe.getSafeProp(Q,"password")||"";K={username:Le,password:at}}if(B8(j)){const Le=new URL(j,Ln.origin);if(!K&&(Le.username||Le.password)){const at=CN(Le.username),he=CN(Le.password);K={username:at,password:he}}(Le.username||Le.password)&&(Le.username="",Le.password="",j=Le.href)}if(K&&(T.delete("authorization"),T.set("Authorization","Basic "+btoa(F8((K.username||"")+":"+(K.password||""))))),H&&typeof j=="string"&&j.startsWith("data:")&&I8(j)>U)throw new Re("maxContentLength size of "+U+" exceeded",Re.ERR_BAD_RESPONSE,y,B);if(Y&&_!=="get"&&_!=="head"){const Le=await x(N);if(typeof Le=="number"&&isFinite(Le)&&(q=Le,Le>z))throw te()}const ne=Y&&(oe.isReadableStream(N)||oe.isStream(N)),se=(Le,at,he)=>SN(Le,kN,me=>{if(Y&&me>z)throw J=te();at&&at(me)},he);if(m&&_!=="get"&&_!=="head"&&(L||ne)){if(q=q??await v(T,N),q!==0||ne){let Le=new a(j,{method:"POST",body:N,duplex:"half"}),at;if(oe.isFormData(N)&&(at=Le.headers.get("content-type"))&&T.setContentType(at),Le.body){const[he,me]=L&&wN(q,mh(jN(L)))||[];N=se(Le.body,he,me)}}}else if(ne&&!d&&g&&_!=="get"&&_!=="head")N=se(N);else if(ne&&d&&!m&&_!=="get"&&_!=="head")throw new Re("Stream request bodies are not supported by the current fetch implementation",Re.ERR_NOT_SUPPORT,y,B);oe.isString(O)||(O=O?"include":"omit");const ce=d&&"credentials"in a.prototype;if(oe.isFormData(N)){const Le=T.getContentType();Le&&/^multipart\/form-data/i.test(Le)&&!/boundary=/i.test(Le)&&T.delete("content-type")}T.set("User-Agent","axios/"+pb,!1);const ye={...M,signal:I,method:_.toUpperCase(),headers:uP(T.normalize()),body:N,duplex:"half",credentials:ce?O:void 0};B=d&&new a(j,ye);let je=await(d?$(B,M):$(j,ye));const Fe=Kn.from(je.headers);if(H){const Le=oe.toFiniteNumber(Fe.getContentLength());if(Le!=null&&Le>U)throw new Re("maxContentLength size of "+U+" exceeded",Re.ERR_BAD_RESPONSE,y,B)}const Ye=p&&(D==="stream"||D==="response");if(p&&je.body&&(R||H||Ye&&V)){const Le={};["status","statusText","headers"].forEach(xe=>{Le[xe]=je[xe]});const at=oe.toFiniteNumber(Fe.getContentLength()),[he,me]=R&&wN(at,mh(jN(R),!0))||[];let Ee=0;const Pe=xe=>{if(H&&(Ee=xe,Ee>U))throw new Re("maxContentLength size of "+U+" exceeded",Re.ERR_BAD_RESPONSE,y,B);he&&he(xe)};je=new o(SN(je.body,kN,Pe,()=>{me&&me(),V&&V()}),Le)}D=D||"text";let et=await w[oe.findKey(w,D)||"text"](je,y);if(H&&!p&&!Ye){let Le;if(et!=null&&(typeof et.byteLength=="number"?Le=et.byteLength:typeof et.size=="number"?Le=et.size:typeof et=="string"&&(Le=typeof r=="function"?new r().encode(et).byteLength:et.length)),typeof Le=="number"&&Le>U)throw new Re("maxContentLength size of "+U+" exceeded",Re.ERR_BAD_RESPONSE,y,B)}return!Ye&&V&&V(),await new Promise((Le,at)=>{vP(Le,at,{data:et,headers:Kn.from(je.headers),status:je.status,statusText:je.statusText,config:y,request:B})})}catch(K){if(V&&V(),I&&I.aborted&&I.reason instanceof Re){const Q=I.reason;throw Q.config=y,B&&(Q.request=B),K!==Q&&Object.defineProperty(Q,"cause",{__proto__:null,value:K,writable:!0,enumerable:!1,configurable:!0}),Q}if(J)throw B&&!J.request&&(J.request=B),J;if(K instanceof Re)throw B&&!K.request&&(K.request=B),K;if(K&&K.name==="TypeError"&&/Load failed|fetch/i.test(K.message)){const Q=new Re("Network Error",Re.ERR_NETWORK,y,B,K&&K.response);throw Object.defineProperty(Q,"cause",{__proto__:null,value:K.cause||K,writable:!0,enumerable:!1,configurable:!0}),Q}throw Re.from(K,K&&K.code,y,B,K&&K.response)}}},U8=new Map,jP=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let o=a.length,c=o,d,h,g=U8;for(;c--;)d=a[c],h=g.get(d),h===void 0&&g.set(d,h=c?new Map:q8(t)),g=h;return h};jP();const gb={http:e8,xhr:A8,fetch:{get:jP}};oe.forEach(gb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const TN=e=>`- ${e}`,$8=e=>oe.isFunction(e)||e===null||e===!1;function z8(e,t){e=oe.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let o=0;o<n;o++){r=e[o];let c;if(i=r,!$8(r)&&(i=gb[(c=String(r)).toLowerCase()],i===void 0))throw new Re(`Unknown adapter '${c}'`);if(i&&(oe.isFunction(i)||(i=i.get(t))))break;a[c||"#"+o]=i}if(!i){const o=Object.entries(a).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?o.length>1?`since : 495`+o.map(TN).join(` 496`):" "+TN(o[0]):"as no adapter specified";throw new Re("There is no suitable adapter to dispatch the request "+c,Re.ERR_NOT_SUPPORT)}return i}const _P={getAdapter:z8,adapters:gb};function Ig(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qu(null,e)}function PN(e){return Ig(e),e.headers=Kn.from(e.headers),e.data=Dg.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_P.getAdapter(e.adapter||Yu.adapter,e)(e).then(function(r){Ig(e),e.response=r;try{r.data=Dg.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Kn.from(r.headers),r},function(r){if(!xP(r)&&(Ig(e),r&&r.response)){e.response=r.response;try{r.response.data=Dg.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Kn.from(r.response.headers)}return Promise.reject(r)})}const $h={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$h[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const AN={};$h.transitional=function(t,n,r){function i(a,o){return"[Axios v"+pb+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,c)=>{if(t===!1)throw new Re(i(o," has been removed"+(n?" in "+n:"")),Re.ERR_DEPRECATED);return n&&!AN[o]&&(AN[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,c):!0}};$h.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function V8(e,t,n){if(typeof e!="object"||e===null)throw new Re("options must be an object",Re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){const c=e[a],d=c===void 0||o(c,a,e);if(d!==!0)throw new Re("option "+a+" must be "+d,Re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Re("Unknown option "+a,Re.ERR_BAD_OPTION)}}const Qf={assertOptions:V8,validators:$h},Un=Qf.validators;let to=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vN,response:new vN}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=(()=>{if(!i.stack)return"";const o=i.stack.indexOf(` 497`);return o===-1?"":i.stack.slice(o+1)})();try{if(!r.stack)r.stack=a;else if(a){const o=a.indexOf(` 498`),c=o===-1?-1:a.indexOf(` 499`,o+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=` 500`+a)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=oo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&Qf.assertOptions(r,{silentJSONParsing:Un.transitional(Un.boolean),forcedJSONParsing:Un.transitional(Un.boolean),clarifyTimeoutError:Un.transitional(Un.boolean),legacyInterceptorReqResOrdering:Un.transitional(Un.boolean),advertiseZstdAcceptEncoding:Un.transitional(Un.boolean),validateStatusUndefinedResolves:Un.transitional(Un.boolean)},!1),i!=null&&(oe.isFunction(i)?n.paramsSerializer={serialize:i}:Qf.assertOptions(i,{encode:Un.function,serialize:Un.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Qf.assertOptions(n,{baseUrl:Un.spelling("baseURL"),withXsrfToken:Un.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&oe.merge(a.common,a[n.method]);a&&oe.forEach(["delete","get","head","post","put","patch","query","common"],w=>{delete a[w]}),n.headers=Kn.concat(o,a);const c=[];let d=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;d=d&&x.synchronous;const v=n.transitional||hb;v&&v.legacyInterceptorReqResOrdering?c.unshift(x.fulfilled,x.rejected):c.push(x.fulfilled,x.rejected)});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let g,f=0,m;if(!d){const w=[PN.bind(this),void 0];for(w.unshift(...c),w.push(...h),m=w.length,g=Promise.resolve(n);f<m;)g=g.then(w[f++],w[f++]);return g}m=c.length;let p=n;for(;f<m;){const w=c[f++],x=c[f++];try{p=w(p)}catch(v){x.call(this,v);break}}try{g=PN.call(this,p)}catch(w){return Promise.reject(w)}for(f=0,m=h.length;f<m;)g=g.then(h[f++],h[f++]);return g}getUri(t){t=oo(this.defaults,t);const n=bP(t.baseURL,t.url,t.allowAbsoluteUrls,t);return pP(n,t.params,t.paramsSerializer)}};oe.forEach(["delete","get","head","options"],function(t){to.prototype[t]=function(n,r){return this.request(oo(r||{},{method:t,url:n,data:r&&oe.hasOwnProp(r,"data")?r.data:void 0}))}});oe.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,o,c){return this.request(oo(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}to.prototype[t]=n(),t!=="query"&&(to.prototype[t+"Form"]=n(!0))});let H8=class NP{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(c=>{r.subscribe(c),a=c}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,c){r.reason||(r.reason=new Qu(a,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
500subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new NP(function(i){t=i}),cancel:t}}};function W8(e){return function(n){return e.apply(null,n)}}function K8(e){return oe.isObject(e)&&e.isAxiosError===!0}const Jv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Jv).forEach(([e,t])=>{Jv[t]=e});function SP(e){const t=new to(e),n=tP(to.prototype.request,t);return oe.extend(n,to.prototype,t,{allOwnKeys:!0}),oe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return SP(oo(e,i))},n}const cn=SP(Yu);cn.Axios=to;cn.CanceledError=Qu;cn.CancelToken=H8;cn.isCancel=xP;cn.VERSION=pb;cn.toFormData=Uh;cn.AxiosError=Re;cn.Cancel=cn.CanceledError;cn.all=function(t){return Promise.all(t)};cn.spread=W8;cn.isAxiosError=K8;cn.mergeConfig=oo;cn.AxiosHeaders=Kn;cn.formToJSON=e=>yP(oe.isHTMLForm(e)?new FormData(e):e);cn.getAdapter=_P.getAdapter;cn.HttpStatusCode=Jv;cn.default=cn;const{Axios:roe,AxiosError:soe,CanceledError:ioe,isCancel:aoe,CancelToken:ooe,VERSION:loe,all:coe,Cancel:uoe,isAxiosError:doe,spread:foe,toFormData:hoe,AxiosHeaders:moe,HttpStatusCode:poe,formToJSON:goe,getAdapter:yoe,mergeConfig:xoe,create:voe}=cn,kP=typeof window>"u",RN=!kP&&window.self!==window.top,G8=!kP&&typeof document>"u",CP=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),On=[];for(let e=0;e<256;++e)On.push((e+256).toString(16).slice(1));function Y8(e,t=0){return(On[e[t+0]]+On[e[t+1]]+On[e[t+2]]+On[e[t+3]]+"-"+On[e[t+4]]+On[e[t+5]]+"-"+On[e[t+6]]+On[e[t+7]]+"-"+On[e[t+8]]+On[e[t+9]]+"-"+On[e[t+10]]+On[e[t+11]]+On[e[t+12]]+On[e[t+13]]+On[e[t+14]]+On[e[t+15]]).toLowerCase()}let Fg;const Q8=new Uint8Array(16);function X8(){if(!Fg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Fg=crypto.getRandomValues.bind(crypto)}return Fg(Q8)}const J8=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ON={randomUUID:J8};function Z8(e,t,n){var i;e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??X8();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Y8(r)}function eU(e,t,n){return ON.randomUUID&&!e?ON.randomUUID():Z8(e)}const Fc=typeof window<"u"?window:{base44SharedInstances:{}};function tU(e,t){return Fc.base44SharedInstances||(Fc.base44SharedInstances={}),Fc.base44SharedInstances[e]||(Fc.base44SharedInstances[e]={instance:t()}),Fc.base44SharedInstances[e].instance}const nU="__user_heartbeat_event__",rU="__initialization_event__",sU="__session_duration_event__",MN="analytics-enable",LN="base44_analytics_session_id",iU={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},aU="analytics",Et=tU(aU,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...iU,...mU()}})),oU=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r,enabled:i})=>{var a;const{maxQueueSize:o,throttleTime:c,batchSize:d}=Et.config;if(!i||!(!((a=Et.config)===null||a===void 0)&&a.enabled)||G8)return{track:()=>{},cleanup:()=>{}};let h;const g=`${t}/api/apps/${n}/analytics/track/batch`,f=async N=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:N}})},m=N=>{try{const C=JSON.stringify({events:N}),S=new Blob([C],{type:"application/json"});return typeof navigator>"u"||C.length>6e4||!navigator.sendBeacon(g,S)}catch{return!1}},p=async(N,C={})=>
500{if(N.length===0)return;const S=await hU(r),P=N.map(fU(S));try{(!C.isBeacon||!m(P))&&await f(P)}catch{}},w=()=>{IN(p,{throttleTime:c,batchSize:d})},x=N=>{if(Et.requestsQueue.length>=o)return;const C=dU();Et.requestsQueue.push({...N,...C}),w()},v=()=>{IN(p,{throttleTime:c,batchSize:d}),h=FN(x),cU()},y=()=>{DN(),h==null||h(),uU(x);const N=Et.requestsQueue.splice(0);p(N,{isBeacon:!0})},j=()=>{typeof window>"u"||(document.visibilityState==="hidden"?y():document.visibilityState==="visible"&&v())},_=()=>{DN(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",j)};return w(),h=FN(x),lU(x),typeof window<"u"&&window.addEventListener("visibilitychange",j),{track:x,cleanup:_}};function DN(){Et.isProcessing=!1}async function IN(e,t){if(Et.isProcessing)return;Et.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;Et.isProcessing&&Et.requestsQueue.length>0;){const i=Et.requestsQueue.splice(0,r);i.length&&await e(i),await new Promise(a=>setTimeout(a,n))}Et.isProcessing=!1}function FN(e){var t;if(typeof window>"u"||Et.isHeartBeatProcessing||((t=Et.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Et.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:nU})},Et.config.heartBeatInterval);return()=>{clearInterval(n),Et.isHeartBeatProcessing=!1}}function lU(e){typeof window>"u"||Et.wasInitializationTracked||(Et.wasInitializationTracked=!0,e({eventName:rU,properties:{referrer:document==null?void 0:document.referrer}}))}function cU(){typeof window>"u"||Et.sessionStartTime!==null||(Et.sessionStartTime=new Date().toISOString())}function uU(e){if(typeof window>"u"||Et.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Et.sessionStartTime).getTime();Et.sessionStartTime=null,e({eventName:sU,properties:{sessionDuration:t}})}function dU(){var e,t;return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"&&(t=(e=window.location)===null||e===void 0?void 0:e.pathname)!==null&&t!==void 0?t:null}}function fU(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let Qc=null;function BN(){Et.sessionContext=null,Qc=null}async function hU(e){if(!Et.sessionContext){if(!e.hasToken())return{user_id:null,session_id:gh()};if(!Qc){const r=gh();Qc=e.me().then(i=>({user_id:i.id,session_id:r})).catch(()=>({user_id:null,session_id:r}))}const t=Qc,n=await t;return Qc===t&&(Et.sessionContext=n),n}return Et.sessionContext}function mU(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(MN);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(MN);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:t==="true"}}function qN(){var e;return(e=Et.fallbackSessionId)!==null&&e!==void 0?e:Et.fallbackSessionId=CP()}function gh(){if(typeof window>"u")return qN();try{const e=localStorage.getItem(LN);if(!e){const t=CP();return localStorage.setItem(LN,t),t}return e}catch{return qN()}}class EP extends Error{constructor(t,n,r,i,a){super(t),this.name="Base44Error",this.status=n,this.code=r,this.data=i,this.originalError=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function tl({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){const a=cn.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(a.defaults.headers.common.Authorization=`Bearer ${n}`),a.interceptors.request.use(o=>{typeof window<"u"&&(window.location&&o.headers.set("X-Origin-URL",window.location.href),o.headers.get("Authorization")||o.headers.set("X-Base44-Anonymous-Id",gh()));const c=eU();if(o.requestId=c,RN)try{window.parent.postMessage({type:"api-request-start",requestId:c,data:{url:e+o.url,method:o.method,body:o.data instanceof FormData?"[FormData object]":o.data}},"*")}catch{}return o}),r&&a.interceptors.response.use(o=>{var c;const d=(c=o.config)===null||c===void 0?void 0:c.requestId;try{RN&&d&&window.parent.postMessage({type:"api-request-end",requestId:d,data:{statusCode:o.status,response:o.data}},"*")}catch{}return o.data},o=>{var c,d,h,g,f,m,p,w,x,v,y,j,_,N,C;const S=((d=(c=o.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message)||((g=(h=o.response)===null||h===void 0?void 0:h.data)===null||g===void 0?void 0:g.detail)||o.message,P=new EP(S,(f=o.response)===null||f===void 0?void 0:f.status,(j=(w=(p=(m=o.response)===null||m===void 0?void 0:m.data)===null||p===void 0?void 0:p.code)!==null&&w!==void 0?w:(y=(v=(x=o.response)===null||x===void 0?void 0:x.headers)===null||v===void 0?void 0:v.get)===null||y===void 0?void 0:y.call(v,"x-base44-connector-error"))!==null&&j!==void 0?j:(N=(_=o.response)===null||_===void 0?void 0:_.headers)===null||N===void 0?void 0:N["x-base44-connector-error"],(C=o.response)===null||C===void 0?void 0:C.data,o);return i==null||i(P),Promise.reject(P)}),a}function UN(e){const{axios:t,appId:n,getSocket:r}=e;return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return gU(t,n,a,r)}})}function pU(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function gU(e,t,n,r){const i=`/apps/${t}/entities/${n}`;return{async list(a,o,c,d){const h={};
500return a&&(h.sort=a),o&&(h.limit=o),c&&(h.skip=c),d&&(h.fields=Array.isArray(d)?d.join(","):d),e.get(i,{params:h})},async filter(a,o,c,d,h){const g={q:JSON.stringify(a)};return o&&(g.sort=o),c&&(g.limit=c),d&&(g.skip=d),h&&(g.fields=Array.isArray(h)?h.join(","):h),e.get(i,{params:g})},async get(a){return e.get(`${i}/${a}`)},async create(a){return e.post(i,a)},async update(a,o){return e.put(`${i}/${a}`,o)},async delete(a){return e.delete(`${i}/${a}`)},async deleteMany(a){return e.delete(i,{data:a})},async bulkCreate(a){return e.post(`${i}/bulk`,a)},async updateMany(a,o){return e.patch(`${i}/update-many`,{query:a,data:o})},async bulkUpdate(a){return e.put(`${i}/bulk`,a)},async importEntities(a){const o=new FormData;return o.append("file",a,a.name),e.post(`${i}/import`,o,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(a){const o=`entities:${t}:${n}`;return r().subscribeToRoom(o,{update_model:h=>{var g;const f=pU(h.data);if(f){f.type!=="delete"&&(!((g=f.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${f.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${f.id}")\` to fetch the full record.`);try{a(f)}catch(m){console.error("[Base44 SDK] Subscription callback error:",m)}}}})}}}function yU(e,t){return{async call(n,r,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(r!=null&&r.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:a,queryParams:o,...c}=i??{},d={...c,...a&&{path_params:a},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,d)}}}function $N(e,t){const n=yU(e,t);return new Proxy({},{get(r,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(a,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return async c=>{if(typeof c=="string")throw new Error(`Integration ${o} must receive an object with named parameters, received: ${c}`);let d,h;return c instanceof FormData||c&&Object.values(c).some(g=>g instanceof File)?(d=new FormData,Object.keys(c).forEach(g=>{c[g]instanceof File?d.append(g,c[g],c[g].name):typeof c[g]=="object"&&c[g]!==null?d.append(g,JSON.stringify(c[g])):d.append(g,c[g])}),h="multipart/form-data"):(d=c,h="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${o}`,d||c,{headers:{"Content-Type":h}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${o}`,d||c,{headers:{"Content-Type":h}})}}})}})}function xU(){return typeof window>"u"?!1:window!==window.parent}function vU(e,t,n){const a=Math.round(window.screenX+(window.outerWidth-500)/2),o=Math.round(window.screenY+(window.outerHeight-600)/2),c=window.open(e,"base44_auth",`width=500,height=600,left=${a},top=${o},resizable=yes,scrollbars=yes`);if(!c)return;const d=()=>{window.removeEventListener("message",h),clearInterval(g),c.closed||c.close()},h=f=>{var m;if(f.origin!==n||f.source!==c||!(!((m=f.data)===null||m===void 0)&&m.access_token))return;d();const p=new URL(t),{access_token:w,is_new_user:x}=f.data;p.searchParams.set("access_token",w),x!=null&&p.searchParams.set("is_new_user",String(x)),window.location.href=p.toString()},g=setInterval(()=>{c.closed&&d()},500);window.addEventListener("message",h)}function bU(e,t,n,r){let i=null;const a=()=>{i=null};let o=!!r.token;return{hasToken(){return o},async me(){const c=i??e.get(`/apps/${n}/entities/User/me`).finally(()=>{i===c&&(i=null)});return i=c,c},async updateMe(c){return e.put(`/apps/${n}/entities/User/me`,c)},redirectToLogin(c){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const d=c?new URL(c,window.location.origin).toString():window.location.href,h=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(d)}`;window.location.href=h},loginWithProvider(c,d="/"){const h=new URL(d,window.location.origin).toString(),g=`app_id=${n}&from_url=${encodeURIComponent(h)}`;let f;c==="sso"?f=`/apps/${n}/auth/sso/login`:f=`/apps/auth${c==="google"?"":`/${c}`}/login`;const m=`${r.appBaseUrl}/api${f}?${g}`;if(xU()){const p=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return vU(p,h,window.location.origin)}window.location.href=m},logout(c){if(delete e.defaults.headers.common.Authorization,a(),BN(),o=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(g){console.error("Failed to remove token from localStorage:",g)}const d=c||window.location.href,h=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(d)}`;window.location.href=h}},setToken(c,d=!0){if(c&&(a(),BN(),o=!0,e.defaults.headers.common.Authorization=`Bearer ${c}`,t.defaults.headers.common.Authorization=`Bearer ${c}`,d&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",c),window.localStorage.setItem("token",c)}catch(h){console.error("Failed to save token to localStorage:",h)}},async loginViaEmailPassword(c,d,h){var g;try{const f=await e.post(`/apps/${n}/auth/login`,{email:c,password:d,...h&&{turnstile_token:h}}),{access_token:m,user:p}=f;return m&&this.setToken(m),{access_token:m,user:p}}catch(f){throw((g=f.response)===null||g===void 0?void 0:g.status)===401&&await this.logout(),f}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(c,d){return e.post(`/apps/${n}/users/invite-user`,{user_email:c,role:d})},register(c){return e.post(`/apps/${n}/auth/register`,c)},verifyOtp({email:c,otpCode:d}){return e.post(`/apps/${n}/auth/verify-otp`,{email:c,otp_code:d})},resendOtp(c){return e.post(`/apps/${n}/auth/resend-otp`,{email:c})},resetPasswordRequest(c){return e.post(`/apps/${n}/auth/reset-password-request`,{email:c})},resetPassword({resetToken:c,newPassword:d}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:c,new_password:d})},changePassword({userId:c,currentPassword:d,newPassword:h}){return e.post(`/apps/${n}/auth/change-password`,{user_id:c,current_password:d,new_password:h})}}}function wU(e,t){return{async getAccessToken(n){const r=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(r)},async getIdToken(n){const r=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(r)}}}const jU=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);
500function _U(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`)).access_token},async getConnection(n){var r;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async getWorkspaceConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(n)}`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`)).access_token},async getCurrentAppUserConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async callApi(n,r){return TP(n,"Integration type"),NU(e,`/apps/${t}/connectors/${encodeURIComponent(n)}/call`,r)}}}function TP(e,t){if(!e||typeof e!="string")throw new Error(`${t} is required and must be a string`)}async function NU(e,t,n){var r,i,a,o,c,d,h,g,f;if(!n||typeof n!="object")throw new Error("Request is required and must be an object");TP(n.path,"Request path");const m=(r=n.method)!==null&&r!==void 0?r:"GET";if(!jU.has(m))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const w=await e.post(t,{method:m,...n.host==null?{}:{host:n.host},path:n.path,query:(i=n.query)!==null&&i!==void 0?i:{},headers:(a=n.headers)!==null&&a!==void 0?a:{},body:(o=n.body)!==null&&o!==void 0?o:null});return{success:w.success,phase:w.phase,status:(c=w.status_code)!==null&&c!==void 0?c:null,data:w.data,dataBase64:(d=w.data_base64)!==null&&d!==void 0?d:null,contentType:(h=w.content_type)!==null&&h!==void 0?h:null,headers:(g=w.headers)!==null&&g!==void 0?g:{},creditsCharged:(f=w.credits_charged)!==null&&f!==void 0?f:0}}function SU(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}`)}}}function oi(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:i=!0}=e;let a=null;if(typeof window<"u"&&window.location)try{const o=new URLSearchParams(window.location.search);if(a=o.get(n),a){if(r&&PP(a,{storageKey:t}),i){o.delete(n);const c=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,c)}return a}}catch(o){console.error("Error retrieving token from URL:",o)}if(typeof window<"u"&&window.localStorage)try{return a=window.localStorage.getItem(t),a}catch(o){console.error("Error retrieving token from local storage:",o)}return null}function PP(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(r){return console.error("Error saving token to local storage:",r),!1}}function kU(e){const{storageKey:t="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage)return!1;try{return window.localStorage.removeItem(t),!0}catch(n){return console.error("Error removing token from local storage:",n),!1}}function CU(e,t){const{serverUrl:n,appId:r,loginPath:i="/login"}=t;if(!n||!r)throw new Error("serverUrl and appId are required to construct login URL");const a=encodeURIComponent(e||(typeof window<"u"?window.location.href:""));return`${n}${i}?from_url=${a}&app_id=${r}`}function zN(e,t,n){const r=(a,o)=>a?`${String(a).replace(/\/$/,"")}${o}`:o,i=a=>{const o=new Headers;if(n!=null&&n.getAuthHeaders){const c=n.getAuthHeaders();
500Object.entries(c).forEach(([d,h])=>{h!=null&&o.set(d,String(h))})}return a&&new Headers(a).forEach((c,d)=>{o.set(d,c)}),o};return{async invoke(a,o){if(typeof o=="string")throw new Error(`Function ${a} must receive an object with named parameters, received: ${o}`);let c,d;return o instanceof FormData||o&&Object.values(o).some(h=>h instanceof File)?(c=new FormData,Object.keys(o).forEach(h=>{o[h]instanceof File?c.append(h,o[h],o[h].name):typeof o[h]=="object"&&o[h]!==null?c.append(h,JSON.stringify(o[h])):c.append(h,o[h])}),d="multipart/form-data"):(c=o,d="application/json"),e.post(`/apps/${t}/functions/${a}`,c||o,{headers:{"Content-Type":d}})},async fetch(a,o={}){const d=`/functions${a.startsWith("/")?a:`/${a}`}`,h=i(o.headers),g={...o,headers:h};return await fetch(r(n==null?void 0:n.baseURL,d),g)}}}function VN({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){const a=`/apps/${n}/agents`,o={},c=()=>e.get(`${a}/conversations`),d=x=>e.get(`${a}/conversations/${x}`);return{getConversations:c,getConversation:d,listConversations:x=>e.get(`${a}/conversations`,{params:x}),createConversation:x=>e.post(`${a}/conversations`,x),addMessage:async(x,v)=>e.post(`${a}/conversations/v2/${x.id}/messages`,v),subscribeToConversation:(x,v)=>{const y=`/agent-conversations/${x}`,j=t(),_=d(x).then(N=>(o[x]=N,N));return j.subscribeToRoom(y,{connect:()=>{},update_model:async({data:N})=>{const C=JSON.parse(N);if(C._message){await _;const S=C._message,P=o[x];if(P){const R=P.messages||[],L=R.findIndex(T=>T.id===S.id),D=L!==-1?R.map((T,O)=>O===L?S:T):[...R,S];o[x]={...P,messages:D},v==null||v(o[x])}}}})},getWhatsAppConnectURL:x=>{const v=`${r}/api/apps/${n}/agents/${encodeURIComponent(x)}/whatsapp`,y=i??oi();return y?`${v}?token=${y}`:v},getTelegramConnectURL:x=>{const v=`${r}/api/apps/${n}/agents/${encodeURIComponent(x)}/telegram`,y=i??oi();return y?`${v}?token=${y}`:v}}}function HN({serverUrl:e,token:t,appId:n}){return{connection:()=>{var i;return{baseURL:`${e}/api/apps/${n}/ai/openai/v1`,token:(i=t??oi())!==null&&i!==void 0?i:""}}}}function WN(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(r){await e.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await e.get(n,{params:r})},async getStats(r={}){return await e.get(`${n}/stats`,{params:r})}}}function EU(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function TU(e,t){return{async inviteUser(n,r){if(r!=="user"&&r!=="admin")throw new Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}const Fs=Object.create(null);Fs.open="0";Fs.close="1";Fs.ping="2";Fs.pong="3";Fs.message="4";Fs.upgrade="5";Fs.noop="6";const Xf=Object.create(null);Object.keys(Fs).forEach(e=>{Xf[Fs[e]]=e});const Zv={type:"error",data:"parser error"},AP=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",RP=typeof ArrayBuffer=="function",OP=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,yb=({type:e,data:t},n,r)=>AP&&t instanceof Blob?n?r(t):KN(t,r):RP&&(t instanceof ArrayBuffer||OP(t))?n?r(t):KN(new Blob([t]),r):r(Fs[e]+(t||"")),KN=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function GN(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Bg;function PU(e,t){if(AP&&e.data instanceof Blob)return e.data.arrayBuffer().then(GN).then(t);if(RP&&(e.data instanceof ArrayBuffer||OP(e.data)))return t(GN(e.data));yb(e,!1,n=>{Bg||(Bg=new TextEncoder),t(Bg.encode(n))})}const YN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<YN.length;e++)Xc[YN.charCodeAt(e)]=e;const AU=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),g=new Uint8Array(h);for(r=0;r<n;r+=4)a=Xc[e.charCodeAt(r)],o=Xc[e.charCodeAt(r+1)],c=Xc[e.charCodeAt(r+2)],d=Xc[e.charCodeAt(r+3)],g[i++]=a<<2|o>>
vendor: 4,559 bytes, line 500
5004,g[i++]=(o&15)<<4|c>>2,g[i++]=(c&3)<<6|d&63;return h},RU=typeof ArrayBuffer=="function",xb=(e,t)=>{if(typeof e!="string")return{type:"message",data:MP(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:OU(e.substring(1),t)}:Xf[n]?e.length>1?{type:Xf[n],data:e.substring(1)}:{type:Xf[n]}:Zv},OU=(e,t)=>{if(RU){const n=AU(e);return MP(n,t)}else return{base64:!0,data:e}},MP=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},LP="�",MU=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((a,o)=>{yb(a,!1,c=>{r[o]=c,++i===n&&t(r.join(LP))})})},LU=(e,t)=>{const n=e.split(LP),r=[];for(let i=0;i<n.length;i++){const a=xb(n[i],t);if(r.push(a),a.type==="error")break}return r};function DU(){return new TransformStream({transform(e,t){PU(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let qg;function Cf(e){return e.reduce((t,n)=>t+n.length,0)}function Ef(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function IU(e,t){qg||(qg=new TextDecoder);const n=[];let r=0,i=-1,a=!1;return new TransformStream({transform(o,c){for(n.push(o);;){if(r===0){if(Cf(n)<1)break;const d=Ef(n,1);a=(d[0]&128)===128,i=d[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Cf(n)<2)break;const d=Ef(n,2);i=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Cf(n)<8)break;const d=Ef(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),g=h.getUint32(0);if(g>Math.pow(2,21)-1){c.enqueue(Zv);break}i=g*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Cf(n)<i)break;const d=Ef(n,i);c.enqueue(xb(a?d:qg.decode(d),t)),r=0}if(i===0||i>e){c.enqueue(Zv);break}}}})}const DP=4;function mn(e){if(e)return FU(e)}function FU(e){for(var t in mn.prototype)e[t]=mn.prototype[t];return e}mn.prototype.on=mn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};mn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};mn.prototype.off=mn.prototype.removeListener=mn.prototype.removeAllListeners=mn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};mn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};mn.prototype.emitReserved=mn.prototype.emit;mn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};mn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const zh=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),zr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),BU="arraybuffer";function IP(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const qU=zr.setTimeout,UU=zr.clearTimeout;function Vh(e,t){t.useNativeTimers?(e.setTimeoutFn=qU.bind(zr),e.clearTimeoutFn=UU.bind(zr)):(e.setTimeoutFn=zr.setTimeout.bind(zr),e.clearTimeoutFn=zr.clearTimeout.bind(zr))}const $U=1.33;function zU(e){return typeof e=="string"?VU(e):Math.ceil((e.byteLength||e.size)*$U)}function VU(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function FP(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function HU(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function WU(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let a=n[r].split("=");
vendor: 6,261 bytes, line 500
500t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class KU extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class vb extends mn{constructor(t){super(),this.writable=!1,Vh(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new KU(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=xb(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=HU(t);return n.length?"?"+n:""}}class GU extends vb{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};LU(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,MU(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=FP()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let BP=!1;try{BP=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const YU=BP;function QU(){}class XU extends GU{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class As extends mn{constructor(t,n,r){super(),this.createRequest=t,Vh(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=IP(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=As.requestsCount++,As.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=QU,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete As.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}As.requestsCount=0;As.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",QN);else if(typeof addEventListener=="function"){const e="onpagehide"in zr?"pagehide":"unload";addEventListener(e,QN,!1)}}function QN(){for(let e in As.requests)As.requests.hasOwnProperty(e)&&As.requests[e].abort()}const JU=(function(){const e=qP({xdomain:!1});return e&&e.responseType!==null})();class ZU extends XU{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=JU&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new As(qP,this.uri(),t)}}function qP(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||YU))return new XMLHttpRequest}catch{}if(!t)try{return new zr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const UP=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class e9 extends vb{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=UP?{}:IP(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}
vendor: 10,324 bytes, line 500
500this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;yb(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}i&&zh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=FP()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ug=zr.WebSocket||zr.MozWebSocket;class t9 extends e9{createSocket(t,n,r){return UP?new Ug(t,n,r):n?new Ug(t,n):new Ug(t)}doWrite(t,n){this.ws.send(n)}}class n9 extends vb{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=IU(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=DU();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&zh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const r9={websocket:t9,webtransport:n9,polling:ZU},s9=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i9=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function e0(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=s9.exec(e||""),a={},o=14;for(;o--;)a[i9[o]]=i[o]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=a9(a,a.path),a.queryKey=o9(a,a.query),a}function a9(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function o9(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,a){i&&(n[i]=a)}),n}const t0=typeof addEventListener=="function"&&typeof removeEventListener=="function",Jf=[];t0&&addEventListener("offline",()=>{Jf.forEach(e=>e())},!1);class oa extends mn{constructor(t,n){if(super(),this.binaryType=BU,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=e0(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=e0(n.host).host);Vh(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=WU(this.opts.query)),t0&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Jf.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=DP,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&oa.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",oa.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=zU(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,zh(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(oa.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),t0&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Jf.indexOf(this._offlineEventListener);r!==-1&&Jf.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}oa.protocol=DP;class l9 extends oa{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;oa.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;oa.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}
vendor: 10,982 bytes, line 500
500]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function a(){r||(r=!0,g(),n.close(),n=null)}const o=f=>{const m=new Error("probe error: "+f);m.transport=n.name,a(),this.emitReserved("upgradeError",m)};function c(){o("transport closed")}function d(){o("socket closed")}function h(f){n&&f.name!==n.name&&a()}const g=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",i),n.once("error",o),n.once("close",c),this.once("close",d),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let c9=class extends l9{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>r9[i]).filter(i=>!!i)),super(t,r)}};function u9(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=e0(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const d9=typeof ArrayBuffer=="function",f9=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,$P=Object.prototype.toString,h9=typeof Blob=="function"||typeof Blob<"u"&&$P.call(Blob)==="[object BlobConstructor]",m9=typeof File=="function"||typeof File<"u"&&$P.call(File)==="[object FileConstructor]";function bb(e){return d9&&(e instanceof ArrayBuffer||f9(e))||h9&&e instanceof Blob||m9&&e instanceof File}function Zf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Zf(e[n]))return!0;return!1}if(bb(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Zf(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Zf(e[n]))return!0;return!1}function p9(e){const t=[],n=e.data,r=e;return r.data=n0(n,t),r.attachments=t.length,{packet:r,buffers:t}}function n0(e,t){if(!e)return e;if(bb(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=n0(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=n0(e[r],t));return n}return e}function g9(e,t){return e.data=r0(e.data,t),delete e.attachments,e}function r0(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=r0(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=r0(e[n],t));return e}const zP=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],y9=5;var mt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(mt||(mt={}));class x9{constructor(t){this.replacer=t}encode(t){return(t.type===mt.EVENT||t.type===mt.ACK)&&Zf(t)?this.encodeAsBinary({type:t.type===mt.EVENT?mt.BINARY_EVENT:mt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===mt.BINARY_EVENT||t.type===mt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=p9(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class wb extends mn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===mt.BINARY_EVENT;r||n.type===mt.BINARY_ACK?(n.type=r?mt.EVENT:mt.ACK,this.reconstructor=new v9(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(bb(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(mt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===mt.BINARY_EVENT||r.type===mt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(a,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(o);if(!VP(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const a=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(wb.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case mt.CONNECT:return yh(n);case mt.DISCONNECT:return n===void 0;case mt.CONNECT_ERROR:return typeof n=="string"||yh(n);case mt.EVENT:case mt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&zP.indexOf(n[0])===-1);case mt.ACK:case mt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class v9{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=g9(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function b9(e){return typeof e=="string"}const VP=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function w9(e){return e===void 0||VP(e)}function yh(e){return Object.prototype.toString.call(e)==="[object Object]"}function j9(e,t){switch(e){case mt.CONNECT:return t===void 0||yh(t);case mt.DISCONNECT:return t===void 0;case mt.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&zP.indexOf(t[0])===-1);case mt.ACK:return Array.isArray(t);case mt.CONNECT_ERROR:return typeof t=="string"||yh(t);default:return!1}}function _9(e){return b9(e.nsp)&&w9(e.id)&&j9(e.type,e.data)}const N9=Object.freeze(Object.defineProperty({__proto__:null,Decoder:wb,Encoder:x9,get PacketType(){return mt},isPacketValid:_9,protocol:y9},Symbol.toStringTag,{value:"Module"}));function ls(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const S9=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class HP extends mn{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ls(t,"open",this.onopen.bind(this)),ls(t,"packet",this.onpacket.bind(this)),ls(t,"error",this.onerror.bind(this)),ls(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,a;if(S9.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:mt.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,f=n.pop();this._registerAckCallback(g,f),o.id=g}const c=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const a=(o,c)=>o?i(o):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...a)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:mt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}
vendor: 7,087 bytes, line 500
500_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case mt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case mt.EVENT:case mt.BINARY_EVENT:this.onevent(t);break;case mt.ACK:case mt.BINARY_ACK:this.onack(t);break;case mt.DISCONNECT:this.ondisconnect();break;case mt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:mt.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:mt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Vl(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Vl.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Vl.prototype.reset=function(){this.attempts=0};Vl.prototype.setMin=function(e){this.ms=e};Vl.prototype.setMax=function(e){this.max=e};Vl.prototype.setJitter=function(e){this.jitter=e};class s0 extends mn{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Vh(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Vl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||N9;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new c9(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ls(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},o=ls(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ls(t,"ping",this.onping.bind(this)),ls(t,"data",this.ondata.bind(this)),ls(t,"error",this.onerror.bind(this)),ls(t,"close",this.onclose.bind(this)),ls(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){zh(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new HP(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}
500cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Bc={};function eh(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=u9(e,t.path||"/socket.io"),r=n.source,i=n.id,a=n.path,o=Bc[i]&&a in Bc[i].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let d;return c?d=new s0(r,t):(Bc[i]||(Bc[i]=new s0(r,t)),d=Bc[i]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(eh,{Manager:s0,Socket:HP,io:eh,connect:eh});const k9=250;function XN(e,t){var n;const r=(n=e.token)!==null&&n!==void 0?n:oi(),i={app_id:e.appId,token:r};r||(i.anonymous_id=gh());const a=eh(e.serverUrl,{path:e.mountPath,transports:e.transports,query:i});return a.on("connect",async()=>{var o;return console.log("connect",a.id),(o=t.connect)===null||o===void 0?void 0:o.call(t)}),a.on("update_model",async o=>{var c;return(c=t.update_model)===null||c===void 0?void 0:c.call(t,o)}),a.on("error",async o=>{var c;return(c=t.error)===null||c===void 0?void 0:c.call(t,o)}),a.on("connect_error",async o=>{var c;return console.error("connect_error",o),(c=t.error)===null||c===void 0?void 0:c.call(t,o)}),a}function C9({config:e}){let t={...e};const n={},r={},i={connect:async()=>{const y=[];Object.keys(n).forEach(j=>{const _=m(j);_.length!==0&&(h(j),_.forEach(({connect:N})=>{const C=async()=>N==null?void 0:N();y.push(C())}))}),await Promise.all(y)},update_model:async y=>{const _=m(y.room).map(N=>{var C;return(C=N.update_model)===null||C===void 0?void 0:C.call(N,y)});await Promise.all(_)},error:async y=>{console.error("error",y);const j=Object.values(n).flat().map(_=>{var N;return(N=_.error)===null||N===void 0?void 0:N.call(_,y)});await Promise.all(j)}};let a=XN(e,i);function o(){c()}function c(){w(),a&&a.disconnect()}function d(y){o(),t={...t,...y},a=XN(t,i)}function h(y){a.emit("join",y)}
500function g(y){a.emit("leave",y)}async function f(y,j){var _;const N=JSON.stringify(j);return(_=i.update_model)===null||_===void 0?void 0:_.call(i,{room:y,data:N})}function m(y){var j;return(j=n[y])!==null&&j!==void 0?j:[]}function p(y){const j=r[y];j&&(clearTimeout(j),delete r[y])}function w(){Object.keys(r).forEach(y=>{var j,_;clearTimeout(r[y]),delete r[y],((_=(j=n[y])===null||j===void 0?void 0:j.length)!==null&&_!==void 0?_:0)===0&&delete n[y]})}function x(y){p(y),r[y]=setTimeout(()=>{var j,_;delete r[y],!(((_=(j=n[y])===null||j===void 0?void 0:j.length)!==null&&_!==void 0?_:0)>0)&&(g(y),delete n[y])},k9)}return{socket:a,subscribeToRoom:(y,j)=>{n[y]?p(y):(h(y),n[y]=[]),n[y].push(j);let _=!1;return()=>{var N,C;_||(_=!0,n[y]=(C=(N=n[y])===null||N===void 0?void 0:N.filter(S=>S!==j))!==null&&C!==void 0?C:[],n[y].length===0&&x(y))}},updateConfig:d,updateModel:f,disconnect:c}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` 501 PartySocket requires a global 'EventTarget' class to be available! 502 You can polyfill this global by adding this to your code before any partysocket imports: 503 504 \`\`\` 505 import 'partysocket/event-target-polyfill'; 506 \`\`\` 507 Please file an issue at https://github.com/partykit/partykit if you're still having trouble. 508`);var WP=class extends Event{constructor(t,n){super("error",n);It(this,"message");It(this,"error");this.message=t.message,this.error=t}},KP=class extends Event{constructor(t=1e3,n="",r){super("close",r);It(this,"code");It(this,"reason");It(this,"wasClean",!0);this.code=t,this.reason=n}},$g={Event,ErrorEvent:WP,CloseEvent:KP};function E9(e,t){if(!e)throw new Error(t)}function T9(e){return new e.constructor(e.type,e)}function P9(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new KP(e.code||1999,e.reason||"unknown reason",e):"error"in e?new WP(e.error,e):new Event(e.type,e)}var VE,A9=typeof process<"u"&&typeof((VE=process.versions)==null?void 0:VE.node)<"u"&&typeof document>"u",Tf=A9?P9:T9,Ia={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},JN=!1,R9=class Ba extends EventTarget{constructor(n,r,i={}){super();It(this,"_ws");It(this,"_retryCount",-1);It(this,"_uptimeTimeout");It(this,"_connectTimeout");It(this,"_shouldReconnect",!0);It(this,"_connectLock",!1);It(this,"_binaryType","blob");It(this,"_closeCalled",!1);It(this,"_messageQueue",[]);It(this,"_url");It(this,"_protocols");It(this,"_options");It(this,"onclose",null);It(this,"onerror",null);It(this,"onmessage",null);It(this,"onopen",null);It(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:r=Ia.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),r),E9(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(i=>{var a;return(a=this._ws)==null?void 0:a.send(i)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(Tf(n))});It(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(Tf(n))});It(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(Tf(n)),this._connect()});It(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(Tf(n))});this._url=n,this._protocols=r,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Ba.CONNECTING}get OPEN(){return Ba.OPEN}get CLOSING(){return Ba.CLOSING}get CLOSED(){return Ba.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((r,i)=>(typeof i=="string"?r+=i.length:i instanceof Blob?r+=i.size:r+=i.byteLength,r),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Ba.CLOSED:Ba.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,r){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,r)}reconnect(n,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,r),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:r=Ia.maxEnqueuedMessages}=this._options;this._messageQueue.length<r&&(this._debug("enqueue",n),this._messageQueue.push(n))}}_debug(...n){this._options.debug&&console.log.apply(console,["RWS>",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=Ia.reconnectionDelayGrowFactor,minReconnectionDelay:r=Ia.minReconnectionDelay,maxReconnectionDelay:i=Ia.maxReconnectionDelay}=this._options;let a=0;return this._retryCount>0&&(a=r*Math.pow(n,this._retryCount-1),a>i&&(a=i)),this._debug("next delay",a),a}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const r=n();if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(r.then)return r}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const r=n();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;
508const{maxRetries:n=Ia.maxRetries,connectionTimeout:r=Ia.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([i,a])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!JN&&(console.error(`â¼ï¸ No WebSocket implementation available. You should define options.WebSocket. 509 510For example, if you're using node.js, run \`npm install ws\`, and then in your code: 511 512import PartySocket from 'partysocket'; 513import WS from 'ws'; 514 515const partysocket = new PartySocket({ 516 host: "127.0.0.1:1999", 517 room: "test-room", 518 WebSocket: WS 519}); 520 521`),JN=!0);const o=this._options.WebSocket||WebSocket;this._debug("connect",{url:i,protocols:a}),this._ws=a?new o(i,a):new o(i),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),r)}).catch(i=>{this._connectLock=!1,this._handleError(new $g.ErrorEvent(Error(i.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new $g.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,r){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,r),this._handleClose(new $g.CloseEvent(n,r,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! 522 * Reconnecting WebSocket 523 * by Pedro Ladaria <[email protected]> 524 * https://github.com/pladaria/reconnecting-websocket 525 * License MIT 526 */const O9=1e3,M9=3e3,L9=new Set([405,409,422,503]),D9=new Set([400,403,404]);function I9(e){const t=e&&typeof e=="object"?e.status:void 0;return typeof t=="number"?t:void 0}function F9(e){return e instanceof Error?e:new Error(String(e))}class B9{constructor(t,n,r,i,a){var o;this.onClose=a,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=(o=i==null?void 0:i.id)!==null&&o!==void 0?o:crypto.randomUUID();let c=r.transport==="proxy";const d=async()=>{var m;if(this.closed)throw new Error("Actor connection is closed");if(!c)try{const{websocket_url:p,token:w}=await r.mintConnectionToken(t,n,this.id),x=p.includes("?")?"&":"?";return`${p}${x}token=${encodeURIComponent(w)}`}catch(p){const w=I9(p);if(!(r.transport!=="direct"&&w!==void 0&&L9.has(w))){w!==void 0&&D9.has(w)&&this.close();try{(m=r.onMintError)===null||m===void 0||m.call(r,F9(p))}catch{}throw p}c=!0}return U9(r.host,t,n,this.id,r.appId,r.getAuthToken(),r.functionsVersion)},h=new R9(d);this.ws=h;let g=Date.now();const f=()=>{g=Date.now()};h.addEventListener("open",f),h.addEventListener("message",m=>{f();let p;try{p=JSON.parse(m.data)}catch{return}if((p&&typeof p=="object"?p.type:void 0)!=="__pong")for(const x of this.listeners)x(p)}),this.heartbeat=setInterval(()=>{if(Date.now()-g>M9){f(),h.readyState===h.OPEN&&h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},O9)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.closed||this.ws.send(JSON.stringify(t))}close(){this.closed||(this.closed=!0,this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose())}}function q9(e,t,n,r){let i=null;return{connect(a){if(i)return i;const o=new B9(e,t,n,a,()=>{r.delete(o),i===o&&(i=null)});return i=o,r.add(o),o}}}function U9(e,t,n,r,i,a,o){let c=e.replace(/^(http|https|ws|wss):\/\//,"");c.endsWith("/")&&(c=c.slice(0,-1));const d=c.startsWith("localhost:")||c.startsWith("127.0.0.1:")||c.startsWith("192.168.")||c.startsWith("10.")||c.startsWith("172.")&&c.split(".")[1]>="16"&&c.split(".")[1]<="31"||c.startsWith("[::ffff:7f00:1]:"),h=new URLSearchParams([["_pk",r],["app_id",i],["handler",t]]);return a&&h.append("token",a),o&&h.append("fv",o),`${d?"ws":"wss"}://${c}/parties/${t}/${n}?${h}`}function $9(e,t){return e&&!e.startsWith("/")?e:t??e}function z9(e){const t=new Set;return{module:new Proxy({}
526,{get(r,i){if(!(typeof i!="string"||i==="then"))return a=>q9(i,a,e,t)}}),closeAll:()=>{for(const r of[...t])r.close()}}}function jb(e){var t,n,r,i;const{serverUrl:a="https://base44.app",appId:o,analytics:c,token:d,serviceToken:h,requiresAuth:g=!1,appBaseUrl:f,options:m,functionsVersion:p,headers:w}=e,x=typeof f=="string"?f:"",v={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:o,token:d};let y=null;const j=()=>(y||(y=C9({config:v})),y),_={...w,"X-App-Id":String(o)},N=p?{..._,"Base44-Functions-Version":p}:_,C=tl({baseURL:`${a}/api`,headers:_,token:d,onError:m==null?void 0:m.onError}),S=tl({baseURL:`${a}/api`,headers:N,token:d,interceptResponses:!1,onError:m==null?void 0:m.onError}),P={..._,...d?{"on-behalf-of":`Bearer ${d}`}:{}},R=tl({baseURL:`${a}/api`,headers:P,token:h,onError:m==null?void 0:m.onError}),L=tl({baseURL:`${a}/api`,headers:N,token:h,interceptResponses:!1}),D=tl({baseURL:`${a}/api`,headers:_}),T=bU(C,S,o,{appBaseUrl:x,token:d});if(typeof window<"u"){const H=d||oi();H&&T.setToken(H)}const O=z9({appId:o,host:$9(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:p,getAuthToken:()=>d||oi(),mintConnectionToken:async(H,Y,G)=>{const $=d||oi();return await D.post(`/apps/${o}/actors/${encodeURIComponent(H)}/connection-token`,{room:Y,connection_id:G},{headers:{...$?{Authorization:`Bearer ${$}`}:{},...p?{"Base44-Functions-Version":p}:{}}})},transport:m==null?void 0:m.actorsTransport,onMintError:m==null?void 0:m.onError}),M={entities:UN({axios:C,appId:o,getSocket:j}),integrations:$N(C,o),connectors:SU(C,o),auth:T,functions:zN(S,o,{getAuthHeaders:()=>{const H={},Y=d||oi();return Y&&(H.Authorization=`Bearer ${Y}`),H},baseURL:(n=S.defaults)===null||n===void 0?void 0:n.baseURL}),agents:VN({axios:C,getSocket:j,appId:o,serverUrl:a,token:d}),aiGateway:HN({serverUrl:a,token:d,appId:o}),appLogs:WN(C,o),app:EU(C,o),users:TU(C,o),analytics:oU({axiosClient:C,serverUrl:a,appId:o,userAuthModule:T,enabled:(r=c==null?void 0:c.enabled)!==null&&r!==void 0?r:!0}),actors:O.module,cleanup:()=>{M.analytics.cleanup(),O.closeAll(),y&&y.disconnect()}},U={entities:UN({axios:R,appId:o,getSocket:j}),integrations:$N(R,o),sso:wU(R,o),connectors:_U(R,o),functions:zN(L,o,{getAuthHeaders:()=>{const H={};return h&&(H.Authorization=`Bearer ${h}`),H},baseURL:(i=L.defaults)===null||i===void 0?void 0:i.baseURL}),agents:VN({axios:R,getSocket:j,appId:o,serverUrl:a,token:d}),aiGateway:HN({serverUrl:a,token:h,appId:o}),appLogs:WN(R,o),cleanup:()=>{y&&y.disconnect()}};return g&&typeof window<"u"&&setTimeout(async()=>{try{await M.auth.isAuthenticated()||M.auth.redirectToLogin(window.location.href)}catch(H){console.error("Authentication check failed:",H),M.auth.redirectToLogin(window.location.href)}},0),{...M,setToken(H){M.auth.setToken(H),y&&y.updateConfig({token:H}),v.token=H},getConfig(){return{serverUrl:a,appId:o,requiresAuth:g}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return U}}}function V9(e){const t=e.headers.get("Authorization"),n=e.headers.get("Base44-Service-Authorization"),r=e.headers.get("Base44-App-Id"),i=e.headers.get("Base44-Api-Url"),a=e.headers.get("Base44-Functions-Version"),o=e.headers.get("Base44-State"),c=e.headers.get("X-Data-Env");if(!r)throw new Error("Base44-App-Id header is required, but is was not found on the request");let d,h;if(n!==null){if(n===""||!n.startsWith("Bearer ")||n.split(" ").length!==2)throw new Error('Invalid authorization header format. Expected "Bearer <token>"');d=n.split(" ")[1]}if(t!==null){if(t===""||!t.startsWith("Bearer ")||t.split(" ").length!==2)throw new Error('Invalid authorization header format. Expected "Bearer <token>"');h=t.split(" ")[1]}const g={};return o&&(g["Base44-State"]=o),(c==="dev"||c==="prod")&&(g["X-Data-Env"]=c),jb({serverUrl:i||"https://base44.app",appId:r,token:h,serviceToken:d,functionsVersion:a??void 0,headers:g})}class H9{constructor(){this.tickIntervalMs=100}handleStart(){}handleWake(t){}schedule(t,n){throw new Error("Actor.schedule() is only available inside a deployed actor")}cancelSchedule(t){throw new Error("Actor.cancelSchedule() is only available inside a deployed actor")}broadcast(t){throw new Error("Actor.broadcast() is only available inside a deployed actor")}getConnections(){throw new Error("Actor.getConnections() is only available inside a deployed actor")}get instanceId(){throw new Error("Actor.instanceId is only available inside a deployed actor")}get storage(){throw new Error("Actor.storage is only available inside a deployed actor")}get client(){throw new Error("Actor.client is only available inside a deployed actor")}}const W9=Object.freeze(Object.defineProperty({__proto__:null,Actor:H9,Base44Error:EP,createClient:jb,createClientFromRequest:V9,getAccessToken:oi,getLoginUrl:CU,removeAccessToken:kU,saveAcce
526ssToken:PP},Symbol.toStringTag,{value:"Module"})),GP=typeof window>"u",K9=GP?{localStorage:new Map}:window,au=K9.localStorage,G9=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Go=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(GP)return t;const r=`base44_${G9(e)}`,i=new URLSearchParams(window.location.search),a=i.get(e);if(n){i.delete(e);const c=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,c)}if(a)return au.setItem(r,a),a;if(t)return au.setItem(r,t),t;const o=au.getItem(r);return o||null},Y9=()=>(Go("clear_access_token")==="true"&&(au.removeItem("base44_access_token"),au.removeItem("token")),{appId:Go("app_id",{defaultValue:"68eab176214c38838029465f"}),serverUrl:Go("server_url",{defaultValue:"https://base44.app"}),token:Go("access_token",{removeFromUrl:!0}),fromUrl:Go("from_url",{defaultValue:window.location.href}),functionsVersion:Go("functions_version")}),nl={...Y9()},{appId:Q9,serverUrl:X9,token:J9,functionsVersion:Z9}=nl,ie=jb({appId:Q9,serverUrl:X9,token:J9,functionsVersion:Z9,requiresAuth:!1}),YP=E.createContext(),e$=({children:e})=>{const[t,n]=E.useState(null),[r,i]=E.useState(!1),[a,o]=E.useState(!0),[c,d]=E.useState(!0),[h,g]=E.useState(null),[f,m]=E.useState(null);E.useEffect(()=>{p()},[]);const p=async()=>{var y,j;try{d(!0),g(null);const _=tl({baseURL:`${nl.serverUrl}/api/apps/public`,headers:{"X-App-Id":nl.appId},token:nl.token,interceptResponses:!0});try{const N=await _.get(`/prod/public-settings/by-id/${nl.appId}`);m(N),nl.token?await w():(o(!1),i(!1)),d(!1)}catch(N){if(console.error("App state check failed:",N),N.status===403&&((j=(y=N.data)==null?void 0:y.extra_data)!=null&&j.reason)){const C=N.data.extra_data.reason;g(C==="auth_required"?{type:"auth_required",message:"Authentication required"}:C==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:C,message:N.message})}else g({type:"unknown",message:N.message||"Failed to load app"});d(!1),o(!1)}}catch(_){console.error("Unexpected error:",_),g({type:"unknown",message:_.message||"An unexpected error occurred"}),d(!1),o(!1)}},w=async()=>{try{o(!0);const y=await ie.auth.me();n(y),i(!0),o(!1)}catch(y){console.error("User auth check failed:",y),o(!1),i(!1),(y.status===401||y.status===403)&&g({type:"auth_required",message:"Authentication required"})}},x=(y=!0)=>{n(null),i(!1),y?ie.auth.logout(window.location.href):ie.auth.logout()},v=()=>{ie.auth.redirectToLogin(window.location.href)};return s.jsx(YP.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:a,isLoadingPublicSettings:c,authError:h,appPublicSettings:f,logout:x,navigateToLogin:v,checkAppState:p},children:e})},QP=()=>{const e=E.useContext(YP);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},t$="",n$="https://media.base44.com/images/public/68eab176214c38838029465f/20c614b3b_Banner.png";function r$(){return t$}function _b(e=""){return""}function ts(e,t,n){let r=document.head.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.setAttribute("content",n)}function s$(e,t){document.head.querySelectorAll(`meta[${e}="${t}"]`).forEach(n=>n.remove())}function ZN(e,t){let n=document.head.querySelector(`link[rel="${e}"]`);t?(n||(n=document.createElement("link"),n.setAttribute("rel",e),document.head.appendChild(n)),n.setAttribute("href",t)):n&&n.remove()}function i$(e){if(document.head.querySelectorAll('script[type="application/ld+json"][data-seo-jsonld]').forEach(n=>n.remove()),!e)return;const t=document.createElement("script");t.setAttribute("type","application/ld+json"),t.setAttribute("data-seo-jsonld","true"),t.textContent=JSON.stringify(Array.isArray(e)?e:[e]),document.head.appendChild(t)}function Mt(e,t,n={}){const{noindex:r=!1,image:i="",canonicalPath:a="",jsonLd:o=null,type:c="website"}=n;E.useEffect(()=>{if(!e)return;document.title=e;const d=_b(a),h=i||n$;ts("name","description",t||""),ts("name","robots",r?"noindex, follow":"index, follow"),ts("property","og:title",e),ts("property","og:description",t||""),ts("property","og:type",c),ts("property","og:image",h),ts("name","twitter:card",i?"summary_large_image":"summary"),ts("name","twitter:title",e),ts("name","twitter:description",t||""),ts("name","twitter:image",h),d?(ts("property","og:url",d),ZN("canonical",d)):(s$("property","og:url"),ZN("canonical","")),i$(r?null:o)},[e,t,r,i,a,o,c])}const Ge=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("rounded-xl border bg-card text-card-foreground shadow",e),...t}));
vendor: 4,207 bytes, line 526
526Ge.displayName="Card";const Cn=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("flex flex-col space-y-1.5 p-6",e),...t}));Cn.displayName="CardHeader";const En=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("font-semibold leading-none tracking-tight",e),...t}));En.displayName="CardTitle";const a$=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("text-sm text-muted-foreground",e),...t}));a$.displayName="CardDescription";const Rt=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("p-6 pt-0",e),...t}));Rt.displayName="CardContent";const Xu=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("flex items-center p-6 pt-0",e),...t}));Xu.displayName="CardFooter";function eS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hh(...e){return t=>{let n=!1;const r=e.map(i=>{const a=eS(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():eS(e[i],null)}}}}function bt(...e){return E.useCallback(Hh(...e),e)}function lo(e){const t=l$(e),n=E.forwardRef((r,i)=>{const{children:a,...o}=r,c=E.Children.toArray(a),d=c.find(u$);if(d){const h=d.props.children,g=c.map(f=>f===d?E.Children.count(h)>1?E.Children.only(null):E.isValidElement(h)?h.props.children:null:f);return s.jsx(t,{...o,ref:i,children:E.isValidElement(h)?E.cloneElement(h,void 0,g):null})}return s.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var o$=lo("Slot");function l$(e){const t=E.forwardRef((n,r)=>{const{children:i,...a}=n;if(E.isValidElement(i)){const o=f$(i),c=d$(a,i.props);return i.type!==E.Fragment&&(c.ref=r?Hh(r,o):o),E.cloneElement(i,c)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var c$=Symbol("radix.slottable");function u$(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===c$}function d$(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...c)=>{const d=a(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function f$(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const h$=Uu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ge=E.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?o$:"button";return s.jsx(o,{className:He(h$({variant:t,size:n,className:e})),ref:a,...i})});ge.displayName="Button";const de=E.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:He("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));de.displayName="Input";const un=E.forwardRef(({className:e,...t},n)=>
526s.jsx("textarea",{className:He("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));un.displayName="Textarea";var m$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=m$.reduce((e,t)=>{const n=lo(`Primitive.${t}`),r=E.forwardRef((i,a)=>{const{asChild:o,...c}=i,d=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(d,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function XP(e,t){e&&Wu.flushSync(()=>e.dispatchEvent(t))}var p$="Label",JP=E.forwardRef((e,t)=>s.jsx(Ze.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));JP.displayName=p$;var ZP=JP;const g$=Uu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ee=E.forwardRef(({className:e,...t},n)=>s.jsx(ZP,{ref:n,className:He(g$(),e),...t}));ee.displayName=ZP.displayName;const y$=Uu("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function rt({className:e,variant:t,...n}){return s.jsx("div",{className:He(y$({variant:t}),e),...n})}function xt(e){return"/"+e.replace(/ /g,"-").toLowerCase()}function ma({tags:e=[],onChange:t,context:n={},entityType:r="business",onParentCategoriesChange:i}){const[a,o]=E.useState(""),[c,d]=E.useState(!1),h=m=>{const p=m.trim().toLowerCase();p&&!e.includes(p)&&e.length<15&&t([...e,p]),o("")},g=m=>{t(e.filter((p,w)=>w!==m))},f=async()=>{var m,p,w;d(!0);try{const x=await ie.functions.invoke("suggestEntityTags",{entity_type:r,entity_data:n}),v=(((m=x==null?void 0:x.data)==null?void 0:m.suggested_tags)||[]).map(j=>j.toLowerCase().trim()).filter(Boolean),y=[...new Set([...e,...v])].slice(0,15);t(y),i&&((w=(p=x==null?void 0:x.data)==null?void 0:p.parent_categories)!=null&&w.length)&&i(x.data.parent_categories)}catch(x){console.error("Tag suggestion failed",x)}finally{d(!1)}};return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(de,{value:a,onChange:m=>o(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),h(a))},placeholder:"Add a tag and press Enter",className:"flex-1",disabled:e.length>=15}),s.jsx(ge,{type:"button",variant:"outline",size:"sm",onClick:f,disabled:c||!n.name&&!n.title,children:c?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-1 animate-spin"}),"Suggesting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ln,{className:"w-4 h-4 mr-1"}),"AI Suggest"]})})]}),e.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((m,p)=>s.jsxs(rt,{variant:"secondary",className:"flex items-center gap-1 px-3 py-1.5 bg-purple-50 text-purple-700 border-purple-100",children:[m,s.jsx("button",{type:"button",onClick:()=>g(p),className:"ml-1 hover:text-red-600",children:s.jsx(kt,{className:"w-3 h-3"})})]},p))}),e.length===0&&!c&&s.jsx("p",{className:"text-xs text-gray-400",children:"No tags yet. Add your own or click AI Suggest."})]})}const eA=[{value:"food-drink",label:"Food & Drink"},{value:"shopping",label:"Shopping"},{value:"health",label:"Health"},{value:"wellness",label:"Wellness"},{value:"beauty-personal-care",label:"Beauty & Personal Care"},{value:"fitness-sport",label:"Fitness & Sport"},{value:"education-childcare",label:"Education & Childcare"},{value:"entertainment-leisure",label:"Entertainment & Leisure"},{value:"professional-services",label:"Professional Services"},{value:"home-services",label:"Home Services"},{value:"property-real-estate",label:"Property & Real Estate"},{value:"automotive",label:"Automotive"}
526,{value:"hospitality",label:"Hospitality"},{value:"pet-care",label:"Pet Care"},{value:"technology",label:"Technology"},{value:"financial-services",label:"Financial Services"}],x$={restaurant:"food-drink",cafe:"food-drink",bar_lounge:"food-drink",retail:"shopping",healthcare:"health",spa_wellness:"wellness",beauty:"beauty-personal-care",fitness:"fitness-sport",education:"education-childcare",entertainment:"entertainment-leisure",professional:"professional-services",services:"professional-services",home_services:"home-services",real_estate:"property-real-estate",automotive:"automotive",hospitality:"hospitality",pet_services:"pet-care",technology:"technology",financial_services:"financial-services"},Nb=(e={})=>{var i;if((i=e.parent_categories)!=null&&i.length)return e.parent_categories;const t=String(e.category||"").toLowerCase(),n=[e.category,e.subcategory,e.name,...e.tags||[]].join(" ").toLowerCase(),r=x$[t];return r?[r]:/medical|doctor|dent|clinic|health|pharmacy|optom/.test(n)?["health"]:/spa|massage|wellness|holistic|therapy/.test(n)?["wellness"]:/beauty|hair|salon|nail|barber|cosmetic/.test(n)?["beauty-personal-care"]:/restaurant|cafe|coffee|food|bakery|bar|takeaway/.test(n)?["food-drink"]:/school|education|tutor|childcare|creche|training/.test(n)?["education-childcare"]:/gym|fitness|sport|yoga|pilates/.test(n)?["fitness-sport"]:/property|real estate|estate agent/.test(n)?["property-real-estate"]:/pet|veterinary| vet |animal/.test(` ${n} `)?["pet-care"]:/car|auto|vehicle|tyre/.test(n)?["automotive"]:/hotel|guesthouse|lodge|accommodation/.test(n)?["hospitality"]:/software|technology|computer| it |digital/.test(` ${n} `)?["technology"]:/bank|finance|account|insurance|financial/.test(n)?["financial-services"]:/plumb|electric|garden|clean|repair|maintenance|construction/.test(n)?["home-services"]:/shop|store|retail|boutique/.test(n)?["shopping"]:/entertain|cinema|arcade|play|leisure/.test(n)?["entertainment-leisure"]:["professional-services"]};function Ju({value:e=[],onChange:t}){const n=r=>{t(e.includes(r)?e.filter(i=>i!==r):[...e,r].slice(0,3))};return s.jsx("div",{className:"grid sm:grid-cols-2 gap-2 mt-2",children:eA.map(r=>s.jsxs("label",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:e.includes(r.value),onChange:()=>n(r.value),disabled:!e.includes(r.value)&&e.length>=3}),r.label]},r.value))})}function xh(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function v$(e,t){const n=E.createContext(t),r=a=>{const{children:o,...c}=a,d=E.useMemo(()=>c,Object.values(c));return s.jsx(n.Provider,{value:d,children:o})};r.displayName=e+"Provider";function i(a){const o=E.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Kr(e,t=[]){let n=[];function r(a,o){const c=E.createContext(o),d=n.length;n=[...n,o];const h=f=>{var y;const{scope:m,children:p,...w}=f,x=((y=m==null?void 0:m[e])==null?void 0:y[d])||c,v=E.useMemo(()=>w,Object.values(w));return s.jsx(x.Provider,{value:v,children:p})};h.displayName=a+"Provider";function g(f,m){var x;const p=((x=m==null?void 0:m[e])==null?void 0:x[d])||c,w=E.useContext(p);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[h,g]}const i=()=>{const a=n.map(o=>E.createContext(o));return function(c){const d=(c==null?void 0:c[e])||a;return E.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return i.scopeName=e,[r,b$(i,...t)]}function b$(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((c,{useScope:d,scopeName:h})=>{const f=d(a)[`__scope${h}`];return{...c,...f}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Wh(e){const t=e+"CollectionProvider",[n,r]=Kr(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=x=>{const{scope:v,children:y}=x,j=Ce.useRef(null),_=Ce.useRef(new Map).current;return s.jsx(i,{scope:v,itemMap:_,collectionRef:j,children:y})};o.displayName=t;const c=e+"CollectionSlot",d=lo(c),h=Ce.forwardRef((x,v)=>{const{scope:y,children:j}=x,_=a(c,y),N=bt(v,_.collectionRef);return s.jsx(d,{ref:N,children:j})});h.displayName=c;const g=e+"CollectionItemSlot",f="data-radix-collection-item",m=lo(g),p=Ce.forwardRef((x,v)=>{const{scope:y,children:j,..._}=x,N=Ce.useRef(null),C=bt(v,N),S=a(g,y);return Ce.useEffect(()=>(S.itemMap.set(N,{ref:N,..._}),()=>void S.itemMap.delete(N))),s.jsx(m,{[f]:"",ref:C,children:j})});p.displayName=g;function w(x){const v=a(e+"CollectionConsumer",x);return Ce.useCallback(()=>{const j=v.collectionRef.current;if(!j)return[];const _=Array.from(j.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((S,P)=>_.indexOf(S.ref.current)-_.indexOf(P.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:h,ItemSlot:p},w,r]}var w$=E.createContext(void 0);function Zu(e){const t=E.useContext(w$);return e||t||"ltr"}function ds(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function j$(e,t=globalThis==null?void 0:globalThis.document){const n=ds(e);E.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}
vendor: 37,245 bytes, line 526
526var _$="DismissableLayer",i0="dismissableLayer.update",N$="dismissableLayer.pointerDownOutside",S$="dismissableLayer.focusOutside",tS,tA=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kh=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:c,...d}=e,h=E.useContext(tA),[g,f]=E.useState(null),m=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=E.useState({}),w=bt(t,P=>f(P)),x=Array.from(h.layers),[v]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),y=x.indexOf(v),j=g?x.indexOf(g):-1,_=h.layersWithOutsidePointerEventsDisabled.size>0,N=j>=y,C=E$(P=>{const R=P.target,L=[...h.branches].some(D=>D.contains(R));!N||L||(i==null||i(P),o==null||o(P),P.defaultPrevented||c==null||c())},m),S=T$(P=>{const R=P.target;[...h.branches].some(D=>D.contains(R))||(a==null||a(P),o==null||o(P),P.defaultPrevented||c==null||c())},m);return j$(P=>{j===h.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))},m),E.useEffect(()=>{if(g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(tS=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),nS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=tS)}},[g,m,n,h]),E.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),nS())},[g,h]),E.useEffect(()=>{const P=()=>p({});return document.addEventListener(i0,P),()=>document.removeEventListener(i0,P)},[]),s.jsx(Ze.div,{...d,ref:w,style:{pointerEvents:_?N?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,C.onPointerDownCapture)})});Kh.displayName=_$;var k$="DismissableLayerBranch",C$=E.forwardRef((e,t)=>{const n=E.useContext(tA),r=E.useRef(null),i=bt(t,r);return E.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),s.jsx(Ze.div,{...e,ref:i})});C$.displayName=k$;function E$(e,t=globalThis==null?void 0:globalThis.document){const n=ds(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const a=c=>{if(c.target&&!r.current){let d=function(){nA(N$,n,h,{discrete:!0})};const h={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function T$(e,t=globalThis==null?void 0:globalThis.document){const n=ds(e),r=E.useRef(!1);return E.useEffect(()=>{const i=a=>{a.target&&!r.current&&nA(S$,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nS(){const e=new CustomEvent(i0);document.dispatchEvent(e)}function nA(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?XP(i,a):i.dispatchEvent(a)}var zg=0;function Sb(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rS()),document.body.insertAdjacentElement("beforeend",e[1]??rS()),zg++,()=>{zg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zg--}},[])}function rS(){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 Vg="focusScope.autoFocusOnMount",Hg="focusScope.autoFocusOnUnmount",sS={bubbles:!1,cancelable:!0},P$="FocusScope",Gh=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[c,d]=E.useState(null),h=ds(i),g=ds(a),f=E.useRef(null),m=bt(t,x=>d(x)),p=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let x=function(_){if(p.paused||!c)return;const N=_.target;c.contains(N)?f.current=N:Wi(f.current,{select:!0})},v=function(_){if(p.paused||!c)return;const N=_.relatedTarget;N!==null&&(c.contains(N)||Wi(f.current,{select:!0}))},y=function(_){if(document.activeElement===document.body)for(const C of _)C.removedNodes.length>0&&Wi(c)};document.addEventListener("focusin",x),document.addEventListener("focusout",v);const j=new MutationObserver(y);return c&&j.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",v),j.disconnect()}}},[r,c,p.paused]),E.useEffect(()=>{if(c){aS.add(p);const x=document.activeElement;if(!c.contains(x)){const y=new CustomEvent(Vg,sS);c.addEventListener(Vg,h),c.dispatchEvent(y),y.defaultPrevented||(A$(D$(rA(c)),{select:!0}),document.activeElement===x&&Wi(c))}return()=>{c.removeEventListener(Vg,h),setTimeout(()=>{const y=new CustomEvent(Hg,sS);c.addEventListener(Hg,g),c.dispatchEvent(y),y.defaultPrevented||Wi(x??document.body,{select:!0}),c.removeEventListener(Hg,g),aS.remove(p)},0)}}},[c,h,g,p]);const w=E.useCallback(x=>{if(!n&&!r||p.paused)return;const v=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,y=document.activeElement;if(v&&y){const j=x.currentTarget,[_,N]=R$(j);_&&N?!x.shiftKey&&y===N?(x.preventDefault(),n&&Wi(_,{select:!0})):x.shiftKey&&y===_&&(x.preventDefault(),n&&Wi(N,{select:!0})):y===j&&x.preventDefault()}},[n,r,p.paused]);return s.jsx(Ze.div,{tabIndex:-1,...o,ref:m,onKeyDown:w})});Gh.displayName=P$;function A$(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wi(r,{select:t}),document.activeElement!==n)return}function R$(e){const t=rA(e),n=iS(t,e),r=iS(t.reverse(),e);return[n,r]}function rA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function iS(e,t){for(const n of e)if(!O$(n,{upTo:t}))return n}function O$(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function M$(e){return e instanceof HTMLInputElement&&"select"in e}function Wi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&M$(e)&&t&&e.select()}}var aS=L$();function L$(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=oS(e,t),e.unshift(t)},remove(t){var n;e=oS(e,t),(n=e[0])==null||n.resume()}}}function oS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function D$(e){return e.filter(t=>t.tagName!=="A")}var jn=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},I$=G0[" useId ".trim().toString()]||(()=>{}),F$=0;function Rs(e){const[t,n]=E.useState(I$());return jn(()=>{n(r=>r??String(F$++))},[e]),t?`radix-${t}`:""}const B$=["top","right","bottom","left"],ca=Math.min,jr=Math.max,vh=Math.round,Pf=Math.floor,Os=e=>({x:e,y:e}),q$={left:"right",right:"left",bottom:"top",top:"bottom"},U$={start:"end",end:"start"};function a0(e,t,n){return jr(e,ca(t,n))}function hi(e,t){return typeof e=="function"?e(t):e}function mi(e){return e.split("-")[0]}function Hl(e){return e.split("-")[1]}function kb(e){return e==="x"?"y":"x"}function Cb(e){return e==="y"?"height":"width"}const $$=new Set(["top","bottom"]);function Ts(e){return $$.has(mi(e))?"y":"x"}function Eb(e){return kb(Ts(e))}function z$(e,t,n){n===void 0&&(n=!1);const r=Hl(e),i=Eb(e),a=Cb(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=bh(o)),[o,bh(o)]}function V$(e){const t=bh(e);return[o0(e),t,o0(t)]}function o0(e){return e.replace(/start|end/g,t=>U$[t])}const lS=["left","right"],cS=["right","left"],H$=["top","bottom"],W$=["bottom","top"];function K$(e,t,n){switch(e){case"top":case"bottom":return n?t?cS:lS:t?lS:cS;case"left":case"right":return t?H$:W$;default:return[]}}function G$(e,t,n,r){const i=Hl(e);let a=K$(mi(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(o0)))),a}function bh(e){return e.replace(/left|right|bottom|top/g,t=>q$[t])}function Y$(e){return{top:0,right:0,bottom:0,left:0,...e}}function sA(e){return typeof e!="number"?Y$(e):{top:e,right:e,bottom:e,left:e}}function wh(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function uS(e,t,n){let{reference:r,floating:i}=e;const a=Ts(t),o=Eb(t),c=Cb(o),d=mi(t),h=a==="y",g=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,m=r[c]/2-i[c]/2;let p;switch(d){case"top":p={x:g,y:r.y-i.height};break;case"bottom":p={x:g,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Hl(t)){case"start":p[o]-=m*(n&&h?-1:1);break;case"end":p[o]+=m*(n&&h?-1:1);break}return p}const Q$=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,c=a.filter(Boolean),d=await(o.isRTL==null?void 0:o.isRTL(t));let h=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:f}=uS(h,r,d),m=r,p={},w=0;for(let x=0;x<c.length;x++){const{name:v,fn:y}=c[x],{x:j,y:_,data:N,reset:C}=await y({x:g,y:f,initialPlacement:r,placement:m,strategy:i,middlewareData:p,rects:h,platform:o,elements:{reference:e,floating:t}});g=j??g,f=_??f,p={...p,[v]:{...p[v],...N}},C&&w<=50&&(w++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(h=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:g,y:f}=uS(h,m,d)),x=-1)}return{x:g,y:f,placement:m,strategy:i,middlewareData:p}};async function bu(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=hi(t,e),w=sA(p),v=c[m?f==="floating"?"reference":"floating":f],y=wh(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:g,strategy:d})),j=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),N=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},C=wh(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:j,offsetParent:_,strategy:d}):j);return{top:(y.top-C.top+w.top)/N.y,bottom:(C.bottom-y.bottom+w.bottom)/N.y,left:(y.left-C.left+w.left)/N.x,right:(C.right-y.right+w.right)/N.x}}const X$=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:c,middlewareData:d}=t,{element:h,padding:g=0}=hi(e,t)||{};if(h==null)return{};const f=sA(g),m={x:n,y:r},p=Eb(i),w=Cb(p),x=await o.getDimensions(h),v=p==="y",y=v?"top":"left",j=v?"bottom":"right",_=v?"clientHeight":"clientWidth",N=a.reference[w]+a.reference[p]-m[p]-a.floating[w],C=m[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(h));let P=S?S[_]:0;(!P||!await(o.isElement==null?void 0:o.isElement(S)))&&(P=c.floating[_]||a.floating[w]);const R=N/2-C/2,L=P/2-x[w]/2-1,D=ca(f[y],L),T=ca(f[j],L),O=D,M=P-x[w]-T,U=P/2-x[w]/2+R,z=a0(O,U,M),H=!d.arrow&&Hl(i)!=null&&U!==z&&a.reference[w]/2-(U<O?D:T)-x[w]/2<0,Y=H?U<O?U-O:U-M:0;return{[p]:m[p]+Y,data:{[p]:z,centerOffset:U-z-Y,...H&&{alignmentOffset:Y}},reset:H}}}),J$=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:g=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:x=!0,...v}=hi(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=mi(i),j=Ts(c),_=mi(c)===c,N=await(d.isRTL==null?void 0:d.isRTL(h.floating)),C=m||(_||!x?[bh(c)]:V$(c)),S=w!=="none";!m&&S&&C.push(...G$(c,x,w,N));const P=[c,...C],R=await bu(t,v),L=[];let D=((r=a.flip)==null?void 0:r.overflows)||[];if(g&&L.push(R[y]),f){const U=z$(i,o,N);L.push(R[U[0]],R[U[1]])}if(D=[...D,{placement:i,overflows:L}],!L.every(U=>U<=0)){var T,O;const U=(((T=a.flip)==null?void 0:T.index)||0)+1,z=P[U];if(z&&(!(f==="alignment"?j!==Ts(z):!1)||D.every(G=>Ts(G.placement)===j?G.overflows[0]>0:!0)))return{data:{index:U,overflows:D},reset:{placement:z}};let H=(O=D.filter(Y=>Y.overflows[0]<=0).sort((Y,G)=>Y.overflows[1]-G.overflows[1])[0])==null?void 0:O.placement;if(!H)switch(p){case"bestFit":{var M;const Y=(M=D.filter(G=>{if(S){const $=Ts(G.placement);return $===j||$==="y"}return!0}).map(G=>[G.placement,G.overflows.filter($=>$>0).reduce(($,I)=>$+I,0)]).sort((G,$)=>G[1]-$[1])[0])==null?void 0:M[0];Y&&(H=Y);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function dS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fS(e){return B$.some(t=>e[t]>=0)}const Z$=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=hi(e,t);switch(r){case"referenceHidden":{const a=await bu(t,{...i,elementContext:"reference"}),o=dS(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:fS(o)}}}case"escaped":{const a=await bu(t,{...i,altBoundary:!0}),o=dS(a,n.floating);return{data:{escapedOffsets:o,escaped:fS(o)}}}default:return{}}}}},iA=new Set(["left","top"]);async function ez(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=mi(n),c=Hl(n),d=Ts(n)==="y",h=iA.has(o)?-1:1,g=a&&d?-1:1,f=hi(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof w=="number"&&(p=c==="end"?w*-1:w),d?{x:p*g,y:m*h}:{x:m*h,y:p*g}}const tz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:c}=t,d=await ez(t,e);return o===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:a+d.y,data:{...d,placement:o}}}}},nz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:c={fn:v=>{let{x:y,y:j}=v;return{x:y,y:j}}},...d}=hi(e,t),h={x:n,y:r},g=await bu(t,d),f=Ts(mi(i)),m=kb(f);let p=h[m],w=h[f];if(a){const v=m==="y"?"top":"left",y=m==="y"?"bottom":"right",j=p+g[v],_=p-g[y];p=a0(j,p,_)}if(o){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",j=w+g[v],_=w-g[y];w=a0(j,w,_)}const x=c.fn({...t,[m]:p,[f]:w});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[m]:a,[f]:o}}}}}},rz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=hi(e,t),g={x:n,y:r},f=Ts(i),m=kb(f);let p=g[m],w=g[f];const x=hi(c,t),v=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const _=m==="y"?"height":"width",N=a.reference[m]-a.floating[_]+v.mainAxis,C=a.reference[m]+a.reference[_]-v.mainAxis;p<N?p=N:p>C&&(p=C)}if(h){var y,j;const _=m==="y"?"width":"height",N=iA.has(mi(i)),C=a.reference[f]-a.floating[_]+(N&&((y=o.offset)==null?void 0:y[f])||0)+(N?0:v.crossAxis),S=a.reference[f]+a.reference[_]+(N?0:((j=o.offset)==null?void 0:j[f])||0)-(N?v.crossAxis:0);w<C?w=C:w>S&&(w=S)}return{[m]:p,[f]:w}}}},sz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:c}=t,{apply:d=()=>{},...h}=hi(e,t),g=await bu(t,h),f=mi(i),m=Hl(i),p=Ts(i)==="y",{width:w,height:x}=a.floating;let v,y;f==="top"||f==="bottom"?(v=f,y=m===(await(o.isRTL==null?void 0:o.isRTL(c.floating))?"start":"end")?"left":"right"):(y=f,v=m==="end"?"top":"bottom");const j=x-g.top-g.bottom,_=w-g.left-g.right,N=ca(x-g[v],j),C=ca(w-g[y],_),S=!t.middlewareData.shift;let P=N,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=j),S&&!m){const D=jr(g.left,0),T=jr(g.right,0),O=jr(g.top,0),M=jr(g.bottom,0);p?R=w-2*(D!==0||T!==0?D+T:jr(g.left,g.right)):P=x-2*(O!==0||M!==0?O+M:jr(g.top,g.bottom))}await d({...t,availableWidth:R,availableHeight:P});const L=await o.getDimensions(c.floating);return w!==L.width||x!==L.height?{reset:{rects:!0}}:{}}}};function Yh(){return typeof window<"u"}function Wl(e){return aA(e)?(e.nodeName||"").toLowerCase():"#document"}function Nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $s(e){var t;return(t=(aA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function aA(e){return Yh()?e instanceof Node||e instanceof Nr(e).Node:!1}function fs(e){return Yh()?e instanceof Element||e instanceof Nr(e).Element:!1}function Bs(e){return Yh()?e instanceof HTMLElement||e instanceof Nr(e).HTMLElement:!1}function hS(e){return!Yh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nr(e).ShadowRoot}const iz=new Set(["inline","contents"]);function ed(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=hs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!iz.has(i)}const az=new Set(["table","td","th"]);function oz(e){return az.has(Wl(e))}const lz=[":popover-open",":modal"];function Qh(e){return lz.some(t=>{try{return e.matches(t)}catch{return!1}})}const cz=["transform","translate","scale","rotate","perspective"],uz=["transform","translate","scale","rotate","perspective","filter"],dz=["paint","layout","strict","content"];function Tb(e){const t=Pb(),n=fs(e)?hs(e):e;return cz.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||uz.some(r=>(n.willChange||"").includes(r))||dz.some(r=>(n.contain||"").includes(r))}function fz(e){let t=ua(e);for(;Bs(t)&&!Al(t);){if(Tb(t))return t;if(Qh(t))return null;t=ua(t)}return null}function Pb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hz=new Set(["html","body","#document"]);function Al(e){return hz.has(Wl(e))}function hs(e){return Nr(e).getComputedStyle(e)}function Xh(e){return fs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ua(e){if(Wl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hS(e)&&e.host||$s(e);return hS(t)?t.host:t}function oA(e){const t=ua(e);return Al(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bs(t)&&ed(t)?t:oA(t)}function wu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=oA(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Nr(i);if(a){const c=l0(o);return t.concat(o,o.visualViewport||[],ed(i)?i:[],c&&n?wu(c):[])}return t.concat(i,wu(i,[],n))}function l0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lA(e){const t=hs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Bs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,c=vh(n)!==a||vh(r)!==o;return c&&(n=a,r=o),{width:n,height:r,$:c}}function Ab(e){return fs(e)?e:e.contextElement}function cl(e){const t=Ab(e);if(!Bs(t))return Os(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=lA(t);let o=(a?vh(n.width):n.width)/r,c=(a?vh(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!c||!Number.isFinite(c))&&(c=1),{x:o,y:c}}const mz=Os(0);function cA(e){const t=Nr(e);return!Pb()||!t.visualViewport?mz:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pz(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nr(e)?!1:t}function co(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Ab(e);let o=Os(1);t&&(r?fs(r)&&(o=cl(r)):o=cl(e));const c=pz(a,n,r)?cA(a):Os(0);let d=(i.left+c.x)/o.x,h=(i.top+c.y)/o.y,g=i.width/o.x,f=i.height/o.y;if(a){const m=Nr(a),p=r&&fs(r)?Nr(r):r;let w=m,x=l0(w);for(;x&&r&&p!==w;){const v=cl(x),y=x.getBoundingClientRect(),j=hs(x),_=y.left+(x.clientLeft+parseFloat(j.paddingLeft))*v.x,N=y.top+(x.clientTop+parseFloat(j.paddingTop))*v.y;d*=v.x,h*=v.y,g*=v.x,f*=v.y,d+=_,h+=N,w=Nr(x),x=l0(w)}}return wh({width:g,height:f,x:d,y:h})}function Jh(e,t){const n=Xh(e).scrollLeft;return t?t.left+n:co($s(e)).left+n}function uA(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Jh(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function gz(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=$s(r),c=t?Qh(t.floating):!1;if(r===o||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=Os(1);const g=Os(0),f=Bs(r);if((f||!f&&!a)&&((Wl(r)!=="body"||ed(o))&&(d=Xh(r)),Bs(r))){const p=co(r);h=cl(r),g.x=p.x+r.clientLeft,g.y=p.y+r.clientTop}const m=o&&!f&&!a?uA(o,d):Os(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+g.x+m.x,y:n.y*h.y-d.scrollTop*h.y+g.y+m.y}}function yz(e){return Array.from(e.getClientRects())}function xz(e){const t=$s(e),n=Xh(e),r=e.ownerDocument.body,i=jr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=jr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Jh(e);const c=-n.scrollTop;return hs(r).direction==="rtl"&&(o+=jr(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:c}}const mS=25;function vz(e,t){const n=Nr(e),r=$s(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,c=0,d=0;if(i){a=i.width,o=i.height;const g=Pb();(!g||g&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const h=Jh(r);if(h<=0){const g=r.ownerDocument,f=g.body,m=getComputedStyle(f),p=g.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(r.clientWidth-f.clientWidth-p);w<=mS&&(a-=w)}else h<=mS&&(a+=h);return{width:a,height:o,x:c,y:d}}const bz=new Set(["absolute","fixed"]);function wz(e,t){const n=co(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Bs(e)?cl(e):Os(1),o=e.clientWidth*a.x,c=e.clientHeight*a.y,d=i*a.x,h=r*a.y;return{width:o,height:c,x:d,y:h}}function pS(e,t,n){let r;if(t==="viewport")r=vz(e,n);else if(t==="document")r=xz($s(e));else if(fs(t))r=wz(t,n);else{const i=cA(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return wh(r)}function dA(e,t){const n=ua(e);return n===t||!fs(n)||Al(n)?!1:hs(n).position==="fixed"||dA(n,t)}function jz(e,t){const n=t.get(e);if(n)return n;let r=wu(e,[],!1).filter(c=>fs(c)&&Wl(c)!=="body"),i=null;const a=hs(e).position==="fixed";let o=a?ua(e):e;for(;fs(o)&&!Al(o);){const c=hs(o),d=Tb(o);!d&&c.position==="fixed"&&(i=null),(a?!d&&!i:!d&&c.position==="static"&&!!i&&bz.has(i.position)||ed(o)&&!d&&dA(e,o))?r=r.filter(g=>g!==o):i=c,o=ua(o)}return t.set(e,r),r}function _z(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Qh(t)?[]:jz(t,this._c):[].concat(n),r],c=o[0],d=o.reduce((h,g)=>{const f=pS(t,g,i);return h.top=jr(f.top,h.top),h.right=ca(f.right,h.right),h.bottom=ca(f.bottom,h.bottom),h.left=jr(f.left,h.left),h},pS(t,c,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Nz(e){const{width:t,height:n}=lA(e);return{width:t,height:n}}function Sz(e,t,n){const r=Bs(t),i=$s(t),a=n==="fixed",o=co(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Os(0);function h(){d.x=Jh(i)}if(r||!r&&!a)if((Wl(t)!=="body"||ed(i))&&(c=Xh(t)),r){const p=co(t,!0,a,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else i&&h();a&&!r&&i&&h();const g=i&&!r&&!a?uA(i,c):Os(0),f=o.left+c.scrollLeft-d.x-g.x,m=o.top+c.scrollTop-d.y-g.y;return{x:f,y:m,width:o.width,height:o.height}}function Wg(e){return hs(e).position==="static"}function gS(e,t){if(!Bs(e)||hs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return $s(e)===n&&(n=n.ownerDocument.body),n}function fA(e,t){const n=Nr(e);if(Qh(e))return n;if(!Bs(e)){let i=ua(e);for(;i&&!Al(i);){if(fs(i)&&!Wg(i))return i;i=ua(i)}return n}let r=gS(e,t);for(;r&&oz(r)&&Wg(r);)r=gS(r,t);return r&&Al(r)&&Wg(r)&&!Tb(r)?n:r||fz(e)||n}const kz=async function(e){const t=this.getOffsetParent||fA,n=this.getDimensions,r=await n(e.floating);return{reference:Sz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cz(e){return hs(e).direction==="rtl"}const Ez={convertOffsetParentRelativeRectToViewportRelativeRect:gz,getDocumentElement:$s,getClippingRect:_z,getOffsetParent:fA,getElementRects:kz,getClientRects:yz,getDimensions:Nz,getScale:cl,isElement:fs,isRTL:Cz};function hA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tz(e,t){let n=null,r;const i=$s(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function o(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:g,top:f,width:m,height:p}=h;if(c||t(),!m||!p)return;const w=Pf(f),x=Pf(i.clientWidth-(g+m)),v=Pf(i.clientHeight-(f+p)),y=Pf(g),_={rootMargin:-w+"px "+-x+"px "+-v+"px "+-y+"px",threshold:jr(0,ca(1,d))||1};let N=!0;function C(S){const P=S[0].intersectionRatio;if(P!==d){if(!N)return o();P?o(!1,P):r=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!hA(h,e.getBoundingClientRect())&&o(),N=!1}try{n=new IntersectionObserver(C,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,_)}n.observe(e)}return o(!0),a}function Pz(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Ab(e),g=i||a?[...h?wu(h):[],...wu(t)]:[];g.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const f=h&&c?Tz(h,n):null;let m=-1,p=null;o&&(p=new ResizeObserver(y=>{let[j]=y;j&&j.target===h&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(t)})),n()}),h&&!d&&p.observe(h),p.observe(t));let w,x=d?co(e):null;d&&v();function v(){const y=co(e);x&&!hA(x,y)&&n(),x=y,w=requestAnimationFrame(v)}return n(),()=>{var y;g.forEach(j=>{i&&j.removeEventListener("scroll",n),a&&j.removeEventListener("resize",n)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,d&&cancelAnimationFrame(w)}}const Az=tz,Rz=nz,Oz=J$,Mz=sz,Lz=Z$,yS=X$,Dz=rz,Iz=(e,t,n)=>{const r=new Map,i={platform:Ez,...n},a={...i.platform,_c:r};return Q$(e,t,{...i,platform:a})};var Fz=typeof document<"u",Bz=function(){},th=Fz?E.useLayoutEffect:Bz;function jh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!jh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!jh(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function mA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xS(e,t){const n=mA(e);return Math.round(t*n)/n}function Kg(e){const t=E.useRef(e);return th(()=>{t.current=e}),t}function qz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[g,f]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=E.useState(r);jh(m,r)||p(r);const[w,x]=E.useState(null),[v,y]=E.useState(null),j=E.useCallback(G=>{G!==S.current&&(S.current=G,x(G))},[]),_=E.useCallback(G=>{G!==P.current&&(P.current=G,y(G))},[]),N=a||w,C=o||v,S=E.useRef(null),P=E.useRef(null),R=E.useRef(g),L=d!=null,D=Kg(d),T=Kg(i),O=Kg(h),M=E.useCallback(()=>{if(!S.current||!P.current)return;const G={placement:t,strategy:n,middleware:m};T.current&&(G.platform=T.current),Iz(S.current,P.current,G).then($=>{const I={...$,isPositioned:O.current!==!1};U.current&&!jh(R.current,I)&&(R.current=I,Wu.flushSync(()=>{f(I)}))})},[m,t,n,T,O]);th(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(G=>({...G,isPositioned:!1})))},[h]);const U=E.useRef(!1);th(()=>(U.current=!0,()=>{U.current=!1}),[]),th(()=>{if(N&&(S.current=N),C&&(P.current=C),N&&C){if(D.current)return D.current(N,C,M);M()}},[N,C,M,D,L]);const z=E.useMemo(()=>({reference:S,floating:P,setReference:j,setFloating:_}),[j,_]),H=E.useMemo(()=>({reference:N,floating:C}),[N,C]),Y=E.useMemo(()=>{const G={position:n,left:0,top:0};if(!H.floating)return G;const $=xS(H.floating,g.x),I=xS(H.floating,g.y);return c?{...G,transform:"translate("+$+"px, "+I+"px)",...mA(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:I}},[n,c,H.floating,g.x,g.y]);return E.useMemo(()=>({...g,update:M,refs:z,elements:H,floatingStyles:Y}),[g,M,z,H,Y])}const Uz=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?yS({element:r.current,padding:i}).fn(n):{}:r?yS({element:r,padding:i}).fn(n):{}}}},$z=(e,t)=>({...Az(e),options:[e,t]}),zz=(e,t)=>({...Rz(e),options:[e,t]}),Vz=(e,t)=>({...Dz(e),options:[e,t]}),Hz=(e,t)=>({...Oz(e),options:[e,t]}),Wz=(e,t)=>({...Mz(e),options:[e,t]}),Kz=(e,t)=>({...Lz(e),options:[e,t]}),Gz=(e,t)=>({...Uz(e),options:[e,t]});var Yz="Arrow",pA=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return s.jsx(Ze.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});pA.displayName=Yz;var Qz=pA;function Zh(e){const[t,n]=E.useState(void 0);return jn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,c;if("borderBoxSize"in a){const d=a.borderBoxSize,h=Array.isArray(d)?d[0]:d;o=h.inlineSize,c=h.blockSize}else o=e.offsetWidth,c=e.offsetHeight;n({width:o,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Rb="Popper",[gA,em]=Kr(Rb),[Xz,yA]=gA(Rb),xA=e=>{const{__scopePopper:t,children:n}=e,[r,i]=E.useState(null);return s.jsx(Xz,{scope:t,anchor:r,onAnchorChange:i,children:n})};xA.displayName=Rb;var vA="PopperAnchor",bA=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=yA(vA,n),o=E.useRef(null),c=bt(t,o),d=E.useRef(null);return E.useEffect(()=>{const h=d.current;d.current=(r==null?void 0:r.current)||o.current,h!==d.current&&a.onAnchorChange(d.current)}),r?null:s.jsx(Ze.div,{...i,ref:c})});bA.displayName=vA;var Ob="PopperContent",[Jz,Zz]=gA(Ob),wA=E.forwardRef((e,t)=>{var Q,ne,se,ce,ye,je;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:w,...x}=e,v=yA(Ob,n),[y,j]=E.useState(null),_=bt(t,Fe=>j(Fe)),[N,C]=E.useState(null),S=Zh(N),P=(S==null?void 0:S.width)??0,R=(S==null?void 0:S.height)??0,L=r+(a!=="center"?"-"+a:""),D=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},T=Array.isArray(h)?h:[h],O=T.length>0,M={padding:D,boundary:T.filter(t7),altBoundary:O},{refs:U,floatingStyles:z,placement:H,isPositioned:Y,middlewareData:G}=qz({strategy:"fixed",placement:L,whileElementsMounted:(...Fe)=>Pz(...Fe,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[$z({mainAxis:i+R,alignmentAxis:o}),d&&zz({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Vz():void 0,...M}),d&&Hz({...M}),Wz({...M,apply:({elements:Fe,rects:Ye,availableWidth:et,availableHeight:Le})=>{const{width:at,height:he}=Ye.reference,me=Fe.floating.style;me.setProperty("--radix-popper-available-width",`${et}px`),me.setProperty("--radix-popper-available-height",`${Le}px`),me.setProperty("--radix-popper-anchor-width",`${at}px`),me.setProperty("--radix-popper-anchor-height",`${he}px`)}}),N&&Gz({element:N,padding:c}),n7({arrowWidth:P,arrowHeight:R}),m&&Kz({strategy:"referenceHidden",...M})]}),[$,I]=NA(H),B=ds(w);jn(()=>{Y&&(B==null||B())},[Y,B]);const V=(Q=G.arrow)==null?void 0:Q.x,q=(ne=G.arrow)==null?void 0:ne.y,J=((se=G.arrow)==null?void 0:se.centerOffset)!==0,[te,K]=E.useState();return jn(()=>{y&&K(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:Y?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(ce=G.transformOrigin)==null?void 0:ce.x,(ye=G.transformOrigin)==null?void 0:ye.y].join(" "),...((je=G.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Jz,{scope:n,placedSide:$,onArrowChange:C,arrowX:V,arrowY:q,shouldHideArrow:J,children:s.jsx(Ze.div,{"data-side":$,"data-align":I,...x,ref:_,style:{...x.style,animation:Y?void 0:"none"}})})})});wA.displayName=Ob;var jA="PopperArrow",e7={top:"bottom",right:"left",bottom:"top",left:"right"},_A=E.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=Zz(jA,r),o=e7[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(Qz,{...i,ref:n,style:{...i.style,display:"block"}})})});_A.displayName=jA;function t7(e){return e!==null}var n7=e=>({name:"transformOrigin",options:e,fn(t){var v,y,j;const{placement:n,rects:r,middlewareData:i}=t,o=((v=i.arrow)==null?void 0:v.centerOffset)!==0,c=o?0:e.arrowWidth,d=o?0:e.arrowHeight,[h,g]=NA(n),f={start:"0%",center:"50%",end:"100%"}[g],m=(((y=i.arrow)==null?void 0:y.x)??0)+c/2,p=(((j=i.arrow)==null?void 0:j.y)??0)+d/2;let w="",x="";return h==="bottom"?(w=o?f:`${m}px`,x=`${-d}px`):h==="top"?(w=o?f:`${m}px`,x=`${r.floating.height+d}px`):h==="right"?(w=`${-d}px`,x=o?f:`${p}px`):h==="left"&&(w=`${r.floating.width+d}px`,x=o?f:`${p}px`),{data:{x:w,y:x}}}});function NA(e){const[t,n="center"]=e.split("-");return[t,n]}var SA=xA,kA=bA,CA=wA,EA=_A,r7="Portal",tm=E.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[i,a]=E.useState(!1);jn(()=>a(!0),[]);const o=n||i&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return o?GF.createPortal(s.jsx(Ze.div,{...r,ref:t}),o):null});tm.displayName=r7;var s7=G0[" useInsertionEffect ".trim().toString()]||jn;function pi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=i7({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:i;{const g=E.useRef(e!==void 0);E.useEffect(()=>{const f=g.current;f!==c&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${c?"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.`),g.current=c},[c,r])}const h=E.useCallback(g=>{var f;if(c){const m=a7(g)?g(e):g;m!==e&&((f=o.current)==null||f.call(o,m))}else a(g)},[c,e,a,o]);return[d,h]}function i7({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),i=E.useRef(n),a=E.useRef(t);return s7(()=>{a.current=t},[t]),E.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function a7(e){return typeof e=="function"}function nm(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var TA=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o7="VisuallyHidden",l7=E.forwardRef((e,t)=>s.jsx(Ze.span,{...e,ref:t,style:{...TA,...e.style}}));l7.displayName=o7;var c7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yo=new WeakMap,Af=new WeakMap,Rf={},Gg=0,PA=function(e){return e&&(e.host||PA(e.parentNode))},u7=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=PA(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},d7=function(e,t,n,r){var i=u7(t,Array.isArray(e)?e:[e]);Rf[n]||(Rf[n]=new WeakMap);var a=Rf[n],o=[],c=new Set,d=new Set(i),h=function(f){!f||c.has(f)||(c.add(f),h(f.parentNode))};
vendor: 6,470 bytes, lines 526-541
526i.forEach(h);var g=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(m){if(c.has(m))g(m);else try{var p=m.getAttribute(r),w=p!==null&&p!=="false",x=(Yo.get(m)||0)+1,v=(a.get(m)||0)+1;Yo.set(m,x),a.set(m,v),o.push(m),x===1&&w&&Af.set(m,!0),v===1&&m.setAttribute(n,"true"),w||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return g(t),c.clear(),Gg++,function(){o.forEach(function(f){var m=Yo.get(f)-1,p=a.get(f)-1;Yo.set(f,m),a.set(f,p),m||(Af.has(f)||f.removeAttribute(r),Af.delete(f)),p||f.removeAttribute(n)}),Gg--,Gg||(Yo=new WeakMap,Yo=new WeakMap,Af=new WeakMap,Rf={})}},Mb=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=c7(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),d7(r,i,n,"aria-hidden")):function(){return null}},Cs=function(){return Cs=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Cs.apply(this,arguments)};function AA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function f7(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var nh="right-scroll-bar-position",rh="width-before-scroll-bar",h7="with-scroll-bars-hidden",m7="--removed-body-scroll-bar-size";function Yg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function p7(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var g7=typeof window<"u"?E.useLayoutEffect:E.useEffect,vS=new WeakMap;function y7(e,t){var n=p7(null,function(r){return e.forEach(function(i){return Yg(i,r)})});return g7(function(){var r=vS.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(c){a.has(c)||Yg(c,null)}),a.forEach(function(c){i.has(c)||Yg(c,o)})}vS.set(n,e)},[e]),n}function x7(e){return e}function v7(e,t){t===void 0&&(t=x7);var n=[],r=!1,i={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(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(c){return c!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var c=n;n=[],c.forEach(a),o=n}var d=function(){var g=o;o=[],g.forEach(a)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(g){o.push(g),h()},filter:function(g){return o=o.filter(g),n}}}};return i}function b7(e){e===void 0&&(e={});var t=v7(null);return t.options=Cs({async:!0,ssr:!1},e),t}var RA=function(e){var t=e.sideCar,n=AA(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 E.createElement(r,Cs({},n))};RA.isSideCarExport=!0;function w7(e,t){return e.useMedium(t),RA}var OA=b7(),Qg=function(){},rm=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:Qg,onWheelCapture:Qg,onTouchMoveCapture:Qg}),i=r[0],a=r[1],o=e.forwardProps,c=e.children,d=e.className,h=e.removeScrollBar,g=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,w=e.noIsolation,x=e.inert,v=e.allowPinchZoom,y=e.as,j=y===void 0?"div":y,_=e.gapMode,N=AA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,S=y7([n,t]),P=Cs(Cs({},N),i);return E.createElement(E.Fragment,null,g&&E.createElement(C,{sideCar:OA,removeScrollBar:h,shards:f,noRelative:p,noIsolation:w,inert:x,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:_}),o?E.cloneElement(E.Children.only(c),Cs(Cs({},P),{ref:S})):E.createElement(j,Cs({},P,{className:d,ref:S}),c))});rm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rm.classNames={fullWidth:rh,zeroRight:nh};var j7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=j7();return t&&e.setAttribute("nonce",t),e}function N7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function S7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var k7=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_7())&&(N7(t,n),S7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},C7=function(){var e=k7();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},MA=function(){var e=C7(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},E7={left:0,top:0,right:0,gap:0},Xg=function(e){return parseInt(e||"",10)||0},T7=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Xg(n),Xg(r),Xg(i)]},P7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return E7;var t=T7(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])}},A7=MA(),ul="data-scroll-locked",R7=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,c=e.gap;return n===void 0&&(n="margin"),` 527 .`.concat(h7,` { 528 overflow: hidden `).concat(r,`; 529 padding-right: `).concat(c,"px ").concat(r,`; 530 } 531 body[`).concat(ul,`] { 532 overflow: hidden `).concat(r,`; 533 overscroll-behavior: contain; 534 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 535 padding-left: `.concat(i,`px; 536 padding-top: `).concat(a,`px; 537 padding-right: `).concat(o,`px; 538 margin-left:0; 539 margin-top:0; 540 margin-right: `).concat(c,"px ").concat(r,`; 541 `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";
541")].filter(Boolean).join(""),` 542 } 543 544 .`).concat(nh,` { 545 right: `).concat(c,"px ").concat(r,`; 546 } 547 548 .`).concat(rh,` { 549 margin-right: `).concat(c,"px ").concat(r,`; 550 } 551 552 .`).concat(nh," .").concat(nh,` { 553 right: 0 `).concat(r,`; 554 } 555 556 .`).concat(rh," .").concat(rh,` { 557 margin-right: 0 `).concat(r,`; 558 } 559 560 body[`).concat(ul,`] { 561 `).concat(m7,": ").concat(c,`px; 562 } 563`)},bS=function(){var e=parseInt(document.body.getAttribute(ul)||"0",10);return isFinite(e)?e:0},O7=function(){E.useEffect(function(){return document.body.setAttribute(ul,(bS()+1).toString()),function(){var e=bS()-1;e<=0?document.body.removeAttribute(ul):document.body.setAttribute(ul,e.toString())}},[])},M7=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;O7();var a=E.useMemo(function(){return P7(i)},[i]);return E.createElement(A7,{styles:R7(a,!t,i,n?"":"!important")})},c0=!1;if(typeof window<"u")try{var Of=Object.defineProperty({},"passive",{get:function(){return c0=!0,!0}});window.addEventListener("test",Of,Of),window.removeEventListener("test",Of,Of)}catch{c0=!1}var Qo=c0?{passive:!1}:!1,L7=function(e){return e.tagName==="TEXTAREA"},LA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!L7(e)&&n[t]==="visible")},D7=function(e){return LA(e,"overflowY")},I7=function(e){return LA(e,"overflowX")},wS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=DA(e,r);if(i){var a=IA(e,r),o=a[1],c=a[2];
vendor: 5,549 bytes, lines 563-566
563if(o>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},F7=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},B7=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},DA=function(e,t){return e==="v"?D7(t):I7(t)},IA=function(e,t){return e==="v"?F7(t):B7(t)},q7=function(e,t){return e==="h"&&t==="rtl"?-1:1},U7=function(e,t,n,r,i){var a=q7(e,window.getComputedStyle(t).direction),o=a*r,c=n.target,d=t.contains(c),h=!1,g=o>0,f=0,m=0;do{if(!c)break;var p=IA(e,c),w=p[0],x=p[1],v=p[2],y=x-v-a*w;(w||y)&&DA(e,c)&&(f+=y,m+=w);var j=c.parentNode;c=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(g&&Math.abs(f)<1||!g&&Math.abs(m)<1)&&(h=!0),h},Mf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jS=function(e){return[e.deltaX,e.deltaY]},_S=function(e){return e&&"current"in e?e.current:e},$7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},z7=function(e){return` 564 .block-interactivity-`.concat(e,` {pointer-events: none;} 565 .allow-interactivity-`).concat(e,` {pointer-events: all;} 566`)},V7=0,Xo=[];function H7(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(V7++)[0],a=E.useState(MA)[0],o=E.useRef(e);E.useEffect(function(){o.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=f7([e.lockRef.current],(e.shards||[]).map(_S),!0).filter(Boolean);return x.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=E.useCallback(function(x,v){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!o.current.allowPinchZoom;var y=Mf(x),j=n.current,_="deltaX"in x?x.deltaX:j[0]-y[0],N="deltaY"in x?x.deltaY:j[1]-y[1],C,S=x.target,P=Math.abs(_)>Math.abs(N)?"h":"v";if("touches"in x&&P==="h"&&S.type==="range")return!1;var R=wS(P,S);if(!R)return!0;if(R?C=P:(C=P==="v"?"h":"v",R=wS(P,S)),!R)return!1;if(!r.current&&"changedTouches"in x&&(_||N)&&(r.current=C),!C)return!0;var L=r.current||C;return U7(L,v,x,L==="h"?_:N)},[]),d=E.useCallback(function(x){var v=x;if(!(!Xo.length||Xo[Xo.length-1]!==a)){var y="deltaY"in v?jS(v):Mf(v),j=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&$7(C.delta,y)})[0];if(j&&j.should){v.cancelable&&v.preventDefault();return}if(!j){var _=(o.current.shards||[]).map(_S).filter(Boolean).filter(function(C){return C.contains(v.target)}),N=_.length>0?c(v,_[0]):!o.current.noIsolation;N&&v.cancelable&&v.preventDefault()}}},[]),h=E.useCallback(function(x,v,y,j){var _={name:x,delta:v,target:y,should:j,shadowParent:W7(y)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(N){return N!==_})},1)},[]),g=E.useCallback(function(x){n.current=Mf(x),r.current=void 0},[]),f=E.useCallback(function(x){h(x.type,jS(x),x.target,c(x,e.lockRef.current))},[]),m=E.useCallback(function(x){h(x.type,Mf(x),x.target,c(x,e.lockRef.current))},[]);E.useEffect(function(){return Xo.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",d,Qo),document.addEventListener("touchmove",d,Qo),document.addEventListener("touchstart",g,Qo),function(){Xo=Xo.filter(function(x){return x!==a}),document.removeEventListener("wheel",d,Qo),document.removeEventListener("touchmove",d,Qo),document.removeEventListener("touchstart",g,Qo)}},[]);var p=e.removeScrollBar,w=e.inert;return E.createElement(E.Fragment,null,w?E.createElement(a,{styles:z7(i)}):null,p?E.createElement(M7,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function W7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const K7=w7(OA,H7);var sm=E.forwardRef(function(e,t){return E.createElement(rm,Cs({},e,{ref:t,sideCar:K7}))});sm.classNames=rm.classNames;var G7=[" ","Enter","ArrowUp","ArrowDown"],Y7=[" ","Enter"],uo="Select",[im,am,Q7]=Wh(uo),[Kl]=Kr(uo,[Q7,em]),om=em(),[X7,pa]=Kl(uo),[J7,Z7]=Kl(uo),FA=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:c,onValueChange:d,dir:h,name:g,autoComplete:f,disabled:m,required:p,form:w}=e,x=om(t),[v,y]=E.useState(null),[j,_]=E.useState(null),[N,C]=E.useState(!1),S=Zu(h),[P,R]=pi({prop:r,defaultProp:i??!1,onChange:a,caller:uo}),[L,D]=pi({prop:o,defaultProp:c,onChange:d,caller:uo}),T=E.useRef(null),O=v?w||!!v.closest("form"):!0,[M,U]=E.useState(new Set),z=Array.from(M).map(H=>H.props.value).join(";");return s.jsx(SA,{...x,children:s.jsxs(X7,{required:p,scope:t,trigger:v,onTriggerChange:y,valueNode:j,onValueNodeChange:_,valueNodeHasChildren:N,onValueNodeHasChildrenChange:C,contentId:Rs(),value:L,onValueChange:D,open:P,onOpenChange:R,dir:S,triggerPointerDownPosRef:T,disabled:m,children:[s.jsx(im.Provider,{scope:t,children:s.jsx(J7,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(H=>{U(Y=>new Set(Y).add(H))},[]),onNativeOptionRemove:E.useCallback(H=>{U(Y=>{const G=new Set(Y);return G.delete(H),G})},[]),children:n})}),O?s.jsxs(lR,{"aria-hidden":!0,required:p,tabIndex:-1,name:g,autoComplete:f,value:L,onChange:H=>D(H.target.value),disabled:m,form:w,children:[L===void 0?s.jsx("option",{value:""}):null,Array.from(M)]},z):null]})})};FA.displayName=uo;var BA="SelectTrigger",qA=E.forwardRef((e,t)=>
vendor: 15,042 bytes, line 566
566{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=om(n),o=pa(BA,n),c=o.disabled||r,d=bt(t,o.onTriggerChange),h=am(n),g=E.useRef("touch"),[f,m,p]=uR(x=>{const v=h().filter(_=>!_.disabled),y=v.find(_=>_.value===o.value),j=dR(v,x,y);j!==void 0&&o.onValueChange(j.value)}),w=x=>{c||(o.onOpenChange(!0),p()),x&&(o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return s.jsx(kA,{asChild:!0,...a,children:s.jsx(Ze.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":cR(o.value)?"":void 0,...i,ref:d,onClick:Ie(i.onClick,x=>{x.currentTarget.focus(),g.current!=="mouse"&&w(x)}),onPointerDown:Ie(i.onPointerDown,x=>{g.current=x.pointerType;const v=x.target;v.hasPointerCapture(x.pointerId)&&v.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(w(x),x.preventDefault())}),onKeyDown:Ie(i.onKeyDown,x=>{const v=f.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&m(x.key),!(v&&x.key===" ")&&G7.includes(x.key)&&(w(),x.preventDefault())})})})});qA.displayName=BA;var UA="SelectValue",$A=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...c}=e,d=pa(UA,n),{onValueNodeHasChildrenChange:h}=d,g=a!==void 0,f=bt(t,d.onValueNodeChange);return jn(()=>{h(g)},[h,g]),s.jsx(Ze.span,{...c,ref:f,style:{pointerEvents:"none"},children:cR(d.value)?s.jsx(s.Fragment,{children:o}):a})});$A.displayName=UA;var eV="SelectIcon",zA=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return s.jsx(Ze.span,{"aria-hidden":!0,...i,ref:t,children:r||"â¼"})});zA.displayName=eV;var tV="SelectPortal",VA=e=>s.jsx(tm,{asChild:!0,...e});VA.displayName=tV;var fo="SelectContent",HA=E.forwardRef((e,t)=>{const n=pa(fo,e.__scopeSelect),[r,i]=E.useState();if(jn(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?Wu.createPortal(s.jsx(WA,{scope:e.__scopeSelect,children:s.jsx(im.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(KA,{...e,ref:t})});HA.displayName=fo;var rs=10,[WA,ga]=Kl(fo),nV="SelectContentImpl",rV=lo("SelectContent.RemoveScroll"),KA=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:c,sideOffset:d,align:h,alignOffset:g,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:x,avoidCollisions:v,...y}=e,j=pa(fo,n),[_,N]=E.useState(null),[C,S]=E.useState(null),P=bt(t,Q=>N(Q)),[R,L]=E.useState(null),[D,T]=E.useState(null),O=am(n),[M,U]=E.useState(!1),z=E.useRef(!1);E.useEffect(()=>{if(_)return Mb(_)},[_]),Sb();const H=E.useCallback(Q=>{const[ne,...se]=O().map(je=>je.ref.current),[ce]=se.slice(-1),ye=document.activeElement;for(const je of Q)if(je===ye||(je==null||je.scrollIntoView({block:"nearest"}),je===ne&&C&&(C.scrollTop=0),je===ce&&C&&(C.scrollTop=C.scrollHeight),je==null||je.focus(),document.activeElement!==ye))return},[O,C]),Y=E.useCallback(()=>H([R,_]),[H,R,_]);E.useEffect(()=>{M&&Y()},[M,Y]);const{onOpenChange:G,triggerPointerDownPosRef:$}=j;E.useEffect(()=>{if(_){let Q={x:0,y:0};const ne=ce=>{var ye,je;Q={x:Math.abs(Math.round(ce.pageX)-(((ye=$.current)==null?void 0:ye.x)??0)),y:Math.abs(Math.round(ce.pageY)-(((je=$.current)==null?void 0:je.y)??0))}},se=ce=>{Q.x<=10&&Q.y<=10?ce.preventDefault():_.contains(ce.target)||G(!1),document.removeEventListener("pointermove",ne),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",se,{capture:!0})}}},[_,G,$]),E.useEffect(()=>{const Q=()=>G(!1);return window.addEventListener("blur",Q),window.addEventListener("resize",Q),()=>{window.removeEventListener("blur",Q),window.removeEventListener("resize",Q)}},[G]);const[I,B]=uR(Q=>{const ne=O().filter(ye=>!ye.disabled),se=ne.find(ye=>ye.ref.current===document.activeElement),ce=dR(ne,Q,se);ce&&setTimeout(()=>ce.ref.current.focus())}),V=E.useCallback((Q,ne,se)=>{const ce=!z.current&&!se;(j.value!==void 0&&j.value===ne||ce)&&(L(Q),ce&&(z.current=!0))},[j.value]),q=E.useCallback(()=>_==null?void 0:_.focus(),[_]),J=E.useCallback((Q,ne,se)=>{const ce=!z.current&&!se;(j.value!==void 0&&j.value===ne||ce)&&T(Q)},[j.value]),te=r==="popper"?u0:GA,K=te===u0?{side:c,sideOffset:d,align:h,alignOffset:g,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:x,avoidCollisions:v}:{};return s.jsx(WA,{scope:n,content:_,viewport:C,onViewportChange:S,itemRefCallback:V,selectedItem:R,onItemLeave:q,itemTextRefCallback:J,focusSelectedItem:Y,selectedItemText:D,position:r,isPositioned:M,searchRef:I,children:s.jsx(sm,{as:rV,allowPinchZoom:!0,children:s.jsx(Gh,{asChild:!0,trapped:j.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:Ie(i,Q=>{var ne;(ne=j.trigger)==null||ne.focus({preventScroll:!0}),Q.preventDefault()}),children:s.jsx(Kh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:s.jsx(te,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:Q=>Q.preventDefault(),...y,...K,onPlaced:()=>U(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ie(y.onKeyDown,Q=>{const ne=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!ne&&Q.key.length===1&&B(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let ce=O().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const ye=Q.target,je=ce.indexOf(ye);ce=ce.slice(je+1)}setTimeout(()=>H(ce)),Q.preventDefault()}})})})})})})});KA.displayName=nV;var sV="SelectItemAlignedPosition",GA=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=pa(fo,n),o=ga(fo,n),[c,d]=E.useState(null),[h,g]=E.useState(null),f=bt(t,P=>g(P)),m=am(n),p=E.useRef(!1),w=E.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:y,focusSelectedItem:j}=o,_=E.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&h&&x&&v&&y){const P=a.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),L=a.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(a.dir!=="rtl"){const ye=D.left-R.left,je=L.left-ye,Fe=P.left-je,Ye=P.width+Fe,et=Math.max(Ye,R.width),Le=window.innerWidth-rs,at=xh(je,[rs,Math.max(rs,Le-et)]);c.style.minWidth=Ye+"px",c.style.left=at+"px"}else{const ye=R.right-D.right,je=window.innerWidth-L.right-ye,Fe=window.innerWidth-P.right-je,Ye=P.width+Fe,et=Math.max(Ye,R.width),Le=window.innerWidth-rs,at=xh(je,[rs,Math.max(rs,Le-et)]);c.style.minWidth=Ye+"px",c.style.right=at+"px"}const T=m(),O=window.innerHeight-rs*2,M=x.scrollHeight,U=window.getComputedStyle(h),z=parseInt(U.borderTopWidth,10),H=parseInt(U.paddingTop,10),Y=parseInt(U.borderBottomWidth,10),G=parseInt(U.paddingBottom,10),$=z+H+M+G+Y,I=Math.min(v.offsetHeight*5,$),B=window.getComputedStyle(x),V=parseInt(B.paddingTop,10),q=parseInt(B.paddingBottom,10),J=P.top+P.height/2-rs,te=O-J,K=v.offsetHeight/2,Q=v.offsetTop+K,ne=z+H+Q,se=$-ne;if(ne<=J){const ye=T.length>0&&v===T[T.length-1].ref.current;c.style.bottom="0px";const je=h.clientHeight-x.offsetTop-x.offsetHeight,Fe=Math.max(te,K+(ye?q:0)+je+Y),Ye=ne+Fe;c.style.height=Ye+"px"}else{const ye=T.length>0&&v===T[0].ref.current;c.style.top="0px";const Fe=Math.max(J,z+x.offsetTop+(ye?V:0)+K)+se;c.style.height=Fe+"px",x.scrollTop=ne-J+x.offsetTop}c.style.margin=`${rs}px 0`,c.style.minHeight=I+"px",c.style.maxHeight=O+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,a.trigger,a.valueNode,c,h,x,v,y,a.dir,r]);jn(()=>_(),[_]);const[N,C]=E.useState();jn(()=>{h&&C(window.getComputedStyle(h).zIndex)},[h]);const S=E.useCallback(P=>{P&&w.current===!0&&(_(),j==null||j(),w.current=!1)},[_,j]);return s.jsx(aV,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:s.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:s.jsx(Ze.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});GA.displayName=sV;var iV="SelectPopperPosition",u0=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=rs,...a}=e,o=om(n);return s.jsx(CA,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});u0.displayName=iV;var[aV,Lb]=Kl(fo,{}),d0="SelectViewport",YA=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=ga(d0,n),o=Lb(d0,n),c=bt(t,a.onViewportChange),d=E.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(im.Slot,{scope:n,children:s.jsx(Ze.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ie(i.onScroll,h=>{const g=h.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&f){const p=Math.abs(d.current-g.scrollTop);if(p>0){const w=window.innerHeight-rs*2,x=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),y=Math.max(x,v);if(y<w){const j=y+p,_=Math.min(w,j),N=j-_;f.style.height=_+"px",f.style.bottom==="0px"&&(g.scrollTop=N>0?N:0,f.style.justifyContent="flex-end")}}}d.current=g.scrollTop})})})]})});YA.displayName=d0;var QA="SelectGroup",[oV,lV]=Kl(QA),cV=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Rs();return s.jsx(oV,{scope:n,id:i,children:s.jsx(Ze.div,{role:"group","aria-labelledby":i,...r,ref:t})})});cV.displayName=QA;var XA="SelectLabel",JA=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=lV(XA,n);return s.jsx(Ze.div,{id:i.id,...r,ref:t})});JA.displayName=XA;var _h="SelectItem",[uV,ZA]=Kl(_h),eR=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,c=pa(_h,n),d=ga(_h,n),h=c.value===r,[g,f]=E.useState(a??""),[m,p]=E.useState(!1),w=bt(t,j=>{var _;return(_=d.itemRefCallback)==null?void 0:_.call(d,j,r,i)}),x=Rs(),v=E.useRef("touch"),y=()=>{i||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(uV,{scope:n,value:r,disabled:i,textId:x,isSelected:h,onItemTextChange:E.useCallback(j=>{f(_=>_||((j==null?void 0:j.textContent)??"").trim())},[]),children:s.jsx(im.ItemSlot,{scope:n,value:r,disabled:i,textValue:g,children:s.jsx(Ze.div,{role:"option","aria-labelledby":x,"data-highlighted":m?"":void 0,"aria-selected":h&&m,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:w,onFocus:Ie(o.onFocus,()=>p(!0)),onBlur:Ie(o.onBlur,()=>p(!1)),onClick:Ie(o.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:Ie(o.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:Ie(o.onPointerDown,j=>{v.current=j.pointerType}),onPointerMove:Ie(o.onPointerMove,j=>{var _;v.current=j.pointerType,i?(_=d.onItemLeave)==null||_.call(d):v.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ie(o.onPointerLeave,j=>{var _;j.currentTarget===document.activeElement&&((_=d.onItemLeave)==null||_.call(d))}),onKeyDown:Ie(o.onKeyDown,j=>{var N;((N=d.searchRef)==null?void 0:N.current)!==""&&j.key===" "||(Y7.includes(j.key)&&y(),j.key===" "&&j.preventDefault())})})})})});eR.displayName=_h;var Jc="SelectItemText",tR=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=pa(Jc,n),c=ga(Jc,n),d=ZA(Jc,n),h=Z7(Jc,n),[g,f]=E.useState(null),m=bt(t,y=>f(y),d.onItemTextChange,y=>{var j;return(j=c.itemTextRefCallback)==null?void 0:j.call(c,y,d.value,d.disabled)}),p=g==null?void 0:g.textContent,w=E.useMemo(()=>s.jsx("option",{value:d.value,disabled:d.disabled,children:p},d.value),[d.disabled,d.value,p]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=h;return jn(()=>(x(w),()=>v(w)),[x,v,w]),s.jsxs(s.Fragment,{children:[s.jsx(Ze.span,{id:d.textId,...a,ref:m}),d.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Wu.createPortal(a.children,o.valueNode):null]})});tR.displayName=Jc;var nR="SelectItemIndicator",rR=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ZA(nR,n).isSelected?s.jsx(Ze.span,{"aria-hidden":!0,...r,ref:t}):null});rR.displayName=nR;var f0="SelectScrollUpButton",sR=E.forwardRef((e,t)=>{const n=ga(f0,e.__scopeSelect),r=Lb(f0,e.__scopeSelect),[i,a]=E.useState(!1),o=bt(t,r.onScrollButtonChange);return jn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;a(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?s.jsx(aR,{...e,ref:o,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});sR.displayName=f0;var h0="SelectScrollDownButton",iR=E.forwardRef((e,t)=>{const n=ga(h0,e.__scopeSelect),r=Lb(h0,e.__scopeSelect),[i,a]=E.useState(!1),o=bt(t,r.onScrollButtonChange);return jn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,g=Math.ceil(d.scrollTop)<h;a(g)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?s.jsx(aR,{...e,ref:o,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});iR.displayName=h0;var aR=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=ga("SelectScrollButton",n),o=E.useRef(null),c=am(n),d=E.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return E.useEffect(()=>()=>d(),[d]),jn(()=>{var g;const h=c().find(f=>f.ref.current===document.activeElement);(g=h==null?void 0:h.ref.current)==null||g.scrollIntoView({block:"nearest"})},[c]),s.jsx(Ze.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ie(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Ie(i.onPointerMove,()=>{var h;(h=a.onItemLeave)==null||h.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Ie(i.onPointerLeave,()=>{d()})})}),dV="SelectSeparator",oR=E.forwardRef((e,t)=>
vendor: 4,320 bytes, line 566
566{const{__scopeSelect:n,...r}=e;return s.jsx(Ze.div,{"aria-hidden":!0,...r,ref:t})});oR.displayName=dV;var m0="SelectArrow",fV=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=om(n),a=pa(m0,n),o=ga(m0,n);return a.open&&o.position==="popper"?s.jsx(EA,{...i,...r,ref:t}):null});fV.displayName=m0;var hV="SelectBubbleInput",lR=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=E.useRef(null),a=bt(r,i),o=nm(t);return E.useEffect(()=>{const c=i.current;if(!c)return;const d=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(d,"value").set;if(o!==t&&g){const f=new Event("change",{bubbles:!0});g.call(c,t),c.dispatchEvent(f)}},[o,t]),s.jsx(Ze.select,{...n,style:{...TA,...n.style},ref:a,defaultValue:t})});lR.displayName=hV;function cR(e){return e===""||e===void 0}function uR(e){const t=ds(e),n=E.useRef(""),r=E.useRef(0),i=E.useCallback(o=>{const c=n.current+o;t(c),(function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),a=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function dR(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=mV(e,Math.max(a,0));i.length===1&&(o=o.filter(h=>h!==n));const d=o.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function mV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var pV=FA,fR=qA,gV=$A,yV=zA,xV=VA,hR=HA,vV=YA,mR=JA,pR=eR,bV=tR,wV=rR,gR=sR,yR=iR,xR=oR;const pt=pV,gt=gV,dt=E.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(fR,{ref:r,className:He("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,s.jsx(yV,{asChild:!0,children:s.jsx(Ih,{className:"h-4 w-4 opacity-50"})})]}));dt.displayName=fR.displayName;const vR=E.forwardRef(({className:e,...t},n)=>s.jsx(gR,{ref:n,className:He("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(rI,{className:"h-4 w-4"})}));vR.displayName=gR.displayName;const bR=E.forwardRef(({className:e,...t},n)=>s.jsx(yR,{ref:n,className:He("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Ih,{className:"h-4 w-4"})}));bR.displayName=yR.displayName;const ft=E.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>s.jsx(xV,{children:s.jsxs(hR,{ref:i,className:He("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[s.jsx(vR,{}),s.jsx(vV,{className:He("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(bR,{})]})}));ft.displayName=hR.displayName;const jV=E.forwardRef(({className:e,...t},n)=>s.jsx(mR,{ref:n,className:He("px-2 py-1.5 text-sm font-semibold",e),...t}));jV.displayName=mR.displayName;const Ae=E.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(pR,{ref:r,className:He("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(wV,{children:s.jsx(Ds,{className:"h-4 w-4"})})}),s.jsx(bV,{children:t})]}));Ae.displayName=pR.displayName;const _V=E.forwardRef(({className:e,...t},n)=>s.jsx(xR,{ref:n,className:He("-mx-1 my-1 h-px bg-muted",e),...t}));_V.displayName=xR.displayName;
566function po({value:e,onChange:t,placeholder:n="Select suburb"}){const{data:r,isLoading:i}=De({queryKey:["official-suburbs"],queryFn:()=>ie.entities.Suburb.list("name"),initialData:[]}),a=[...new Set(r.map(o=>o.name).filter(Boolean))].sort((o,c)=>o.localeCompare(c));return s.jsxs(pt,{value:e||"",onValueChange:t,disabled:i,children:[s.jsx(dt,{children:s.jsx(gt,{placeholder:i?"Loading suburbs...":n})}),s.jsx(ft,{children:a.map(o=>s.jsx(Ae,{value:o,children:o},o))})]})}const NV=["restaurant","cafe","bar_lounge","retail","services","healthcare","education","entertainment","fitness","beauty","spa_wellness","professional","automotive","home_services","real_estate","hospitality","pet_services","technology","financial_services","other"],SV=e=>e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");function kV(){Mt("Add a Business | This is Randburg","",{noindex:!0});const e=wt(),t=dn(),[n,r]=E.useState(!0),[i,a]=E.useState(null),[o,c]=E.useState(!1),[d,h]=E.useState(!1),[g,f]=E.useState(!1),[m,p]=E.useState({name:"",slug:"",tagline:"",description:"",category:"",parent_categories:[],suburb:"",address:"",contact_phone:"",contact_email:"",website:"",social_links:[],main_image_url:"",additional_image_urls:[],operating_hours:"",features:[],tags:[]}),[w,x]=E.useState(""),[v,y]=E.useState(""),[j,_]=E.useState(""),N=()=>{w.trim()&&(L("features",[...m.features,w.trim()]),x(""))},C=$=>{L("features",m.features.filter((I,B)=>B!==$))},S=()=>{v.trim()&&j.trim()&&(L("social_links",[...m.social_links,{platform:v.trim(),url:j.trim()}]),y(""),_(""))},P=$=>{L("social_links",m.social_links.filter((I,B)=>B!==$))};E.useEffect(()=>{(async()=>{if(!await ie.auth.isAuthenticated()){ie.auth.redirectToLogin(xt("AddBusiness"));return}const B=await ie.auth.me();a(B),r(!1)})()},[e]);const R=Ct({mutationFn:$=>ie.entities.Business.create({...$,status:"active",featured:!1}),onSuccess:()=>{t.invalidateQueries({queryKey:["businesses","user-businesses"]}),f(!0),setTimeout(()=>e(xt("UserDashboard")),2e3)}}),L=($,I)=>p(B=>({...B,[$]:I})),D=$=>$.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/^-+|-+$/g,""),T=$=>{L("name",$),m.slug||L("slug",D($))},O=$=>{const I=$.toLowerCase().replace(/[^a-z0-9-]/g,"");L("slug",I)},M=$=>{$.replace(/\s/g,"").length<=30&&L("tagline",$)},U=async $=>$?!(await ie.entities.Business.list()).some(B=>B.slug===$):!1,z=async $=>{var B;const I=(B=$.target.files)==null?void 0:B[0];if(I){if(!I.type.match(/^image\/(jpeg|jpg|png)$/)){alert("Please upload a JPEG or PNG image.");return}if(I.size>1024*1024){alert("Please upload an image smaller than 1MB.");return}c(!0);try{const{file_url:V}=await ie.integrations.Core.UploadFile({file:I});L("main_image_url",V)}finally{c(!1)}}},H=async $=>{const I=Array.from($.target.files||[]);if(I.length===0)return;if(I.filter(q=>!q.type.match(/^image\/(jpeg|jpg|png)$/)).length>0){alert("Please upload only JPEG or PNG images.");return}if(I.find(q=>q.size>500*1024)){alert("Gallery images must be smaller than 500KB each.");return}if(m.additional_image_urls.length+I.length>5){alert("You can upload up to 5 additional images.");return}h(!0);try{const J=(await Promise.all(I.map(te=>ie.integrations.Core.UploadFile({file:te})))).map(te=>te.file_url);L("additional_image_urls",[...m.additional_image_urls,...J].slice(0,5))}finally{h(!1)}},Y=$=>{L("additional_image_urls",m.additional_image_urls.filter((I,B)=>B!==$))},G=async $=>{if($.preventDefault(),m.parent_categories.length===0){alert("Please select at least one main category.");return}const I=m.slug||D(m.name);if(!await U(I)){alert("This slug is already taken. Please choose another.");return}R.mutate({...m,slug:I})};return n?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:s.jsx(Ke,{className:"w-8 h-8 animate-spin text-blue-600"})}):g?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:s.jsxs(Ge,{className:"max-w-md w-full p-8 text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(cs,{className:"w-10 h-10 text-green-600"})}),s.jsx("h2",{className:"text-2xl font-black text-gray-900 mb-3",children:"Business Added!"}),s.jsx("p",{className:"text-gray-600",children:"Your business is live."})]})}):s.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-4xl font-black text-gray-900 mb-3",children:"Add a Business"}),s.jsx("p",{className:"text-lg text-gray-600",children:"Add your business. Listings go live immediately."})]}),s.jsx(Ge,{className:"p-8",children:s.jsxs("form",{onSubmit:G,className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"name",children:"Business N
566ame *"}),s.jsx(de,{id:"name",required:!0,value:m.name,onChange:$=>T($.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"slug",children:"URL Slug *"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-gray-500",children:"thisisrandburg.co.za/business/"}),s.jsx(de,{id:"slug",required:!0,value:m.slug,onChange:$=>O($.target.value)})]}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Lowercase letters, numbers, and hyphens only."})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"tagline",children:"Tagline"}),s.jsx(de,{id:"tagline",value:m.tagline,onChange:$=>M($.target.value),placeholder:"A short catchy phrase about your business"}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Optional: Max 30 characters (excluding spaces). ",30-m.tagline.replace(/\s/g,"").length," remaining"]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"description",children:"Description *"}),s.jsx(un,{id:"description",rows:4,required:!0,value:m.description,onChange:$=>L("description",$.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Main Categories * (choose up to 3)"}),s.jsx(Ju,{value:m.parent_categories,onChange:$=>L("parent_categories",$)})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"category",children:"Specific Category *"}),s.jsxs("select",{id:"category",required:!0,value:m.category,onChange:$=>L("category",$.target.value),className:"w-full border rounded-md h-10 px-3",children:[s.jsx("option",{value:"",disabled:!0,children:"Select category"}),NV.map($=>s.jsx("option",{value:$,children:SV($)},$))]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Suburb *"}),s.jsx(po,{value:m.suburb,onChange:$=>L("suburb",$)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"address",children:"Address"}),s.jsx(de,{id:"address",value:m.address,onChange:$=>L("address",$.target.value)})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"contact_phone",children:"Contact Phone"}),s.jsx(de,{id:"contact_phone",value:m.contact_phone,onChange:$=>L("contact_phone",$.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"contact_email",children:"Contact Email"}),s.jsx(de,{id:"contact_email",type:"email",value:m.contact_email,onChange:$=>L("contact_email",$.target.value)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"website",children:"Website"})," ",s.jsx(de,{id:"website",value:m.website,onChange:$=>L("website",$.target.value),placeholder:"https://www.yourbusiness.com"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Social Media Links (up to 10)"}),s.jsxs("div",{className:"space-y-3 mt-2",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(de,{value:v,onChange:$=>y($.target.value),placeholder:"Platform (e.g., Facebook, Instagram)",className:"flex-1"}),s.jsx(de,{value:j,onChange:$=>_($.target.value),placeholder:"https://...",className:"flex-1"}),s.jsx(ge,{type:"button",onClick:S,variant:"outline",disabled:m.social_links.length>=10,children:s.jsx(Cr,{className:"w-4 h-4"})})]}),m.social_links.length>0&&s.jsx("div",{className:"space-y-2",children:m.social_links.map(($,I)=>s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-gray-50 rounded",children:[s.jsxs("span",{className:"font-medium text-sm flex-shrink-0",children:[$.platform,":"]}),s.jsx("span",{className:"text-sm text-gray-600 truncate flex-1",children:$.url}),s.jsx("button",{type:"button",onClick:()=>P(I),className:"text-red-600 hover:text-red-700 flex-shrink-0",children:s.jsx(kt,{className:"w-4 h-4"})})]},I))})]}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Add links to your social media profiles"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"operating_hours",children:"Operating Hours"}),s.jsx(un,{id:"operating_hours",rows:3,value:m.operating_hours,onChange:$=>L("operating_hours",$.target.value),placeholder:"e.g. Mon-Fri: 9am-5pm, Sat: 10am-2pm"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Optional: When your business is open"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Features & Amenities"}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsx(de,{value:w,onChange:$=>x($.target.value),onKeyPress:$=>{$.key==="Enter"&&($.preventDefault(),N())},placeholder:"e.g. Free WiFi, Parking, Wheelchair Accessible"}),s.jsx(ge,{type:"button",onClick:N,variant:"outline",children:"Add"})]}),m.features.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:m.features.map(($,I)=>s.jsxs(rt,{variant:"secondary",className:"flex items-center gap-1",children:[$,s.jsx("button",{type:"button",onClick:()=>C(I),className:"ml-1 hover:text-red-600",children:s.jsx(kt,{className:"w-3 h-3"})})]},I))}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Optional: Add features/amenities your business offers"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Discoverability Tags"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Add tags to help people find your business in search. Try our AI suggest button!"}),s.jsx("div",{className:"mt-2",children:s.jsx(ma,{tags:m.tags,onChange:$=>L("tags",$),context:{name:m.name,description:m.description,category:m.category,parent_categories:m.parent_categories,suburb:m.suburb},entityType:"business",onParentCategoriesChange:$=>L("parent_categories",$)})})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Main Image (thumbnail) *"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Max file size: 1MB. JPEG or PNG only."})," ",s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"main_image",accept:"image/jpeg,image/jpg,image/png",onCh
566ange:z,className:"hidden"})," ",s.jsx("label",{htmlFor:"main_image",children:s.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400",children:o?s.jsx("p",{children:"Uploading..."}):m.main_image_url?s.jsx("img",{src:m.main_image_url,alt:"Main",className:"h-40 mx-auto object-cover rounded-md"}):s.jsx(s.Fragment,{children:"Click to upload main image"})})})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Additional Images (up to 5)"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Max file size per image: 500KB. JPEG or PNG only."})," ",s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"gallery_images",accept:"image/jpeg,image/jpg,image/png",multiple:!0,onChange:H,className:"hidden"})," ",s.jsx("label",{htmlFor:"gallery_images",children:s.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400",children:d?s.jsx("p",{children:"Uploading..."}):s.jsx(s.Fragment,{children:"Click to upload gallery images"})})}),m.additional_image_urls.length>0&&s.jsx("div",{className:"grid grid-cols-3 gap-4 mt-4",children:m.additional_image_urls.map(($,I)=>s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:$,alt:`Upload preview ${I}`,className:"w-full h-32 object-cover rounded-lg"}),s.jsx("button",{type:"button",onClick:()=>Y(I),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-4 h-4"})})]},I))})]})]}),s.jsxs("div",{className:"flex justify-end gap-4 pt-2",children:[s.jsx(ge,{type:"button",variant:"outline",onClick:()=>e(xt("UserDashboard")),children:"Cancel"}),s.jsx(ge,{type:"submit",disabled:!m.suburb||!m.main_image_url||R.isPending,children:R.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Publishing..."]}):"Publish Listing"})]})]})})]})})}function CV(){Mt("Add an Event | This is Randburg","",{noindex:!0});const e=dn(),t=wt(),[n,r]=E.useState(!0),[i,a]=E.useState({title:"",description:"",start_date:"",end_date:"",category:"",venue_name:"",suburb:"",address:"",main_image_url:"",additional_image_urls:[],organizer:"",contact_email:"",contact_phone:"",ticket_price:"",tags:[]}),[o,c]=E.useState(!1),[d,h]=E.useState(!1),[g,f]=E.useState(!1);E.useEffect(()=>{(async()=>{await ie.auth.isAuthenticated()?r(!1):ie.auth.redirectToLogin(xt("AddEvent"))})()},[]);const m=Ct({mutationFn:_=>ie.entities.Event.create({..._,status:"published"}),onSuccess:()=>{e.invalidateQueries({queryKey:["events","user-events"]}),c(!0),setTimeout(()=>{t(xt("UserDashboard"))},2e3)}}),p=(_,N)=>a(C=>({...C,[_]:N})),w=async _=>{var C;const N=(C=_.target.files)==null?void 0:C[0];if(N){if(!N.type.match(/^image\/(jpeg|jpg|png)$/)){alert("Please upload a JPEG or PNG image.");return}if(N.size>1024*1024){alert("Please upload an image smaller than 1MB.");return}h(!0);try{const{file_url:S}=await ie.integrations.Core.UploadFile({file:N});p("main_image_url",S)}finally{h(!1)}}},x=async _=>{const N=Array.from(_.target.files||[]);if(N.length===0)return;if(N.filter(P=>!P.type.match(/^image\/(jpeg|jpg|png)$/)).length>0){alert("Please upload only JPEG or PNG images.");return}if(N.find(P=>P.size>500*1024)){alert("Gallery images must be smaller than 500KB each.");return}f(!0);try{const R=(await Promise.all(N.map(L=>ie.integrations.Core.UploadFile({file:L})))).map(L=>L.file_url);p("additional_image_urls",[...i.additional_image_urls,...R].slice(0,5))}finally{f(!1)}},v=_=>{p("additional_image_urls",i.additional_image_urls.filter((N,C)=>C!==_))},y=_=>{_.preventDefault(),m.mutate({...i,start_date:new Date(i.start_date).toISOString(),end_date:i.end_date?new Date(i.end_date).toISOString():null})},j=["entertainment","sports","food","family","arts","culture","education","business","community","music","festival","market","other"];return n?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:s.jsx(Ke,{className:"w-8 h-8 animate-spin text-blue-600"})}):o?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:s.jsxs(Ge,{className:"max-w-md w-full p-8 text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(cs,{className:"w-10 h-10 text-green-600"})}),s.jsx("h2",{className:"text-2xl font-black text-gray-900 mb-3",children:"Event Created!"}),s.jsx("p",{className:"text-gray-600",children:"Your event has been successfully added to the platform."})]})}):s.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-4xl font-black text-gray-900 mb-3",children:"Add a New Event"}),s.jsx("p",{className:"text-lg text-gray-600",children:"Share what's happening in Randburg with the community."})]}),s.jsx(Ge,{children:s.jsxs("form",{onSubmit:y,children:[s.jsxs(Rt,{className:"p-8 space-y-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"title",children:"Event Title *"}),s.jsx(de,{id:"title",value:i.title,onChange:_=>p("title",_.target.value),required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"description",children:"Description *"}),s.jsx(un,{id:"description",value:i.description,onChange:_=>p("description",_.target.value),required:!0})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"start_date",children:"Start Date & Time *"}),s.jsx(de,{id:"start_date",type:"datetime-local",value:i.start_date,onChange:_=>p("start_date",_.target.value),required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"end_date",children:"End Date & Time"}),s.jsx(de,{id:"end_date",type:"datetime-local",value:i.end_date,onChange:_=>p("end_date",_.target.value)})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"venue_name",children:"Venue *"}),s.jsx(de,{id:"venue_name",value:i.venue_name,onChange:_=>p("venue_name",_.target.value),required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Suburb *"}),s.jsx(po,{value:i.suburb,onChange:_=>p("suburb",_)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"address",children:"Address"}),s.jsx(de,{id:"address",value:i.address,onChange:_=>p("address",_.target.value)})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"category",children:"Category *"}),s.jsxs(pt,{required:!0,value:i.category,onValueChange:_=>p("category",_),children:[s.jsx(dt,{children:s.jsx(gt,{placeholder:"Select category"})}),s.jsx(ft,{children:j.map(_=>s.jsx(Ae,{value:_,children:_.charAt(0).toUpperCase()+_.slice(1)},_))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"ticket_price",children:"Ticket Price"}),s.jsx(de,{id:"ticket_price",value:i.ticket_price,onChange:_=>p("ticket_price",_.target.value),placeholder:"e.g., R100 or Free"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Discoverability Tags"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Add tags to help people find your event in search. Try our AI suggest button!"}),s.jsx("div",{className:"mt-2",children:s.jsx(ma,{tags:i.tags,onChange:_=>
566p("tags",_),context:{name:i.title,description:i.description,category:i.category,suburb:i.suburb},entityType:"event"})})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Main Image (thumbnail) *"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Max file size: 1MB. JPEG or PNG only."}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"main_image",accept:"image/jpeg,image/jpg,image/png",onChange:w,className:"hidden"}),s.jsx("label",{htmlFor:"main_image",children:s.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400",children:d?s.jsx("p",{children:"Uploading..."}):i.main_image_url?s.jsx("img",{src:i.main_image_url,alt:"Main",className:"h-40 mx-auto object-cover rounded-md"}):s.jsx(s.Fragment,{children:"Click to upload main image"})})})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Gallery Images (optional)"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Max file size per image: 500KB. Up to 5 images. JPEG or PNG only."}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"gallery_images",accept:"image/jpeg,image/jpg,image/png",multiple:!0,onChange:x,className:"hidden"}),s.jsx("label",{htmlFor:"gallery_images",children:s.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400",children:g?s.jsx("p",{children:"Uploading..."}):s.jsx(s.Fragment,{children:"Click to upload gallery images"})})}),i.additional_image_urls.length>0&&s.jsx("div",{className:"grid grid-cols-3 gap-4 mt-4",children:i.additional_image_urls.map((_,N)=>s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:_,alt:`Upload preview ${N}`,className:"w-full h-32 object-cover rounded-lg"}),s.jsx("button",{type:"button",onClick:()=>v(N),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-4 h-4"})})]},N))})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"organizer",children:"Organizer"}),s.jsx(de,{id:"organizer",value:i.organizer,onChange:_=>p("organizer",_.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"contact_email",children:"Contact Email"}),s.jsx(de,{id:"contact_email",type:"email",value:i.contact_email,onChange:_=>p("contact_email",_.target.value)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"contact_phone",children:"Contact Phone"}),s.jsx(de,{id:"contact_phone",value:i.contact_phone,onChange:_=>p("contact_phone",_.target.value)})]})]}),s.jsx(Xu,{className:"p-8 pt-0",children:s.jsx(ge,{type:"submit",disabled:m.isPending||!i.suburb||!i.main_image_url,className:"w-full",children:m.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"})," Creating Event..."]}):"Create Event"})})]})})]})})}function EV(){Mt("List Your Property | This is Randburg","",{noindex:!0});const e=wt(),[t,n]=E.useState(!0),[r,i]=E.useState(!1),[a,o]=E.useState(!1),[c,d]=E.useState(!1),[h,g]=E.useState({title:"",description:"",property_type:"",bedrooms:1,bathrooms:1,parking_spaces:0,rent_amount:0,deposit_amount:0,available_from:"",suburb:"",address:"",main_image_url:"",additional_image_urls:[],contact_name:"",contact_email:"",contact_phone:"",features:"",pet_friendly:!1,furnished:!1,tags:[]});E.useEffect(()=>{(async()=>{await ie.auth.isAuthenticated()?n(!1):ie.auth.redirectToLogin(xt("AddRentalListing"))})()},[]);const f=Ct({mutationFn:j=>ie.entities.Property.create({...j,status:"available",featured:!1,features:j.features?j.features.split(",").map(_=>_.trim()).filter(Boolean):[]}),onSuccess:()=>{d(!0),setTimeout(()=>e(xt("UserDashboard")),2e3)}}),m=(j,_)=>g(N=>({...N,[j]:_})),p=async j=>{var N;const _=(N=j.target.files)==null?void 0:N[0];if(_){if(!_.type.match(/^image\/(jpeg|jpg|png)$/)){alert("Please upload a JPEG or PNG image.");return}if(_.size>1024*1024){alert("Please upload an image smaller than 1MB.");return}i(!0);try{const{file_url:C}=await ie.integrations.Core.UploadFile({file:_});m("main_image_url",C)}finally{i(!1)}}},w=async j=>{const _=Array.from(j.target.files||[]);if(_.length===0)return;if(_.filter(S=>!S.type.match(/^image\/(jpeg|jpg|png)$/)).length>0){alert("Please upload only JPEG or PNG images.");return}if(_.find(S=>S.size>500*1024)){alert("Gallery images must be smaller than 500KB each.");return}if(h.additional_image_urls.length+_.length>5){alert("You can upload up to 5 additional images.");return}o(!0);try{const P=(await Promise.all(_.map(R=>ie.integrations.Core.UploadFile({file:R})))).map(R=>R.file_url);m("additional_image_urls",[...h.additional_image_urls,...P].slice(0,5))}finally{o(!1)}},x=j=>{m("additional_image_urls",h.additional_image_urls.filter((_,N)=>N!==j))},v=j=>{j.preventDefault(),f.mutate(h)};if(t)return s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:s.jsx(Ke,{className:"w-8 h-8 animate-spin text-blue-600"})});if(c)return s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:s.jsxs(Ge,{className:"max-w-md w-full p-8 text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(cs,{className:"w-10 h-10 text-green-600"})}),s.jsx("h2",{className:"text-2xl font-black text-gray-900 mb-3",children:"Property Listed!"}),s.jsx("p",{className:"text-gray-600",children:"Your property is live."})]})});const y=["apartment","house","townhouse","studio","penthouse","duplex","cottage","bachelor"];return s.jsx("div",{className:"min-h-screen bg-gray-50 py-8 md:py-12",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"text-center mb-6 md:mb-8",children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-black text-gray-900 mb-2 md:mb-3",children:"List Your Property"}),s.jsx("p",{className:"text-base md:text-lg text-gray-600",children:"Add a rental property. Listings go live immediately."})]}),s.jsx(Ge,{className:"p-4 md:p-8",children:s.jsxs("form",{onSubmit:v,className:"space-y-4 md:space-y-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"title",children:"Title *"}),s.jsx(de,{id:"title",required:!0,value:h.title,onChange:j=>m("title",j.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"description",children:"Description *"}),s.jsx(un,{id:"description",required:!0,rows:4,value:h.description,onChange:j=>m("description",j.target.value)})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"property_type",children:"Property Type *"}),s.jsxs("select",{id:"property_type",required:!0,value:h.property_type,onCh
566ange:j=>m("property_type",j.target.value),className:"w-full border rounded-md h-10 px-3",children:[s.jsx("option",{value:"",disabled:!0,children:"Select type"}),y.map(j=>s.jsx("option",{value:j,children:j.charAt(0).toUpperCase()+j.slice(1)},j))]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Suburb *"}),s.jsx(po,{value:h.suburb,onChange:j=>m("suburb",j)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"address",children:"Full Address"}),s.jsx(de,{id:"address",value:h.address,onChange:j=>m("address",j.target.value)})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"bedrooms",children:"Bedrooms *"}),s.jsx(de,{id:"bedrooms",type:"number",min:"0",required:!0,value:h.bedrooms,onChange:j=>m("bedrooms",parseInt(j.target.value||"0",10))})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"bathrooms",children:"Bathrooms *"}),s.jsx(de,{id:"bathrooms",type:"number",min:"0",step:"0.5",required:!0,value:h.bathrooms,onChange:j=>m("bathrooms",parseFloat(j.target.value||"0"))})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"parking_spaces",children:"Parking Spaces"}),s.jsx(de,{id:"parking_spaces",type:"number",min:"0",value:h.par
566king_spaces,onChange:j=>m("parking_spaces",parseInt(j.target.value||"0",10))})]})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"rent_amount",children:"Monthly Rent (R) *"}),s.jsx(de,{id:"rent_amount",type:"number",min:"0",required:!0,value:h.rent_amount,onChange:j=>m("rent_amount",parseFloat(j.target.value||"0"))})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"deposit_amount",children:"Deposit (R)"}),s.jsx(de,{id:"deposit_amount",type:"number",min:"0",value:h.deposit_amount,onChange:j=>m("deposit_amount",parseFloat(j.target.value||"0"))})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"available_from",children:"Available From *"}),s.jsx(de,{id:"available_from",type:"date",required:!0,value:h.available_from,onChange:j=>m("available_from",j.target.value)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Main Image (thumbnail) *"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Max file size: 1MB. JPEG or PNG only."}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"main_image",accept:"image/jpeg,image/jpg,image/png",onChange:p,className:"hidden"}),s.jsx("label",{htmlFor:"main_image",children:s.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400",children:r?s.jsx("p",{children:"Uploading..."}):h.main_image_url?s.jsx("img",{src:h.main_image_url,alt:"Main",className:"h-40 mx-auto object-cover rounded-md"}):s.jsx(s.Fragment,{children:"Click to upload main image"})})})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Additional Images (up to 5)"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Max file size per image: 500KB. JPEG or PNG only."}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"gallery_images",accept:"image/jpeg,image/jpg,image/png",multiple:!0,onChange:w,className:"hidden"}),s.jsx("label",{htmlFor:"gallery_images",children:s.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400",children:a?s.jsx("p",{children:"Uploading..."}):s.jsx(s.Fragment,{children:"Click to upload gallery images"})})}),h.additional_image_urls.length>0&&s.jsx("div",{className:"grid grid-cols-3 gap-4 mt-4",children:h.additional_image_urls.map((j,_)=>s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:j,alt:`Upload preview ${_}`,className:"w-full h-32 object-cover rounded-lg"}),s.jsx("button",{type:"button",onClick:()=>x(_),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-4 h-4"})})]},_))})]})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"contact_name",children:"Contact Name"}),s.jsx(de,{id:"contact_name",value:h.contact_name,onChange:j=>m("contact_name",j.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"contact_email",children:"Contact Email"}),s.jsx(de,{id:"contact_email",type:"email",value:h.contact_email,onChange:j=>m("contact_email",j.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"contact_phone",children:"Contact Phone"}),s.jsx(de,{id:"contact_phone",value:h.contact_phone,onChange:j=>m("contact_phone",j.target.value)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"features",children:"Features"}),s.jsx(de,{id:"features",value:h.features,onChange:j=>m("features",j.target.value),placeholder:"e.g., Pool, Garden, Security (comma separated)"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Discoverability Tags"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Add tags to help people find your property in search. Try our AI suggest button!"}),s.jsx("div",{className:"mt-2",children:s.jsx(ma,{tags:h.tags,onChange:j=>m("tags",j),context:{name:h.title,description:h.description,category:h.property_type,suburb:h.suburb},entityType:"property"})})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row justify-end gap-3 md:gap-4 pt-2",children:[s.jsx(ge,{type:"button",variant:"outline",onClick:()=>e(xt("UserDashboard")),className:"w-full sm:w-auto",children:"Cancel"}),s.jsx(ge,{type:"submit",disabled:!h.suburb||!h.main_image_url||f.isPending,className:"w-full sm:w-auto",children:f.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Listing..."]}):"Publish Listing"})]})]})})]})})}var Jg="rovingFocusGroup.onEntryFocus",TV={bubbles:!1,cancelable:!0},td="RovingFocusGroup",[p0,wR,PV]=Wh(td),[AV,lm]=Kr(td,[PV]),[RV,OV]=AV(td),jR=E.forwardRef((e,t)=>
vendor: 5,742 bytes, line 566
566s.jsx(p0.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(p0.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(MV,{...e,ref:t})})}));jR.displayName=td;var MV=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...f}=e,m=E.useRef(null),p=bt(t,m),w=Zu(a),[x,v]=pi({prop:o,defaultProp:c??null,onChange:d,caller:td}),[y,j]=E.useState(!1),_=ds(h),N=wR(n),C=E.useRef(!1),[S,P]=E.useState(0);return E.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(Jg,_),()=>R.removeEventListener(Jg,_)},[_]),s.jsx(RV,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:x,onItemFocus:E.useCallback(R=>v(R),[v]),onItemShiftTab:E.useCallback(()=>j(!0),[]),onFocusableItemAdd:E.useCallback(()=>P(R=>R+1),[]),onFocusableItemRemove:E.useCallback(()=>P(R=>R-1),[]),children:s.jsx(Ze.div,{tabIndex:y||S===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ie(e.onMouseDown,()=>{C.current=!0}),onFocus:Ie(e.onFocus,R=>{const L=!C.current;if(R.target===R.currentTarget&&L&&!y){const D=new CustomEvent(Jg,TV);if(R.currentTarget.dispatchEvent(D),!D.defaultPrevented){const T=N().filter(H=>H.focusable),O=T.find(H=>H.active),M=T.find(H=>H.id===x),z=[O,M,...T].filter(Boolean).map(H=>H.ref.current);SR(z,g)}}C.current=!1}),onBlur:Ie(e.onBlur,()=>j(!1))})})}),_R="RovingFocusGroupItem",NR=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...c}=e,d=Rs(),h=a||d,g=OV(_R,n),f=g.currentTabStopId===h,m=wR(n),{onFocusableItemAdd:p,onFocusableItemRemove:w,currentTabStopId:x}=g;return E.useEffect(()=>{if(r)return p(),()=>w()},[r,p,w]),s.jsx(p0.ItemSlot,{scope:n,id:h,focusable:r,active:i,children:s.jsx(Ze.span,{tabIndex:f?0:-1,"data-orientation":g.orientation,...c,ref:t,onMouseDown:Ie(e.onMouseDown,v=>{r?g.onItemFocus(h):v.preventDefault()}),onFocus:Ie(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:Ie(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){g.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=IV(v,g.orientation,g.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let _=m().filter(N=>N.focusable).map(N=>N.ref.current);if(y==="last")_.reverse();else if(y==="prev"||y==="next"){y==="prev"&&_.reverse();const N=_.indexOf(v.currentTarget);_=g.loop?FV(_,N+1):_.slice(N+1)}setTimeout(()=>SR(_))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:x!=null}):o})})});NR.displayName=_R;var LV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function DV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function IV(e,t,n){const r=DV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return LV[r]}function SR(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function FV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kR=jR,CR=NR;function BV(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var zs=e=>{const{present:t,children:n}=e,r=qV(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),a=bt(r.ref,UV(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:a}):null};zs.displayName="Presence";function qV(e){const[t,n]=E.useState(),r=E.useRef(null),i=E.useRef(e),a=E.useRef("none"),o=e?"mounted":"unmounted",[c,d]=BV(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const h=Lf(r.current);a.current=c==="mounted"?h:"none"},[c]),jn(()=>{const h=r.current,g=i.current;if(g!==e){const m=a.current,p=Lf(h);e?d("MOUNT"):p==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(g&&m!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),jn(()=>{if(t){let h;const g=t.ownerDocument.defaultView??window,f=p=>{const x=Lf(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&x&&(d("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",h=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=p=>{p.target===t&&(a.current=Lf(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{g.clearTimeout(h),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:E.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function Lf(e){return(e==null?void 0:e.animationName)||"none"}function UV(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cm="Tabs",[$V]=Kr(cm,[lm]),ER=lm(),[zV,Db]=$V(cm),TR=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:c,activationMode:d="automatic",...h}=e,g=Zu(c),[f,m]=pi({prop:r,onChange:i,defaultProp:a??"",caller:cm});return s.jsx(zV,{scope:n,baseId:Rs(),value:f,onValueChange:m,orientation:o,dir:g,activationMode:d,children:s.jsx(Ze.div,{dir:g,"data-orientation":o,...h,ref:t})})});TR.displayName=cm;var PR="TabsList",AR=E.forwardRef((e,t)=>
566{const{__scopeTabs:n,loop:r=!0,...i}=e,a=Db(PR,n),o=ER(n);return s.jsx(kR,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:s.jsx(Ze.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});AR.displayName=PR;var RR="TabsTrigger",OR=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Db(RR,n),c=ER(n),d=DR(o.baseId,r),h=IR(o.baseId,r),g=r===o.value;return s.jsx(CR,{asChild:!0,...c,focusable:!i,active:g,children:s.jsx(Ze.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":h,"data-state":g?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...a,ref:t,onMouseDown:Ie(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:Ie(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:Ie(e.onFocus,()=>{const f=o.activationMode!=="manual";!g&&!i&&f&&o.onValueChange(r)})})})});OR.displayName=RR;var MR="TabsContent",LR=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,c=Db(MR,n),d=DR(c.baseId,r),h=IR(c.baseId,r),g=r===c.value,f=E.useRef(g);return E.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),s.jsx(zs,{present:i||g,children:({present:m})=>s.jsx(Ze.div,{"data-state":g?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!m,id:h,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&a})})});LR.displayName=MR;function DR(e,t){return`${e}-trigger-${t}`}function IR(e,t){return`${e}-content-${t}`}var VV=TR,FR=AR,BR=OR,qR=LR;const Ib=VV,um=E.forwardRef(({className:e,...t},n)=>s.jsx(FR,{ref:n,className:He("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));um.displayName=FR.displayName;const Kt=E.forwardRef(({className:e,...t},n)=>s.jsx(BR,{ref:n,className:He("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Kt.displayName=BR.displayName;const rn=E.forwardRef(({className:e,...t},n)=>s.jsx(qR,{ref:n,className:He("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));rn.displayName=qR.displayName;var UR=["PageUp","PageDown"],$R=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zR={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Gl="Slider",[g0,HV,WV]=Wh(Gl),[VR]=Kr(Gl,[WV]),[KV,dm]=VR(Gl),HR=E.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:a=1,orientation:o="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:h=[r],value:g,onValueChange:f=()=>{},onValueCommit:m=()=>{},inverted:p=!1,form:w,...x}=e,v=E.useRef(new Set),y=E.useRef(0),_=o==="horizontal"?GV:YV,[N=[],C]=pi({prop:g,defaultProp:h,onChange:T=>{var M;(M=[...v.current][y.current])==null||M.focus(),f(T)}}),S=E.useRef(N);function P(T){const O=eH(N,T);D(T,O)}function R(T){D(T,y.current)}function L(){const T=S.current[y.current];N[y.current]!==T&&m(N)}function D(T,O,{commit:M}={commit:!1}){const U=sH(a),z=iH(Math.round((T-r)/a)*a+r,U),H=xh(z,[r,i]);C((Y=[])=>{const G=JV(Y,H,O);if(rH(G,d*a)){y.current=G.indexOf(H);const $=String(G)!==String(Y);return $&&M&&m(G),$?G:Y}else return Y})}return s.jsx(KV,{scope:e.__scopeSlider,name:n,disabled:c,min:r,max:i,valueIndexToChangeRef:y,thumbs:v.current,values:N,orientation:o,form:w,children:s.jsx(g0.Provider,{scope:e.__scopeSlider,children:s.jsx(g0.Slot,{scope:e.__scopeSlider,children:s.jsx(_,{"aria-disabled":c,"data-disabled":c?"":void 0,...x,ref:t,onPointerDown:Ie(x.onPointerDown,()=>{c||(S.current=N)}),min:r,max:i,inverted:p,onSlideStart:c?void 0:P,onSlideMove:c?void 0:R,onSlideEnd:c?void 0:L,onHomeKeyDown:()=>!c&&D(r,0,{commit:!0}),onEndKeyDown:()=>!c&&D(i,N.length-1,{commit:!0}),onStepKeyDown:({event:T,direction:O})=>{if(!c){const z=UR.includes(T.key)||T.shiftKey&&$R.includes(T.key)?10:1,H=y.current,Y=N[H],G=a*z*O;D(Y+G,H,{commit:!0})}}})})})})});HR.displayName=Gl;var[WR,KR]=VR(Gl,{startEdge:"left",endEdge:"right",size:"width",direction:1}),GV=E.forwardRef((e,t)=>
566{const{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:c,onSlideEnd:d,onStepKeyDown:h,...g}=e,[f,m]=E.useState(null),p=bt(t,_=>m(_)),w=E.useRef(void 0),x=Zu(i),v=x==="ltr",y=v&&!a||!v&&a;function j(_){const N=w.current||f.getBoundingClientRect(),C=[0,N.width],P=Fb(C,y?[n,r]:[r,n]);return w.current=N,P(_-N.left)}return s.jsx(WR,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:s.jsx(GR,{dir:x,"data-orientation":"horizontal",...g,ref:p,style:{...g.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:_=>{const N=j(_.clientX);o==null||o(N)},onSlideMove:_=>{const N=j(_.clientX);c==null||c(N)},onSlideEnd:()=>{w.current=void 0,d==null||d()},onStepKeyDown:_=>{const C=zR[y?"from-left":"from-right"].includes(_.key);h==null||h({event:_,direction:C?-1:1})}})})}),YV=E.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:c,onStepKeyDown:d,...h}=e,g=E.useRef(null),f=bt(t,g),m=E.useRef(void 0),p=!i;function w(x){const v=m.current||g.current.getBoundingClientRect(),y=[0,v.height],_=Fb(y,p?[r,n]:[n,r]);return m.current=v,_(x-v.top)}return s.jsx(WR,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:s.jsx(GR,{"data-orientation":"vertical",...h,ref:f,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:x=>{const v=w(x.clientY);a==null||a(v)},onSlideMove:x=>{const v=w(x.clientY);o==null||o(v)},onSlideEnd:()=>{m.current=void 0,c==null||c()},onStepKeyDown:x=>{const y=zR[p?"from-bottom":"from-top"].includes(x.key);d==null||d({event:x,direction:y?-1:1})}})})}),GR=E.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:c,onStepKeyDown:d,...h}=e,g=dm(Gl,n);return s.jsx(Ze.span,{...h,ref:t,onKeyDown:Ie(e.onKeyDown,f=>{f.key==="Home"?(o(f),f.preventDefault()):f.key==="End"?(c(f),f.preventDefault()):UR.concat($R).includes(f.key)&&(d(f),f.preventDefault())}),onPointerDown:Ie(e.onPointerDown,f=>{const m=f.target;m.setPointerCapture(f.pointerId),f.preventDefault(),g.thumbs.has(m)?m.focus():r(f)}),onPointerMove:Ie(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&i(f)}),onPointerUp:Ie(e.onPointerUp,f=>{const m=f.target;m.hasPointerCapture(f.pointerId)&&(m.releasePointerCapture(f.pointerId),a(f))})})}),YR="SliderTrack",QR=E.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=dm(YR,n);return s.jsx(Ze.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});QR.displayName=YR;var y0="SliderRange",XR=E.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=dm(y0,n),a=KR(y0,n),o=E.useRef(null),c=bt(t,o),d=i.values.length,h=i.values.map(m=>eO(m,i.min,i.max)),g=d>1?Math.min(...h):0,f=100-Math.max(...h);return s.jsx(Ze.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:c,style:{...e.style,[a.startEdge]:g+"%",[a.endEdge]:f+"%"}})});XR.displayName=y0;var x0="SliderThumb",JR=E.forwardRef((e,t)=>{const n=HV(e.__scopeSlider),[r,i]=E.useState(null),a=bt(t,c=>i(c)),o=E.useMemo(()=>r?n().findIndex(c=>c.ref.current===r):-1,[n,r]);return s.jsx(QV,{...e,ref:a,index:o})}),QV=E.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...a}=e,o=dm(x0,n),c=KR(x0,n),[d,h]=E.useState(null),g=bt(t,j=>h(j)),f=d?o.form||!!d.closest("form"):!0,m=Zh(d),p=o.values[r],w=p===void 0?0:eO(p,o.min,o.max),x=ZV(r,o.values.length),v=m==null?void 0:m[c.size],y=v?tH(v,w,c.direction):0;return E.useEffect(()=>{if(d)return o.thumbs.add(d),()=>{o.thumbs.delete(d)}},[d,o.thumbs]),s.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${w}% + ${y}px)`},children:[s.jsx(g0.ItemSlot,{scope:e.__scopeSlider,children:s.jsx(Ze.span,{role:"slider","aria-label":e["aria-label"]||x,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...a,ref:g,style:p===void 0?{display:"none"}:e.style,onFocus:Ie(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),f&&s.jsx(ZR,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:p},r)]})});JR.displayName=x0;var XV="RadioBubbleInput",ZR=E.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const i=E.useRef(null),a=bt(i,r),o=nm(t);return E.useEffect(()=>{const c=i.current;if(!c)return;const d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"value").set;if(o!==t&&g){const f=new Event("input",{bubbles:!0});g.call(c,t),c.dispatchEvent(f)}},[o,t]),s.jsx(Ze.input,{style:{display:"none"},...n,ref:a,defaultValue:t})});ZR.displayName=XV;function JV(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,a)=>i-a)}function eO(e,t,n){const a=100/(n-t)*(e-t);return xh(a,[0,100])}function ZV(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function eH(e,t){if(e.length===1)return 0;const n=e.map(i=>
566Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function tH(e,t,n){const r=e/2,a=Fb([0,50],[0,r]);return(r-a(t)*n)*n}function nH(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function rH(e,t){if(t>0){const n=nH(e);return Math.min(...n)>=t}return!0}function Fb(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function sH(e){return(String(e).split(".")[1]||"").length}function iH(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var tO=HR,aH=QR,oH=XR,lH=JR;const nO=E.forwardRef(({className:e,...t},n)=>s.jsxs(tO,{ref:n,className:He("relative flex w-full touch-none select-none items-center",e),...t,children:[s.jsx(aH,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:s.jsx(oH,{className:"absolute h-full bg-primary"})}),s.jsx(lH,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));nO.displayName=tO.displayName;function cH(){const e=dn(),{data:t,isLoading:n}=De({queryKey:["site-settings"],queryFn:async()=>{const m=await ie.entities.SiteSetting.list();return m&&m.length?m[0]:null},initialData:null}),[r,i]=Ce.useState({logo_url:"",logo_width:200,logo_height:100,whatsapp_number:"",contact_email:"",contact_phone:"",contact_address:"",facebook_url:"",instagram_url:"",twitter_url:""}),[a,o]=Ce.useState(!1);Ce.useEffect(()=>{t&&i({logo_url:t.logo_url||"",logo_width:t.logo_width||200,logo_height:t.logo_height||100,whatsapp_number:t.whatsapp_number||"",contact_email:t.contact_email||"",contact_phone:t.contact_phone||"",contact_address:t.contact_address||"",facebook_url:t.facebook_url||"",instagram_url:t.instagram_url||"",twitter_url:t.twitter_url||""})},[t]);const c=Ct({mutationFn:m=>ie.entities.SiteSetting.create(m),onSuccess:()=>e.invalidateQueries({queryKey:["site-settings"]})}),d=Ct({mutationFn:m=>ie.entities.SiteSetting.update(t.id,m),onSuccess:()=>e.invalidateQueries({queryKey:["site-settings"]})}),h=async m=>{var w;const p=(w=m.target.files)==null?void 0:w[0];if(p){o(!0);try{const{file_url:x}=await ie.integrations.Core.UploadFile({file:p});i(v=>({...v,logo_url:x}))}finally{o(!1)}}},g=m=>{const p=m[0],w=Math.round(p/2);i(x=>({...x,logo_width:p,logo_height:w}))},f=()=>{t!=null&&t.id?d.mutate(r):c.mutate(r)};return n?s.jsx("div",{className:"p-8",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin"})}):s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsx(En,{children:"Site Settings"})}),s.jsxs(Rt,{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"md:col-span-2",children:[s.jsx(ee,{children:"Logo (2:1 aspect ratio recommended)"}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{id:"logoUpload",type:"file",accept:"image/*",onChange:h,className:"hidden"}),s.jsx("label",{htmlFor:"logoUpload",children:s.jsx("div",{className:"border-2 border-dashed rounded-lg p-6 text-center cursor-pointer hover:border-gray-400",children:a?"Uploading...":r.logo_url?s.jsxs("div",{className:"flex flex-col items-center gap-3",children:[s.jsx("img",{src:r.logo_url,alt:"Logo",style:{width:`${r.logo_width}px`,height:`${r.logo_height}px`},className:"object-contain"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Click to change"})]}):s.jsxs("div",{className:"flex items-center justify-center gap-2 text-gray-600",children:[s.jsx(li,{className:"w-4 h-4"})," Upload Logo"]})})})]}),r.logo_url&&s.jsxs("div",{className:"mt-4 space-y-2",children:[s.jsxs(ee,{children:["Logo Width: ",r.logo_width,"px (Height: ",r.logo_height,"px)"]}),s.jsx(nO,{value:[r.logo_width],onValueChange:g,min:50,max:400,step:10,className:"w-full"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Adjust width (height maintains 2:1 ratio)"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"WhatsApp Number"}),s.jsx(de,{value:r.whatsapp_number,onChange:m=>i({...r,whatsapp_number:m.target.value}),placeholder:"+27 ...",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Contact Email"}),s.jsx(de,{value:r.contact_email,onChange:m=>i({...r,contact_email:m.target.value}),className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Contact Phone"}),s.jsx(de,{value:r.contact_phone,onChange:m=>i({...r,contact_phone:m.target.value}),className:"mt-1"})]}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx(ee,{children:"Contact Address"}),s.jsx(de,{value:r.contact_address,onChange:m=>i({...r,contact_address:m.target.value}),className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Facebook URL"}),s.jsx(de,{value:r.facebook_url,onChange:m=>i({...r,facebook_url:m.target.value}),className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Instagram URL"}
566),s.jsx(de,{value:r.instagram_url,onChange:m=>i({...r,instagram_url:m.target.value}),className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Twitter URL"}),s.jsx(de,{value:r.twitter_url,onChange:m=>i({...r,twitter_url:m.target.value}),className:"mt-1"})]})]}),s.jsx(Xu,{className:"justify-end",children:s.jsx(ge,{onClick:f,disabled:c.isPending||d.isPending,children:c.isPending||d.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):"Save Settings"})})]})}var fm="Switch",[uH]=Kr(fm),[dH,fH]=uH(fm),rO=E.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:c,value:d="on",onCheckedChange:h,form:g,...f}=e,[m,p]=E.useState(null),w=bt(t,_=>p(_)),x=E.useRef(!1),v=m?g||!!m.closest("form"):!0,[y,j]=pi({prop:i,defaultProp:a??!1,onChange:h,caller:fm});return s.jsxs(dH,{scope:n,checked:y,disabled:c,children:[s.jsx(Ze.button,{type:"button",role:"switch","aria-checked":y,"aria-required":o,"data-state":oO(y),"data-disabled":c?"":void 0,disabled:c,value:d,...f,ref:w,onClick:Ie(e.onClick,_=>{j(N=>!N),v&&(x.current=_.isPropagationStopped(),x.current||_.stopPropagation())})}),v&&s.jsx(aO,{control:m,bubbles:!x.current,name:r,value:d,checked:y,required:o,disabled:c,form:g,style:{transform:"translateX(-100%)"}})]})});rO.displayName=fm;var sO="SwitchThumb",iO=E.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=fH(sO,n);return s.jsx(Ze.span,{"data-state":oO(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});iO.displayName=sO;var hH="SwitchBubbleInput",aO=E.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{const o=E.useRef(null),c=bt(o,a),d=nm(n),h=Zh(t);return E.useEffect(()=>{const g=o.current;if(!g)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(d!==n&&p){const w=new Event("click",{bubbles:r});p.call(g,n),g.dispatchEvent(w)}},[d,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:c,style:{...i.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});aO.displayName=hH;function oO(e){return e?"checked":"unchecked"}var lO=rO,mH=iO;const Vs=E.forwardRef(({className:e,...t},n)=>s.jsx(lO,{className:He("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:s.jsx(mH,{className:He("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Vs.displayName=lO.displayName;const pH=["home","rentals","businesses","events","news","contact","terms"];function gH(){const e=dn(),[t,n]=Ce.useState("rentals"),{data:r,isLoading:i}=De({queryKey:["page-banner",t],queryFn:async()=>{const f=await ie.entities.PageBanner.filter({page_name:t});return f&&f.length?f[0]:null},initialData:null}),[a,o]=Ce.useState({page_name:"rentals",slider_enabled:!1,banner_image_1:"",banner_image_2:"",banner_image_3:""});Ce.useEffect(()=>{o(r?{page_name:r.page_name,slider_enabled:!!r.slider_enabled,banner_image_1:r.banner_image_1||"",banner_image_2:r.banner_image_2||"",banner_image_3:r.banner_image_3||""}:{page_name:t,slider_enabled:!1,banner_image_1:"",banner_image_2:"",banner_image_3:""})},[r,t]);const c=Ct({mutationFn:f=>ie.entities.PageBanner.create(f),onSuccess:()=>e.invalidateQueries({queryKey:["page-banner",t]})}),d=Ct({mutationFn:f=>ie.entities.PageBanner.update(r.id,f),onSuccess:()=>e.invalidateQueries({queryKey:["page-banner",t]})}),h=async(f,m)=>{var x;const p=(x=f.target.files)==null?void 0:x[0];if(!p)return;const{file_url:w}=await ie.integrations.Core.UploadFile({file:p});o(v=>({...v,[`banner_image_${m}`]:w}))},g=()=>{const f={...a,page_name:t};r!=null&&r.id?d.mutate(f):c.mutate(f)};return s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsxs(En,{className:"flex items-center gap-2",children:[s.jsx(AI,{className:"w-5 h-5"})," Page Banners"]})}),s.jsxs(Rt,{className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Page"}),s.jsxs(pt,{value:t,onValueChange:n,children:[s.jsx(dt,{className:"mt-1",children:s.jsx(gt,{placeholder:"Select page"})}),s.jsx(ft,{children:pH.map(f=>s.jsx(Ae,{value:f,children:f.charAt(0).toUpperCase()+f.slice(1)},f))})]})]}),s.jsx("div",{className:"md:col-span-2 flex items-end gap-3",children:s.jsxs("div",{children:[s.jsx(ee,{children:"Slider Enabled"}),s.jsx("div",{className:"mt-2",children:s.jsx(Vs,{checked:a.slider_enabled,onCheckedChange:f=>o(m=>({...m,slider_enabled:f}))})})]})})]}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[1,2,3].map(f=>s.jsxs("div",{children:[s.jsxs(ee,{children:["Banner Image ",f]}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{id:`banner_${f}`,type:"file",accept:"image/*",onChange:m=>h(m,f),className:"hidden"}),s.jsx("label",{htmlFor:`banner_${f}`,children:s.jsx("div",{className:"border-2 border-dashed rounded-lg p-6 text-center cursor-pointer",children:a[`banner_image_${f}`]?s.jsx("img",{src:a[`banner_image_${f}`],alt:`Banner ${f}`,className:"h-32 w-full object-cover rounded"}):s.jsxs("div",{className:"flex items-center justify-center gap-2 text-gray-600",children:[s.jsx(li,{className:"w-4 h-4"})," Upload image"]})})}),s.jsx(de,{className:"mt-2",placeholder:"or paste image URL",value:a[`banner_image_${f}`],onChange:m=>o(p=>({...p,[`banner_image_${f}`]:m.target.value}))})]})]},f))})]}),s.jsx(Xu,{className:"justify-end",children:s.jsx(ge,{onClick:g,disabled:c.isPending||d.isPending,children:c.isPending||d.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):"Save Banner"})})]})}function yH(){const e=dn(),[t,n]=Ce.useState(null),[r,i]=Ce.useState({de
566sktop:!1,mobile:!1}),{data:a,isLoading:o}=De({queryKey:["ad-slots"],queryFn:()=>ie.entities.AdSlot.list("-created_date"),initialData:[]}),[c,d]=Ce.useState({slot_name:"",page_location:"all",position:"above_footer_banner",desktop_image_url:"",mobile_image_url:"",link_url:"",container_size:"800x250px",active:!0}),h=Ct({mutationFn:_=>ie.entities.AdSlot.create(_),onSuccess:()=>{e.invalidateQueries({queryKey:["ad-slots"]}),n(null),m()}}),g=Ct({mutationFn:({id:_,data:N})=>ie.entities.AdSlot.update(_,N),onSuccess:()=>{e.invalidateQueries({queryKey:["ad-slots"]}),n(null),m()}}),f=Ct({mutationFn:_=>ie.entities.AdSlot.delete(_),onSuccess:()=>e.invalidateQueries({queryKey:["ad-slots"]})}),m=()=>{d({slot_name:"",page_location:"all",position:"above_footer_banner",desktop_image_url:"",mobile_image_url:"",link_url:"",container_size:"800x250px",active:!0})},p=()=>{m(),n("new")},w=_=>{d({slot_name:_.slot_name||"",page_location:_.page_location||"all",position:_.position||"above_footer_banner",desktop_image_url:_.desktop_image_url||"",mobile_image_url:_.mobile_image_url||"",link_url:_.link_url||"",container_size:_.container_size||"800x250px",active:!!_.active}),n(_.id)},x=async(_,N)=>{var P;const C=(P=_.target.files)==null?void 0:P[0];if(!C)return;const S=N==="desktop_image_url"?"desktop":"mobile";i(R=>({...R,[S]:!0}));try{const{file_url:R}=await ie.integrations.Core.UploadFile({file:C});d(L=>({...L,[N]:R}))}finally{i(R=>({...R,[S]:!1}))}},v=()=>{t==="new"?h.mutate(c):g.mutate({id:t,data:c})},y=_=>_==="mid_section_banner"?"Home Mid-Section Banner":_==="above_footer_banner"?"Above Footer Banner":_,j=_=>_==="all"?"All Pages":_==="home"?"Home Page Only":_;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Ge,{children:[s.jsxs(Cn,{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[s.jsx(En,{children:"Ad Slots"}),s.jsxs(ge,{onClick:p,children:[s.jsx(Cr,{className:"w-4 h-4 mr-2"}),"New Ad Slot"]})]}),s.jsx(Rt,{children:o?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin"})}):s.jsxs("div",{className:"space-y-3",children:[a.map(_=>s.jsxs("div",{className:"border rounded-lg p-4 flex flex-col md:flex-row md:items-center md:justify-between gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-bold text-lg",children:_.slot_name}),s.jsxs("div",{className:"text-sm text-gray-600 mt-1",children:[j(_.page_location)," ⢠",y(_.position)]}),s.jsxs("div",{className:"text-sm text-gray-500 mt-1",children:[_.container_size," ⢠",_.active?"Active":"Inactive"]}),_.desktop_image_url&&s.jsx("img",{src:_.desktop_image_url,alt:_.slot_name,className:"mt-2 h-20 object-contain border rounded"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(ge,{variant:"outline",size:"sm",onClick:()=>w(_),children:[s.jsx(QI,{className:"w-4 h-4 mr-1"}),"Edit"]}),s.jsxs(ge,{variant:"destructive",size:"sm",onClick:()=>f.mutate(_.id),children:[s.jsx(Us,{className:"w-4 h-4 mr-1"}),"Delete"]})]})]},_.id)),a.length===0&&s.jsx("div",{className:"text-center py-8 text-gray-500",children:'No ad slots created yet. Click "New Ad Slot" to get started.'})]})})]}),t&&s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsx(En,{children:t==="new"?"Create New Ad Slot":"Edit Ad Slot"})}),s.jsxs(Rt,{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"slot_name",children:"Ad Slot Name *"}),s.jsx(de,{id:"slot_name",value:c.slot_name,onChange:_=>d(N=>({...N,slot_name:_.target.value})),placeholder:"e.g., Footer Banner - Summer Sale",className:"mt-1"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Internal reference name"})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"page_location",children:"Page Location *"}),s.jsxs(pt,{value:c.page_location,onValueChange:_=>d(N=>({...N,page_location:_})),children:[s.jsx(dt,{className:"mt-1",children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Pages"}),s.jsx(Ae,{value:"home",children:"Home Page Only"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"position",children:"Position *"}),s.jsxs(pt,{value:c.position,onValueChange:_=>d(N=>({...N,position:_})),children:[s.jsx(dt,{className:"mt-1",children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"mid_section_banner",children:"Home Mid-Section Banner"}),s.jsx(Ae,{value:"above_footer_banner",children:"Above Footer Banner"})]})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"container_size",children:"Container Size"}),s.jsx(de,{id:"container_size",value:c.container_size,onChange:_=>d(N=>({...N,container_size:_.target.value})),placeholder:"800x250px",className:"mt-1"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Recommended dimensions for desktop uploads"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Desktop Creative *"}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1 mb-2",children:["Recommended: ",c.container_size]}),s.jsx("input",{type:"file",id:"desktop",accept:"image/*,video/*",onChange:_=>x(_,"desktop_image_url"),className:"hidden"}),s.jsx("label",{htmlFor:"desktop",children:s.jsx("div",{className:"border-2 border-dashed rounded-lg p-6 text-center cursor-pointer hover:border-gray-400",children:r.desktop?s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx(Ke,{className:"w-5 h-5 animate-spin"}),s.jsx("span",{children:"Uploading..."})]}):c.desktop_image_url?s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("img",{src:c.desktop_image_url,alt:"Desktop creative",className:"max-h-32 object-contain"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Click to change"})]}):s.jsxs("div",{className:"flex items-center justify-center gap-2 text-gray-600",children:[s.jsx(li,{className:"w-5 h-5"}),s.jsx("span",{children:"Click to upload desktop creative"})]})})}),s.jsx(de,{className:"mt-2",placeholder:"or paste image URL",value:c.desktop_image_url,onChange:_=>d(N=>({...N,desktop_image_url:_.target.value}))})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Mobile Creative (Optional)"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1 mb-2",children:"Recommended: 800x500px - Falls back to desktop if not provided"}),s.jsx("input",{type:"file",id:"mobile",accept:"image/*,video/*",onChange:_=>x(_,"mobile_image_url"),className:"hidden"}),s.jsx("label",{htmlFor:"mobile",children:s.jsx("div",{className:"border-2 border-dashed rounded-lg p-6 text-center cursor-pointer hover:border-gray-400",children:r.mobile?s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx(Ke,{className:"w-5 h-5 animate-spin"}),s.jsx("span",{children:"Uploading..."})]}):c.mobile_image_url?s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("img",{src:c.mobile_image_url,alt:"Mobile creative",className:"max-h-32 object-contain"}),s.jsx("span",{className:"text-sm text-gray-500",children:"Click to change"})]}):s.jsxs("div",{className:"flex items-center justify-center gap-2 text-gray-600",children:[s.jsx(li,{className:"w-5 h-5"}),s.jsx("span",{children:"Click to upload mobile creative"})]})})}),s.jsx(de,{className:"mt-2",placeholder:"or paste image URL",value:c.mobile_image_url,onChange:_=>d(N=>({...N,mobile_image_url:_.target.value}))})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"link_url",children:"Click Destination URL *"}),s.jsx(de,{id:"link_url",value:c.link_url,onChange:_=>d(N=>({...N,link_url:_.target.value})),placeholder:"https://example.com",className:"mt-1"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ee,{htmlFor:"active",children:"Active"}),s.jsx(Vs,{id:"active",checked:c.active,onCheckedChange:_=>d(N=>({...N,active:_}))}),s.jsx("span",{className:"text-sm text-gray-500",children:c.active?"Ad is currently showing":"Ad is hidden from users"})]})]}),s.jsx(Rt,{className:"pt-0",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(ge,{variant:"outline",onClick:()=>{n(null),m()},children:"Cancel"}),s.jsx(ge,{onClick:v,disabled:h.isPending||g.isPending||!c.slot_name||!c.desktop_image_url||!c.link_url,children:h.isPending||g.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):"Save Ad Slot"})]})})]})]})}const xH=Uu("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ya=E.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:He(xH({variant:t}),e),...n}));ya.displayName="Alert";const go=E.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:He("mb-1 font-medium leading-none tracking-tight",e),...t}));go.displayName="AlertTitle";const xa=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("text-sm [&_p]:leading-relaxed",e),...t}));xa.displayName="AlertDescription";const hm=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:n,className:He("w-full caption-bottom text-sm",e),...t})}));hm.displayName="Table";const mm=E.forwardRef(({className:e,...t},n)=>s.jsx("thead",{ref:n,className:He("[&_tr]:border-b",e),...t}));mm.displayName="TableHeader";const pm=E.forwardRef(({className:e,...t},n)=>s.jsx("tbody",{ref:n,className:He("[&_tr:last-child]:border-0",e),...t}));pm.displayName="TableBody";const vH=E.forwardRef(({className:e,...t},n)=>s.jsx("tfoot",{ref:n,className:He("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));vH.displayName="TableFooter";const Ps=E.forwardRef(({className:e,...t},n)=>s.jsx("tr",{ref:n,className:He("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Ps.displayName="TableRow";const Hn=E.forwardRef(({className:e,...t},n)=>s.jsx("th",{ref:n,className:He("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Hn.displayName="TableHead";const bn=E.forwardRef(({className:e,...t},n)=>s.jsx("td",{ref:n,className:He("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));bn.displayName="TableCell";const bH=E.forwardRef(({className:e,...t},n)=>s.jsx("caption",{ref:n,className:He("mt-4 text-sm text-muted-foreground",e),...t}));bH.displayName="TableCaption";function gn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ms(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function NS(e,t){const n=gn(e);
vendor: 4,999 bytes, line 566
566return isNaN(t)?ms(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function wH(e,t){const n=gn(e);if(isNaN(t))return ms(e,NaN);if(!t)return n;const r=n.getDate(),i=ms(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const a=i.getDate();return r>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function jH(e){return gn(e).getDay()===6}function _H(e){return gn(e).getDay()===0}const cO=6048e5,NH=864e5;let SH={};function gm(){return SH}function ju(e,t){var c,d,h,g;const n=gm(),r=(t==null?void 0:t.weekStartsOn)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??n.weekStartsOn??((g=(h=n.locale)==null?void 0:h.options)==null?void 0:g.weekStartsOn)??0,i=gn(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Nh(e){return ju(e,{weekStartsOn:1})}function uO(e){const t=gn(e),n=t.getFullYear(),r=ms(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Nh(r),a=ms(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const o=Nh(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Rl(e){const t=gn(e);return t.setHours(0,0,0,0),t}function SS(e){const t=gn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function kH(e,t){const n=Rl(e),r=Rl(t),i=+n-SS(n),a=+r-SS(r);return Math.round((i-a)/NH)}function CH(e){const t=uO(e),n=ms(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Nh(n)}function EH(e){return ms(e,Date.now())}function TH(e,t){const n=Rl(e),r=Rl(t);return+n==+r}function PH(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function AH(e){if(!PH(e)&&typeof e!="number")return!1;const t=gn(e);return!isNaN(Number(t))}function RH(e){const t=gn(e),n=ms(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function OH(e,t){const n=t==null?void 0:t.weekStartsOn,r=gn(e),i=r.getDay(),a=(i<n?-7:0)+6-(i-n);return r.setDate(r.getDate()+a),r.setHours(23,59,59,999),r}const MH={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},LH=(e,t,n)=>{let r;const i=MH[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Zg(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const DH={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},IH={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},FH={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},BH={date:Zg({formats:DH,defaultWidth:"full"}),time:Zg({formats:IH,defaultWidth:"full"}),dateTime:Zg({formats:FH,defaultWidth:"full"})},qH={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},UH=(e,t,n,r)=>qH[e];function qc(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):o;i=e.formattingValues[c]||e.formattingValues[o]}else{const o=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const $H={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zH={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},VH={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},HH={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
566ay","Saturday"]},WH={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},KH={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},GH=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},YH={ordinalNumber:GH,era:qc({values:$H,defaultWidth:"wide"}),quarter:qc({values:zH,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qc({values:VH,defaultWidth:"wide"}),day:qc({values:HH,defaultWidth:"wide"}),dayPeriod:qc({values:WH,defaultWidth:"wide",formattingValues:KH,defaultFormattingWidth:"wide"})};function Uc(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?XH(c,f=>f.test(o)):QH(c,f=>f.test(o));let h;h=e.valueCallback?e.valueCallback(d):d,h=n.valueCallback?n.valueCallback(h):h;const g=t.slice(o.length);return{value:h,rest:g}}}function QH(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function XH(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function JH(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;const c=t.slice(i.length);return{value:o,rest:c}}}const ZH=/^(\d+)(th|st|nd|rd)?/i,eW=/\d+/i,tW={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nW={any:[/^b/i,/^(a|c)/i]},rW={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sW={any:[/1/i,/2/i,/3/i,/4/i]},iW={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},aW={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oW={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lW={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cW={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uW={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},dW={ordinalNumber:JH({matchPattern:ZH,parsePattern:eW,valueCallback:e=>parseInt(e,10)}),era:Uc({matchPatterns:tW,defaultMatchWidth:"wide",parsePatterns:nW,defaultParseWidth:"any"}),quarter:Uc({matchPatterns:rW,defaultMatchWidth:"wide",parsePatterns:sW,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Uc({matchPatterns:iW,defaultMatchWidth:"wide",parsePatterns:aW,defaultParseWidth:"any"}),day:Uc({matchPatterns:oW,defaultMatchWidth:"wide",parsePatterns:lW,defaultParseWidth:"any"}),dayPeriod:Uc({matchPatterns:cW,defaultMatchWidth:"any",parsePatterns:uW,defaultParseWidth:"any"})},fW={code:"en-US",formatDistance:LH,formatLong:BH,formatRelative:UH,localize:YH,match:dW,options:{weekStartsOn:0,firstWeekContainsDate:1}};function hW(e){const t=gn(e);return kH(t,RH(t))+1}function mW(e){const t=gn(e),n=+Nh(t)-+CH(t);return Math.round(n/cO)+1}function dO(e,t){var g,f,m,p;const n=gn(e),r=n.getFullYear(),i=gm(),a=(t==null?void 0:t.firstWeekContainsDate)??((f=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((p=(m=i.locale)==null?void 0:m.options)==null?void 0:p.firstWeekContainsDate)??1,o=ms(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const c=ju(o,t),d=ms(e,0);d.setFullYear(r,0,a),d.setHours(0,0,0,0);const h=ju(d,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=h.getTime()?r:r-1}function pW(e,t){var c,d,h,g;const n=gm(),r=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((g=(h=n.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,i=dO(e,t),a=ms(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),ju(a,t)}function gW(e,t){const n=gn(e),r=+ju(n,t)-+pW(n,t);return Math.round(r/cO)+1}function At(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const zi={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return At(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):At(n+1,2)},d(e,t){return At(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return At(e.getHours()%12||12,t.length)},H(e,t){return At(e.getHours(),t.length)},m(e,t){return At(e.getMinutes(),t.length)},s(e,t){return At(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return At(i,t.length)}},Jo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},kS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return zi.y(e,t)},Y:function(e,t,n,r){const i=dO(e,r),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return At(o,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):At(a,t.length)},R:function(e,t){const n=uO(e);return At(n,t.length)},u:function(e,t){const n=e.getFullYear();return At(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return At(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return At(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return zi.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return At(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=gW(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):At(i,t.length)},I:function(e,t,n){const r=mW(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):At(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):zi.d(e,t)},D:function(e,t,n){const r=hW(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):At(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return At(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return At(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return At(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Jo.noon:r===0?i=Jo.midnight:i=r/12>
vendor: 4,172 bytes, line 566
566=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Jo.evening:r>=12?i=Jo.afternoon:r>=4?i=Jo.morning:i=Jo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return zi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):zi.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):At(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):At(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):zi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):zi.s(e,t)},S:function(e,t){return zi.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ES(r);case"XXXX":case"XX":return qa(r);case"XXXXX":case"XXX":default:return qa(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ES(r);case"xxxx":case"xx":return qa(r);case"xxxxx":case"xxx":default:return qa(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+CS(r,":");case"OOOO":default:return"GMT"+qa(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+CS(r,":");case"zzzz":default:return"GMT"+qa(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return At(r,t.length)},T:function(e,t,n){const r=e.getTime();return At(r,t.length)}};function CS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+At(a,2)}function ES(e,t){return e%60===0?(e>0?"-":"+")+At(Math.abs(e)/60,2):qa(e,t)}function qa(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=At(Math.trunc(r/60),2),a=At(r%60,2);return n+i+t+a}const TS=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},fO=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},yW=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return TS(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",TS(r,t)).replace("{{time}}",fO(i,t))},xW={p:fO,P:yW},vW=/^D+$/,bW=/^Y+$/,wW=["D","DD","YY","YYYY"];function jW(e){return vW.test(e)}function _W(e){return bW.test(e)}function NW(e,t,n){const r=SW(e,t,n);if(console.warn(r),wW.includes(e))throw new RangeError(r)}function SW(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const kW=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,CW=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EW=/^'([^]*?)'?$/,TW=/''/g,PW=/[a-zA-Z]/;function Yt(e,t,n){var g,f,m,p;const r=gm(),i=r.locale??fW,a=r.firstWeekContainsDate??((f=(g=r.locale)==null?void 0:g.options)==null?void 0:f.firstWeekContainsDate)??1,o=r.weekStartsOn??((p=(m=r.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)??0,c=gn(e);if(!AH(c))throw new RangeError("Invalid time value");let d=t.match(CW).map(w=>{const x=w[0];
566if(x==="p"||x==="P"){const v=xW[x];return v(w,i.formatLong)}return w}).join("").match(kW).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:AW(w)};if(kS[x])return{isToken:!0,value:w};if(x.match(PW))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(d=i.localize.preprocessor(c,d));const h={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return d.map(w=>{if(!w.isToken)return w.value;const x=w.value;(_W(x)||jW(x))&&NW(x,t,String(e));const v=kS[x[0]];return v(c,x,i.localize,h)}).join("")}function AW(e){const t=e.match(EW);return t?t[1].replace(TW,"'"):e}function PS(e,t){const n=gn(e),r=gn(t);return n.getTime()>r.getTime()}function ey(e,t){const n=gn(e),r=gn(t);return+n<+r}function AS(e){return TH(e,EH(e))}function RS(e,t){return wH(e,-t)}var ym="Checkbox",[RW]=Kr(ym),[OW,Bb]=RW(ym);function MW(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:c,onCheckedChange:d,required:h,value:g="on",internal_do_not_use_render:f}=e,[m,p]=pi({prop:n,defaultProp:i??!1,onChange:d,caller:ym}),[w,x]=E.useState(null),[v,y]=E.useState(null),j=E.useRef(!1),_=w?!!o||!!w.closest("form"):!0,N={checked:m,disabled:a,setChecked:p,control:w,setControl:x,name:c,form:o,value:g,hasConsumerStoppedPropagationRef:j,required:h,defaultChecked:la(i)?!1:i,isFormControl:_,bubbleInput:v,setBubbleInput:y};return s.jsx(OW,{scope:t,...N,children:LW(f)?f(N):r})}var hO="CheckboxTrigger",mO=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:a,value:o,disabled:c,checked:d,required:h,setControl:g,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:w}=Bb(hO,e),x=bt(i,g),v=E.useRef(d);return E.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const j=()=>f(v.current);return y.addEventListener("reset",j),()=>y.removeEventListener("reset",j)}},[a,f]),s.jsx(Ze.button,{type:"button",role:"checkbox","aria-checked":la(d)?"mixed":d,"aria-required":h,"data-state":vO(d),"data-disabled":c?"":void 0,disabled:c,value:o,...r,ref:x,onKeyDown:Ie(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Ie(n,y=>{f(j=>la(j)?!0:!j),w&&p&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})});mO.displayName=hO;var qb=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:c,value:d,onCheckedChange:h,form:g,...f}=e;return s.jsx(MW,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:c,required:o,onCheckedChange:h,name:r,form:g,value:d,internal_do_not_use_render:({isFormControl:m})=>s.jsxs(s.Fragment,{children:[s.jsx(mO,{...f,ref:t,__scopeCheckbox:n}),m&&s.jsx(xO,{__scopeCheckbox:n})]})})});qb.displayName=ym;var pO="CheckboxIndicator",gO=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=Bb(pO,n);return s.jsx(zs,{present:r||la(a.checked)||a.checked===!0,children:s.jsx(Ze.span,{"data-state":vO(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});gO.displayName=pO;var yO="CheckboxBubbleInput",xO=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:c,disabled:d,name:h,value:g,form:f,bubbleInput:m,setBubbleInput:p}=Bb(yO,e),w=bt(n,p),x=nm(a),v=Zh(r);E.useEffect(()=>{const j=m;if(!j)return;const _=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(_,"checked").set,S=!i.current;if(x!==a&&C){const P=new Event("click",{bubbles:S});j.indeterminate=la(a),C.call(j,la(a)?!1:a),j.dispatchEvent(P)}},[m,x,a,i]);const y=E.useRef(la(a)?!1:a);return s.jsx(Ze.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??y.current,required:c,disabled:d,name:h,value:g,form:f,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});xO.displayName=yO;function LW(e){return typeof e=="function"}function la(e){return e==="indeterminate"}function vO(e){return la(e)?"indeterminate":e?"checked":"unchecked"}const Ub=E.forwardRef(({className:e,...t},n)=>s.jsx(qb,{ref:n,className:He("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:s.jsx(gO,{className:He("flex items-center justify-center text-current"),children:s.jsx(Ds,{className:"h-4 w-4"})})}));Ub.displayName=qb.displayName;var ty,OS;function DW(){if(OS)return ty;OS=1;function e(){this.__data__=[],this.size=0}return ty=e,ty}var ny,MS;function bO(){if(MS)return ny;MS=1;function e(t,n){return t===n||t!==t&&n!==n}return ny=e,ny}var ry,LS;function xm(){if(LS)return ry;LS=1;var e=bO();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return ry=t,ry}var sy,DS;function IW(){if(DS)return sy;DS=1;var e=xm(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var c=a.length-1;return o==c?a.pop():n.call(a,o,1),--this.size,!0}return sy=r,sy}var iy,IS;
vendor: 8,056 bytes, line 566
566function FW(){if(IS)return iy;IS=1;var e=xm();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return iy=t,iy}var ay,FS;function BW(){if(FS)return ay;FS=1;var e=xm();function t(n){return e(this.__data__,n)>-1}return ay=t,ay}var oy,BS;function qW(){if(BS)return oy;BS=1;var e=xm();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return oy=t,oy}var ly,qS;function vm(){if(qS)return ly;qS=1;var e=DW(),t=IW(),n=FW(),r=BW(),i=qW();function a(o){var c=-1,d=o==null?0:o.length;for(this.clear();++c<d;){var h=o[c];this.set(h[0],h[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,ly=a,ly}var cy,US;function UW(){if(US)return cy;US=1;var e=vm();function t(){this.__data__=new e,this.size=0}return cy=t,cy}var uy,$S;function $W(){if($S)return uy;$S=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return uy=e,uy}var dy,zS;function zW(){if(zS)return dy;zS=1;function e(t){return this.__data__.get(t)}return dy=e,dy}var fy,VS;function VW(){if(VS)return fy;VS=1;function e(t){return this.__data__.has(t)}return fy=e,fy}var hy,HS;function wO(){if(HS)return hy;HS=1;var e=typeof wf=="object"&&wf&&wf.Object===Object&&wf;return hy=e,hy}var my,WS;function vi(){if(WS)return my;WS=1;var e=wO(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return my=n,my}var py,KS;function $b(){if(KS)return py;KS=1;var e=vi(),t=e.Symbol;return py=t,py}var gy,GS;function HW(){if(GS)return gy;GS=1;var e=$b(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var c=n.call(o,i),d=o[i];try{o[i]=void 0;var h=!0}catch{}var g=r.call(o);return h&&(c?o[i]=d:delete o[i]),g}return gy=a,gy}var yy,YS;function WW(){if(YS)return yy;YS=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return yy=n,yy}var xy,QS;function bm(){if(QS)return xy;QS=1;var e=$b(),t=HW(),n=WW(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(c){return c==null?c===void 0?i:r:a&&a in Object(c)?t(c):n(c)}return xy=o,xy}var vy,XS;function jO(){if(XS)return vy;XS=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return vy=e,vy}var by,JS;function _O(){if(JS)return by;JS=1;var e=bm(),t=jO(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(c){if(!t(c))return!1;var d=e(c);return d==r||d==i||d==n||d==a}return by=o,by}var wy,ZS;function KW(){if(ZS)return wy;ZS=1;var e=vi(),t=e["__core-js_shared__"];return wy=t,wy}var jy,ek;function GW(){if(ek)return jy;ek=1;var e=KW(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return jy=n,jy}var _y,tk;function NO(){if(tk)return _y;tk=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return _y=n,_y}var Ny,nk;function YW(){if(nk)return Ny;nk=1;var e=_O(),t=GW(),n=jO(),r=NO(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,c=Object.prototype,d=o.toString,h=c.hasOwnProperty,g=RegExp("^"+d.call(h).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(m){if(!n(m)||t(m))return!1;var p=e(m)?g:a;return p.test(r(m))}return Ny=f,Ny}var Sy,rk;function QW(){if(rk)return Sy;rk=1;function e(t,n){return t==null?void 0:t[n]}return Sy=e,Sy}var ky,sk;function Yl(){if(sk)return ky;sk=1;var e=YW(),t=QW();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return ky=n,ky}var Cy,ik;function zb(){if(ik)return Cy;ik=1;var e=Yl(),t=vi(),n=e(t,"Map");return Cy=n,Cy}var Ey,ak;function wm(){if(ak)return Ey;ak=1;var e=Yl(),t=e(Object,"create");return Ey=t,Ey}var Ty,ok;function XW(){if(ok)return Ty;ok=1;var e=wm();function t(){this.__data__=e?e(null):{},this.size=0}return Ty=t,Ty}var Py,lk;function JW(){if(lk)return Py;lk=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Py=e,Py}var Ay,ck;function ZW(){if(ck)return Ay;ck=1;var e=wm(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var c=o[a];return c===t?void 0:c}return r.call(o,a)?o[a]:void 0}return Ay=i,Ay}var Ry,uk;function eK(){if(uk)return Ry;uk=1;var e=wm(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return Ry=r,Ry}var Oy,dk;function tK(){if(dk)return Oy;dk=1;var e=wm(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return Oy=n,Oy}var My,fk;function nK(){if(fk)return My;fk=1;var e=XW(),t=JW(),n=ZW(),r=eK(),i=tK();function a(o){var c=-1,d=o==null?0:o.length;for(this.clear();++c<d;){var h=o[c];this.set(h[0],h[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,My=a,My}var Ly,hk;function rK(){if(hk)return Ly;hk=1;var e=nK(),t=vm(),n=zb();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Ly=r,Ly}var Dy,mk;function sK(){if(mk)return Dy;mk=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Dy=e,Dy}var Iy,pk;function jm(){if(pk)return Iy;pk=1;var e=sK();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Iy=t,Iy}var Fy,gk;function iK(){if(gk)return Fy;gk=1;var e=jm();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Fy=t,Fy}var By,yk;function aK(){if(yk)return By;yk=1;var e=jm();function t(n){return e(this,n).get(n)}return By=t,By}var qy,xk;function oK(){if(xk)return qy;xk=1;var e=jm();function t(n){return e(this,n).has(n)}return qy=t,qy}var Uy,vk;function lK(){if(vk)return Uy;vk=1;var e=jm();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return Uy=t,Uy}var $y,bk;function SO(){if(bk)return $y;bk=1;var e=rK(),t=iK(),n=aK(),r=oK(),i=lK();function a(o){var c=-1,d=o==null?0:o.length;for(this.clear();++c<d;){var h=o[c];this.set(h[0],h[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,$y=a,$y}var zy,wk;function cK(){if(wk)return zy;wk=1;var e=vm(),t=zb(),n=SO(),r=200;function i(a,o){var c=this.__data__;if(c instanceof e){var d=c.__data__;if(!t||d.length<r-1)return d.push([a,o]),this.size=++c.size,this;c=this.__data__=new n(d)}return c.set(a,o),this.size=c.size,this}return zy=i,zy}var Vy,jk;function uK(){if(jk)return Vy;jk=1;var e=vm(),t=UW(),n=$W(),r=zW(),i=VW(),a=cK();function o(c){var d=this.__data__=new e(c);this.size=d.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,Vy=o,Vy}var Hy,_k;function dK(){if(_k)return Hy;_k=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Hy=t,Hy}var Wy,Nk;function fK(){if(Nk)return Wy;Nk=1;function e(t){return this.__data__.has(t)}return Wy=e,Wy}var Ky,Sk;function hK(){if(Sk)return Ky;Sk=1;var e=SO(),t=dK(),n=fK();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Ky=r,Ky}var Gy,kk;function mK(){if(kk)return Gy;kk=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return Gy=e,Gy}var Yy,Ck;function pK(){if(Ck)return Yy;Ck=1;function e(t,n){return t.has(n)}return Yy=e,Yy}var Qy,Ek;function kO(){if(Ek)return Qy;Ek=1;var e=hK(),t=mK(),n=pK(),r=1,i=2;function a(o,c,d,h,g,f){var m=d&r,p=o.length,w=c.length;if(p!=w&&!(m&&w>p))return!1;var x=f.get(o),v=f.get(c);if(x&&v)return x==c&&v==o;var y=-1,j=!0,_=d&i?new e:void 0;for(f.set(o,c),f.set(c,o);++y<p;){var N=o[y],C=c[y];if(h)var S=m?h(C,N,y,c,o,f):h(N,C,y,o,c,f);if(S!==void 0){if(S)continue;j=!1;break}if(_){if(!t(c,function(P,R){if(!n(_,R)&&(N===P||g(N,P,d,h,f)))return _.push(R)}
vendor: 4,679 bytes, line 566
566)){j=!1;break}}else if(!(N===C||g(N,C,d,h,f))){j=!1;break}}return f.delete(o),f.delete(c),j}return Qy=a,Qy}var Xy,Tk;function gK(){if(Tk)return Xy;Tk=1;var e=vi(),t=e.Uint8Array;return Xy=t,Xy}var Jy,Pk;function yK(){if(Pk)return Jy;Pk=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return Jy=e,Jy}var Zy,Ak;function xK(){if(Ak)return Zy;Ak=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Zy=e,Zy}var ex,Rk;function vK(){if(Rk)return ex;Rk=1;var e=$b(),t=gK(),n=bO(),r=kO(),i=yK(),a=xK(),o=1,c=2,d="[object Boolean]",h="[object Date]",g="[object Error]",f="[object Map]",m="[object Number]",p="[object RegExp]",w="[object Set]",x="[object String]",v="[object Symbol]",y="[object ArrayBuffer]",j="[object DataView]",_=e?e.prototype:void 0,N=_?_.valueOf:void 0;function C(S,P,R,L,D,T,O){switch(R){case j:if(S.byteLength!=P.byteLength||S.byteOffset!=P.byteOffset)return!1;S=S.buffer,P=P.buffer;case y:return!(S.byteLength!=P.byteLength||!T(new t(S),new t(P)));case d:case h:case m:return n(+S,+P);case g:return S.name==P.name&&S.message==P.message;case p:case x:return S==P+"";case f:var M=i;case w:var U=L&o;if(M||(M=a),S.size!=P.size&&!U)return!1;var z=O.get(S);if(z)return z==P;L|=c,O.set(S,P);var H=r(M(S),M(P),L,D,T,O);return O.delete(S),H;case v:if(N)return N.call(S)==N.call(P)}return!1}return ex=C,ex}var tx,Ok;function bK(){if(Ok)return tx;Ok=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return tx=e,tx}var nx,Mk;function Vb(){if(Mk)return nx;Mk=1;var e=Array.isArray;return nx=e,nx}var rx,Lk;function wK(){if(Lk)return rx;Lk=1;var e=bK(),t=Vb();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return rx=n,rx}var sx,Dk;function jK(){if(Dk)return sx;Dk=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var c=t[r];n(c,r,t)&&(o[a++]=c)}return o}return sx=e,sx}var ix,Ik;function _K(){if(Ik)return ix;Ik=1;function e(){return[]}return ix=e,ix}var ax,Fk;function NK(){if(Fk)return ax;Fk=1;var e=jK(),t=_K(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(c){return r.call(o,c)}))}:t;return ax=a,ax}var ox,Bk;function SK(){if(Bk)return ox;Bk=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return ox=e,ox}var lx,qk;function _m(){if(qk)return lx;qk=1;function e(t){return t!=null&&typeof t=="object"}return lx=e,lx}var cx,Uk;function kK(){if(Uk)return cx;Uk=1;var e=bm(),t=_m(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return cx=r,cx}var ux,$k;function CK(){if($k)return ux;$k=1;var e=kK(),t=_m(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return ux=a,ux}var Zc={exports:{}},dx,zk;function EK(){if(zk)return dx;zk=1;function e(){return!1}return dx=e,dx}Zc.exports;var Vk;function CO(){return Vk||(Vk=1,(function(e,t){var n=vi(),r=EK(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,c=o?n.Buffer:void 0,d=c?c.isBuffer:void 0,h=d||r;e.exports=h})(Zc,Zc.exports)),Zc.exports}var fx,Hk;function TK(){if(Hk)return fx;Hk=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return fx=n,fx}var hx,Wk;function EO(){if(Wk)return hx;Wk=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return hx=t,hx}var mx,Kk;function PK(){if(Kk)return mx;Kk=1;var e=bm(),t=EO(),n=_m(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",c="[object Error]",d="[object Function]",h="[object Map]",g="[object Number]",f="[object Object]",m="[object RegExp]",p="[object Set]",w="[object String]",x="[object WeakMap]",v="[object ArrayBuffer]",y="[object DataView]",j="[object Float32Array]",_="[object Float64Array]",N="[object Int8Array]",C="[object Int16Array]",S="[object Int32Array]",P="[object Uint8Array]",R="[object Uint8ClampedArray]",L="[object Uint16Array]",D="[object Uint32Array]",T={};T[j]=T[_]=T[N]=T[C]=T[S]=T[P]=T[R]=T[L]=T[D]=!0,T[r]=T[i]=T[v]=T[a]=T[y]=T[o]=T[c]=T[d]=T[h]=T[g]=T[f]=T[m]=T[p]=T[w]=T[x]=!1;function O(M){return n(M)&&t(M.length)&&!!T[e(M)]}return mx=O,mx}var px,Gk;function AK(){if(Gk)return px;Gk=1;function e(t){return function(n){return t(n)}}return px=e,px}var eu={exports:{}};eu.exports;var Yk;function RK(){return Yk||(Yk=1,(function(e,t){var n=wO(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,c=(function(){try{var d=i&&i.require&&i.require("util").t
vendor: 3,772 bytes, line 566
566ypes;return d||o&&o.binding&&o.binding("util")}catch{}})();e.exports=c})(eu,eu.exports)),eu.exports}var gx,Qk;function TO(){if(Qk)return gx;Qk=1;var e=PK(),t=AK(),n=RK(),r=n&&n.isTypedArray,i=r?t(r):e;return gx=i,gx}var yx,Xk;function OK(){if(Xk)return yx;Xk=1;var e=SK(),t=CK(),n=Vb(),r=CO(),i=TK(),a=TO(),o=Object.prototype,c=o.hasOwnProperty;function d(h,g){var f=n(h),m=!f&&t(h),p=!f&&!m&&r(h),w=!f&&!m&&!p&&a(h),x=f||m||p||w,v=x?e(h.length,String):[],y=v.length;for(var j in h)(g||c.call(h,j))&&!(x&&(j=="length"||p&&(j=="offset"||j=="parent")||w&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||i(j,y)))&&v.push(j);return v}return yx=d,yx}var xx,Jk;function MK(){if(Jk)return xx;Jk=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return xx=t,xx}var vx,Zk;function LK(){if(Zk)return vx;Zk=1;function e(t,n){return function(r){return t(n(r))}}return vx=e,vx}var bx,e2;function DK(){if(e2)return bx;e2=1;var e=LK(),t=e(Object.keys,Object);return bx=t,bx}var wx,t2;function IK(){if(t2)return wx;t2=1;var e=MK(),t=DK(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var c in Object(a))r.call(a,c)&&c!="constructor"&&o.push(c);return o}return wx=i,wx}var jx,n2;function FK(){if(n2)return jx;n2=1;var e=_O(),t=EO();function n(r){return r!=null&&t(r.length)&&!e(r)}return jx=n,jx}var _x,r2;function BK(){if(r2)return _x;r2=1;var e=OK(),t=IK(),n=FK();function r(i){return n(i)?e(i):t(i)}return _x=r,_x}var Nx,s2;function qK(){if(s2)return Nx;s2=1;var e=wK(),t=NK(),n=BK();function r(i){return e(i,n,t)}return Nx=r,Nx}var Sx,i2;function UK(){if(i2)return Sx;i2=1;var e=qK(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,c,d,h,g){var f=c&t,m=e(a),p=m.length,w=e(o),x=w.length;if(p!=x&&!f)return!1;for(var v=p;v--;){var y=m[v];if(!(f?y in o:r.call(o,y)))return!1}var j=g.get(a),_=g.get(o);if(j&&_)return j==o&&_==a;var N=!0;g.set(a,o),g.set(o,a);for(var C=f;++v<p;){y=m[v];var S=a[y],P=o[y];if(d)var R=f?d(P,S,y,o,a,g):d(S,P,y,a,o,g);if(!(R===void 0?S===P||h(S,P,c,d,g):R)){N=!1;break}C||(C=y=="constructor")}if(N&&!C){var L=a.constructor,D=o.constructor;L!=D&&"constructor"in a&&"constructor"in o&&!(typeof L=="function"&&L instanceof L&&typeof D=="function"&&D instanceof D)&&(N=!1)}return g.delete(a),g.delete(o),N}return Sx=i,Sx}var kx,a2;function $K(){if(a2)return kx;a2=1;var e=Yl(),t=vi(),n=e(t,"DataView");return kx=n,kx}var Cx,o2;function zK(){if(o2)return Cx;o2=1;var e=Yl(),t=vi(),n=e(t,"Promise");return Cx=n,Cx}var Ex,l2;function VK(){if(l2)return Ex;l2=1;var e=Yl(),t=vi(),n=e(t,"Set");return Ex=n,Ex}var Tx,c2;function HK(){if(c2)return Tx;c2=1;var e=Yl(),t=vi(),n=e(t,"WeakMap");return Tx=n,Tx}var Px,u2;function WK(){if(u2)return Px;u2=1;var e=$K(),t=zb(),n=zK(),r=VK(),i=HK(),a=bm(),o=NO(),c="[object Map]",d="[object Object]",h="[object Promise]",g="[object Set]",f="[object WeakMap]",m="[object DataView]",p=o(e),w=o(t),x=o(n),v=o(r),y=o(i),j=a;return(e&&j(new e(new ArrayBuffer(1)))!=m||t&&j(new t)!=c||n&&j(n.resolve())!=h||r&&j(new r)!=g||i&&j(new i)!=f)&&(j=function(_){var N=a(_),C=N==d?_.constructor:void 0,S=C?o(C):"";if(S)switch(S){case p:return m;case w:return c;case x:return h;case v:return g;case y:return f}return N}),Px=j,Px}var Ax,d2;function KK(){if(d2)return Ax;d2=1;var e=uK(),t=kO(),n=vK(),r=UK(),i=WK(),a=Vb(),o=CO(),c=TO(),d=1,h="[object Arguments]",g="[object Array]",f="[object Object]",m=Object.prototype,p=m.hasOwnProperty;function w(x,v,y,j,_,N){var C=a(x),S=a(v),P=C?g:i(x),R=S?g:i(v);P=P==h?f:P,R=R==h?f:R;var L=P==f,D=R==f,T=P==R;if(T&&o(x)){if(!o(v))return!1;C=!0,L=!1}if(T&&!L)return N||(N=new e),C||c(x)?t(x,v,y,j,_,N):n(x,v,P,y,j,_,N);if(!(y&d)){var O=L&&p.call(x,"__wrapped__"),M=D&&p.call(v,"__wrapped__");
vendor: 199,529 bytes, lines 566-606
566if(O||M){var U=O?x.value():x,z=M?v.value():v;return N||(N=new e),_(U,z,y,j,N)}}return T?(N||(N=new e),r(x,v,y,j,_,N)):!1}return Ax=w,Ax}var Rx,f2;function GK(){if(f2)return Rx;f2=1;var e=KK(),t=_m();function n(r,i,a,o,c){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,c)}return Rx=n,Rx}var Ox,h2;function YK(){if(h2)return Ox;h2=1;var e=GK();function t(n,r){return e(n,r)}return Ox=t,Ox}var sh={exports:{}};/*! 567 * Quill Editor v1.3.7 568 * https://quilljs.com/ 569 * Copyright (c) 2014, Jason Chen 570 * Copyright (c) 2013, salesforce.com 571 */var QK=sh.exports,m2;function XK(){return m2||(m2=1,(function(e,t){(function(r,i){e.exports=i()})(typeof self<"u"?self:QK,function(){return(function(n){var r={};function i(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return n[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=n,i.c=r,i.d=function(a,o,c){i.o(a,o)||Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get:c})},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=109)})([(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(17),o=i(18),c=i(19),d=i(45),h=i(46),g=i(47),f=i(48),m=i(49),p=i(12),w=i(32),x=i(33),v=i(31),y=i(1),j={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:a.default,Format:o.default,Leaf:c.default,Embed:f.default,Scroll:d.default,Block:g.default,Inline:h.default,Text:m.default,Attributor:{Attribute:p.default,Class:w.default,Style:x.default,Store:v.default}};r.default=j}),(function(n,r,i){var a=this&&this.__extends||(function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,j){y.__proto__=j}||function(y,j){for(var _ in j)j.hasOwnProperty(_)&&(y[_]=j[_])};return function(y,j){v(y,j);function _(){this.constructor=y}y.prototype=j===null?Object.create(j):(_.prototype=j.prototype,new _)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=(function(v){a(y,v);function y(j){var _=this;return j="[Parchment] "+j,_=v.call(this,j)||this,_.message=j,_.name=_.constructor.name,_}return y})(Error);r.ParchmentError=o;var c={},d={},h={},g={};r.DATA_KEY="__blot";var f;(function(v){v[v.TYPE=3]="TYPE",v[v.LEVEL=12]="LEVEL",v[v.ATTRIBUTE=13]="ATTRIBUTE",v[v.BLOT=14]="BLOT",v[v.INLINE=7]="INLINE",v[v.BLOCK=11]="BLOCK",v[v.BLOCK_BLOT=10]="BLOCK_BLOT",v[v.INLINE_BLOT=6]="INLINE_BLOT",v[v.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",v[v.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",v[v.ANY=15]="ANY"})(f=r.Scope||(r.Scope={}));function m(v,y){var j=w(v);if(j==null)throw new o("Unable to create "+v+" blot");var _=j,N=v instanceof Node||v.nodeType===Node.TEXT_NODE?v:_.create(y);return new _(N,y)}r.create=m;function p(v,y){return y===void 0&&(y=!1),v==null?null:v[r.DATA_KEY]!=null?v[r.DATA_KEY].blot:y?p(v.parentNode,y):null}r.find=p;function w(v,y){y===void 0&&(y=f.ANY);var j;if(typeof v=="string")j=g[v]||c[v];else if(v instanceof Text||v.nodeType===Node.TEXT_NODE)j=g.text;else if(typeof v=="number")v&f.LEVEL&f.BLOCK?j=g.block:v&f.LEVEL&f.INLINE&&(j=g.inline);else if(v instanceof HTMLElement){var _=(v.getAttribute("class")||"").split(/\s+/);for(var N in _)if(j=d[_[N]],j)break;j=j||h[v.tagName]}return j==null?null:y&f.LEVEL&j.scope&&y&f.TYPE&j.scope?j:null}r.query=w;function x(){for(var v=[],y=0;y<arguments.length;y++)v[y]=arguments[y];if(v.length>1)return v.map(function(N){return x(N)});var j=v[0];if(typeof j.blotName!="string"&&typeof j.attrName!="string")throw new o("Invalid definition");if(j.blotName==="abstract")throw new o("Cannot register abstract class");if(g[j.blotName||j.attrName]=j,typeof j.keyName=="string")c[j.keyName]=j;else if(j.className!=null&&(d[j.className]=j),j.tagName!=null){Array.isArray(j.tagName)?j.tagName=j.tagName.map(function(N){return N.toUpperCase()}):j.tagName=j.tagName.toUpperCase();var _=Array.isArray(j.tagName)?j.tagName:[j.tagName];_.forEach(function(N){(h[N]==null||j.className==null)&&(h[N]=j)})}return j}r.register=x}),(function(n,r,i){var a=i(51),o=i(11),c=i(3),d=i(20),h="\0",g=function(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]};g.prototype.insert=function(f,m){var p={};return f.length===0?this:(p.insert=f,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(p.attributes=m),this.push(p))},g.prototype.delete=function(f){return f<=0?this:this.push({delete:f})},g.prototype.retain=function(f,m){if(f<=0)return this;var p={retain:f};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(p.attributes=m),this.push(p)},g.prototype.push=function(f){var m=this.ops.length,p=this.ops[m-1];if(f=c(!0,{},f),typeof p=="object"){if(typeof f.delete=="number"&&typeof p.delete=="number")return this.ops[m-1]={delete:p.delete+f.delete},this;if(typeof p.delete=="number"&&f.insert!=null&&(m-=1,p=this.ops[m-1],typeof p!="object"))return this.ops.unshift(f),this;if(o(f.attributes,p.attributes)){if(typeof f.insert=="string"&&typeof p.insert=="string")return this.ops[m-1]={insert:p.insert+f.insert},typeof f.attributes=="object"&&(this.ops[m-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof p.retain=="number")return this.ops[m-1]={retain:p.retain+f.retain},typeof f.attributes=="object"&&(this.ops[m-1].attributes=f.attributes),this}}return m===this.ops.length?this.ops.push(f):this.ops.splice(m,0,f),this},g.prototype.chop=function(){var f=this.ops[this.ops.length-1];return f&&f.retain&&!f.attributes&&this.ops.pop(),this},g.prototype.filter=function(f){return this.ops.filter(f)},g.prototype.forEach=function(f){this.ops.forEach(f)},g.prototype.map=function(f){return this.ops.map(f)},g.prototype.partition=function(f){var m=[],p=[];return this.forEach(function(w){var x=f(w)?m:p;x.push(w)}),[m,p]},g.prototype.reduce=function(f,m){return this.ops.reduce(f,m)},g.prototype.changeLength=function(){return this.reduce(function(f,m){return m.insert?f+d.length(m):m.delete?f-m.delete:f},0)},g.prototype.length=function(){return this.reduce(function(f,m){return f+d.length(m)},0)},g.prototype.slice=function(f,m){f=f||0,typeof m!="number"&&(m=1/0);for(var p=[],w=d.iterator(this.ops),x=0;x<m&&w.hasNext();){var v;x<f?v=w.next(f-x):(v=w.next(m-x),p.push(v)),x+=d.length(v)}return new g(p)},g.prototype.compose=function(f){var m=d.iterator(this.ops),p=d.iterator(f.ops),w=[],x=p.peek();if(x!=null&&typeof x.retain=="number"&&x.attributes==null){for(var v=x.retain;m.peekType()==="insert"&&m.peekLength()<=v;)v-=m.peekLength(),w.push(m.next());x.retain-v>0&&p.next(x.retain-v)}for(var y=new g(w);m.hasNext()||p.hasNext();)if(p.peekType()==="insert")y.push(p.next());else if(m.peekType()==="delete")y.push(m.next());else{var j=Math.min(m.peekLength(),p.peekLength()),_=m.next(j),N=p.next(j);if(typeof N.retain=="number"){var C={};typeof _.retain=="number"?C.retain=j:C.insert=_.insert;var S=d.attributes.compose(_.attributes,N.attributes,typeof _.retain=="number");if(S&&(C.attributes=S),y.push(C),!p.hasNext()&&o(y.ops[y.ops.length-1],C)){var P=new g(m.rest());return y.concat(P).chop()}}else typeof N.delete=="number"&&typeof _.retain=="number"&&y.push(N)}return y.chop()},g.prototype.concat=function(f){var m=new g(this.ops.slice());return f.ops.length>0&&(m.push(f.ops[0]),m.ops=m.ops.concat(f.ops.slice(1))),m},g.prototype.diff=function(f,m){if(this.ops===f.ops)return new g;var p=[this,f].map(function(j){return j.map(function(_){if(_.insert!=null)return typeof _.insert=="string"?_.insert:h;var N=j===f?"on":"with";throw new Error("diff() called "+N+" non-document")}).join("")}),w=new g,x=a(p[0],p[1],m),v=d.iterator(this.ops),y=d.iterator(f.ops);return x.forEach(function(j){for(var _=j[1].length;_>0;){var N=0;switch(j[0]){case a.INSERT:N=Math.min(y.peekLength(),_),w.push(y.next(N));break;case a.DELETE:N=Math.min(_,v.peekLength()),v.next(N),w.delete(N);break;case a.EQUAL:N=Math.min(v.peekLength(),y.peekLength(),_);var C=v.next(N),S=y.next(N);o(C.insert,S.insert)?w.retain(N,d.attributes.diff(C.attributes,S.attributes)):w.push(S).delete(N);break}_-=N}}),w.chop()},g.prototype.eachLine=function(f,m){m=m||` 572`;for(var p=d.iterator(this.ops),w=new g,x=0;p.hasNext();){if(p.peekType()!=="insert")return;var v=p.peek(),y=d.length(v)-p.peekLength(),j=typeof v.insert=="string"?v.insert.indexOf(m,y)-y:-1;if(j<0)w.push(p.next());else if(j>0)w.push(p.next(j));else{if(f(w,p.next(1).attributes||{},x)===!1)return;x+=1,w=new g}}w.length()>0&&f(w,{},x)},g.prototype.transform=function(f,m){if(m=!!m,typeof f=="number")return this.transformPosition(f,m);for(var p=d.iterator(this.ops),w=d.iterator(f.ops),x=new g;p.hasNext()||w.hasNext();)if(p.peekType()==="insert"&&(m||w.peekType()!=="insert"))x.retain(d.length(p.next()));else if(w.peekType()==="insert")x.push(w.next());else{var v=Math.min(p.peekLength(),w.peekLength()),y=p.next(v),j=w.next(v);if(y.delete)continue;j.delete?x.push(j):x.retain(v,d.attributes.transform(y.attributes,j.attributes,m))}return x.chop()},g.prototype.transformPosition=function(f,m){m=!!m;for(var p=d.iterator(this.ops),w=0;p.hasNext()&&w<=f;){var x=p.peekLength(),v=p.peekType();if(p.next(),v==="delete"){f-=Math.min(x,f-w);continue}else v==="insert"&&(w<f||!m)&&(f+=x);w+=x}return f},n.exports=g}),(function(n,r){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=function(p){return typeof Array.isArray=="function"?Array.isArray(p):a.call(p)==="[object Array]"},h=function(p){if(!p||a.call(p)!=="[object Object]")return!1;var w=i.call(p,"constructor"),x=p.constructor&&p.constructor.prototype&&i.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!w&&!x)return!1;var v;for(v in p);return typeof v>"u"||i.call(p,v)},g=function(p,w){o&&w.name==="__proto__"?o(p,w.name,{enumerable:!0,configurable:!0,value:w.newValue,writable:!0}):p[w.name]=w.newValue},f=function(p,w){if(w==="__proto__")if(i.call(p,w)){if(c)return c(p,w).value}else return;return p[w]};n.exports=function m(){var p,w,x,v,y,j,_=arguments[0],N=1,C=arguments.length,S=!1;for(typeof _=="boolean"&&(S=_,_=arguments[1]||{},N=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});N<C;++N)if(p=arguments[N],p!=null)for(w in p)x=f(_,w),v=f(p,w),_!==v&&(S&&v&&(h(v)||(y=d(v)))?(y?(y=!1,j=x&&d(x)?x:[]):j=x&&h(x)?x:{},g(_,{name:w,newValue:m(S,j,v)})):typeof v<"u"&&g(_,{name:w,newValue:v}));return _}}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var a=(function(){function T(O,M){for(var U=0;U<M.length;U++){var z=M[U];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(O,z.key,z)}}return function(O,M,U){return M&&T(O.prototype,M),U&&T(O,U),O}})(),o=function T(O,M,U){O===null&&(O=Function.prototype);var z=Object.getOwnPropertyDescriptor(O,M);if(z===void 0){var H=Object.getPrototypeOf(O);return H===null?void 0:T(H,M,U)}else{if("value"in z)return z.value;var Y=z.get;return Y===void 0?void 0:Y.call(U)}},c=i(3),d=_(c),h=i(2),g=_(h),f=i(0),m=_(f),p=i(16),w=_(p),x=i(6),v=_(x),y=i(7),j=_(y);function _(T){return T&&T.__esModule?T:{default:T}}function N(T,O){if(!(T instanceof O))throw new TypeError("Cannot call a class as a function")}function C(T,O){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:T}function S(T,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);T.prototype=Object.create(O&&O.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(T,O):T.__proto__=O)}var P=1,R=(function(T){S(O,T);function O(){return N(this,O),C(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return a(O,[{key:"attach",value:function(){o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"attach",this).call(this),this.attributes=new m.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new g.default().insert(this.value(),(0,d.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(U,z){var H=m.default.query(U,m.default.Scope.BLOCK_ATTRIBUTE);H!=null&&this.attributes.attribute(H,z)}},{key:"formatAt",value:function(U,z,H,Y){this.format(H,Y)}},{key:"insertAt",value:function(U,z,H){if(typeof z=="string"&&z.endsWith(` 573`)){var Y=m.default.create(L.blotName);this.parent.insertBefore(Y,U===0?this:this.next),Y.insertAt(0,z.slice(0,-1))}else o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertAt",this).call(this,U,z,H)}}]),O})(m.default.Embed);R.scope=m.default.Scope.BLOCK_BLOT;var L=(function(T){S(O,T);function O(M){N(this,O);var U=C(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,M));return U.cache={},U}return a(O,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(m.default.Leaf).reduce(function(U,z){return z.length()===0?U:U.insert(z.value(),D(z))},new g.default).insert(` 574`,D(this))),this.cache.delta}},{key:"deleteAt",value:function(U,z){o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"deleteAt",this).call(this,U,z),this.cache={}}},{key:"formatAt",value:function(U,z,H,Y){z<=0||(m.default.query(H,m.default.Scope.BLOCK)?U+z===this.length()&&this.format(H,Y):o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"formatAt",this).call(this,U,Math.min(z,this.length()-U-1),H,Y),this.cache={})}},{key:"insertAt",value:function(U,z,H){if(H!=null)return o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertAt",this).call(this,U,z,H);if(z.length!==0){var Y=z.split(` 575`),G=Y.shift();G.length>0&&(U<this.length()-1||this.children.tail==null?o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertAt",this).call(this,Math.min(U,this.length()-1),G):this.children.tail.insertAt(this.children.tail.length(),G),this.cache={});var $=this;Y.reduce(function(I,B){return $=$.split(I,!0),$.insertAt(0,B),B.length},U+G.length)}}},{key:"insertBefore",value:function(U,z){var H=this.children.head;o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertBefore",this).call(this,U,z),H instanceof w.default&&H.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"length",this).call(this)+P),this.cache.length}},{key:"moveChildren",value:function(U,z){o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"moveChildren",this).call(this,U,z),this.cache={}}},{key:"optimize",value:function(U){o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"optimize",this).call(this,U),this.cache={}}},{key:"path",value:function(U){return o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"path",this).call(this,U,!0)}},{key:"removeChild",value:function(U){o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"removeChild",this).call(this,U),this.cache={}}},{key:"split",value:function(U){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(z&&(U===0||U>=this.length()-P)){var H=this.clone();return U===0?(this.parent.insertBefore(H,this),this):(this.parent.insertBefore(H,this.next),H)}else{var Y=o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"split",this).call(this,U,z);return this.cache={},Y}}}]),O})(m.default.Block);L.blotName="block",L.tagName="P",L.defaultChild="break",L.allowedChildren=[v.default,m.default.Embed,j.default];function D(T){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T==null||(typeof T.formats=="function"&&(O=(0,d.default)(O,T.formats())),T.parent==null||T.parent.blotName=="scroll"||T.parent.statics.scope!==T.statics.scope)?O:D(T.parent,O)}r.bubbleFormats=D,r.BlockEmbed=R,r.default=L}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},o=(function(){function $(I,B){var V=[],q=!0,J=!1,te=void 0;try{for(var K=I[Symbol.iterator](),Q;!(q=(Q=K.next()).done)&&(V.push(Q.value),!(B&&V.length===B));q=!0);}catch(ne){J=!0,te=ne}finally{try{!q&&K.return&&K.return()}finally{if(J)throw te}}return V}return function(I,B){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return $(I,B);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function $(I,B){for(var V=0;V<B.length;V++){var q=B[V];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(I,q.key,q)}}return function(I,B,V){return B&&$(I.prototype,B),V&&$(I,V),I}})();i(50);var d=i(2),h=D(d),g=i(14),f=D(g),m=i(8),p=D(m),w=i(9),x=D(w),v=i(0),y=D(v),j=i(15),_=D(j),N=i(3),C=D(N),S=i(10),P=D(S),R=i(34),L=D(R);function D($){return $&&$.__esModule?$:{default:$}}function T($,I,B){return I in $?Object.defineProperty($,I,{value:B,enumerable:!0,configurable:!0,writable:!0}):$[I]=B,$}function O($,I){if(!($ instanceof I))throw new TypeError("Cannot call a class as a function")}var M=(0,P.default)("quill"),U=(function(){c($,null,[{key:"debug",value:function(B){B===!0&&(B="log"),P.default.level(B)}},{key:"find",value:function(B){return B.__quill||y.default.find(B)}},{key:"import",value:function(B){return this.imports[B]==null&&M.error("Cannot import "+B+". Are you sure it was registered?"),this.imports[B]}},{key:"register",value:function(B,V){var q=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof B!="string"){var te=B.attrName||B.blotName;typeof te=="string"?this.register("formats/"+te,B,V):Object.keys(B).forEach(function(K){q.register(K,B[K],V)})}else this.imports[B]!=null&&!J&&M.warn("Overwriting "+B+" with",V),this.imports[B]=V,(B.startsWith("blots/")||B.startsWith("formats/"))&&V.blotName!=="abstract"?y.default.register(V):B.startsWith("modules")&&typeof V.register=="function"&&V.register()}}]);function $(I){var B=this,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(O(this,$),this.options=z(I,V),this.container=this.options.container,this.container==null)return M.error("Invalid Quill container",I);this.options.debug&&$.debug(this.options.debug);var q=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new p.default,this.scroll=y.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new f.default(this.scroll),this.selection=new _.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(p.default.events.EDITOR_CHANGE,function(te){te===p.default.events.TEXT_CHANGE&&B.root.classList.toggle("ql-blank",B.editor.isBlank())}),this.emitter.on(p.default.events.SCROLL_UPDATE,function(te,K){var Q=B.selection.lastRange,ne=Q&&Q.length===0?Q.index:void 0;H.call(B,function(){return B.editor.update(null,K,ne)},te)});var J=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+q+"<p><br></p></div>");this.setContents(J),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return c($,[{key:"addContainer",value:function(B){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof B=="string"){var q=B;B=document.createElement("div"),B.classList.add(q)}return this.container.insertBefore(B,V),B}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(B,V,q){var J=this,te=Y(B,V,q),K=o(te,4);return B=K[0],V=K[1],q=K[3],H.call(this,function(){return J.editor.deleteText(B,V)},q,B,-1*V)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(B),this.container.classList.toggle("ql-disabled",!B)}},{key:"focus",value:function(){var B=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=B,this.scrollIntoView()}},{key:"format",value:function(B,V){var q=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;return H.call(this,function(){var te=q.getSelection(!0),K=new h.default;if(te==null)return K;if(y.default.query(B,y.default.Scope.BLOCK))K=q.editor.formatLine(te.index,te.length,T({},B,V));else{if(te.length===0)return q.selection.format(B,V),K;K=q.editor.formatText(te.index,te.length,T({},B,V))}return q.setSelection(te,p.default.sources.SILENT),K},J)}},{key:"formatLine",value:function(B,V,q,J,te){var K=this,Q=void 0,ne=Y(B,V,q,J,te),se=o(ne,4);return B=se[0],V=se[1],Q=se[2],te=se[3],H.call(this,function(){return K.editor.formatLine(B,V,Q)},te,B,0)}},{key:"formatText",value:function(B,V,q,J,te){var K=this,Q=void 0,ne=Y(B,V,q,J,te),se=o(ne,4);return B=se[0],V=se[1],Q=se[2],te=se[3],H.call(this,function(){return K.editor.formatText(B,V,Q)},te,B,0)}},{key:"getBounds",value:function(B){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q=void 0;typeof B=="number"?q=this.selection.getBounds(B,V):q=this.selection.getBounds(B.index,B.length);var J=this.container.getBoundingClientRect();return{bottom:q.bottom-J.top,height:q.height,left:q.left-J.left,right:q.right-J.left,top:q.top-J.top,width:q.width}}},{key:"getContents",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-B,q=Y(B,V),J=o(q,2);return B=J[0],V=J[1],this.editor.getContents(B,V)}},{key:"getFormat",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof B=="number"?this.editor.getFormat(B,V):this.editor.getFormat(B.index,B.length)}},{key:"getIndex",value:function(B){return B.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(B){return this.scroll.leaf(B)}},{key:"getLine",value:function(B){return this.scroll.line(B)}},{key:"getLines",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof B!="number"?this.scroll.lines(B.index,B.length):this.scroll.lines(B,V)}},{key:"getModule",value:function(B){return this.theme.modules[B]}},{key:"getSelection",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return B&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-B,q=Y(B,V),J=o(q,2);return B=J[0],V=J[1],this.editor.getText(B,V)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(B,V,q){var J=this,te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$.sources.API;return H.call(this,function(){return J.editor.insertEmbed(B,V,q)},te,B)}},{key:"insertText",value:function(B,V,q,J,te){var K=this,Q=void 0,ne=Y(B,0,q,J,te),se=o(ne,4);return B=se[0],Q=se[2],te=se[3],H.call(this,function(){return K.editor.insertText(B,V,Q)},te,B,V.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(B,V,q){this.clipboard.dangerouslyPasteHTML(B,V,q)}},{key:"removeFormat",value:function(B,V,q){var J=this,te=Y(B,V,q),K=o(te,4);return B=K[0],V=K[1],q=K[3],H.call(this,function(){return J.editor.removeFormat(B,V)},q,B)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(B){var V=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API;return H.call(this,function(){B=new h.default(B);var J=V.getLength(),te=V.editor.deleteText(0,J),K=V.editor.applyDelta(B),Q=K.ops[K.ops.length-1];Q!=null&&typeof Q.insert=="string"&&Q.insert[Q.insert.length-1]===` 576`&&(V.editor.deleteText(V.getLength()-1,1),K.delete(1));var ne=te.compose(K);return ne},q)}},{key:"setSelection",value:function(B,V,q){if(B==null)this.selection.setRange(null,V||$.sources.API);else{var J=Y(B,V,q),te=o(J,4);B=te[0],V=te[1],q=te[3],this.selection.setRange(new j.Range(B,V),q),q!==p.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(B){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API,q=new h.default().insert(B);return this.setContents(q,V)}},{key:"update",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.default.sources.USER,V=this.scroll.update(B);return this.selection.update(B),V}},{key:"updateContents",value:function(B){var V=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API;return H.call(this,function(){return B=new h.default(B),V.editor.applyDelta(B,q)},q,!0)}}]),$})();U.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},U.events=p.default.events,U.sources=p.default.sources,U.version="1.3.7",U.imports={delta:h.default,parchment:y.default,"core/module":x.default,"core/theme":L.default};function z($,I){if(I=(0,C.default)(!0,{container:$,modules:{clipboard:!0,keyboard:!0,history:!0}},I),!I.theme||I.theme===U.DEFAULTS.theme)I.theme=L.default;else if(I.theme=U.import("themes/"+I.theme),I.theme==null)throw new Error("Invalid theme "+I.theme+". Did you register it?");var B=(0,C.default)(!0,{},I.theme.DEFAULTS);[B,I].forEach(function(J){J.modules=J.modules||{},Object.keys(J.modules).forEach(function(te){J.modules[te]===!0&&(J.modules[te]={})})});var V=Object.keys(B.modules).concat(Object.keys(I.modules)),q=V.reduce(function(J,te){var K=U.import("modules/"+te);return K==null?M.error("Cannot load "+te+" module. Are you sure you registered it?"):J[te]=K.DEFAULTS||{},J},{});return I.modules!=null&&I.modules.toolbar&&I.modules.toolbar.constructor!==Object&&(I.modules.toolbar={container:I.modules.toolbar}),I=(0,C.default)(!0,{},U.DEFAULTS,{modules:q},B,I),["bounds","container","scrollingContainer"].forEach(function(J){typeof I[J]=="string"&&(I[J]=document.querySelector(I[J]))}),I.modules=Object.keys(I.modules).reduce(function(J,te){return I.modules[te]&&(J[te]=I.modules[te]),J},{}),I}function H($,I,B,V){if(this.options.strict&&!this.isEnabled()&&I===p.default.sources.USER)return new h.default;var q=B==null?null:this.getSelection(),J=this.editor.delta,te=$();if(q!=null&&(B===!0&&(B=q.index),V==null?q=G(q,te,I):V!==0&&(q=G(q,B,V,I)),this.setSelection(q,p.default.sources.SILENT)),te.length()>0){var K,Q=[p.default.events.TEXT_CHANGE,te,J,I];if((K=this.emitter).emit.apply(K,[p.default.events.EDITOR_CHANGE].concat(Q)),I!==p.default.sources.SILENT){var ne;(ne=this.emitter).emit.apply(ne,Q)}}return te}function Y($,I,B,V,q){var J={};return typeof $.index=="number"&&typeof $.length=="number"?typeof I!="number"?(q=V,V=B,B=I,I=$.length,$=$.index):(I=$.length,$=$.index):typeof I!="number"&&(q=V,V=B,B=I,I=0),(typeof B>"u"?"undefined":a(B))==="object"?(J=B,q=V):typeof B=="string"&&(V!=null?J[B]=V:q=B),q=q||p.default.sources.API,[$,I,J,q]}function G($,I,B,V){if($==null)return null;var q=void 0,J=void 0;if(I instanceof h.default){var te=[$.index,$.index+$.length].map(function(se){return I.transformPosition(se,V!==p.default.sources.USER)}),K=o(te,2);q=K[0],J=K[1]}else{var Q=[$.index,$.index+$.length].map(function(se){return se<I||se===I&&V===p.default.sources.USER?se:B>=0?se+B:Math.max(I,se+B)}),ne=o(Q,2);q=ne[0],J=ne[1]}return new j.Range(q,J-q)}r.expandConfig=z,r.overload=Y,r.default=U}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function v(y,j){for(var _=0;_<j.length;_++){var N=j[_];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,j,_){return j&&v(y.prototype,j),_&&v(y,_),y}})(),o=function v(y,j,_){y===null&&(y=Function.prototype);var N=Object.getOwnPropertyDescriptor(y,j);if(N===void 0){var C=Object.getPrototypeOf(y);return C===null?void 0:v(C,j,_)}else{if("value"in N)return N.value;var S=N.get;return S===void 0?void 0:S.call(_)}},c=i(7),d=f(c),h=i(0),g=f(h);function f(v){return v&&v.__esModule?v:{default:v}}function m(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function p(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function w(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var x=(function(v){w(y,v);function y(){return m(this,y),p(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"formatAt",value:function(_,N,C,S){if(y.compare(this.statics.blotName,C)<0&&g.default.query(C,g.default.Scope.BLOT)){var P=this.isolate(_,N);S&&P.wrap(C,S)}else o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"formatAt",this).call(this,_,N,C,S)}},{key:"optimize",value:function(_){if(o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"optimize",this).call(this,_),this.parent instanceof y&&y.compare(this.statics.blotName,this.parent.statics.blotName)>0){var N=this.parent.isolate(this.offset(),this.length());this.moveChildren(N),N.wrap(this)}}}],[{key:"compare",value:function(_,N){var C=y.order.indexOf(_),S=y.order.indexOf(N);return C>=0||S>=0?C-S:_===N?0:_<N?-1:1}}]),y})(g.default.Inline);x.allowedChildren=[x,g.default.Embed,d.default],x.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=x}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(0),o=c(a);function c(m){return m&&m.__esModule?m:{default:m}}function d(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")}function h(m,p){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:m}function g(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(m,p):m.__proto__=p)}var f=(function(m){g(p,m);function p(){return d(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(o.default.Text);r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function j(_,N){for(var C=0;C<N.length;C++){var S=N[C];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(_,S.key,S)}}return function(_,N,C){return N&&j(_.prototype,N),C&&j(_,C),_}})(),o=function j(_,N,C){_===null&&(_=Function.prototype);var S=Object.getOwnPropertyDescriptor(_,N);if(S===void 0){var P=Object.getPrototypeOf(_);return P===null?void 0:j(P,N,C)}else{if("value"in S)return S.value;var R=S.get;return R===void 0?void 0:R.call(C)}},c=i(54),d=f(c),h=i(10),g=f(h);function f(j){return j&&j.__esModule?j:{default:j}}function m(j,_){if(!(j instanceof _))throw new TypeError("Cannot call a class as a function")}function p(j,_){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:j}function w(j,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);j.prototype=Object.create(_&&_.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(j,_):j.__proto__=_)}var x=(0,g.default)("quill:events"),v=["selectionchange","mousedown","mouseup","click"];v.forEach(function(j){document.addEventListener(j,function(){for(var _=arguments.length,N=Array(_),C=0;C<_;C++)N[C]=arguments[C];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(S){if(S.__quill&&S.__quill.emitter){var P;(P=S.__quill.emitter).handleDOM.apply(P,N)}})})});var y=(function(j){w(_,j);function _(){m(this,_);var N=p(this,(_.__proto__||Object.getPrototypeOf(_)).call(this));return N.listeners={},N.on("error",x.error),N}return a(_,[{key:"emit",value:function(){x.log.apply(x,arguments),o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(C){for(var S=arguments.length,P=Array(S>1?S-1:0),R=1;R<S;R++)P[R-1]=arguments[R];(this.listeners[C.type]||[]).forEach(function(L){var D=L.node,T=L.handler;(C.target===D||D.contains(C.target))&&T.apply(void 0,[C].concat(P))})}},{key:"listenDOM",value:function(C,S,P){this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push({node:S,handler:P})}}]),_})(d.default);y.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},y.sources={API:"api",SILENT:"silent",USER:"user"},r.default=y}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});function a(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}var o=function c(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(this,c),this.quill=d,this.options=h};o.DEFAULTS={},r.default=o}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=["error","warn","log","info"],o="warn";function c(h){if(a.indexOf(h)<=a.indexOf(o)){for(var g,f=arguments.length,m=Array(f>1?f-1:0),p=1;p<f;p++)m[p-1]=arguments[p];(g=console)[h].apply(g,m)}}function d(h){return a.reduce(function(g,f){return g[f]=c.bind(console,f,h),g},{})}c.level=d.level=function(h){o=h},r.default=d}),(function(n,r,i){var a=Array.prototype.slice,o=i(52),c=i(53),d=n.exports=function(m,p,w){return w||(w={}),m===p?!0:m instanceof Date&&p instanceof Date?m.getTime()===p.getTime():!m||!p||typeof m!="object"&&typeof p!="object"?w.strict?m===p:m==p:f(m,p,w)};function h(m){return m==null}function g(m){return!(!m||typeof m!="object"||typeof m.length!="number"||typeof m.copy!="function"||typeof m.slice!="function"||m.length>0&&typeof m[0]!="number")}function f(m,p,w){var x,v;if(h(m)||h(p)||m.prototype!==p.prototype)return!1;if(c(m))return c(p)?(m=a.call(m),p=a.call(p),d(m,p,w)):!1;if(g(m)){if(!g(p)||m.length!==p.length)return!1;for(x=0;x<m.length;x++)if(m[x]!==p[x])return!1;return!0}try{var y=o(m),j=o(p)}catch{return!1}if(y.length!=j.length)return!1;for(y.sort(),j.sort(),x=y.length-1;x>=0;x--)if(y[x]!=j[x])return!1;for(x=y.length-1;x>=0;x--)if(v=y[x],!d(m[v],p[v],w))return!1;return typeof m==typeof p}}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(1),o=(function(){function c(d,h,g){g===void 0&&(g={}),this.attrName=d,this.keyName=h;var f=a.Scope.TYPE&a.Scope.ATTRIBUTE;g.scope!=null?this.scope=g.scope&a.Scope.LEVEL|f:this.scope=a.Scope.ATTRIBUTE,g.whitelist!=null&&(this.whitelist=g.whitelist)}return c.keys=function(d){return[].map.call(d.attributes,function(h){return h.name})},c.prototype.add=function(d,h){return this.canAdd(d,h)?(d.setAttribute(this.keyName,h),!0):!1},c.prototype.canAdd=function(d,h){var g=a.query(d,a.Scope.BLOT&(this.scope|a.Scope.TYPE));return g==null?!1:this.whitelist==null?!0:typeof h=="string"?this.whitelist.indexOf(h.replace(/["']/g,""))>-1:this.whitelist.indexOf(h)>-1},c.prototype.remove=function(d){d.removeAttribute(this.keyName)},c.prototype.value=function(d){var h=d.getAttribute(this.keyName);return this.canAdd(d,h)&&h?h:""},c})();r.default=o}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var a=(function(){function R(L,D){var T=[],O=!0,M=!1,U=void 0;try{for(var z=L[Symbol.iterator](),H;!(O=(H=z.next()).done)&&(T.push(H.value),!(D&&T.length===D));O=!0);}catch(Y){M=!0,U=Y}finally{try{!O&&z.return&&z.return()}finally{if(M)throw U}}return T}return function(L,D){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return R(L,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function R(L,D){for(var T=0;T<D.length;T++){var O=D[T];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(L,O.key,O)}}return function(L,D,T){return D&&R(L.prototype,D),T&&R(L,T),L}})(),c=function R(L,D,T){L===null&&(L=Function.prototype);var O=Object.getOwnPropertyDescriptor(L,D);if(O===void 0){var M=Object.getPrototypeOf(L);return M===null?void 0:R(M,D,T)}else{if("value"in O)return O.value;var U=O.get;return U===void 0?void 0:U.call(T)}},d=i(2),h=j(d),g=i(0),f=j(g),m=i(4),p=j(m),w=i(6),x=j(w),v=i(7),y=j(v);function j(R){return R&&R.__esModule?R:{default:R}}function _(R,L){if(!(R instanceof L))throw new TypeError("Cannot call a class as a function")}function N(R,L){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:R}function C(R,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);R.prototype=Object.create(L&&L.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(R,L):R.__proto__=L)}var S=(function(R){C(L,R);function L(){return _(this,L),N(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L})(x.default);S.blotName="code",S.tagName="CODE";var P=(function(R){C(L,R);function L(){return _(this,L),N(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return o(L,[{key:"delta",value:function(){var T=this,O=this.domNode.textContent;return O.endsWith(` 577`)&&(O=O.slice(0,-1)),O.split(` 578`).reduce(function(M,U){return M.insert(U).insert(` 579`,T.formats())},new h.default)}},{key:"format",value:function(T,O){if(!(T===this.statics.blotName&&O)){var M=this.descendant(y.default,this.length()-1),U=a(M,1),z=U[0];z!=null&&z.deleteAt(z.length()-1,1),c(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"format",this).call(this,T,O)}}},{key:"formatAt",value:function(T,O,M,U){if(O!==0&&!(f.default.query(M,f.default.Scope.BLOCK)==null||M===this.statics.blotName&&U===this.statics.formats(this.domNode))){var z=this.newlineIndex(T);if(!(z<0||z>=T+O)){var H=this.newlineIndex(T,!0)+1,Y=z-H+1,G=this.isolate(H,Y),$=G.next;G.format(M,U),$ instanceof L&&$.formatAt(0,T-H+O-Y,M,U)}}}},{key:"insertAt",value:function(T,O,M){if(M==null){var U=this.descendant(y.default,T),z=a(U,2),H=z[0],Y=z[1];H.insertAt(Y,O)}}},{key:"length",value:function(){var T=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` 580`)?T:T+1}},{key:"newlineIndex",value:function(T){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(O)return this.domNode.textContent.slice(0,T).lastIndexOf(` 581`);var M=this.domNode.textContent.slice(T).indexOf(` 582`);return M>-1?T+M:-1}},{key:"optimize",value:function(T){this.domNode.textContent.endsWith(` 583`)||this.appendChild(f.default.create("text",` 584`)),c(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,T);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===O.statics.formats(O.domNode)&&(O.optimize(T),O.moveChildren(this),O.remove())}},{key:"replace",value:function(T){c(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,T),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(O){var M=f.default.find(O);M==null?O.parentNode.removeChild(O):M instanceof f.default.Embed?M.remove():M.unwrap()})}}],[{key:"create",value:function(T){var O=c(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,T);return O.setAttribute("spellcheck",!1),O}},{key:"formats",value:function(){return!0}}]),L})(p.default);P.blotName="code-block",P.tagName="PRE",P.TAB=" ",r.Code=S,r.default=P}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},o=(function(){function $(I,B){var V=[],q=!0,J=!1,te=void 0;try{for(var K=I[Symbol.iterator](),Q;!(q=(Q=K.next()).done)&&(V.push(Q.value),!(B&&V.length===B));q=!0);}catch(ne){J=!0,te=ne}finally{try{!q&&K.return&&K.return()}finally{if(J)throw te}}return V}return function(I,B){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return $(I,B);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function $(I,B){for(var V=0;V<B.length;V++){var q=B[V];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(I,q.key,q)}}return function(I,B,V){return B&&$(I.prototype,B),V&&$(I,V),I}})(),d=i(2),h=O(d),g=i(20),f=O(g),m=i(0),p=O(m),w=i(13),x=O(w),v=i(24),y=O(v),j=i(4),_=O(j),N=i(16),C=O(N),S=i(21),P=O(S),R=i(11),L=O(R),D=i(3),T=O(D);function O($){return $&&$.__esModule?$:{default:$}}function M($,I,B){return I in $?Object.defineProperty($,I,{value:B,enumerable:!0,configurable:!0,writable:!0}):$[I]=B,$}function U($,I){if(!($ instanceof I))throw new TypeError("Cannot call a class as a function")}var z=/^[ -~]*$/,H=(function(){function $(I){U(this,$),this.scroll=I,this.delta=this.getDelta()}return c($,[{key:"applyDelta",value:function(B){var V=this,q=!1;this.scroll.update();var J=this.scroll.length();return this.scroll.batchStart(),B=G(B),B.reduce(function(te,K){var Q=K.retain||K.delete||K.insert.length||1,ne=K.attributes||{};if(K.insert!=null){if(typeof K.insert=="string"){var se=K.insert;se.endsWith(` 585`)&&q&&(q=!1,se=se.slice(0,-1)),te>=J&&!se.endsWith(` 586`)&&(q=!0),V.scroll.insertAt(te,se);var ce=V.scroll.line(te),ye=o(ce,2),je=ye[0],Fe=ye[1],Ye=(0,T.default)({},(0,j.bubbleFormats)(je));if(je instanceof _.default){var et=je.descendant(p.default.Leaf,Fe),Le=o(et,1),at=Le[0];Ye=(0,T.default)(Ye,(0,j.bubbleFormats)(at))}ne=f.default.attributes.diff(Ye,ne)||{}}else if(a(K.insert)==="object"){var he=Object.keys(K.insert)[0];if(he==null)return te;V.scroll.insertAt(te,he,K.insert[he])}J+=Q}return Object.keys(ne).forEach(function(me){V.scroll.formatAt(te,Q,me,ne[me])}),te+Q},0),B.reduce(function(te,K){return typeof K.delete=="number"?(V.scroll.deleteAt(te,K.delete),te):te+(K.retain||K.insert.length||1)},0),this.scroll.batchEnd(),this.update(B)}},{key:"deleteText",value:function(B,V){return this.scroll.deleteAt(B,V),this.update(new h.default().retain(B).delete(V))}},{key:"formatLine",value:function(B,V){var q=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(J).forEach(function(te){if(!(q.scroll.whitelist!=null&&!q.scroll.whitelist[te])){var K=q.scroll.lines(B,Math.max(V,1)),Q=V;K.forEach(function(ne){var se=ne.length();if(!(ne instanceof x.default))ne.format(te,J[te]);else{var ce=B-ne.offset(q.scroll),ye=ne.newlineIndex(ce+Q)-ce+1;ne.formatAt(ce,ye,te,J[te])}Q-=se})}}),this.scroll.optimize(),this.update(new h.default().retain(B).retain(V,(0,P.default)(J)))}},{key:"formatText",value:function(B,V){var q=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(J).forEach(function(te){q.scroll.formatAt(B,V,te,J[te])}),this.update(new h.default().retain(B).retain(V,(0,P.default)(J)))}},{key:"getContents",value:function(B,V){return this.delta.slice(B,B+V)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(B,V){return B.concat(V.delta())},new h.default)}},{key:"getFormat",value:function(B){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q=[],J=[];V===0?this.scroll.path(B).forEach(function(K){var Q=o(K,1),ne=Q[0];ne instanceof _.default?q.push(ne):ne instanceof p.default.Leaf&&J.push(ne)}):(q=this.scroll.lines(B,V),J=this.scroll.descendants(p.default.Leaf,B,V));var te=[q,J].map(function(K){if(K.length===0)return{};for(var Q=(0,j.bubbleFormats)(K.shift());Object.keys(Q).length>0;){var ne=K.shift();if(ne==null)return Q;Q=Y((0,j.bubbleFormats)(ne),Q)}return Q});return T.default.apply(T.default,te)}},{key:"getText",value:function(B,V){return this.getContents(B,V).filter(function(q){return typeof q.insert=="string"}).map(function(q){return q.insert}).join("")}},{key:"insertEmbed",value:function(B,V,q){return this.scroll.insertAt(B,V,q),this.update(new h.default().retain(B).insert(M({},V,q)))}},{key:"insertText",value:function(B,V){var q=this,J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return V=V.replace(/\r\n/g,` 587`).replace(/\r/g,` 588`),this.scroll.insertAt(B,V),Object.keys(J).forEach(function(te){q.scroll.formatAt(B,V.length,te,J[te])}),this.update(new h.default().retain(B).insert(V,(0,P.default)(J)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var B=this.scroll.children.head;return B.statics.blotName!==_.default.blotName||B.children.length>1?!1:B.children.head instanceof C.default}},{key:"removeFormat",value:function(B,V){var q=this.getText(B,V),J=this.scroll.line(B+V),te=o(J,2),K=te[0],Q=te[1],ne=0,se=new h.default;K!=null&&(K instanceof x.default?ne=K.newlineIndex(Q)-Q+1:ne=K.length()-Q,se=K.delta().slice(Q,Q+ne-1).insert(` 589`));var ce=this.getContents(B,V+ne),ye=ce.diff(new h.default().insert(q).concat(se)),je=new h.default().retain(B).concat(ye);return this.applyDelta(je)}},{key:"update",value:function(B){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,J=this.delta;if(V.length===1&&V[0].type==="characterData"&&V[0].target.data.match(z)&&p.default.find(V[0].target)){var te=p.default.find(V[0].target),K=(0,j.bubbleFormats)(te),Q=te.offset(this.scroll),ne=V[0].oldValue.replace(y.default.CONTENTS,""),se=new h.default().insert(ne),ce=new h.default().insert(te.value()),ye=new h.default().retain(Q).concat(se.diff(ce,q));B=ye.reduce(function(je,Fe){return Fe.insert?je.insert(Fe.insert,K):je.push(Fe)},new h.default),this.delta=J.compose(B)}else this.delta=this.getDelta(),(!B||!(0,L.default)(J.compose(B),this.delta))&&(B=J.diff(this.delta,q));return B}}]),$})();function Y($,I){return Object.keys(I).reduce(function(B,V){return $[V]==null||(I[V]===$[V]?B[V]=I[V]:Array.isArray(I[V])?I[V].indexOf($[V])<0&&(B[V]=I[V].concat([$[V]])):B[V]=[I[V],$[V]]),B},{})}function G($){return $.reduce(function(I,B){if(B.insert===1){var V=(0,P.default)(B.attributes);return delete V.image,I.insert({image:B.attributes.image},V)}if(B.attributes!=null&&(B.attributes.list===!0||B.attributes.bullet===!0)&&(B=(0,P.default)(B),B.attributes.list?B.attributes.list="ordered":(B.attributes.list="bullet",delete B.attributes.bullet)),typeof B.insert=="string"){var q=B.insert.replace(/\r\n/g,` 590`).replace(/\r/g,` 591`);return I.insert(q,B.attributes)}return I.push(B)},new h.default)}r.default=H}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var a=(function(){function R(L,D){var T=[],O=!0,M=!1,U=void 0;try{for(var z=L[Symbol.iterator](),H;!(O=(H=z.next()).done)&&(T.push(H.value),!(D&&T.length===D));O=!0);}catch(Y){M=!0,U=Y}finally{try{!O&&z.return&&z.return()}finally{if(M)throw U}}return T}return function(L,D){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return R(L,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function R(L,D){for(var T=0;T<D.length;T++){var O=D[T];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(L,O.key,O)}}return function(L,D,T){return D&&R(L.prototype,D),T&&R(L,T),L}})(),c=i(0),d=y(c),h=i(21),g=y(h),f=i(11),m=y(f),p=i(8),w=y(p),x=i(10),v=y(x);function y(R){return R&&R.__esModule?R:{default:R}}function j(R){if(Array.isArray(R)){for(var L=0,D=Array(R.length);L<R.length;L++)D[L]=R[L];return D}else return Array.from(R)}function _(R,L){if(!(R instanceof L))throw new TypeError("Cannot call a class as a function")}var N=(0,v.default)("quill:selection"),C=function R(L){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_(this,R),this.index=L,this.length=D},S=(function(){function R(L,D){var T=this;_(this,R),this.emitter=D,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=d.default.create("cursor",this),this.lastRange=this.savedRange=new C(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){T.mouseDown||setTimeout(T.update.bind(T,w.default.sources.USER),1)}),this.emitter.on(w.default.events.EDITOR_CHANGE,function(O,M){O===w.default.events.TEXT_CHANGE&&M.length()>0&&T.update(w.default.sources.SILENT)}),this.emitter.on(w.default.events.SCROLL_BEFORE_UPDATE,function(){if(T.hasFocus()){var O=T.getNativeRange();O!=null&&O.start.node!==T.cursor.textNode&&T.emitter.once(w.default.events.SCROLL_UPDATE,function(){try{T.setNativeRange(O.start.node,O.start.offset,O.end.node,O.end.offset)}catch{}})}}),this.emitter.on(w.default.events.SCROLL_OPTIMIZE,function(O,M){if(M.range){var U=M.range,z=U.startNode,H=U.startOffset,Y=U.endNode,G=U.endOffset;T.setNativeRange(z,H,Y,G)}}),this.update(w.default.sources.SILENT)}return o(R,[{key:"handleComposition",value:function(){var D=this;this.root.addEventListener("compositionstart",function(){D.composing=!0}),this.root.addEventListener("compositionend",function(){if(D.composing=!1,D.cursor.parent){var T=D.cursor.restore();if(!T)return;setTimeout(function(){D.setNativeRange(T.startNode,T.startOffset,T.endNode,T.endOffset)},1)}})}},{key:"handleDragging",value:function(){var D=this;this.emitter.listenDOM("mousedown",document.body,function(){D.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){D.mouseDown=!1,D.update(w.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(D,T){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[D])){this.scroll.update();var O=this.getNativeRange();if(!(O==null||!O.native.collapsed||d.default.query(D,d.default.Scope.BLOCK))){if(O.start.node!==this.cursor.textNode){var M=d.default.find(O.start.node,!1);if(M==null)return;if(M instanceof d.default.Leaf){var U=M.split(O.start.offset);M.parent.insertBefore(this.cursor,U)}else M.insertBefore(this.cursor,O.start.node);this.cursor.attach()}this.cursor.format(D,T),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(D){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,O=this.scroll.length();D=Math.min(D,O-1),T=Math.min(D+T,O-1)-D;var M=void 0,U=this.scroll.leaf(D),z=a(U,2),H=z[0],Y=z[1];if(H==null)return null;var G=H.position(Y,!0),$=a(G,2);M=$[0],Y=$[1];var I=document.createRange();if(T>0){I.setStart(M,Y);var B=this.scroll.leaf(D+T),V=a(B,2);if(H=V[0],Y=V[1],H==null)return null;var q=H.position(Y,!0),J=a(q,2);return M=J[0],Y=J[1],I.setEnd(M,Y),I.getBoundingClientRect()}else{var te="left",K=void 0;return M instanceof Text?(Y<M.data.length?(I.setStart(M,Y),I.setEnd(M,Y+1)):(I.setStart(M,Y-1),I.setEnd(M,Y),te="right"),K=I.getBoundingClientRect()):(K=H.domNode.getBoundingClientRect(),Y>0&&(te="right")),{bottom:K.top+K.height,height:K.height,left:K[te],right:K[te],top:K.top,width:0}}}},{key:"getNativeRange",value:function(){var D=document.getSelection();if(D==null||D.rangeCount<=0)return null;var T=D.getRangeAt(0);if(T==null)return null;var O=this.normalizeNative(T);return N.info("getNativeRange",O),O}},{key:"getRange",value:function(){var D=this.getNativeRange();if(D==null)return[null,null];var T=this.normalizedToRange(D);return[T,D]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(D){var T=this,O=[[D.start.node,D.start.offset]];D.native.collapsed||O.push([D.end.node,D.end.offset]);var M=O.map(function(H){var Y=a(H,2),G=Y[0],$=Y[1],I=d.default.find(G,!0),B=I.offset(T.scroll);return $===0?B:I instanceof d.default.Container?B+I.length():B+I.index(G,$)}),U=Math.min(Math.max.apply(Math,j(M)),this.scroll.length()-1),z=Math.min.apply(Math,[U].concat(j(M)));return new C(z,U-z)}},{key:"normalizeNative",value:function(D){if(!P(this.root,D.startContainer)||!D.collapsed&&!P(this.root,D.endContainer))return null;var T={start:{node:D.startContainer,offset:D.startOffset},end:{node:D.endContainer,offset:D.endOffset},native:D};return[T.start,T.end].forEach(function(O){for(var M=O.node,U=O.offset;!(M instanceof Text)&&M.childNodes.length>0;)if(M.childNodes.length>U)M=M.childNodes[U],U=0;else if(M.childNodes.length===U)M=M.lastChild,U=M instanceof Text?M.data.length:M.childNodes.length+1;else break;O.node=M,O.offset=U}),T}},{key:"rangeToNative",value:function(D){var T=this,O=D.collapsed?[D.index]:[D.index,D.index+D.length],M=[],U=this.scroll.length();return O.forEach(function(z,H){z=Math.min(U-1,z);var Y=void 0,G=T.scroll.leaf(z),$=a(G,2),I=$[0],B=$[1],V=I.position(B,H!==0),q=a(V,2);Y=q[0],B=q[1],M.push(Y,B)}),M.length<2&&(M=M.concat(M)),M}},{key:"scrollIntoView",value:function(D){var T=this.lastRange;if(T!=null){var O=this.getBounds(T.index,T.length);if(O!=null){var M=this.scroll.length()-1,U=this.scroll.line(Math.min(T.index,M)),z=a(U,1),H=z[0],Y=H;if(T.length>0){var G=this.scroll.line(Math.min(T.index+T.length,M)),$=a(G,1);Y=$[0]}if(!(H==null||Y==null)){var I=D.getBoundingClientRect();O.top<I.top?D.scrollTop-=I.top-O.top:O.bottom>I.bottom&&(D.scrollTop+=O.bottom-I.bottom)}}}}},{key:"setNativeRange",value:function(D,T){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:D,M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:T,U=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(N.info("setNativeRange",D,T,O,M),!(D!=null&&(this.root.parentNode==null||D.parentNode==null||O.parentNode==null))){var z=document.getSelection();if(z!=null)if(D!=null){this.hasFocus()||this.root.focus();var H=(this.getNativeRange()||{}).native;if(H==null||U||D!==H.startContainer||T!==H.startOffset||O!==H.endContainer||M!==H.endOffset){D.tagName=="BR"&&(T=[].indexOf.call(D.parentNode.childNodes,D),D=D.parentNode),O.tagName=="BR"&&(M=[].indexOf.call(O.parentNode.childNodes,O),O=O.parentNode);var Y=document.createRange();Y.setStart(D,T),Y.setEnd(O,M),z.removeAllRanges(),z.addRange(Y)}}else z.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(D){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.default.sources.API;if(typeof T=="string"&&(O=T,T=!1),N.info("setRange",D),D!=null){var M=this.rangeToNative(D);this.setNativeRange.apply(this,j(M).concat([T]))}else this.setNativeRange(null);this.update(O)}},{key:"update",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w.default.sources.USER,T=this.lastRange,O=this.getRange(),M=a(O,2),U=M[0],z=M[1];if(this.lastRange=U,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,m.default)(T,this.lastRange)){var H;!this.composing&&z!=null&&z.native.collapsed&&z.start.node!==this.cursor.textNode&&this.cursor.restore();var Y=[w.default.events.SELECTION_CHANGE,(0,g.default)(this.lastRange),(0,g.default)(T),D];if((H=this.emitter).emit.apply(H,[w.default.events.EDITOR_CHANGE].concat(Y)),D!==w.default.sources.SILENT){var G;(G=this.emitter).emit.apply(G,Y)}}}}]),R})();function P(R,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),R.contains(L)}r.Range=C,r.default=S}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function w(x,v){for(var y=0;y<v.length;y++){var j=v[y];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,v,y){return v&&w(x.prototype,v),y&&w(x,y),x}})(),o=function w(x,v,y){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,v);if(j===void 0){var _=Object.getPrototypeOf(x);return _===null?void 0:w(_,v,y)}else{if("value"in j)return j.value;var N=j.get;return N===void 0?void 0:N.call(y)}},c=i(0),d=h(c);function h(w){return w&&w.__esModule?w:{default:w}}function g(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function f(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function m(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var p=(function(w){m(x,w);function x(){return g(this,x),f(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,[{key:"insertInto",value:function(y,j){y.children.length===0?o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertInto",this).call(this,y,j):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),x})(d.default.Embed);p.blotName="break",p.tagName="BR",r.default=p}),(function(n,r,i){var a=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var w in p)p.hasOwnProperty(w)&&(m[w]=p[w])};return function(m,p){f(m,p);function w(){this.constructor=m}m.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(44),c=i(30),d=i(1),h=(function(f){a(m,f);function m(p){var w=f.call(this,p)||this;return w.build(),w}return m.prototype.appendChild=function(p){this.insertBefore(p)},m.prototype.attach=function(){f.prototype.attach.call(this),this.children.forEach(function(p){p.attach()})},m.prototype.build=function(){var p=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(w){try{var x=g(w);p.insertBefore(x,p.children.head||void 0)}catch(v){if(v instanceof d.ParchmentError)return;throw v}})},m.prototype.deleteAt=function(p,w){if(p===0&&w===this.length())return this.remove();this.children.forEachAt(p,w,function(x,v,y){x.deleteAt(v,y)})},m.prototype.descendant=function(p,w){var x=this.children.find(w),v=x[0],y=x[1];return p.blotName==null&&p(v)||p.blotName!=null&&v instanceof p?[v,y]:v instanceof m?v.descendant(p,y):[null,-1]},m.prototype.descendants=function(p,w,x){w===void 0&&(w=0),x===void 0&&(x=Number.MAX_VALUE);var v=[],y=x;return this.children.forEachAt(w,x,function(j,_,N){(p.blotName==null&&p(j)||p.blotName!=null&&j instanceof p)&&v.push(j),j instanceof m&&(v=v.concat(j.descendants(p,_,y))),y-=N}),v},m.prototype.detach=function(){this.children.forEach(function(p){p.detach()}),f.prototype.detach.call(this)},m.prototype.formatAt=function(p,w,x,v){this.children.forEachAt(p,w,function(y,j,_){y.formatAt(j,_,x,v)})},m.prototype.insertAt=function(p,w,x){var v=this.children.find(p),y=v[0],j=v[1];if(y)y.insertAt(j,w,x);else{var _=x==null?d.create("text",w):d.create(w,x);this.appendChild(_)}},m.prototype.insertBefore=function(p,w){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(x){return p instanceof x}))throw new d.ParchmentError("Cannot insert "+p.statics.blotName+" into "+this.statics.blotName);p.insertInto(this,w)},m.prototype.length=function(){return this.children.reduce(function(p,w){return p+w.length()},0)},m.prototype.moveChildren=function(p,w){this.children.forEach(function(x){p.insertBefore(x,w)})},m.prototype.optimize=function(p){if(f.prototype.optimize.call(this,p),this.children.length===0)if(this.statics.defaultChild!=null){var w=d.create(this.statics.defaultChild);this.appendChild(w),w.optimize(p)}else this.remove()},m.prototype.path=function(p,w){w===void 0&&(w=!1);var x=this.children.find(p,w),v=x[0],y=x[1],j=[[this,p]];return v instanceof m?j.concat(v.path(y,w)):(v!=null&&j.push([v,y]),j)},m.prototype.removeChild=function(p){this.children.remove(p)},m.prototype.replace=function(p){p instanceof m&&p.moveChildren(this),f.prototype.replace.call(this,p)},m.prototype.split=function(p,w){if(w===void 0&&(w=!1),!w){if(p===0)return this;if(p===this.length())return this.next}var x=this.clone();return this.parent.insertBefore(x,this.next),this.children.forEachAt(p,this.length(),function(v,y,j){v=v.split(y,w),x.appendChild(v)}),x},m.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},m.prototype.update=function(p,w){var x=this,v=[],y=[];p.forEach(function(j){j.target===x.domNode&&j.type==="childList"&&(v.push.apply(v,j.addedNodes),y.push.apply(y,j.removedNodes))}),y.forEach(function(j){if(!(j.parentNode!=null&&j.tagName!=="IFRAME"&&document.body.compareDocumentPosition(j)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var _=d.find(j);_!=null&&(_.domNode.parentNode==null||_.domNode.parentNode===x.domNode)&&_.detach()}}),v.filter(function(j){return j.parentNode==x.domNode}).sort(function(j,_){return j===_?0:j.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(j){var _=null;j.nextSibling!=null&&(_=d.find(j.nextSibling));var N=g(j);(N.next!=_||N.next==null)&&(N.parent!=null&&N.parent.removeChild(x),x.insertBefore(N,_||void 0))})},m})(c.default);function g(f){var m=d.find(f);if(m==null)try{m=d.create(f)}catch{m=d.create(d.Scope.INLINE),[].slice.call(f.childNodes).forEach(function(w){m.domNode.appendChild(w)}),f.parentNode&&f.parentNode.replaceChild(m.domNode,f),m.attach()}return m}r.default=h}),(function(n,r,i){var a=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var w in p)p.hasOwnProperty(w)&&(m[w]=p[w])};return function(m,p){f(m,p);function w(){this.constructor=m}m.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),c=i(31),d=i(17),h=i(1),g=(function(f){a(m,f);function m(p){var w=f.call(this,p)||this;return w.attributes=new c.default(w.domNode),w}return m.formats=function(p){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return p.tagName.toLowerCase()},m.prototype.format=function(p,w){var x=h.query(p);x instanceof o.default?this.attributes.attribute(x,w):w&&x!=null&&(p!==this.statics.blotName||this.formats()[p]!==w)&&this.replaceWith(p,w)},m.prototype.formats=function(){var p=this.attributes.values(),w=this.statics.formats(this.domNode);return w!=null&&(p[this.statics.blotName]=w),p},m.prototype.replaceWith=function(p,w){var x=f.prototype.replaceWith.call(this,p,w);return this.attributes.copy(x),x},m.prototype.update=function(p,w){var x=this;f.prototype.update.call(this,p,w),p.some(function(v){return v.target===x.domNode&&v.type==="attributes"})&&this.attributes.build()},m.prototype.wrap=function(p,w){var x=f.prototype.wrap.call(this,p,w);return x instanceof m&&x.statics.scope===this.statics.scope&&this.attributes.move(x),x},m})(d.default);r.default=g}),(function(n,r,i){var a=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,f){g.__proto__=f}||function(g,f){for(var m in f)f.hasOwnProperty(m)&&(g[m]=f[m])};return function(g,f){h(g,f);function m(){this.constructor=g}g.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(30),c=i(1),d=(function(h){a(g,h);function g(){return h!==null&&h.apply(this,arguments)||this}return g.value=function(f){return!0},g.prototype.index=function(f,m){return this.domNode===f||this.domNode.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(m,1):-1},g.prototype.position=function(f,m){var p=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return f>0&&(p+=1),[this.parent.domNode,p]},g.prototype.value=function(){var f;return f={},f[this.statics.blotName]=this.statics.value(this.domNode)||!0,f},g.scope=c.Scope.INLINE_BLOT,g})(o.default);r.default=d}),(function(n,r,i){var a=i(11),o=i(3),c={attributes:{compose:function(h,g,f){typeof h!="object"&&(h={}),typeof g!="object"&&(g={});var m=o(!0,{},g);f||(m=Object.keys(m).reduce(function(w,x){return m[x]!=null&&(w[x]=m[x]),w},{}));for(var p in h)h[p]!==void 0&&g[p]===void 0&&(m[p]=h[p]);return Object.keys(m).length>0?m:void 0},diff:function(h,g){typeof h!="object"&&(h={}),typeof g!="object"&&(g={});var f=Object.keys(h).concat(Object.keys(g)).reduce(function(m,p){return a(h[p],g[p])||(m[p]=g[p]===void 0?null:g[p]),m},{});return Object.keys(f).length>0?f:void 0},transform:function(h,g,f){if(typeof h!="object")return g;if(typeof g=="object"){if(!f)return g;var m=Object.keys(g).reduce(function(p,w){return h[w]===void 0&&(p[w]=g[w]),p},{});return Object.keys(m).length>0?m:void 0}}},iterator:function(h){return new d(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function d(h){this.ops=h,this.index=0,this.offset=0}d.prototype.hasNext=function(){return this.peekLength()<1/0},d.prototype.next=function(h){h||(h=1/0);var g=this.ops[this.index];if(g){var f=this.offset,m=c.length(g);if(h>=m-f?(h=m-f,this.index+=1,this.offset=0):this.offset+=h,typeof g.delete=="number")return{delete:h};var p={};return g.attributes&&(p.attributes=g.attributes),typeof g.retain=="number"?p.retain=h:typeof g.insert=="string"?p.insert=g.insert.substr(f,h):p.insert=g.insert,p}else return{retain:1/0}},d.prototype.peek=function(){return this.ops[this.index]},d.prototype.peekLength=function(){return this.ops[this.index]?c.length(this.ops[this.index])-this.offset:1/0},d.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},d.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,g=this.index,f=this.next(),m=this.ops.slice(this.index);return this.offset=h,this.index=g,[f].concat(m)}else return[]},n.exports=c}),(function(n,r){var i=(function(){function a(x,v){return v!=null&&x instanceof v}var o;try{o=Map}catch{o=function(){}}var c;try{c=Set}catch{c=function(){}}var d;try{d=Promise}catch{d=function(){}}function h(x,v,y,j,_){typeof v=="object"&&(y=v.depth,j=v.prototype,_=v.includeNonEnumerable,v=v.circular);var N=[],C=[],S=typeof Buffer<"u";typeof v>"u"&&(v=!0),typeof y>"u"&&(y=1/0);function P(R,L){if(R===null)return null;if(L===0)return R;var D,T;if(typeof R!="object")return R;if(a(R,o))D=new o;else if(a(R,c))D=new c;else if(a(R,d))D=new d(function(I,B){R.then(function(V){I(P(V,L-1))},function(V){B(P(V,L-1))})});else if(h.__isArray(R))D=[];else if(h.__isRegExp(R))D=new RegExp(R.source,w(R)),R.lastIndex&&(D.lastIndex=R.lastIndex);else if(h.__isDate(R))D=new Date(R.getTime());else{if(S&&Buffer.isBuffer(R))return Buffer.allocUnsafe?D=Buffer.allocUnsafe(R.length):D=new Buffer(R.length),R.copy(D),D;a(R,Error)?D=Object.create(R):typeof j>"u"?(T=Object.getPrototypeOf(R),D=Object.create(T)):(D=Object.create(j),T=j)}if(v){var O=N.indexOf(R);if(O!=-1)return C[O];N.push(R),C.push(D)}a(R,o)&&R.forEach(function(I,B){var V=P(B,L-1),q=P(I,L-1);D.set(V,q)}),a(R,c)&&R.forEach(function(I){var B=P(I,L-1);D.add(B)});for(var M in R){var U;T&&(U=Object.getOwnPropertyDescriptor(T,M)),!(U&&U.set==null)&&(D[M]=P(R[M],L-1))}if(Object.getOwnPropertySymbols)for(var z=Object.getOwnPropertySymbols(R),M=0;M<z.length;M++){var H=z[M],Y=Object.getOwnPropertyDescriptor(R,H);Y&&!Y.enumerable&&!_||(D[H]=P(R[H],L-1),Y.enumerable||Object.defineProperty(D,H,{enumerable:!1}))}if(_)for(var G=Object.getOwnPropertyNames(R),M=0;M<G.length;M++){var $=G[M],Y=Object.getOwnPropertyDescriptor(R,$);Y&&Y.enumerable||(D[$]=P(R[$],L-1),Object.defineProperty(D,$,{enumerable:!1}))}return D}return P(x,y)}h.clonePrototype=function(v){if(v===null)return null;var y=function(){};return y.prototype=v,new y};function g(x){return Object.prototype.toString.call(x)}h.__objToStr=g;function f(x){return typeof x=="object"&&g(x)==="[object Date]"}h.__isDate=f;function m(x){return typeof x=="object"&&g(x)==="[object Array]"}h.__isArray=m;function p(x){return typeof x=="object"&&g(x)==="[object RegExp]"}h.__isRegExp=p;function w(x){var v="";return x.global&&(v+="g"),x.ignoreCase&&(v+="i"),x.multiline&&(v+="m"),v}return h.__getRegExpFlags=w,h})();typeof n=="object"&&n.exports&&(n.exports=i)}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function D(T,O){var M=[],U=!0,z=!1,H=void 0;try{for(var Y=T[Symbol.iterator](),G;!(U=(G=Y.next()).done)&&(M.push(G.value),!(O&&M.length===O));U=!0);}catch($){z=!0,H=$}finally{try{!U&&Y.return&&Y.return()}finally{if(z)throw H}}return M}return function(T,O){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return D(T,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function D(T,O){for(var M=0;M<O.length;M++){var U=O[M];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(T,U.key,U)}}return function(T,O,M){return O&&D(T.prototype,O),M&&D(T,M),T}})(),c=function D(T,O,M){T===null&&(T=Function.prototype);var U=Object.getOwnPropertyDescriptor(T,O);if(U===void 0){var z=Object.getPrototypeOf(T);return z===null?void 0:D(z,O,M)}else{if("value"in U)return U.value;var H=U.get;return H===void 0?void 0:H.call(M)}},d=i(0),h=N(d),g=i(8),f=N(g),m=i(4),p=N(m),w=i(16),x=N(w),v=i(13),y=N(v),j=i(25),_=N(j);function N(D){return D&&D.__esModule?D:{default:D}}function C(D,T){if(!(D instanceof T))throw new TypeError("Cannot call a class as a function")}function S(D,T){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:D}function P(D,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);D.prototype=Object.create(T&&T.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(D,T):D.__proto__=T)}function R(D){return D instanceof p.default||D instanceof m.BlockEmbed}var L=(function(D){P(T,D);function T(O,M){C(this,T);var U=S(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,O));return U.emitter=M.emitter,Array.isArray(M.whitelist)&&(U.whitelist=M.whitelist.reduce(function(z,H){return z[H]=!0,z},{})),U.domNode.addEventListener("DOMNodeInserted",function(){}),U.optimize(),U.enable(),U}return o(T,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(M,U){var z=this.line(M),H=a(z,2),Y=H[0],G=H[1],$=this.line(M+U),I=a($,1),B=I[0];if(c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"deleteAt",this).call(this,M,U),B!=null&&Y!==B&&G>0){if(Y instanceof m.BlockEmbed||B instanceof m.BlockEmbed){this.optimize();return}if(Y instanceof y.default){var V=Y.newlineIndex(Y.length(),!0);if(V>-1&&(Y=Y.split(V+1),Y===B)){this.optimize();return}}else if(B instanceof y.default){var q=B.newlineIndex(0);q>-1&&B.split(q+1)}var J=B.children.head instanceof x.default?null:B.children.head;Y.moveChildren(B,J),Y.remove()}this.optimize()}},{key:"enable",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",M)}},{key:"formatAt",value:function(M,U,z,H){this.whitelist!=null&&!this.whitelist[z]||(c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"formatAt",this).call(this,M,U,z,H),this.optimize())}},{key:"insertAt",value:function(M,U,z){if(!(z!=null&&this.whitelist!=null&&!this.whitelist[U])){if(M>=this.length())if(z==null||h.default.query(U,h.default.Scope.BLOCK)==null){var H=h.default.create(this.statics.defaultChild);this.appendChild(H),z==null&&U.endsWith(` 592`)&&(U=U.slice(0,-1)),H.insertAt(0,U,z)}else{var Y=h.default.create(U,z);this.appendChild(Y)}else c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertAt",this).call(this,M,U,z);this.optimize()}}},{key:"insertBefore",value:function(M,U){if(M.statics.scope===h.default.Scope.INLINE_BLOT){var z=h.default.create(this.statics.defaultChild);z.appendChild(M),M=z}c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertBefore",this).call(this,M,U)}},{key:"leaf",value:function(M){return this.path(M).pop()||[null,-1]}},{key:"line",value:function(M){return M===this.length()?this.line(M-1):this.descendant(R,M)}},{key:"lines",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,z=function H(Y,G,$){var I=[],B=$;return Y.children.forEachAt(G,$,function(V,q,J){R(V)?I.push(V):V instanceof h.default.Container&&(I=I.concat(H(V,q,B))),B-=J}),I};return z(this,M,U)}},{key:"optimize",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"optimize",this).call(this,M,U),M.length>0&&this.emitter.emit(f.default.events.SCROLL_OPTIMIZE,M,U))}},{key:"path",value:function(M){return c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"path",this).call(this,M).slice(1)}},{key:"update",value:function(M){if(this.batch!==!0){var U=f.default.sources.USER;typeof M=="string"&&(U=M),Array.isArray(M)||(M=this.observer.takeRecords()),M.length>0&&this.emitter.emit(f.default.events.SCROLL_BEFORE_UPDATE,U,M),c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"update",this).call(this,M.concat([])),M.length>0&&this.emitter.emit(f.default.events.SCROLL_UPDATE,U,M)}}}]),T})(h.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[p.default,m.BlockEmbed,_.default],r.default=L}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},o=(function(){function K(Q,ne){var se=[],ce=!0,ye=!1,je=void 0;try{for(var Fe=Q[Symbol.iterator](),Ye;!(ce=(Ye=Fe.next()).done)&&(se.push(Ye.value),!(ne&&se.length===ne));ce=!0);}catch(et){ye=!0,je=et}finally{try{!ce&&Fe.return&&Fe.return()}finally{if(ye)throw je}}return se}return function(Q,ne){if(Array.isArray(Q))return Q;if(Symbol.iterator in Object(Q))return K(Q,ne);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function K(Q,ne){for(var se=0;se<ne.length;se++){var ce=ne[se];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Q,ce.key,ce)}}return function(Q,ne,se){return ne&&K(Q.prototype,ne),se&&K(Q,se),Q}})(),d=i(21),h=D(d),g=i(11),f=D(g),m=i(3),p=D(m),w=i(2),x=D(w),v=i(20),y=D(v),j=i(0),_=D(j),N=i(5),C=D(N),S=i(10),P=D(S),R=i(9),L=D(R);function D(K){return K&&K.__esModule?K:{default:K}}function T(K,Q,ne){return Q in K?Object.defineProperty(K,Q,{value:ne,enumerable:!0,configurable:!0,writable:!0}):K[Q]=ne,K}function O(K,Q){if(!(K instanceof Q))throw new TypeError("Cannot call a class as a function")}function M(K,Q){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Q&&(typeof Q=="object"||typeof Q=="function")?Q:K}function U(K,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Q);K.prototype=Object.create(Q&&Q.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),Q&&(Object.setPrototypeOf?Object.setPrototypeOf(K,Q):K.__proto__=Q)}var z=(0,P.default)("quill:keyboard"),H=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",Y=(function(K){U(Q,K),c(Q,null,[{key:"match",value:function(se,ce){return ce=te(ce),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ye){return!!ce[ye]!==se[ye]&&ce[ye]!==null})?!1:ce.key===(se.which||se.keyCode)}}]);function Q(ne,se){O(this,Q);var ce=M(this,(Q.__proto__||Object.getPrototypeOf(Q)).call(this,ne,se));return ce.bindings={},Object.keys(ce.options.bindings).forEach(function(ye){ye==="list autofill"&&ne.scroll.whitelist!=null&&!ne.scroll.whitelist.list||ce.options.bindings[ye]&&ce.addBinding(ce.options.bindings[ye])}),ce.addBinding({key:Q.keys.ENTER,shiftKey:null},V),ce.addBinding({key:Q.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(ce.addBinding({key:Q.keys.BACKSPACE},{collapsed:!0},$),ce.addBinding({key:Q.keys.DELETE},{collapsed:!0},I)):(ce.addBinding({key:Q.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},$),ce.addBinding({key:Q.keys.DELETE},{collapsed:!0,suffix:/^.?$/},I)),ce.addBinding({key:Q.keys.BACKSPACE},{collapsed:!1},B),ce.addBinding({key:Q.keys.DELETE},{collapsed:!1},B),ce.addBinding({key:Q.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},$),ce.listen(),ce}return c(Q,[{key:"addBinding",value:function(se){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},je=te(se);if(je==null||je.key==null)return z.warn("Attempted to add invalid keyboard binding",je);typeof ce=="function"&&(ce={handler:ce}),typeof ye=="function"&&(ye={handler:ye}),je=(0,p.default)(je,ce,ye),this.bindings[je.key]=this.bindings[je.key]||[],this.bindings[je.key].push(je)}},{key:"listen",value:function(){var se=this;this.quill.root.addEventListener("keydown",function(ce){if(!ce.defaultPrevented){var ye=ce.which||ce.keyCode,je=(se.bindings[ye]||[]).filter(function(Qe){return Q.match(ce,Qe)});if(je.length!==0){var Fe=se.quill.getSelection();if(!(Fe==null||!se.quill.hasFocus())){var Ye=se.quill.getLine(Fe.index),et=o(Ye,2),Le=et[0],at=et[1],he=se.quill.getLeaf(Fe.index),me=o(he,2),Ee=me[0],Pe=me[1],xe=Fe.length===0?[Ee,Pe]:se.quill.getLeaf(Fe.index+Fe.length),ot=o(xe,2),lt=ot[0],ct=ot[1],pe=Ee instanceof _.default.Text?Ee.value().slice(0,Pe):"",_e=lt instanceof _.default.Text?lt.value().slice(ct):"",Oe={collapsed:Fe.length===0,empty:Fe.length===0&&Le.length()<=1,format:se.quill.getFormat(Fe),offset:at,prefix:pe,suffix:_e},ht=je.some(function(Qe){if(Qe.collapsed!=null&&Qe.collapsed!==Oe.collapsed||Qe.empty!=null&&Qe.empty!==Oe.empty||Qe.offset!=null&&Qe.offset!==Oe.offset)return!1;if(Array.isArray(Qe.format)){if(Qe.format.every(function(Lt){return Oe.format[Lt]==null}))return!1}else if(a(Qe.format)==="object"&&!Object.keys(Qe.format).every(function(Lt){return Qe.format[Lt]===!0?Oe.format[Lt]!=null:Qe.format[Lt]===!1?Oe.format[Lt]==null:(0,f.default)(Qe.format[Lt],Oe.format[Lt])}))return!1;return Qe.prefix!=null&&!Qe.prefix.test(Oe.prefix)||Qe.suffix!=null&&!Qe.suffix.test(Oe.suffix)?!1:Qe.handler.call(se,Fe,Oe)!==!0});ht&&ce.preventDefault()}}}})}}]),Q})(L.default);Y.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},Y.DEFAULTS={bindings:{bold:J("bold"),italic:J("italic"),underline:J("underline"),indent:{key:Y.keys.TAB,format:["blockquote","indent","list"],handler:function(Q,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","+1",C.default.sources.USER)}},outdent:{key:Y.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(Q,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","-1",C.default.sources.USER)}},"outdent backspace":{key:Y.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(Q,ne){ne.format.indent!=null?this.quill.format("indent","-1",C.default.sources.USER):ne.format.list!=null&&this.quill.format("list",!1,C.default.sources.USER)}},"indent code-block":q(!0),"outdent code-block":q(!1),"remove tab":{key:Y.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(Q){this.quill.deleteText(Q.index-1,1,C.default.sources.USER)}},tab:{key:Y.keys.TAB,handler:function(Q){this.quill.history.cutoff();var ne=new x.default().retain(Q.index).delete(Q.length).insert(" ");this.quill.updateContents(ne,C.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Q.index+1,C.default.sources.SILENT)}},"list empty enter":{key:Y.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(Q,ne){this.quill.format("list",!1,C.default.sources.USER),ne.format.indent&&this.quill.format("indent",!1,C.default.sources.USER)}},"checklist enter":{key:Y.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(Q){var ne=this.quill.getLine(Q.index),se=o(ne,2),ce=se[0],ye=se[1],je=(0,p.default)({},ce.formats(),{list:"checked"}),Fe=new x.default().retain(Q.index).insert(` 593`,je).retain(ce.length()-ye-1).retain(1,{list:"unchecked"});this.quill.updateContents(Fe,C.default.sources.USER),this.quill.setSelection(Q.index+1,C.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:Y.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(Q,ne){var se=this.quill.getLine(Q.index),ce=o(se,2),ye=ce[0],je=ce[1],Fe=new x.default().retain(Q.index).insert(` 594`,ne.format).retain(ye.length()-je-1).retain(1,{header:null});this.quill.updateContents(Fe,C.default.sources.USER),this.quill.setSelection(Q.index+1,C.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Q,ne){var se=ne.prefix.length,ce=this.quill.getLine(Q.index),ye=o(ce,2),je=ye[0],Fe=ye[1];if(Fe>se)return!0;var Ye=void 0;switch(ne.prefix.trim()){case"[]":case"[ ]":Ye="unchecked";break;case"[x]":Ye="checked";break;case"-":case"*":Ye="bullet";break;default:Ye="ordered"}this.quill.insertText(Q.index," ",C.default.sources.USER),this.quill.history.cutoff();var et=new x.default().retain(Q.index-Fe).delete(se+1).retain(je.length()-2-Fe).retain(1,{list:Ye});this.quill.updateContents(et,C.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Q.index-se,C.default.sources.SILENT)}},"code exit":{key:Y.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Q){var ne=this.quill.getLine(Q.index),se=o(ne,2),ce=se[0],ye=se[1],je=new x.default().retain(Q.index+ce.length()-ye-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(je,C.default.sources.USER)}},"embed left":G(Y.keys.LEFT,!1),"embed left shift":G(Y.keys.LEFT,!0),"embed right":G(Y.keys.RIGHT,!1),"embed right shift":G(Y.keys.RIGHT,!0)}};function G(K,Q){var ne,se=K===Y.keys.LEFT?"prefix":"suffix";return ne={key:K,shiftKey:Q,altKey:null},T(ne,se,/^$/),T(ne,"handler",function(ye){var je=ye.index;K===Y.keys.RIGHT&&(je+=ye.length+1);var Fe=this.quill.getLeaf(je),Ye=o(Fe,1),et=Ye[0];return et instanceof _.default.Embed?(K===Y.keys.LEFT?Q?this.quill.setSelection(ye.index-1,ye.length+1,C.default.sources.USER):this.quill.setSelection(ye.index-1,C.default.sources.USER):Q?this.quill.setSelection(ye.index,ye.length+1,C.default.sources.USER):this.quill.setSelection(ye.index+ye.length+1,C.default.sources.USER),!1):!0}),ne}function $(K,Q){if(!(K.index===0||this.quill.getLength()<=1)){var ne=this.quill.getLine(K.index),se=o(ne,1),ce=se[0],ye={};if(Q.offset===0){var je=this.quill.getLine(K.index-1),Fe=o(je,1),Ye=Fe[0];if(Ye!=null&&Ye.length()>1){var et=ce.formats(),Le=this.quill.getFormat(K.index-1,1);ye=y.default.attributes.diff(et,Le)||{}}}var at=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Q.prefix)?2:1;this.quill.deleteText(K.index-at,at,C.default.sources.USER),Object.keys(ye).length>0&&this.quill.formatLine(K.index-at,at,ye,C.default.sources.USER),this.quill.focus()}}function I(K,Q){var ne=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Q.suffix)?2:1;if(!(K.index>=this.quill.getLength()-ne)){var se={},ce=0,ye=this.quill.getLine(K.index),je=o(ye,1),Fe=je[0];if(Q.offset>=Fe.length()-1){var Ye=this.quill.getLine(K.index+1),et=o(Ye,1),Le=et[0];if(Le){var at=Fe.formats(),he=this.quill.getFormat(K.index,1);se=y.default.attributes.diff(at,he)||{},ce=Le.length()}}this.quill.deleteText(K.index,ne,C.default.sources.USER),Object.keys(se).length>0&&this.quill.formatLine(K.index+ce-1,ne,se,C.default.sources.USER)}}function B(K){var Q=this.quill.getLines(K),ne={};if(Q.length>1){var se=Q[0].formats(),ce=Q[Q.length-1].formats();ne=y.default.attributes.diff(ce,se)||{}}this.quill.deleteText(K,C.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(K.index,1,ne,C.default.sources.USER),this.quill.setSelection(K.index,C.default.sources.SILENT),this.quill.focus()}function V(K,Q){var ne=this;K.length>0&&this.quill.scroll.deleteAt(K.index,K.length);var se=Object.keys(Q.format).reduce(function(ce,ye){return _.default.query(ye,_.default.Scope.BLOCK)&&!Array.isArray(Q.format[ye])&&(ce[ye]=Q.format[ye]),ce},{});this.quill.insertText(K.index,` 595`,se,C.default.sources.USER),this.quill.setSelection(K.index+1,C.default.sources.SILENT),this.quill.focus(),Object.keys(Q.format).forEach(function(ce){se[ce]==null&&(Array.isArray(Q.format[ce])||ce!=="link"&&ne.quill.format(ce,Q.format[ce],C.default.sources.USER))})}function q(K){return{key:Y.keys.TAB,shiftKey:!K,format:{"code-block":!0},handler:function(ne){var se=_.default.query("code-block"),ce=ne.index,ye=ne.length,je=this.quill.scroll.descendant(se,ce),Fe=o(je,2),Ye=Fe[0],et=Fe[1];if(Ye!=null){var Le=this.quill.getIndex(Ye),at=Ye.newlineIndex(et,!0)+1,he=Ye.newlineIndex(Le+et+ye),me=Ye.domNode.textContent.slice(at,he).split(` 596`);et=0,me.forEach(function(Ee,Pe){K?(Ye.insertAt(at+et,se.TAB),et+=se.TAB.length,Pe===0?ce+=se.TAB.length:ye+=se.TAB.length):Ee.startsWith(se.TAB)&&(Ye.deleteAt(at+et,se.TAB.length),et-=se.TAB.length,Pe===0?ce-=se.TAB.length:ye-=se.TAB.length),et+=Ee.length+1}),this.quill.update(C.default.sources.USER),this.quill.setSelection(ce,ye,C.default.sources.SILENT)}}}}function J(K){return{key:K[0].toUpperCase(),shortKey:!0,handler:function(ne,se){this.quill.format(K,!se.format[K],C.default.sources.USER)}}}function te(K){if(typeof K=="string"||typeof K=="number")return te({key:K});if((typeof K>"u"?"undefined":a(K))==="object"&&(K=(0,h.default)(K,!1)),typeof K.key=="string")if(Y.keys[K.key.toUpperCase()]!=null)K.key=Y.keys[K.key.toUpperCase()];else if(K.key.length===1)K.key=K.key.toUpperCase().charCodeAt(0);else return null;return K.shortKey&&(K[H]=K.shortKey,delete K.shortKey),K}r.default=Y,r.SHORTKEY=H}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function y(j,_){var N=[],C=!0,S=!1,P=void 0;try{for(var R=j[Symbol.iterator](),L;!(C=(L=R.next()).done)&&(N.push(L.value),!(_&&N.length===_));C=!0);}catch(D){S=!0,P=D}finally{try{!C&&R.return&&R.return()}finally{if(S)throw P}}return N}return function(j,_){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return y(j,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function y(j,_,N){j===null&&(j=Function.prototype);var C=Object.getOwnPropertyDescriptor(j,_);if(C===void 0){var S=Object.getPrototypeOf(j);return S===null?void 0:y(S,_,N)}else{if("value"in C)return C.value;var P=C.get;return P===void 0?void 0:P.call(N)}},c=(function(){function y(j,_){for(var N=0;N<_.length;N++){var C=_[N];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(j,C.key,C)}}return function(j,_,N){return _&&y(j.prototype,_),N&&y(j,N),j}})(),d=i(0),h=m(d),g=i(7),f=m(g);function m(y){return y&&y.__esModule?y:{default:y}}function p(y,j){if(!(y instanceof j))throw new TypeError("Cannot call a class as a function")}function w(y,j){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:y}function x(y,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);y.prototype=Object.create(j&&j.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(y,j):y.__proto__=j)}var v=(function(y){x(j,y),c(j,null,[{key:"value",value:function(){}}]);function j(_,N){p(this,j);var C=w(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,_));return C.selection=N,C.textNode=document.createTextNode(j.CONTENTS),C.domNode.appendChild(C.textNode),C._length=0,C}return c(j,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(N,C){if(this._length!==0)return o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"format",this).call(this,N,C);for(var S=this,P=0;S!=null&&S.statics.scope!==h.default.Scope.BLOCK_BLOT;)P+=S.offset(S.parent),S=S.parent;S!=null&&(this._length=j.CONTENTS.length,S.optimize(),S.formatAt(P,j.CONTENTS.length,N,C),this._length=0)}},{key:"index",value:function(N,C){return N===this.textNode?0:o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"index",this).call(this,N,C)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var N=this.textNode,C=this.selection.getNativeRange(),S=void 0,P=void 0,R=void 0;if(C!=null&&C.start.node===N&&C.end.node===N){var L=[N,C.start.offset,C.end.offset];S=L[0],P=L[1],R=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==j.CONTENTS){var D=this.textNode.data.split(j.CONTENTS).join("");this.next instanceof f.default?(S=this.next.domNode,this.next.insertAt(0,D),this.textNode.data=j.CONTENTS):(this.textNode.data=D,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(j.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),P!=null){var T=[P,R].map(function(M){return Math.max(0,Math.min(S.data.length,M-1))}),O=a(T,2);return P=O[0],R=O[1],{startNode:S,startOffset:P,endNode:S,endOffset:R}}}}},{key:"update",value:function(N,C){var S=this;if(N.some(function(R){return R.type==="characterData"&&R.target===S.textNode})){var P=this.restore();P&&(C.range=P)}}},{key:"value",value:function(){return""}}]),j})(h.default.Embed);v.blotName="cursor",v.className="ql-cursor",v.tagName="span",v.CONTENTS="\uFEFF",r.default=v}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(0),o=h(a),c=i(4),d=h(c);function h(w){return w&&w.__esModule?w:{default:w}}function g(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function f(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function m(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var p=(function(w){m(x,w);function x(){return g(this,x),f(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return x})(o.default.Container);p.allowedChildren=[d.default,c.BlockEmbed,p],r.default=p}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var a=(function(){function v(y,j){for(var _=0;_<j.length;_++){var N=j[_];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,j,_){return j&&v(y.prototype,j),_&&v(y,_),y}})(),o=function v(y,j,_){y===null&&(y=Function.prototype);var N=Object.getOwnPropertyDescriptor(y,j);if(N===void 0){var C=Object.getPrototypeOf(y);return C===null?void 0:v(C,j,_)}else{if("value"in N)return N.value;var S=N.get;return S===void 0?void 0:S.call(_)}},c=i(0),d=h(c);function h(v){return v&&v.__esModule?v:{default:v}}function g(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function f(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function m(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var p=(function(v){m(y,v);function y(){return g(this,y),f(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"value",value:function(_){var N=o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,_);return N.startsWith("rgb(")?(N=N.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+N.split(",").map(function(C){return("00"+parseInt(C).toString(16)).slice(-2)}).join("")):N}}]),y})(d.default.Attributor.Style),w=new d.default.Attributor.Class("color","ql-color",{scope:d.default.Scope.INLINE}),x=new p("color","color",{scope:d.default.Scope.INLINE});r.ColorAttributor=p,r.ColorClass=w,r.ColorStyle=x}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var a=(function(){function x(v,y){for(var j=0;j<y.length;j++){var _=y[j];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(v,_.key,_)}}return function(v,y,j){return y&&x(v.prototype,y),j&&x(v,j),v}})(),o=function x(v,y,j){v===null&&(v=Function.prototype);var _=Object.getOwnPropertyDescriptor(v,y);if(_===void 0){var N=Object.getPrototypeOf(v);return N===null?void 0:x(N,y,j)}else{if("value"in _)return _.value;var C=_.get;return C===void 0?void 0:C.call(j)}},c=i(6),d=h(c);function h(x){return x&&x.__esModule?x:{default:x}}function g(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function f(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function m(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var p=(function(x){m(v,x);function v(){return g(this,v),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return a(v,[{key:"format",value:function(j,_){if(j!==this.statics.blotName||!_)return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,j,_);_=this.constructor.sanitize(_),this.domNode.setAttribute("href",_)}}],[{key:"create",value:function(j){var _=o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,j);return j=this.sanitize(j),_.setAttribute("href",j),_.setAttribute("rel","noopener noreferrer"),_.setAttribute("target","_blank"),_}},{key:"formats",value:function(j){return j.getAttribute("href")}},{key:"sanitize",value:function(j){return w(j,this.PROTOCOL_WHITELIST)?j:this.SANITIZED_URL}}]),v})(d.default);p.blotName="link",p.tagName="A",p.SANITIZED_URL="about:blank",p.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function w(x,v){var y=document.createElement("a");y.href=x;var j=y.href.slice(0,y.href.indexOf(":"));return v.indexOf(j)>-1}r.default=p,r.sanitize=w}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},o=(function(){function v(y,j){for(var _=0;_<j.length;_++){var N=j[_];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,j,_){return j&&v(y.prototype,j),_&&v(y,_),y}})(),c=i(23),d=f(c),h=i(107),g=f(h);function f(v){return v&&v.__esModule?v:{default:v}}function m(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}var p=0;function w(v,y){v.setAttribute(y,v.getAttribute(y)!=="true")}var x=(function(){function v(y){var j=this;m(this,v),this.select=y,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){j.togglePicker()}),this.label.addEventListener("keydown",function(_){switch(_.keyCode){case d.default.keys.ENTER:j.togglePicker();break;case d.default.keys.ESCAPE:j.escape(),_.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(v,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),w(this.label,"aria-expanded"),w(this.options,"aria-hidden")}},{key:"buildItem",value:function(j){var _=this,N=document.createElement("span");return N.tabIndex="0",N.setAttribute("role","button"),N.classList.add("ql-picker-item"),j.hasAttribute("value")&&N.setAttribute("data-value",j.getAttribute("value")),j.textContent&&N.setAttribute("data-label",j.textContent),N.addEventListener("click",function(){_.selectItem(N,!0)}),N.addEventListener("keydown",function(C){switch(C.keyCode){case d.default.keys.ENTER:_.selectItem(N,!0),C.preventDefault();break;case d.default.keys.ESCAPE:_.escape(),C.preventDefault();break}}),N}},{key:"buildLabel",value:function(){var j=document.createElement("span");return j.classList.add("ql-picker-label"),j.innerHTML=g.default,j.tabIndex="0",j.setAttribute("role","button"),j.setAttribute("aria-expanded","false"),this.container.appendChild(j),j}},{key:"buildOptions",value:function(){var j=this,_=document.createElement("span");_.classList.add("ql-picker-options"),_.setAttribute("aria-hidden","true"),_.tabIndex="-1",_.id="ql-picker-options-"+p,p+=1,this.label.setAttribute("aria-controls",_.id),this.options=_,[].slice.call(this.select.options).forEach(function(N){var C=j.buildItem(N);_.appendChild(C),N.selected===!0&&j.selectItem(C)}),this.container.appendChild(_)}},{key:"buildPicker",value:function(){var j=this;[].slice.call(this.select.attributes).forEach(function(_){j.container.setAttribute(_.name,_.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var j=this;this.close(),setTimeout(function(){return j.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(j){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,N=this.container.querySelector(".ql-selected");if(j!==N&&(N!=null&&N.classList.remove("ql-selected"),j!=null&&(j.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(j.parentNode.children,j),j.hasAttribute("data-value")?this.label.setAttribute("data-value",j.getAttribute("data-value")):this.label.removeAttribute("data-value"),j.hasAttribute("data-label")?this.label.setAttribute("data-label",j.getAttribute("data-label")):this.label.removeAttribute("data-label"),_))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":a(Event))==="object"){var C=document.createEvent("Event");C.initEvent("change",!0,!0),this.select.dispatchEvent(C)}this.close()}}},{key:"update",value:function(){var j=void 0;if(this.select.selectedIndex>-1){var _=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];j=this.select.options[this.select.selectedIndex],this.selectItem(_)}else this.selectItem(null);var N=j!=null&&j!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",N)}}]),v})();r.default=x}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(0),o=z(a),c=i(5),d=z(c),h=i(4),g=z(h),f=i(16),m=z(f),p=i(25),w=z(p),x=i(24),v=z(x),y=i(35),j=z(y),_=i(6),N=z(_),C=i(22),S=z(C),P=i(7),R=z(P),L=i(55),D=z(L),T=i(42),O=z(T),M=i(23),U=z(M);function z(H){return H&&H.__esModule?H:{default:H}}d.default.register({"blots/block":g.default,"blots/block/embed":h.BlockEmbed,"blots/break":m.default,"blots/container":w.default,"blots/cursor":v.default,"blots/embed":j.default,"blots/inline":N.default,"blots/scroll":S.default,"blots/text":R.default,"modules/clipboard":D.default,"modules/history":O.default,"modules/keyboard":U.default}),o.default.register(g.default,m.default,v.default,N.default,S.default,R.default),r.default=d.default}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(1),o=(function(){function c(d){this.domNode=d,this.domNode[a.DATA_KEY]={blot:this}}return Object.defineProperty(c.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),c.create=function(d){if(this.tagName==null)throw new a.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof d=="string"&&(d=d.toUpperCase(),parseInt(d).toString()===d&&(d=parseInt(d))),typeof d=="number"?h=document.createElement(this.tagName[d-1]):this.tagName.indexOf(d)>-1?h=document.createElement(d):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},c.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},c.prototype.clone=function(){var d=this.domNode.cloneNode(!1);return a.create(d)},c.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[a.DATA_KEY]},c.prototype.deleteAt=function(d,h){var g=this.isolate(d,h);g.remove()},c.prototype.formatAt=function(d,h,g,f){var m=this.isolate(d,h);if(a.query(g,a.Scope.BLOT)!=null&&f)m.wrap(g,f);else if(a.query(g,a.Scope.ATTRIBUTE)!=null){var p=a.create(this.statics.scope);m.wrap(p),p.format(g,f)}},c.prototype.insertAt=function(d,h,g){var f=g==null?a.create("text",h):a.create(h,g),m=this.split(d);this.parent.insertBefore(f,m)},c.prototype.insertInto=function(d,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var g=null;d.children.insertBefore(this,h),h!=null&&(g=h.domNode),(this.domNode.parentNode!=d.domNode||this.domNode.nextSibling!=g)&&d.domNode.insertBefore(this.domNode,g),this.parent=d,this.attach()},c.prototype.isolate=function(d,h){var g=this.split(d);return g.split(h),g},c.prototype.length=function(){return 1},c.prototype.offset=function(d){return d===void 0&&(d=this.parent),this.parent==null||this==d?0:this.parent.children.offset(this)+this.parent.offset(d)},c.prototype.optimize=function(d){this.domNode[a.DATA_KEY]!=null&&delete this.domNode[a.DATA_KEY].mutations},c.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},c.prototype.replace=function(d){d.parent!=null&&(d.parent.insertBefore(this,d.next),d.remove())},c.prototype.replaceWith=function(d,h){var g=typeof d=="string"?a.create(d,h):d;return g.replace(this),g},c.prototype.split=function(d,h){return d===0?this:this.next},c.prototype.update=function(d,h){},c.prototype.wrap=function(d,h){var g=typeof d=="string"?a.create(d,h):d;return this.parent!=null&&this.parent.insertBefore(g,this.next),g.appendChild(this),g},c.blotName="abstract",c})();r.default=o}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(12),o=i(32),c=i(33),d=i(1),h=(function(){function g(f){this.attributes={},this.domNode=f,this.build()}return g.prototype.attribute=function(f,m){m?f.add(this.domNode,m)&&(f.value(this.domNode)!=null?this.attributes[f.attrName]=f:delete this.attributes[f.attrName]):(f.remove(this.domNode),delete this.attributes[f.attrName])},g.prototype.build=function(){var f=this;this.attributes={};var m=a.default.keys(this.domNode),p=o.default.keys(this.domNode),w=c.default.keys(this.domNode);m.concat(p).concat(w).forEach(function(x){var v=d.query(x,d.Scope.ATTRIBUTE);v instanceof a.default&&(f.attributes[v.attrName]=v)})},g.prototype.copy=function(f){var m=this;Object.keys(this.attributes).forEach(function(p){var w=m.attributes[p].value(m.domNode);f.format(p,w)})},g.prototype.move=function(f){var m=this;this.copy(f),Object.keys(this.attributes).forEach(function(p){m.attributes[p].remove(m.domNode)}),this.attributes={}},g.prototype.values=function(){var f=this;return Object.keys(this.attributes).reduce(function(m,p){return m[p]=f.attributes[p].value(f.domNode),m},{})},g})();r.default=h}),(function(n,r,i){var a=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,f){g.__proto__=f}||function(g,f){for(var m in f)f.hasOwnProperty(m)&&(g[m]=f[m])};return function(g,f){h(g,f);function m(){this.constructor=g}g.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function c(h,g){var f=h.getAttribute("class")||"";return f.split(/\s+/).filter(function(m){return m.indexOf(g+"-")===0})}var d=(function(h){a(g,h);function g(){return h!==null&&h.apply(this,arguments)||this}return g.keys=function(f){return(f.getAttribute("class")||"").split(/\s+/).map(function(m){return m.split("-").slice(0,-1).join("-")})},g.prototype.add=function(f,m){return this.canAdd(f,m)?(this.remove(f),f.classList.add(this.keyName+"-"+m),!0):!1},g.prototype.remove=function(f){var m=c(f,this.keyName);m.forEach(function(p){f.classList.remove(p)}),f.classList.length===0&&f.removeAttribute("class")},g.prototype.value=function(f){var m=c(f,this.keyName)[0]||"",p=m.slice(this.keyName.length+1);return this.canAdd(f,p)?p:""},g})(o.default);r.default=d}),(function(n,r,i){var a=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,f){g.__proto__=f}||function(g,f){for(var m in f)f.hasOwnProperty(m)&&(g[m]=f[m])};return function(g,f){h(g,f);function m(){this.constructor=g}g.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function c(h){var g=h.split("-"),f=g.slice(1).map(function(m){return m[0].toUpperCase()+m.slice(1)}).join("");return g[0]+f}var d=(function(h){a(g,h);function g(){return h!==null&&h.apply(this,arguments)||this}return g.keys=function(f){return(f.getAttribute("style")||"").split(";").map(function(m){var p=m.split(":");return p[0].trim()})},g.prototype.add=function(f,m){return this.canAdd(f,m)?(f.style[c(this.keyName)]=m,!0):!1},g.prototype.remove=function(f){f.style[c(this.keyName)]="",f.getAttribute("style")||f.removeAttribute("style")},g.prototype.value=function(f){var m=f.style[c(this.keyName)];return this.canAdd(f,m)?m:""},g})(o.default);r.default=d}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function d(h,g){for(var f=0;f<g.length;f++){var m=g[f];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(h,m.key,m)}}return function(h,g,f){return g&&d(h.prototype,g),f&&d(h,f),h}})();function o(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}var c=(function(){function d(h,g){o(this,d),this.quill=h,this.options=g,this.modules={}}return a(d,[{key:"init",value:function(){var g=this;Object.keys(this.options.modules).forEach(function(f){g.modules[f]==null&&g.addModule(f)})}},{key:"addModule",value:function(g){var f=this.quill.constructor.import("modules/"+g);return this.modules[g]=new f(this.quill,this.options.modules[g]||{}),this.modules[g]}}]),d})();c.DEFAULTS={modules:{}},c.themes={default:c},r.default=c}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function y(j,_){for(var N=0;N<_.length;N++){var C=_[N];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(j,C.key,C)}}return function(j,_,N){return _&&y(j.prototype,_),N&&y(j,N),j}})(),o=function y(j,_,N){j===null&&(j=Function.prototype);var C=Object.getOwnPropertyDescriptor(j,_);if(C===void 0){var S=Object.getPrototypeOf(j);return S===null?void 0:y(S,_,N)}else{if("value"in C)return C.value;var P=C.get;return P===void 0?void 0:P.call(N)}},c=i(0),d=f(c),h=i(7),g=f(h);function f(y){return y&&y.__esModule?y:{default:y}}function m(y,j){if(!(y instanceof j))throw new TypeError("Cannot call a class as a function")}function p(y,j){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:y}function w(y,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);y.prototype=Object.create(j&&j.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(y,j):y.__proto__=j)}var x="\uFEFF",v=(function(y){w(j,y);function j(_){m(this,j);var N=p(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,_));return N.contentNode=document.createElement("span"),N.contentNode.setAttribute("contenteditable",!1),[].slice.call(N.domNode.childNodes).forEach(function(C){N.contentNode.appendChild(C)}),N.leftGuard=document.createTextNode(x),N.rightGuard=document.createTextNode(x),N.domNode.appendChild(N.leftGuard),N.domNode.appendChild(N.contentNode),N.domNode.appendChild(N.rightGuard),N}return a(j,[{key:"index",value:function(N,C){return N===this.leftGuard?0:N===this.rightGuard?1:o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"index",this).call(this,N,C)}},{key:"restore",value:function(N){var C=void 0,S=void 0,P=N.data.split(x).join("");if(N===this.leftGuard)if(this.prev instanceof g.default){var R=this.prev.length();this.prev.insertAt(R,P),C={startNode:this.prev.domNode,startOffset:R+P.length}}else S=document.createTextNode(P),this.parent.insertBefore(d.default.create(S),this),C={startNode:S,startOffset:P.length};else N===this.rightGuard&&(this.next instanceof g.default?(this.next.insertAt(0,P),C={startNode:this.next.domNode,startOffset:P.length}):(S=document.createTextNode(P),this.parent.insertBefore(d.default.create(S),this.next),C={startNode:S,startOffset:P.length}));return N.data=x,C}},{key:"update",value:function(N,C){var S=this;N.forEach(function(P){if(P.type==="characterData"&&(P.target===S.leftGuard||P.target===S.rightGuard)){var R=S.restore(P.target);R&&(C.range=R)}})}}]),j})(d.default.Embed);r.default=v}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var a=i(0),o=c(a);function c(m){return m&&m.__esModule?m:{default:m}}var d={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new o.default.Attributor.Attribute("align","align",d),g=new o.default.Attributor.Class("align","ql-align",d),f=new o.default.Attributor.Style("align","text-align",d);r.AlignAttribute=h,r.AlignClass=g,r.AlignStyle=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var a=i(0),o=d(a),c=i(26);function d(f){return f&&f.__esModule?f:{default:f}}var h=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),g=new c.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});r.BackgroundClass=h,r.BackgroundStyle=g}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var a=i(0),o=c(a);function c(m){return m&&m.__esModule?m:{default:m}}var d={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},h=new o.default.Attributor.Attribute("direction","dir",d),g=new o.default.Attributor.Class("direction","ql-direction",d),f=new o.default.Attributor.Style("direction","direction",d);r.DirectionAttribute=h,r.DirectionClass=g,r.DirectionStyle=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var a=(function(){function y(j,_){for(var N=0;N<_.length;N++){var C=_[N];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(j,C.key,C)}}return function(j,_,N){return _&&y(j.prototype,_),N&&y(j,N),j}})(),o=function y(j,_,N){j===null&&(j=Function.prototype);var C=Object.getOwnPropertyDescriptor(j,_);if(C===void 0){var S=Object.getPrototypeOf(j);return S===null?void 0:y(S,_,N)}else{if("value"in C)return C.value;var P=C.get;return P===void 0?void 0:P.call(N)}},c=i(0),d=h(c);function h(y){return y&&y.__esModule?y:{default:y}}function g(y,j){if(!(y instanceof j))throw new TypeError("Cannot call a class as a function")}function f(y,j){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:y}function m(y,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);y.prototype=Object.create(j&&j.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(y,j):y.__proto__=j)}var p={scope:d.default.Scope.INLINE,whitelist:["serif","monospace"]},w=new d.default.Attributor.Class("font","ql-font",p),x=(function(y){m(j,y);function j(){return g(this,j),f(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return a(j,[{key:"value",value:function(N){return o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"value",this).call(this,N).replace(/["']/g,"")}}]),j})(d.default.Attributor.Style),v=new x("font","font-family",p);r.FontStyle=v,r.FontClass=w}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var a=i(0),o=c(a);function c(g){return g&&g.__esModule?g:{default:g}}var d=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=d,r.SizeStyle=h}),(function(n,r,i){n.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var a=(function(){function _(N,C){for(var S=0;S<C.length;S++){var P=C[S];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(N,P.key,P)}}return function(N,C,S){return C&&_(N.prototype,C),S&&_(N,S),N}})(),o=i(0),c=m(o),d=i(5),h=m(d),g=i(9),f=m(g);function m(_){return _&&_.__esModule?_:{default:_}}function p(_,N){if(!(_ instanceof N))throw new TypeError("Cannot call a class as a function")}function w(_,N){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:_}function x(_,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);_.prototype=Object.create(N&&N.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(_,N):_.__proto__=N)}var v=(function(_){x(N,_);function N(C,S){p(this,N);var P=w(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,C,S));return P.lastRecorded=0,P.ignoreChange=!1,P.clear(),P.quill.on(h.default.events.EDITOR_CHANGE,function(R,L,D,T){R!==h.default.events.TEXT_CHANGE||P.ignoreChange||(!P.options.userOnly||T===h.default.sources.USER?P.record(L,D):P.transform(L))}),P.quill.keyboard.addBinding({key:"Z",shortKey:!0},P.undo.bind(P)),P.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},P.redo.bind(P)),/Win/i.test(navigator.platform)&&P.quill.keyboard.addBinding({key:"Y",shortKey:!0},P.redo.bind(P)),P}return a(N,[{key:"change",value:function(S,P){if(this.stack[S].length!==0){var R=this.stack[S].pop();this.stack[P].push(R),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(R[S],h.default.sources.USER),this.ignoreChange=!1;var L=j(R[S]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(S,P){if(S.ops.length!==0){this.stack.redo=[];var R=this.quill.getContents().diff(P),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var D=this.stack.undo.pop();R=R.compose(D.undo),S=D.redo.compose(S)}else this.lastRecorded=L;this.stack.undo.push({redo:S,undo:R}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(S){this.stack.undo.forEach(function(P){P.undo=S.transform(P.undo,!0),P.redo=S.transform(P.redo,!0)}),this.stack.redo.forEach(function(P){P.undo=S.transform(P.undo,!0),P.redo=S.transform(P.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),N})(f.default);v.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function y(_){var N=_.ops[_.ops.length-1];return N==null?!1:N.insert!=null?typeof N.insert=="string"&&N.insert.endsWith(` 597`):N.attributes!=null?Object.keys(N.attributes).some(function(C){return c.default.query(C,c.default.Scope.BLOCK)!=null}):!1}function j(_){var N=_.reduce(function(S,P){return S+=P.delete||0,S},0),C=_.length()-N;return y(_)&&(C-=1),C}r.default=v,r.getLastChangeIndex=j}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var a=(function(){function V(q,J){for(var te=0;te<J.length;te++){var K=J[te];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(q,K.key,K)}}return function(q,J,te){return J&&V(q.prototype,J),te&&V(q,te),q}})(),o=function V(q,J,te){q===null&&(q=Function.prototype);var K=Object.getOwnPropertyDescriptor(q,J);if(K===void 0){var Q=Object.getPrototypeOf(q);return Q===null?void 0:V(Q,J,te)}else{if("value"in K)return K.value;var ne=K.get;return ne===void 0?void 0:ne.call(te)}},c=i(3),d=L(c),h=i(2),g=L(h),f=i(8),m=L(f),p=i(23),w=L(p),x=i(34),v=L(x),y=i(59),j=L(y),_=i(60),N=L(_),C=i(28),S=L(C),P=i(61),R=L(P);function L(V){return V&&V.__esModule?V:{default:V}}function D(V,q){if(!(V instanceof q))throw new TypeError("Cannot call a class as a function")}function T(V,q){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:V}function O(V,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);V.prototype=Object.create(q&&q.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(V,q):V.__proto__=q)}var M=[!1,"center","right","justify"],U=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],z=[!1,"serif","monospace"],H=["1","2","3",!1],Y=["small",!1,"large","huge"],G=(function(V){O(q,V);function q(J,te){D(this,q);var K=T(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,J,te)),Q=function ne(se){if(!document.body.contains(J.root))return document.body.removeEventListener("click",ne);K.tooltip!=null&&!K.tooltip.root.contains(se.target)&&document.activeElement!==K.tooltip.textbox&&!K.quill.hasFocus()&&K.tooltip.hide(),K.pickers!=null&&K.pickers.forEach(function(ce){ce.container.contains(se.target)||ce.close()})};return J.emitter.listenDOM("click",document.body,Q),K}return a(q,[{key:"addModule",value:function(te){var K=o(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"addModule",this).call(this,te);return te==="toolbar"&&this.extendToolbar(K),K}},{key:"buildButtons",value:function(te,K){te.forEach(function(Q){var ne=Q.getAttribute("class")||"";ne.split(/\s+/).forEach(function(se){if(se.startsWith("ql-")&&(se=se.slice(3),K[se]!=null))if(se==="direction")Q.innerHTML=K[se][""]+K[se].rtl;else if(typeof K[se]=="string")Q.innerHTML=K[se];else{var ce=Q.value||"";ce!=null&&K[se][ce]&&(Q.innerHTML=K[se][ce])}})})}},{key:"buildPickers",value:function(te,K){var Q=this;this.pickers=te.map(function(se){if(se.classList.contains("ql-align"))return se.querySelector("option")==null&&B(se,M),new N.default(se,K.align);if(se.classList.contains("ql-background")||se.classList.contains("ql-color")){var ce=se.classList.contains("ql-background")?"background":"color";return se.querySelector("option")==null&&B(se,U,ce==="background"?"#ffffff":"#000000"),new j.default(se,K[ce])}else return se.querySelector("option")==null&&(se.classList.contains("ql-font")?B(se,z):se.classList.contains("ql-header")?B(se,H):se.classList.contains("ql-size")&&B(se,Y)),new S.default(se)});var ne=function(){Q.pickers.forEach(function(ce){ce.update()})};this.quill.on(m.default.events.EDITOR_CHANGE,ne)}}]),q})(v.default);G.DEFAULTS=(0,d.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var q=this,J=this.container.querySelector("input.ql-image[type=file]");J==null&&(J=document.createElement("input"),J.setAttribute("type","file"),J.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),J.classList.add("ql-image"),J.addEventListener("change",function(){if(J.files!=null&&J.files[0]!=null){var te=new FileReader;te.onload=function(K){var Q=q.quill.getSelection(!0);q.quill.updateContents(new g.default().retain(Q.index).delete(Q.length).insert({image:K.target.result}),m.default.sources.USER),q.quill.setSelection(Q.index+1,m.default.sources.SILENT),J.value=""},te.readAsDataURL(J.files[0])}}),this.container.appendChild(J)),J.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var $=(function(V){O(q,V);function q(J,te){D(this,q);var K=T(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,J,te));return K.textbox=K.root.querySelector('input[type="text"]'),K.listen(),K}return a(q,[{key:"listen",value:function(){var te=this;this.textbox.addEventListener("keydown",function(K){w.default.match(K,"enter")?(te.save(),K.preventDefault()):w.default.match(K,"escape")&&(te.cancel(),K.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),K!=null?this.textbox.value=K:te!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+te)||""),this.root.setAttribute("data-mode",te)}},{key:"restoreFocus",value:function(){var te=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=te}},{key:"save",value:function(){var te=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var K=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",te,m.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",te,m.default.sources.USER)),this.quill.root.scrollTop=K;break}case"video":te=I(te);case"formula":{if(!te)break;var Q=this.quill.getSelection(!0);if(Q!=null){var ne=Q.index+Q.length;this.quill.insertEmbed(ne,this.root.getAttribute("data-mode"),te,m.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(ne+1," ",m.default.sources.USER),this.quill.setSelection(ne+2,m.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),q})(R.default);function I(V){var q=V.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||V.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return q?(q[1]||"https")+"://www.youtube.com/embed/"+q[2]+"?showinfo=0":(q=V.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(q[1]||"https")+"://player.vimeo.com/video/"+q[2]+"/":V}function B(V,q){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;q.forEach(function(te){var K=document.createElement("option");te===J?K.setAttribute("selected","selected"):K.setAttribute("value",te),V.appendChild(K)})}r.BaseTooltip=$,r.default=G}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];this.insertBefore(c[0],null),c.length>1&&this.append.apply(this,c.slice(1))},o.prototype.contains=function(c){for(var d,h=this.iterator();d=h();)if(d===c)return!0;return!1},o.prototype.insertBefore=function(c,d){c&&(c.next=d,d!=null?(c.prev=d.prev,d.prev!=null&&(d.prev.next=c),d.prev=c,d===this.head&&(this.head=c)):this.tail!=null?(this.tail.next=c,c.prev=this.tail,this.tail=c):(c.prev=null,this.head=this.tail=c),this.length+=1)},o.prototype.offset=function(c){for(var d=0,h=this.head;h!=null;){if(h===c)return d;d+=h.length(),h=h.next}return-1},o.prototype.remove=function(c){this.contains(c)&&(c.prev!=null&&(c.prev.next=c.next),c.next!=null&&(c.next.prev=c.prev),c===this.head&&(this.head=c.next),c===this.tail&&(this.tail=c.prev),this.length-=1)},o.prototype.iterator=function(c){return c===void 0&&(c=this.head),function(){var d=c;return c!=null&&(c=c.next),d}},o.prototype.find=function(c,d){d===void 0&&(d=!1);for(var h,g=this.iterator();h=g();){var f=h.length();if(c<f||d&&c===f&&(h.next==null||h.next.length()!==0))return[h,c];c-=f}return[null,0]},o.prototype.forEach=function(c){for(var d,h=this.iterator();d=h();)c(d)},o.prototype.forEachAt=function(c,d,h){if(!(d<=0))for(var g=this.find(c),f=g[0],m=g[1],p,w=c-m,x=this.iterator(f);(p=x())&&w<c+d;){var v=p.length();c>w?h(p,c-w,Math.min(d,w+v-c)):h(p,0,Math.min(v,c+d-w)),w+=v}},o.prototype.map=function(c){return this.reduce(function(d,h){return d.push(c(h)),d},[])},o.prototype.reduce=function(c,d){for(var h,g=this.iterator();h=g();)d=c(d,h);return d},o})();r.default=a}),(function(n,r,i){var a=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var w in p)p.hasOwnProperty(w)&&(m[w]=p[w])};return function(m,p){f(m,p);function w(){this.constructor=m}m.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(17),c=i(1),d={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,g=(function(f){a(m,f);function m(p){var w=f.call(this,p)||this;return w.scroll=w,w.observer=new MutationObserver(function(x){w.update(x)}),w.observer.observe(w.domNode,d),w.attach(),w}return m.prototype.detach=function(){f.prototype.detach.call(this),this.observer.disconnect()},m.prototype.deleteAt=function(p,w){this.update(),p===0&&w===this.length()?this.children.forEach(function(x){x.remove()}):f.prototype.deleteAt.call(this,p,w)},m.prototype.formatAt=function(p,w,x,v){this.update(),f.prototype.formatAt.call(this,p,w,x,v)},m.prototype.insertAt=function(p,w,x){this.update(),f.prototype.insertAt.call(this,p,w,x)},m.prototype.optimize=function(p,w){var x=this;p===void 0&&(p=[]),w===void 0&&(w={}),f.prototype.optimize.call(this,w);for(var v=[].slice.call(this.observer.takeRecords());v.length>0;)p.push(v.pop());for(var y=function(C,S){S===void 0&&(S=!0),!(C==null||C===x)&&C.domNode.parentNode!=null&&(C.domNode[c.DATA_KEY].mutations==null&&(C.domNode[c.DATA_KEY].mutations=[]),S&&y(C.parent))},j=function(C){C.domNode[c.DATA_KEY]==null||C.domNode[c.DATA_KEY].mutations==null||(C instanceof o.default&&C.children.forEach(j),C.optimize(w))},_=p,N=0;_.length>0;N+=1){if(N>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(_.forEach(function(C){var S=c.find(C.target,!0);S!=null&&(S.domNode===C.target&&(C.type==="childList"?(y(c.find(C.previousSibling,!1)),[].forEach.call(C.addedNodes,function(P){var R=c.find(P,!1);y(R,!1),R instanceof o.default&&R.children.forEach(function(L){y(L,!1)})})):C.type==="attributes"&&y(S.prev)),y(S))}),this.children.forEach(j),_=[].slice.call(this.observer.takeRecords()),v=_.slice();v.length>0;)p.push(v.pop())}},m.prototype.update=function(p,w){var x=this;w===void 0&&(w={}),p=p||this.observer.takeRecords(),p.map(function(v){var y=c.find(v.target,!0);return y==null?null:y.domNode[c.DATA_KEY].mutations==null?(y.domNode[c.DATA_KEY].mutations=[v],y):(y.domNode[c.DATA_KEY].mutations.push(v),null)}).forEach(function(v){v==null||v===x||v.domNode[c.DATA_KEY]==null||v.update(v.domNode[c.DATA_KEY].mutations||[],w)}),this.domNode[c.DATA_KEY].mutations!=null&&f.prototype.update.call(this,this.domNode[c.DATA_KEY].mutations,w),this.optimize(p,w)},m.blotName="scroll",m.defaultChild="block",m.scope=c.Scope.BLOCK_BLOT,m.tagName="DIV",m})(o.default);r.default=g}),(function(n,r,i){var a=this&&this.__extends||(function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var p in m)m.hasOwnProperty(p)&&(f[p]=m[p])};return function(f,m){g(f,m);function p(){this.constructor=f}f.prototype=m===null?Object.create(m):(p.prototype=m.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),c=i(1);function d(g,f){if(Object.keys(g).length!==Object.keys(f).length)return!1;for(var m in g)if(g[m]!==f[m])return!1;return!0}var h=(function(g){a(f,g);function f(){return g!==null&&g.apply(this,arguments)||this}return f.formats=function(m){if(m.tagName!==f.tagName)return g.formats.call(this,m)},f.prototype.format=function(m,p){var w=this;m===this.statics.blotName&&!p?(this.children.forEach(function(x){x instanceof o.default||(x=x.wrap(f.blotName,!0)),w.attributes.copy(x)}),this.unwrap()):g.prototype.format.call(this,m,p)},f.prototype.formatAt=function(m,p,w,x){if(this.formats()[w]!=null||c.query(w,c.Scope.ATTRIBUTE)){var v=this.isolate(m,p);v.format(w,x)}else g.prototype.formatAt.call(this,m,p,w,x)},f.prototype.optimize=function(m){g.prototype.optimize.call(this,m);var p=this.formats();if(Object.keys(p).length===0)return this.unwrap();var w=this.next;w instanceof f&&w.prev===this&&d(p,w.formats())&&(w.moveChildren(this),w.remove())},f.blotName="inline",f.scope=c.Scope.INLINE_BLOT,f.tagName="SPAN",f})(o.default);r.default=h}),(function(n,r,i){var a=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,f){g.__proto__=f}||function(g,f){for(var m in f)f.hasOwnProperty(m)&&(g[m]=f[m])};return function(g,f){h(g,f);function m(){this.constructor=g}g.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),c=i(1),d=(function(h){a(g,h);function g(){return h!==null&&h.apply(this,arguments)||this}return g.formats=function(f){var m=c.query(g.blotName).tagName;if(f.tagName!==m)return h.formats.call(this,f)},g.prototype.format=function(f,m){c.query(f,c.Scope.BLOCK)!=null&&(f===this.statics.blotName&&!m?this.replaceWith(g.blotName):h.prototype.format.call(this,f,m))},g.prototype.formatAt=function(f,m,p,w){c.query(p,c.Scope.BLOCK)!=null?this.format(p,w):h.prototype.formatAt.call(this,f,m,p,w)},g.prototype.insertAt=function(f,m,p){if(p==null||c.query(m,c.Scope.INLINE)!=null)h.prototype.insertAt.call(this,f,m,p);else{var w=this.split(f),x=c.create(m,p);w.parent.insertBefore(x,w)}},g.prototype.update=function(f,m){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,f,m)},g.blotName="block",g.scope=c.Scope.BLOCK_BLOT,g.tagName="P",g})(o.default);r.default=d}),(function(n,r,i){var a=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var f in g)g.hasOwnProperty(f)&&(h[f]=g[f])};return function(h,g){d(h,g);function f(){this.constructor=h}h.prototype=g===null?Object.create(g):(f.prototype=g.prototype,new f)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),c=(function(d){a(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.formats=function(g){},h.prototype.format=function(g,f){d.prototype.formatAt.call(this,0,this.length(),g,f)},h.prototype.formatAt=function(g,f,m,p){g===0&&f===this.length()?this.format(m,p):d.prototype.formatAt.call(this,g,f,m,p)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h})(o.default);r.default=c}),(function(n,r,i){var a=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,f){g.__proto__=f}||function(g,f){for(var m in f)f.hasOwnProperty(m)&&(g[m]=f[m])};return function(g,f){h(g,f);function m(){this.constructor=g}g.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),c=i(1),d=(function(h){a(g,h);function g(f){var m=h.call(this,f)||this;return m.text=m.statics.value(m.domNode),m}return g.create=function(f){return document.createTextNode(f)},g.value=function(f){var m=f.data;return m.normalize&&(m=m.normalize()),m},g.prototype.deleteAt=function(f,m){this.domNode.data=this.text=this.text.slice(0,f)+this.text.slice(f+m)},g.prototype.index=function(f,m){return this.domNode===f?m:-1},g.prototype.insertAt=function(f,m,p){p==null?(this.text=this.text.slice(0,f)+m+this.text.slice(f),this.domNode.data=this.text):h.prototype.insertAt.call(this,f,m,p)},g.prototype.length=function(){return this.text.length},g.prototype.optimize=function(f){h.prototype.optimize.call(this,f),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof g&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},g.prototype.position=function(f,m){return[this.domNode,f]},g.prototype.split=function(f,m){if(m===void 0&&(m=!1),!m){if(f===0)return this;if(f===this.length())return this.next}var p=c.create(this.domNode.splitText(f));return this.parent.insertBefore(p,this.next),this.text=this.statics.value(this.domNode),p},g.prototype.update=function(f,m){var p=this;f.some(function(w){return w.type==="characterData"&&w.target===p.domNode})&&(this.text=this.statics.value(this.domNode))},g.prototype.value=function(){return this.text},g.blotName="text",g.scope=c.Scope.INLINE_BLOT,g})(o.default);r.default=d}),(function(n,r,i){var a=document.createElement("div");if(a.classList.toggle("test-class",!1),a.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(c,d){return arguments.length>1&&!this.contains(c)==!d?d:o.call(this,c)}}String.prototype.startsWith||(String.prototype.startsWith=function(c,d){return d=d||0,this.substr(d,c.length)===c}),String.prototype.endsWith||(String.prototype.endsWith=function(c,d){var h=this.toString();(typeof d!="number"||!isFinite(d)||Math.floor(d)!==d||d>h.length)&&(d=h.length),d-=c.length;var g=h.indexOf(c,d);return g!==-1&&g===d}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(d){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof d!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),g=h.length>>>0,f=arguments[1],m,p=0;p<g;p++)if(m=h[p],d.call(f,m,p,h))return m}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})}),(function(n,r){var i=-1,a=1,o=0;function c(N,C,S){if(N==C)return N?[[o,N]]:[];(S<0||N.length<S)&&(S=null);var P=f(N,C),R=N.substring(0,P);N=N.substring(P),C=C.substring(P),P=m(N,C);var L=N.substring(N.length-P);N=N.substring(0,N.length-P),C=C.substring(0,C.length-P);var D=d(N,C);return R&&D.unshift([o,R]),L&&D.push([o,L]),w(D),S!=null&&(D=y(D,S)),D=j(D),D}function d(N,C){var S;if(!N)return[[a,C]];if(!C)return[[i,N]];var P=N.length>C.length?N:C,R=N.length>C.length?C:N,L=P.indexOf(R);if(L!=-1)return S=[[a,P.substring(0,L)],[o,R],[a,P.substring(L+R.length)]],N.length>C.length&&(S[0][0]=S[2][0]=i),S;if(R.length==1)return[[i,N],[a,C]];var D=p(N,C);if(D){var T=D[0],O=D[1],M=D[2],U=D[3],z=D[4],H=c(T,M),Y=c(O,U);return H.concat([[o,z]],Y)}return h(N,C)}function h(N,C){for(var S=N.length,P=C.length,R=Math.ceil((S+P)/2),L=R,D=2*R,T=new Array(D),O=new Array(D),M=0;M<D;M++)T[M]=-1,O[M]=-1;T[L+1]=0,O[L+1]=0;for(var U=S-P,z=U%2!=0,H=0,Y=0,G=0,$=0,I=0;I<R;I++){for(var B=-I+H;B<=I-Y;B+=2){var V=L+B,q;B==-I||B!=I&&T[V-1]<T[V+1]?q=T[V+1]:q=T[V-1]+1;for(var J=q-B;q<S&&J<P&&N.charAt(q)==C.charAt(J);)q++,J++;if(T[V]=q,q>S)Y+=2;else if(J>P)H+=2;else if(z){var te=L+U-B;if(te>=0&&te<D&&O[te]!=-1){var K=S-O[te];if(q>=K)return g(N,C,q,J)}}}for(var Q=-I+G;Q<=I-$;Q+=2){var te=L+Q,K;Q==-I||Q!=I&&O[te-1]<O[te+1]?K=O[te+1]:K=O[te-1]+1;for(var ne=K-Q;K<S&&ne<P&&N.charAt(S-K-1)==C.charAt(P-ne-1);)K++,ne++;if(O[te]=K,K>S)$+=2;else if(ne>P)G+=2;else if(!z){var V=L+U-Q;if(V>=0&&V<D&&T[V]!=-1){var q=T[V],J=L+q-V;if(K=S-K,q>=K)return g(N,C,q,J)}}}}return[[i,N],[a,C]]}function g(N,C,S,P){var R=N.substring(0,S),L=C.substring(0,P),D=N.substring(S),T=C.substring(P),O=c(R,L),M=c(D,T);return O.concat(M)}function f(N,C){if(!N||!C||N.charAt(0)!=C.charAt(0))return 0;for(var S=0,P=Math.min(N.length,C.length),R=P,L=0;S<R;)N.substring(L,R)==C.substring(L,R)?(S=R,L=S):P=R,R=Math.floor((P-S)/2+S);return R}function m(N,C){if(!N||!C||N.charAt(N.length-1)!=C.charAt(C.length-1))return 0;for(var S=0,P=Math.min(N.length,C.length),R=P,L=0;S<R;)N.substring(N.length-R,N.length-L)==C.substring(C.length-R,C.length-L)?(S=R,L=S):P=R,R=Math.floor((P-S)/2+S);return R}function p(N,C){var S=N.length>C.length?N:C,P=N.length>C.length?C:N;if(S.length<4||P.length*2<S.length)return null;function R(Y,G,$){for(var I=Y.substring($,$+Math.floor(Y.length/4)),B=-1,V="",q,J,te,K;(B=G.indexOf(I,B+1))!=-1;){var Q=f(Y.substring($),G.substring(B)),ne=m(Y.substring(0,$),G.substring(0,B));V.length<ne+Q&&(V=G.substring(B-ne,B)+G.substring(B,B+Q),q=Y.substring(0,$-ne),J=Y.substring($+Q),te=G.substring(0,B-ne),K=G.substring(B+Q))}return V.length*2>=Y.length?[q,J,te,K,V]:null}var L=R(S,P,Math.ceil(S.length/4)),D=R(S,P,Math.ceil(S.length/2)),T;if(!L&&!D)return null;D?L?T=L[4].length>D[4].length?L:D:T=D:T=L;var O,M,U,z;N.length>C.length?(O=T[0],M=T[1],U=T[2],z=T[3]):(U=T[0],z=T[1],O=T[2],M=T[3]);var H=T[4];return[O,M,U,z,H]}function w(N){N.push([o,""]);for(var C=0,S=0,P=0,R="",L="",D;C<N.length;)switch(N[C][0]){case a:P++,L+=N[C][1],C++;break;case i:S++,R+=N[C][1],C++;break;case o:S+P>1?(S!==0&&P!==0&&(D=f(L,R),D!==0&&(C-S-P>0&&N[C-S-P-1][0]==o?N[C-S-P-1][1]+=L.substring(0,D):(N.splice(0,0,[o,L.substring(0,D)]),C++),L=L.substring(D),R=R.substring(D)),D=m(L,R),D!==0&&(N[C][1]=L.substring(L.length-D)+N[C][1],L=L.substring(0,L.length-D),R=R.substring(0,R.length-D))),S===0?N.splice(C-P,S+P,[a,L]):P===0?N.splice(C-S,S+P,[i,R]):N.splice(C-S-P,S+P,[i,R],[a,L]),C=C-S-P+(S?1:0)+(P?1:0)+1):C!==0&&N[C-1][0]==o?(N[C-1][1]+=N[C][1],N.splice(C,1)):C++,P=0,S=0,R="",L="";break}N[N.length-1][1]===""&&N.pop();var T=!1;for(C=1;C<N.length-1;)N[C-1][0]==o&&N[C+1][0]==o&&(N[C][1].substring(N[C][1].length-N[C-1][1].length)==N[C-1][1]?(N[C][1]=N[C-1][1]+N[C][1].substring(0,N[C][1].length-N[C-1][1].length),N[C+1][1]=N[C-1][1]+N[C+1][1],N.splice(C-1,1),T=!0):N[C][1].substring(0,N[C+1][1].length)==N[C+1][1]&&(N[C-1][1]+=N[C+1][1],N[C][1]=N[C][1].substring(N[C+1][1].length)+N[C+1][1],N.splice(C+1,1),T=!0)),C++;T&&w(N)}var x=c;x.INSERT=a,x.DELETE=i,x.EQUAL=o,n.exports=x;function v(N,C){if(C===0)return[o,N];for(var S=0,P=0;P<N.length;P++){var R=N[P];if(R[0]===i||R[0]===o){var L=S+R[1].length;if(C===L)return[P+1,N];if(C<L){N=N.slice();var D=C-S,T=[R[0],R[1].slice(0,D)],O=[R[0],R[1].slice(D)];return N.splice(P,1,T,O),[P+1,N]}else S=L}}throw new Error("cursor_pos is out of bounds!")}function y(N,C){var S=v(N,C),P=S[1],R=S[0],L=P[R],D=P[R+1];if(L==null)return N;if(L[0]!==o)return N;if(D!=null&&L[1]+D[1]===D[1]+L[1])return P.splice(R,2,D,L),_(P,R,2);if(D!=null&&D[1].indexOf(L[1])===0){P.splice(R,2,[D[0],L[1]],[0,L[1]]);var T=D[1].slice(L[1].length);return T.length>0&&P.splice(R+2,0,[D[0],T]),_(P,R,3)}else return N}function j(N){for(var C=!1,S=function(D){return D.charCodeAt(0)>=56320&&D.charCodeAt(0)<=57343},P=function(D){return D.charCodeAt(D.length-1)>=55296&&D.charCodeAt(D.length-1)<=56319},R=2;R<N.length;R+=1)N[R-2][0]===o&&P(N[R-2][1])&&N[R-1][0]===i&&S(N[R-1][1])&&N[R][0]===a&&S(N[R][1])&&(C=!0,N[R-1][1]=N[R-2][1].slice(-1)+N[R-1][1],N[R][1]=N[R-2][1].slice(-1)+N[R][1],N[R-2][1]=N[R-2][1].slice(0,-1));if(!C)return N;for(var L=[],R=0;R<N.length;R+=1)N[R][1].length>0&&L.push(N[R]);return L}function _(N,C,S){for(var P=C+S-1;P>=0&&P>=C-1;P--)if(P+1<N.length){var R=N[P],L=N[P+1];R[0]===L[1]&&N.splice(P,2,[R[0],R[1]+L[1]])}return N}}),(function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:i,r.shim=i;function i(a){var o=[];for(var c in a)o.push(c);return o}}),(function(n,r){var i=(function(){return Object.prototype.toString.call(arguments)})()=="[object Arguments]";r=n.exports=i?a:o,r.supported=a;function a(c){return Object.prototype.toString.call(c)=="[object Arguments]"}r.unsupported=o;function o(c){return c&&typeof c=="object"&&typeof c.length=="number"&&Object.prototype.hasOwnProperty.call(c,"callee")&&!Object.prototype.propertyIsEnumerable.call(c,"callee")||!1}}),(function(n,r){var i=Object.prototype.hasOwnProperty,a="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(a=!1));function c(h,g,f){this.fn=h,this.context=g,this.once=f||!1}function d(){this._events=new o,this._eventsCount=0}d.prototype.eventNames=function(){var g=[],f,m;if(this._eventsCount===0)return g;for(m in f=this._events)i.call(f,m)&&g.push(a?m.slice(1):m);return Object.getOwnPropertySymbols?g.concat(Object.getOwnPropertySymbols(f)):g},d.prototype.listeners=function(g,f){var m=a?a+g:g,p=this._events[m];if(f)return!!p;if(!p)return[];if(p.fn)return[p.fn];for(var w=0,x=p.length,v=new Array(x);w<x;w++)v[w]=p[w].fn;return v},d.prototype.emit=function(g,f,m,p,w,x){var v=a?a+g:g;if(!this._events[v])return!1;var y=this._events[v],j=arguments.length,_,N;if(y.fn){switch(y.once&&this.removeListener(g,y.fn,void 0,!0),j){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,f),!0;case 3:return y.fn.call(y.context,f,m),!0;case 4:return y.fn.call(y.context,f,m,p),!0;case 5:return y.fn.call(y.context,f,m,p,w),!0;case 6:return y.fn.call(y.context,f,m,p,w,x),!0}for(N=1,_=new Array(j-1);N<j;N++)_[N-1]=arguments[N];y.fn.apply(y.context,_)}else{var C=y.length,S;for(N=0;N<C;N++)switch(y[N].once&&this.removeListener(g,y[N].fn,void 0,!0),j){case 1:y[N].fn.call(y[N].context);break;case 2:y[N].fn.call(y[N].context,f);break;case 3:y[N].fn.call(y[N].context,f,m);break;case 4:y[N].fn.call(y[N].context,f,m,p);break;default:if(!_)for(S=1,_=new Array(j-1);S<j;S++)_[S-1]=arguments[S];y[N].fn.apply(y[N].context,_)}}return!0},d.prototype.on=function(g,f,m){var p=new c(f,m||this),w=a?a+g:g;return this._events[w]?this._events[w].fn?this._events[w]=[this._events[w],p]:this._events[w].push(p):(this._events[w]=p,this._eventsCount++),this},d.prototype.once=function(g,f,m){var p=new c(f,m||this,!0),w=a?a+g:g;return this._events[w]?this._events[w].fn?this._events[w]=[this._events[w],p]:this._events[w].push(p):(this._events[w]=p,this._eventsCount++),this},d.prototype.removeListener=function(g,f,m,p){var w=a?a+g:g;if(!this._events[w])return this;if(!f)return--this._eventsCount===0?this._events=new o:delete this._events[w],this;var x=this._events[w];if(x.fn)x.fn===f&&(!p||x.once)&&(!m||x.context===m)&&(--this._eventsCount===0?this._events=new o:delete this._events[w]);else{for(var v=0,y=[],j=x.length;v<j;v++)(x[v].fn!==f||p&&!x[v].once||m&&x[v].context!==m)&&y.push(x[v]);y.length?this._events[w]=y.length===1?y[0]:y:--this._eventsCount===0?this._events=new o:delete this._events[w]}return this},d.prototype.removeAllListeners=function(g){var f;return g?(f=a?a+g:g,this._events[f]&&(--this._eventsCount===0?this._events=new o:delete this._events[f])):(this._events=new o,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prototype.setMaxListeners=function(){return this},d.prefixed=a,d.EventEmitter=d,typeof n<"u"&&(n.exports=d)}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he},o=(function(){function he(me,Ee){var Pe=[],xe=!0,ot=!1,lt=void 0;try{for(var ct=me[Symbol.iterator](),pe;!(xe=(pe=ct.next()).done)&&(Pe.push(pe.value),!(Ee&&Pe.length===Ee));xe=!0);}catch(_e){ot=!0,lt=_e}finally{try{!xe&&ct.return&&ct.return()}finally{if(ot)throw lt}}return Pe}return function(me,Ee){if(Array.isArray(me))return me;if(Symbol.iterator in Object(me))return he(me,Ee);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function he(me,Ee){for(var Pe=0;Pe<Ee.length;Pe++){var xe=Ee[Pe];xe.enumerable=xe.enumerable||!1,xe.configurable=!0,"value"in xe&&(xe.writable=!0),Object.defineProperty(me,xe.key,xe)}}return function(me,Ee,Pe){return Ee&&he(me.prototype,Ee),Pe&&he(me,Pe),me}})(),d=i(3),h=O(d),g=i(2),f=O(g),m=i(0),p=O(m),w=i(5),x=O(w),v=i(10),y=O(v),j=i(9),_=O(j),N=i(36),C=i(37),S=i(13),P=O(S),R=i(26),L=i(38),D=i(39),T=i(40);function O(he){return he&&he.__esModule?he:{default:he}}function M(he,me,Ee){return me in he?Object.defineProperty(he,me,{value:Ee,enumerable:!0,configurable:!0,writable:!0}):he[me]=Ee,he}function U(he,me){if(!(he instanceof me))throw new TypeError("Cannot call a class as a function")}function z(he,me){if(!he)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:he}function H(he,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);he.prototype=Object.create(me&&me.prototype,{constructor:{value:he,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(he,me):he.__proto__=me)}var Y=(0,y.default)("quill:clipboard"),G="__ql-matcher",$=[[Node.TEXT_NODE,at],[Node.TEXT_NODE,Ye],["br",ye],[Node.ELEMENT_NODE,Ye],[Node.ELEMENT_NODE,ce],[Node.ELEMENT_NODE,et],[Node.ELEMENT_NODE,se],[Node.ELEMENT_NODE,Le],["li",Fe],["b",ne.bind(ne,"bold")],["i",ne.bind(ne,"italic")],["style",je]],I=[N.AlignAttribute,L.DirectionAttribute].reduce(function(he,me){return he[me.keyName]=me,he},{}),B=[N.AlignStyle,C.BackgroundStyle,R.ColorStyle,L.DirectionStyle,D.FontStyle,T.SizeStyle].reduce(function(he,me){return he[me.keyName]=me,he},{}),V=(function(he){H(me,he);function me(Ee,Pe){U(this,me);var xe=z(this,(me.__proto__||Object.getPrototypeOf(me)).call(this,Ee,Pe));return xe.quill.root.addEventListener("paste",xe.onPaste.bind(xe)),xe.container=xe.quill.addContainer("ql-clipboard"),xe.container.setAttribute("contenteditable",!0),xe.container.setAttribute("tabindex",-1),xe.matchers=[],$.concat(xe.options.matchers).forEach(function(ot){var lt=o(ot,2),ct=lt[0],pe=lt[1];!Pe.matchVisual&&pe===et||xe.addMatcher(ct,pe)}),xe}return c(me,[{key:"addMatcher",value:function(Pe,xe){this.matchers.push([Pe,xe])}},{key:"convert",value:function(Pe){if(typeof Pe=="string")return this.container.innerHTML=Pe.replace(/\>\r?\n +\</g,"><"),this.convert();var xe=this.quill.getFormat(this.quill.selection.savedRange.index);if(xe[P.default.blotName]){var ot=this.container.innerText;return this.container.innerHTML="",new f.default().insert(ot,M({},P.default.blotName,xe[P.default.blotName]))}var lt=this.prepareMatching(),ct=o(lt,2),pe=ct[0],_e=ct[1],Oe=Q(this.container,pe,_e);return te(Oe,` 598`)&&Oe.ops[Oe.ops.length-1].attributes==null&&(Oe=Oe.compose(new f.default().retain(Oe.length()-1).delete(1))),Y.log("convert",this.container.innerHTML,Oe),this.container.innerHTML="",Oe}},{key:"dangerouslyPasteHTML",value:function(Pe,xe){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.default.sources.API;if(typeof Pe=="string")this.quill.setContents(this.convert(Pe),xe),this.quill.setSelection(0,x.default.sources.SILENT);else{var lt=this.convert(xe);this.quill.updateContents(new f.default().retain(Pe).concat(lt),ot),this.quill.setSelection(Pe+lt.length(),x.default.sources.SILENT)}}},{key:"onPaste",value:function(Pe){var xe=this;if(!(Pe.defaultPrevented||!this.quill.isEnabled())){var ot=this.quill.getSelection(),lt=new f.default().retain(ot.index),ct=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(x.default.sources.SILENT),setTimeout(function(){lt=lt.concat(xe.convert()).delete(ot.length),xe.quill.updateContents(lt,x.default.sources.USER),xe.quill.setSelection(lt.length()-ot.length,x.default.sources.SILENT),xe.quill.scrollingContainer.scrollTop=ct,xe.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Pe=this,xe=[],ot=[];return this.matchers.forEach(function(lt){var ct=o(lt,2),pe=ct[0],_e=ct[1];switch(pe){case Node.TEXT_NODE:ot.push(_e);break;case Node.ELEMENT_NODE:xe.push(_e);break;default:[].forEach.call(Pe.container.querySelectorAll(pe),function(Oe){Oe[G]=Oe[G]||[],Oe[G].push(_e)});break}}),[xe,ot]}}]),me})(_.default);V.DEFAULTS={matchers:[],matchVisual:!0};function q(he,me,Ee){return(typeof me>"u"?"undefined":a(me))==="object"?Object.keys(me).reduce(function(Pe,xe){return q(Pe,xe,me[xe])},he):he.reduce(function(Pe,xe){return xe.attributes&&xe.attributes[me]?Pe.push(xe):Pe.insert(xe.insert,(0,h.default)({},M({},me,Ee),xe.attributes))},new f.default)}function J(he){if(he.nodeType!==Node.ELEMENT_NODE)return{};var me="__ql-computed-style";return he[me]||(he[me]=window.getComputedStyle(he))}function te(he,me){for(var Ee="",Pe=he.ops.length-1;Pe>=0&&Ee.length<me.length;--Pe){var xe=he.ops[Pe];if(typeof xe.insert!="string")break;Ee=xe.insert+Ee}return Ee.slice(-1*me.length)===me}function K(he){if(he.childNodes.length===0)return!1;var me=J(he);return["block","list-item"].indexOf(me.display)>-1}function Q(he,me,Ee){return he.nodeType===he.TEXT_NODE?Ee.reduce(function(Pe,xe){return xe(he,Pe)},new f.default):he.nodeType===he.ELEMENT_NODE?[].reduce.call(he.childNodes||[],function(Pe,xe){var ot=Q(xe,me,Ee);return xe.nodeType===he.ELEMENT_NODE&&(ot=me.reduce(function(lt,ct){return ct(xe,lt)},ot),ot=(xe[G]||[]).reduce(function(lt,ct){return ct(xe,lt)},ot)),Pe.concat(ot)},new f.default):new f.default}function ne(he,me,Ee){return q(Ee,he,!0)}function se(he,me){var Ee=p.default.Attributor.Attribute.keys(he),Pe=p.default.Attributor.Class.keys(he),xe=p.default.Attributor.Style.keys(he),ot={};return Ee.concat(Pe).concat(xe).forEach(function(lt){var ct=p.default.query(lt,p.default.Scope.ATTRIBUTE);ct!=null&&(ot[ct.attrName]=ct.value(he),ot[ct.attrName])||(ct=I[lt],ct!=null&&(ct.attrName===lt||ct.keyName===lt)&&(ot[ct.attrName]=ct.value(he)||void 0),ct=B[lt],ct!=null&&(ct.attrName===lt||ct.keyName===lt)&&(ct=B[lt],ot[ct.attrName]=ct.value(he)||void 0))}),Object.keys(ot).length>0&&(me=q(me,ot)),me}function ce(he,me){var Ee=p.default.query(he);if(Ee==null)return me;if(Ee.prototype instanceof p.default.Embed){var Pe={},xe=Ee.value(he);xe!=null&&(Pe[Ee.blotName]=xe,me=new f.default().insert(Pe,Ee.formats(he)))}else typeof Ee.formats=="function"&&(me=q(me,Ee.blotName,Ee.formats(he)));return me}function ye(he,me){return te(me,` 599`)||me.insert(` 600`),me}function je(){return new f.default}function Fe(he,me){var Ee=p.default.query(he);if(Ee==null||Ee.blotName!=="list-item"||!te(me,` 601`))return me;for(var Pe=-1,xe=he.parentNode;!xe.classList.contains("ql-clipboard");)(p.default.query(xe)||{}).blotName==="list"&&(Pe+=1),xe=xe.parentNode;return Pe<=0?me:me.compose(new f.default().retain(me.length()-1).retain(1,{indent:Pe}))}function Ye(he,me){return te(me,` 602`)||(K(he)||me.length()>0&&he.nextSibling&&K(he.nextSibling))&&me.insert(` 603`),me}function et(he,me){if(K(he)&&he.nextElementSibling!=null&&!te(me,` 604 605`)){var Ee=he.offsetHeight+parseFloat(J(he).marginTop)+parseFloat(J(he).marginBottom);he.nextElementSibling.offsetTop>he.offsetTop+Ee*1.5&&me.insert(` 606`)}return me}function Le(he,me){var Ee={},Pe=he.style||{};return Pe.fontStyle&&J(he).fontStyle==="italic"&&(Ee.italic=!0),Pe.fontWeight&&(J(he).fontWeight.startsWith("bold")||parseInt(J(he).fontWeight)>=700)&&(Ee.bold=!0),Object.keys(Ee).length>0&&(me=q(me,Ee)),parseFloat(Pe.textIndent||0)>0&&(me=new f.default().insert(" ").concat(me)),me}function at(he,me){var Ee=he.data;if(he.parentNode.tagName==="O:P")return me.insert(Ee.trim());if(Ee.trim().length===0&&he.parentNode.classList.contains("ql-clipboard"))return me;if(!J(he.parentNode).whiteSpace.startsWith("pre")){var Pe=function(ot,lt){return lt=lt.replace(/[^\u00a0]/g,""),lt.length<1&&ot?" ":lt};Ee=Ee.replace(/\r\n/g," ").replace(/\n/g," "),Ee=Ee.replace(/\s\s+/g,Pe.bind(Pe,!0)),(he.previousSibling==null&&K(he.parentNode)||he.previousSibling!=null&&K(he.previousSibling))&&(Ee=Ee.replace(/^\s+/,Pe.bind(Pe,!1))),(he.nextSibling==null&&K(he.parentNode)||he.nextSibling!=null&&K(he.nextSibling))&&(Ee=Ee.replace(/\s+$/,Pe.bind(Pe,!1)))}return me.insert(Ee)}r.default=V,r.matchAttributor=se,r.matchBlot=ce,r.matchNewline=Ye,r.matchSpacing=et,r.matchText=at}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function w(x,v){for(var y=0;y<v.length;y++){var j=v[y];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,v,y){return v&&w(x.prototype,v),y&&w(x,y),x}})(),o=function w(x,v,y){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,v);if(j===void 0){var _=Object.getPrototypeOf(x);return _===null?void 0:w(_,v,y)}else{if("value"in j)return j.value;var N=j.get;return N===void 0?void 0:N.call(y)}},c=i(6),d=h(c);function h(w){return w&&w.__esModule?w:{default:w}}function g(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function f(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function m(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var p=(function(w){m(x,w);function x(){return g(this,x),f(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,[{key:"optimize",value:function(y){o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,y),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),x})(d.default);p.blotName="bold",p.tagName=["STRONG","B"],r.default=p}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var a=(function(){function T(O,M){var U=[],z=!0,H=!1,Y=void 0;try{for(var G=O[Symbol.iterator](),$;!(z=($=G.next()).done)&&(U.push($.value),!(M&&U.length===M));z=!0);}catch(I){H=!0,Y=I}finally{try{!z&&G.return&&G.return()}finally{if(H)throw Y}}return U}return function(O,M){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return T(O,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function T(O,M){for(var U=0;U<M.length;U++){var z=M[U];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(O,z.key,z)}}return function(O,M,U){return M&&T(O.prototype,M),U&&T(O,U),O}})(),c=i(2),d=y(c),h=i(0),g=y(h),f=i(5),m=y(f),p=i(10),w=y(p),x=i(9),v=y(x);function y(T){return T&&T.__esModule?T:{default:T}}function j(T,O,M){return O in T?Object.defineProperty(T,O,{value:M,enumerable:!0,configurable:!0,writable:!0}):T[O]=M,T}function _(T,O){if(!(T instanceof O))throw new TypeError("Cannot call a class as a function")}function N(T,O){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:T}function C(T,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);T.prototype=Object.create(O&&O.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(T,O):T.__proto__=O)}var S=(0,w.default)("quill:toolbar"),P=(function(T){C(O,T);function O(M,U){_(this,O);var z=N(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,M,U));if(Array.isArray(z.options.container)){var H=document.createElement("div");L(H,z.options.container),M.container.parentNode.insertBefore(H,M.container),z.container=H}else typeof z.options.container=="string"?z.container=document.querySelector(z.options.container):z.container=z.options.container;if(!(z.container instanceof HTMLElement)){var Y;return Y=S.error("Container required for toolbar",z.options),N(z,Y)}return z.container.classList.add("ql-toolbar"),z.controls=[],z.handlers={},Object.keys(z.options.handlers).forEach(function(G){z.addHandler(G,z.options.handlers[G])}),[].forEach.call(z.container.querySelectorAll("button, select"),function(G){z.attach(G)}),z.quill.on(m.default.events.EDITOR_CHANGE,function(G,$){G===m.default.events.SELECTION_CHANGE&&z.update($)}),z.quill.on(m.default.events.SCROLL_OPTIMIZE,function(){var G=z.quill.selection.getRange(),$=a(G,1),I=$[0];z.update(I)}),z}return o(O,[{key:"addHandler",value:function(U,z){this.handlers[U]=z}},{key:"attach",value:function(U){var z=this,H=[].find.call(U.classList,function(G){return G.indexOf("ql-")===0});if(H){if(H=H.slice(3),U.tagName==="BUTTON"&&U.setAttribute("type","button"),this.handlers[H]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[H]==null){S.warn("ignoring attaching to disabled format",H,U);return}if(g.default.query(H)==null){S.warn("ignoring attaching to nonexistent format",H,U);return}}var Y=U.tagName==="SELECT"?"change":"click";U.addEventListener(Y,function(G){var $=void 0;if(U.tagName==="SELECT"){if(U.selectedIndex<0)return;var I=U.options[U.selectedIndex];I.hasAttribute("selected")?$=!1:$=I.value||!1}else U.classList.contains("ql-active")?$=!1:$=U.value||!U.hasAttribute("value"),G.preventDefault();z.quill.focus();var B=z.quill.selection.getRange(),V=a(B,1),q=V[0];if(z.handlers[H]!=null)z.handlers[H].call(z,$);else if(g.default.query(H).prototype instanceof g.default.Embed){if($=prompt("Enter "+H),!$)return;z.quill.updateContents(new d.default().retain(q.index).delete(q.length).insert(j({},H,$)),m.default.sources.USER)}else z.quill.format(H,$,m.default.sources.USER);z.update(q)}),this.controls.push([H,U])}}},{key:"update",value:function(U){var z=U==null?{}:this.quill.getFormat(U);this.controls.forEach(function(H){var Y=a(H,2),G=Y[0],$=Y[1];if($.tagName==="SELECT"){var I=void 0;if(U==null)I=null;else if(z[G]==null)I=$.querySelector("option[selected]");else if(!Array.isArray(z[G])){var B=z[G];typeof B=="string"&&(B=B.replace(/\"/g,'\\"')),I=$.querySelector('option[value="'+B+'"]')}I==null?($.value="",$.selectedIndex=-1):I.selected=!0}else if(U==null)$.classList.remove("ql-active");else if($.hasAttribute("value")){var V=z[G]===$.getAttribute("value")||z[G]!=null&&z[G].toString()===$.getAttribute("value")||z[G]==null&&!$.getAttribute("value");$.classList.toggle("ql-active",V)}else $.classList.toggle("ql-active",z[G]!=null)})}}]),O})(v.default);P.DEFAULTS={};function R(T,O,M){var U=document.createElement("button");U.setAttribute("type","button"),U.classList.add("ql-"+O),M!=null&&(U.value=M),T.appendChild(U)}function L(T,O){Array.isArray(O[0])||(O=[O]),O.forEach(function(M){var U=document.createElement("span");U.classList.add("ql-formats"),M.forEach(function(z){if(typeof z=="string")R(U,z);else{var H=Object.keys(z)[0],Y=z[H];Array.isArray(Y)?D(U,H,Y):R(U,H,Y)}}),T.appendChild(U)})}function D(T,O,M){var U=document.createElement("select");U.classList.add("ql-"+O),M.forEach(function(z){var H=document.createElement("option");z!==!1?H.setAttribute("value",z):H.setAttribute("selected","selected"),U.appendChild(H)}),T.appendChild(U)}P.DEFAULTS={container:null,handlers:{clean:function(){var O=this,M=this.quill.getSelection();if(M!=null)if(M.length==0){var U=this.quill.getFormat();Object.keys(U).forEach(function(z){g.default.query(z,g.default.Scope.INLINE)!=null&&O.quill.format(z,!1)})}else this.quill.removeFormat(M,m.default.sources.USER)},direction:function(O){var M=this.quill.getFormat().align;O==="rtl"&&M==null?this.quill.format("align","right",m.default.sources.USER):!O&&M==="right"&&this.quill.format("align",!1,m.default.sources.USER),this.quill.format("direction",O,m.default.sources.USER)},indent:function(O){var M=this.quill.getSelection(),U=this.quill.getFormat(M),z=parseInt(U.indent||0);if(O==="+1"||O==="-1"){var H=O==="+1"?1:-1;U.direction==="rtl"&&(H*=-1),this.quill.format("indent",z+H,m.default.sources.USER)}},link:function(O){O===!0&&(O=prompt("Enter link URL:")),this.quill.format("link",O,m.default.sources.USER)},list:function(O){var M=this.quill.getSelection(),U=this.quill.getFormat(M);O==="check"?U.list==="checked"||U.list==="unchecked"?this.quill.format("list",!1,m.default.sources.USER):this.quill.format("list","unchecked",m.default.sources.USER):this.quill.format("list",O,m.default.sources.USER)}}},r.default=P,r.addControls=L}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function w(x,v){for(var y=0;y<v.length;y++){var j=v[y];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,v,y){return v&&w(x.prototype,v),y&&w(x,y),x}})(),o=function w(x,v,y){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,v);if(j===void 0){var _=Object.getPrototypeOf(x);return _===null?void 0:w(_,v,y)}else{if("value"in j)return j.value;var N=j.get;return N===void 0?void 0:N.call(y)}},c=i(28),d=h(c);function h(w){return w&&w.__esModule?w:{default:w}}function g(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function f(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function m(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var p=(function(w){m(x,w);function x(v,y){g(this,x);var j=f(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,v));return j.label.innerHTML=y,j.container.classList.add("ql-color-picker"),[].slice.call(j.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(_){_.classList.add("ql-primary")}),j}return a(x,[{key:"buildItem",value:function(y){var j=o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"buildItem",this).call(this,y);return j.style.backgroundColor=y.getAttribute("value")||"",j}},{key:"selectItem",value:function(y,j){o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"selectItem",this).call(this,y,j);var _=this.label.querySelector(".ql-color-label"),N=y&&y.getAttribute("data-value")||"";_&&(_.tagName==="line"?_.style.stroke=N:_.style.fill=N)}}]),x})(d.default);r.default=p}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function w(x,v){for(var y=0;y<v.length;y++){var j=v[y];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,v,y){return v&&w(x.prototype,v),y&&w(x,y),x}})(),o=function w(x,v,y){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,v);if(j===void 0){var _=Object.getPrototypeOf(x);return _===null?void 0:w(_,v,y)}else{if("value"in j)return j.value;var N=j.get;return N===void 0?void 0:N.call(y)}},c=i(28),d=h(c);function h(w){return w&&w.__esModule?w:{default:w}}function g(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function f(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function m(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var p=(function(w){m(x,w);function x(v,y){g(this,x);var j=f(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,v));return j.container.classList.add("ql-icon-picker"),[].forEach.call(j.container.querySelectorAll(".ql-picker-item"),function(_){_.innerHTML=y[_.getAttribute("data-value")||""]}),j.defaultItem=j.container.querySelector(".ql-selected"),j.selectItem(j.defaultItem),j}return a(x,[{key:"selectItem",value:function(y,j){o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"selectItem",this).call(this,y,j),y=y||this.defaultItem,this.label.innerHTML=y.innerHTML}}]),x})(d.default);r.default=p}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function d(h,g){for(var f=0;f<g.length;f++){var m=g[f];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(h,m.key,m)}}return function(h,g,f){return g&&d(h.prototype,g),f&&d(h,f),h}})();function o(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}var c=(function(){function d(h,g){var f=this;o(this,d),this.quill=h,this.boundsContainer=g||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){f.root.style.marginTop=-1*f.quill.root.scrollTop+"px"}),this.hide()}return a(d,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(g){var f=g.left+g.width/2-this.root.offsetWidth/2,m=g.bottom+this.quill.root.scrollTop;this.root.style.left=f+"px",this.root.style.top=m+"px",this.root.classList.remove("ql-flip");var p=this.boundsContainer.getBoundingClientRect(),w=this.root.getBoundingClientRect(),x=0;if(w.right>p.right&&(x=p.right-w.right,this.root.style.left=f+x+"px"),w.left<p.left&&(x=p.left-w.left,this.root.style.left=f+x+"px"),w.bottom>p.bottom){var v=w.bottom-w.top,y=g.bottom-g.top+v;this.root.style.top=m-y+"px",this.root.classList.add("ql-flip")}return x}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),d})();r.default=c}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function D(T,O){var M=[],U=!0,z=!1,H=void 0;try{for(var Y=T[Symbol.iterator](),G;!(U=(G=Y.next()).done)&&(M.push(G.value),!(O&&M.length===O));U=!0);}catch($){z=!0,H=$}finally{try{!U&&Y.return&&Y.return()}finally{if(z)throw H}}return M}return function(T,O){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return D(T,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function D(T,O,M){T===null&&(T=Function.prototype);var U=Object.getOwnPropertyDescriptor(T,O);if(U===void 0){var z=Object.getPrototypeOf(T);return z===null?void 0:D(z,O,M)}else{if("value"in U)return U.value;var H=U.get;return H===void 0?void 0:H.call(M)}},c=(function(){function D(T,O){for(var M=0;M<O.length;M++){var U=O[M];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(T,U.key,U)}}return function(T,O,M){return O&&D(T.prototype,O),M&&D(T,M),T}})(),d=i(3),h=_(d),g=i(8),f=_(g),m=i(43),p=_(m),w=i(27),x=_(w),v=i(15),y=i(41),j=_(y);function _(D){return D&&D.__esModule?D:{default:D}}function N(D,T){if(!(D instanceof T))throw new TypeError("Cannot call a class as a function")}function C(D,T){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:D}function S(D,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);D.prototype=Object.create(T&&T.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(D,T):D.__proto__=T)}var P=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],R=(function(D){S(T,D);function T(O,M){N(this,T),M.modules.toolbar!=null&&M.modules.toolbar.container==null&&(M.modules.toolbar.container=P);var U=C(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,O,M));return U.quill.container.classList.add("ql-snow"),U}return c(T,[{key:"extendToolbar",value:function(M){M.container.classList.add("ql-snow"),this.buildButtons([].slice.call(M.container.querySelectorAll("button")),j.default),this.buildPickers([].slice.call(M.container.querySelectorAll("select")),j.default),this.tooltip=new L(this.quill,this.options.bounds),M.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(U,z){M.handlers.link.call(M,!z.format.link)})}}]),T})(p.default);R.DEFAULTS=(0,h.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){if(T){var O=this.quill.getSelection();if(O==null||O.length==0)return;var M=this.quill.getText(O);/^\S+@\S+\.\S+$/.test(M)&&M.indexOf("mailto:")!==0&&(M="mailto:"+M);var U=this.quill.theme.tooltip;U.edit("link",M)}else this.quill.format("link",!1)}}}}});var L=(function(D){S(T,D);function T(O,M){N(this,T);var U=C(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,O,M));return U.preview=U.root.querySelector("a.ql-preview"),U}return c(T,[{key:"listen",value:function(){var M=this;o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(U){M.root.classList.contains("ql-editing")?M.save():M.edit("link",M.preview.textContent),U.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(U){if(M.linkRange!=null){var z=M.linkRange;M.restoreFocus(),M.quill.formatText(z,"link",!1,f.default.sources.USER),delete M.linkRange}U.preventDefault(),M.hide()}),this.quill.on(f.default.events.SELECTION_CHANGE,function(U,z,H){if(U!=null){if(U.length===0&&H===f.default.sources.USER){var Y=M.quill.scroll.descendant(x.default,U.index),G=a(Y,2),$=G[0],I=G[1];if($!=null){M.linkRange=new v.Range(U.index-I,$.length());var B=x.default.formats($.domNode);M.preview.textContent=B,M.preview.setAttribute("href",B),M.show(),M.position(M.quill.getBounds(M.linkRange));return}}else delete M.linkRange;M.hide()}})}},{key:"show",value:function(){o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),T})(m.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=R}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(29),o=xe(a),c=i(36),d=i(38),h=i(64),g=i(65),f=xe(g),m=i(66),p=xe(m),w=i(67),x=xe(w),v=i(37),y=i(26),j=i(39),_=i(40),N=i(56),C=xe(N),S=i(68),P=xe(S),R=i(27),L=xe(R),D=i(69),T=xe(D),O=i(70),M=xe(O),U=i(71),z=xe(U),H=i(72),Y=xe(H),G=i(73),$=xe(G),I=i(13),B=xe(I),V=i(74),q=xe(V),J=i(75),te=xe(J),K=i(57),Q=xe(K),ne=i(41),se=xe(ne),ce=i(28),ye=xe(ce),je=i(59),Fe=xe(je),Ye=i(60),et=xe(Ye),Le=i(61),at=xe(Le),he=i(108),me=xe(he),Ee=i(62),Pe=xe(Ee);function xe(ot){return ot&&ot.__esModule?ot:{default:ot}}o.default.register({"attributors/attribute/direction":d.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":v.BackgroundClass,"attributors/class/color":y.ColorClass,"attributors/class/direction":d.DirectionClass,"attributors/class/font":j.FontClass,"attributors/class/size":_.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":v.BackgroundStyle,"attributors/style/color":y.ColorStyle,"attributors/style/direction":d.DirectionStyle,"attributors/style/font":j.FontStyle,"attributors/style/size":_.SizeStyle},!0),o.default.register({"formats/align":c.AlignClass,"formats/direction":d.DirectionClass,"formats/indent":h.IndentClass,"formats/background":v.BackgroundStyle,"formats/color":y.ColorStyle,"formats/font":j.FontClass,"formats/size":_.SizeClass,"formats/blockquote":f.default,"formats/code-block":B.default,"formats/header":p.default,"formats/list":x.default,"formats/bold":C.default,"formats/code":I.Code,"formats/italic":P.default,"formats/link":L.default,"formats/script":T.default,"formats/strike":M.default,"formats/underline":z.default,"formats/image":Y.default,"formats/video":$.default,"formats/list/item":w.ListItem,"modules/formula":q.default,"modules/syntax":te.default,"modules/toolbar":Q.default,"themes/bubble":me.default,"themes/snow":Pe.default,"ui/icons":se.default,"ui/picker":ye.default,"ui/icon-picker":et.default,"ui/color-picker":Fe.default,"ui/tooltip":at.default},!0),r.default=o.default}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var a=(function(){function x(v,y){for(var j=0;j<y.length;j++){var _=y[j];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(v,_.key,_)}}return function(v,y,j){return y&&x(v.prototype,y),j&&x(v,j),v}})(),o=function x(v,y,j){v===null&&(v=Function.prototype);var _=Object.getOwnPropertyDescriptor(v,y);if(_===void 0){var N=Object.getPrototypeOf(v);return N===null?void 0:x(N,y,j)}else{if("value"in _)return _.value;var C=_.get;return C===void 0?void 0:C.call(j)}},c=i(0),d=h(c);function h(x){return x&&x.__esModule?x:{default:x}}function g(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function f(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function m(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var p=(function(x){m(v,x);function v(){return g(this,v),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return a(v,[{key:"add",value:function(j,_){if(_==="+1"||_==="-1"){var N=this.value(j)||0;_=_==="+1"?N+1:N-1}return _===0?(this.remove(j),!0):o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"add",this).call(this,j,_)}},{key:"canAdd",value:function(j,_){return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"canAdd",this).call(this,j,_)||o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"canAdd",this).call(this,j,parseInt(_))}},{key:"value",value:function(j){return parseInt(o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"value",this).call(this,j))||void 0}}]),v})(d.default.Attributor.Class),w=new p("indent","ql-indent",{scope:d.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=w}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(4),o=c(a);function c(m){return m&&m.__esModule?m:{default:m}}function d(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")}function h(m,p){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:m}function g(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(m,p):m.__proto__=p)}var f=(function(m){g(p,m);function p(){return d(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(o.default);f.blotName="blockquote",f.tagName="blockquote",r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function p(w,x){for(var v=0;v<x.length;v++){var y=x[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(w,y.key,y)}}return function(w,x,v){return x&&p(w.prototype,x),v&&p(w,v),w}})(),o=i(4),c=d(o);function d(p){return p&&p.__esModule?p:{default:p}}function h(p,w){if(!(p instanceof w))throw new TypeError("Cannot call a class as a function")}function g(p,w){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:p}function f(p,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);p.prototype=Object.create(w&&w.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(p,w):p.__proto__=w)}var m=(function(p){f(w,p);function w(){return h(this,w),g(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return a(w,null,[{key:"formats",value:function(v){return this.tagName.indexOf(v.tagName)+1}}]),w})(c.default);m.blotName="header",m.tagName=["H1","H2","H3","H4","H5","H6"],r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var a=(function(){function N(C,S){for(var P=0;P<S.length;P++){var R=S[P];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(C,R.key,R)}}return function(C,S,P){return S&&N(C.prototype,S),P&&N(C,P),C}})(),o=function N(C,S,P){C===null&&(C=Function.prototype);var R=Object.getOwnPropertyDescriptor(C,S);if(R===void 0){var L=Object.getPrototypeOf(C);return L===null?void 0:N(L,S,P)}else{if("value"in R)return R.value;var D=R.get;return D===void 0?void 0:D.call(P)}},c=i(0),d=p(c),h=i(4),g=p(h),f=i(25),m=p(f);function p(N){return N&&N.__esModule?N:{default:N}}function w(N,C,S){return C in N?Object.defineProperty(N,C,{value:S,enumerable:!0,configurable:!0,writable:!0}):N[C]=S,N}function x(N,C){if(!(N instanceof C))throw new TypeError("Cannot call a class as a function")}function v(N,C){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:N}function y(N,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);N.prototype=Object.create(C&&C.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(N,C):N.__proto__=C)}var j=(function(N){y(C,N);function C(){return x(this,C),v(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return a(C,[{key:"format",value:function(P,R){P===_.blotName&&!R?this.replaceWith(d.default.create(this.statics.scope)):o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"format",this).call(this,P,R)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(P,R){return this.parent.isolate(this.offset(this.parent),this.length()),P===this.parent.statics.blotName?(this.parent.replaceWith(P,R),this):(this.parent.unwrap(),o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replaceWith",this).call(this,P,R))}}],[{key:"formats",value:function(P){return P.tagName===this.tagName?void 0:o(C.__proto__||Object.getPrototypeOf(C),"formats",this).call(this,P)}}]),C})(g.default);j.blotName="list-item",j.tagName="LI";var _=(function(N){y(C,N),a(C,null,[{key:"create",value:function(P){var R=P==="ordered"?"OL":"UL",L=o(C.__proto__||Object.getPrototypeOf(C),"create",this).call(this,R);return(P==="checked"||P==="unchecked")&&L.setAttribute("data-checked",P==="checked"),L}},{key:"formats",value:function(P){if(P.tagName==="OL")return"ordered";if(P.tagName==="UL")return P.hasAttribute("data-checked")?P.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function C(S){x(this,C);var P=v(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,S)),R=function(D){if(D.target.parentNode===S){var T=P.statics.formats(S),O=d.default.find(D.target);T==="checked"?O.format("list","unchecked"):T==="unchecked"&&O.format("list","checked")}};return S.addEventListener("touchstart",R),S.addEventListener("mousedown",R),P}return a(C,[{key:"format",value:function(P,R){this.children.length>0&&this.children.tail.format(P,R)}},{key:"formats",value:function(){return w({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(P,R){if(P instanceof j)o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,P,R);else{var L=R==null?this.length():R.offset(this),D=this.split(L);D.parent.insertBefore(P,D)}}},{key:"optimize",value:function(P){o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,P);var R=this.next;R!=null&&R.prev===this&&R.statics.blotName===this.statics.blotName&&R.domNode.tagName===this.domNode.tagName&&R.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(R.moveChildren(this),R.remove())}},{key:"replace",value:function(P){if(P.statics.blotName!==this.statics.blotName){var R=d.default.create(this.statics.defaultChild);P.moveChildren(R),this.appendChild(R)}o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replace",this).call(this,P)}}]),C})(m.default);_.blotName="list",_.scope=d.default.Scope.BLOCK_BLOT,_.tagName=["OL","UL"],_.defaultChild="list-item",_.allowedChildren=[j],r.ListItem=j,r.default=_}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(56),o=c(a);function c(m){return m&&m.__esModule?m:{default:m}}function d(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")}function h(m,p){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:m}function g(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(m,p):m.__proto__=p)}var f=(function(m){g(p,m);function p(){return d(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(o.default);f.blotName="italic",f.tagName=["EM","I"],r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function w(x,v){for(var y=0;y<v.length;y++){var j=v[y];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,j.key,j)}}return function(x,v,y){return v&&w(x.prototype,v),y&&w(x,y),x}})(),o=function w(x,v,y){x===null&&(x=Function.prototype);var j=Object.getOwnPropertyDescriptor(x,v);if(j===void 0){var _=Object.getPrototypeOf(x);return _===null?void 0:w(_,v,y)}else{if("value"in j)return j.value;var N=j.get;return N===void 0?void 0:N.call(y)}},c=i(6),d=h(c);function h(w){return w&&w.__esModule?w:{default:w}}function g(w,x){if(!(w instanceof x))throw new TypeError("Cannot call a class as a function")}function f(w,x){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:w}function m(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);w.prototype=Object.create(x&&x.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(w,x):w.__proto__=x)}var p=(function(w){m(x,w);function x(){return g(this,x),f(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,null,[{key:"create",value:function(y){return y==="super"?document.createElement("sup"):y==="sub"?document.createElement("sub"):o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,y)}},{key:"formats",value:function(y){if(y.tagName==="SUB")return"sub";if(y.tagName==="SUP")return"super"}}]),x})(d.default);p.blotName="script",p.tagName=["SUB","SUP"],r.default=p}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=c(a);function c(m){return m&&m.__esModule?m:{default:m}}function d(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")}function h(m,p){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:m}function g(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(m,p):m.__proto__=p)}var f=(function(m){g(p,m);function p(){return d(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(o.default);f.blotName="strike",f.tagName="S",r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=c(a);function c(m){return m&&m.__esModule?m:{default:m}}function d(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")}function h(m,p){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:m}function g(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);m.prototype=Object.create(p&&p.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(m,p):m.__proto__=p)}var f=(function(m){g(p,m);function p(){return d(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(o.default);f.blotName="underline",f.tagName="U",r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function v(y,j){for(var _=0;_<j.length;_++){var N=j[_];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,j,_){return j&&v(y.prototype,j),_&&v(y,_),y}})(),o=function v(y,j,_){y===null&&(y=Function.prototype);var N=Object.getOwnPropertyDescriptor(y,j);if(N===void 0){var C=Object.getPrototypeOf(y);return C===null?void 0:v(C,j,_)}else{if("value"in N)return N.value;var S=N.get;return S===void 0?void 0:S.call(_)}},c=i(0),d=g(c),h=i(27);function g(v){return v&&v.__esModule?v:{default:v}}function f(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function m(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function p(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var w=["alt","height","width"],x=(function(v){p(y,v);function y(){return f(this,y),m(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"format",value:function(_,N){w.indexOf(_)>-1?N?this.domNode.setAttribute(_,N):this.domNode.removeAttribute(_):o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,_,N)}}],[{key:"create",value:function(_){var N=o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,_);return typeof _=="string"&&N.setAttribute("src",this.sanitize(_)),N}},{key:"formats",value:function(_){return w.reduce(function(N,C){return _.hasAttribute(C)&&(N[C]=_.getAttribute(C)),N},{})}},{key:"match",value:function(_){return/\.(jpe?g|gif|png)$/.test(_)||/^data:image\/.+;base64/.test(_)}},{key:"sanitize",value:function(_){return(0,h.sanitize)(_,["http","https","data"])?_:"//:0"}},{key:"value",value:function(_){return _.getAttribute("src")}}]),y})(d.default.Embed);x.blotName="image",x.tagName="IMG",r.default=x}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function v(y,j){for(var _=0;_<j.length;_++){var N=j[_];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,j,_){return j&&v(y.prototype,j),_&&v(y,_),y}})(),o=function v(y,j,_){y===null&&(y=Function.prototype);var N=Object.getOwnPropertyDescriptor(y,j);if(N===void 0){var C=Object.getPrototypeOf(y);return C===null?void 0:v(C,j,_)}else{if("value"in N)return N.value;var S=N.get;return S===void 0?void 0:S.call(_)}},c=i(4),d=i(27),h=g(d);function g(v){return v&&v.__esModule?v:{default:v}}function f(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function m(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function p(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var w=["height","width"],x=(function(v){p(y,v);function y(){return f(this,y),m(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"format",value:function(_,N){w.indexOf(_)>-1?N?this.domNode.setAttribute(_,N):this.domNode.removeAttribute(_):o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,_,N)}}],[{key:"create",value:function(_){var N=o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,_);return N.setAttribute("frameborder","0"),N.setAttribute("allowfullscreen",!0),N.setAttribute("src",this.sanitize(_)),N}},{key:"formats",value:function(_){return w.reduce(function(N,C){return _.hasAttribute(C)&&(N[C]=_.getAttribute(C)),N},{})}},{key:"sanitize",value:function(_){return h.default.sanitize(_)}},{key:"value",value:function(_){return _.getAttribute("src")}}]),y})(c.BlockEmbed);x.blotName="video",x.className="ql-video",x.tagName="IFRAME",r.default=x}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var a=(function(){function _(N,C){for(var S=0;S<C.length;S++){var P=C[S];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(N,P.key,P)}}return function(N,C,S){return C&&_(N.prototype,C),S&&_(N,S),N}})(),o=function _(N,C,S){N===null&&(N=Function.prototype);var P=Object.getOwnPropertyDescriptor(N,C);if(P===void 0){var R=Object.getPrototypeOf(N);return R===null?void 0:_(R,C,S)}else{if("value"in P)return P.value;var L=P.get;return L===void 0?void 0:L.call(S)}},c=i(35),d=p(c),h=i(5),g=p(h),f=i(9),m=p(f);function p(_){return _&&_.__esModule?_:{default:_}}function w(_,N){if(!(_ instanceof N))throw new TypeError("Cannot call a class as a function")}function x(_,N){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:_}function v(_,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);_.prototype=Object.create(N&&N.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(_,N):_.__proto__=N)}var y=(function(_){v(N,_);function N(){return w(this,N),x(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return a(N,null,[{key:"create",value:function(S){var P=o(N.__proto__||Object.getPrototypeOf(N),"create",this).call(this,S);return typeof S=="string"&&(window.katex.render(S,P,{throwOnError:!1,errorColor:"#f00"}),P.setAttribute("data-value",S)),P}},{key:"value",value:function(S){return S.getAttribute("data-value")}}]),N})(d.default);y.blotName="formula",y.className="ql-formula",y.tagName="SPAN";var j=(function(_){v(N,_),a(N,null,[{key:"register",value:function(){g.default.register(y,!0)}}]);function N(){w(this,N);var C=x(this,(N.__proto__||Object.getPrototypeOf(N)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return C}return N})(m.default);r.FormulaBlot=y,r.default=j}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var a=(function(){function S(P,R){for(var L=0;L<R.length;L++){var D=R[L];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(P,D.key,D)}}return function(P,R,L){return R&&S(P.prototype,R),L&&S(P,L),P}})(),o=function S(P,R,L){P===null&&(P=Function.prototype);var D=Object.getOwnPropertyDescriptor(P,R);if(D===void 0){var T=Object.getPrototypeOf(P);return T===null?void 0:S(T,R,L)}else{if("value"in D)return D.value;var O=D.get;return O===void 0?void 0:O.call(L)}},c=i(0),d=x(c),h=i(5),g=x(h),f=i(9),m=x(f),p=i(13),w=x(p);function x(S){return S&&S.__esModule?S:{default:S}}function v(S,P){if(!(S instanceof P))throw new TypeError("Cannot call a class as a function")}function y(S,P){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:S}function j(S,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);S.prototype=Object.create(P&&P.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(S,P):S.__proto__=P)}var _=(function(S){j(P,S);function P(){return v(this,P),y(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return a(P,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var D=this.domNode.textContent;this.cachedText!==D&&((D.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(D),this.domNode.normalize(),this.attach()),this.cachedText=D)}}]),P})(w.default);_.className="ql-syntax";var N=new d.default.Attributor.Class("token","hljs",{scope:d.default.Scope.INLINE}),C=(function(S){j(P,S),a(P,null,[{key:"register",value:function(){g.default.register(N,!0),g.default.register(_,!0)}}]);function P(R,L){v(this,P);var D=y(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,R,L));if(typeof D.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var T=null;return D.quill.on(g.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(T),T=setTimeout(function(){D.highlight(),T=null},D.options.interval)}),D.highlight(),D}return a(P,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(g.default.sources.USER);var D=this.quill.getSelection();this.quill.scroll.descendants(_).forEach(function(T){T.highlight(L.options.highlight)}),this.quill.update(g.default.sources.SILENT),D!=null&&this.quill.setSelection(D,g.default.sources.SILENT)}}}]),P})(m.default);C.DEFAULTS={highlight:(function(){return window.hljs==null?null:function(S){var P=window.hljs.highlightAuto(S);return P.value}})(),interval:1e3},r.CodeBlock=_,r.CodeToken=N,r.default=C}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18">
606 <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'}),(function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.
606177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'}),(function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'}),(function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'}),(function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'}
vendor: 11,446 bytes, line 606
606),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var a=function P(R,L,D){R===null&&(R=Function.prototype);var T=Object.getOwnPropertyDescriptor(R,L);if(T===void 0){var O=Object.getPrototypeOf(R);return O===null?void 0:P(O,L,D)}else{if("value"in T)return T.value;var M=T.get;return M===void 0?void 0:M.call(D)}},o=(function(){function P(R,L){for(var D=0;D<L.length;D++){var T=L[D];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(R,T.key,T)}}return function(R,L,D){return L&&P(R.prototype,L),D&&P(R,D),R}})(),c=i(3),d=v(c),h=i(8),g=v(h),f=i(43),m=v(f),p=i(15),w=i(41),x=v(w);function v(P){return P&&P.__esModule?P:{default:P}}function y(P,R){if(!(P instanceof R))throw new TypeError("Cannot call a class as a function")}function j(P,R){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:P}function _(P,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);P.prototype=Object.create(R&&R.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(P,R):P.__proto__=R)}var N=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],C=(function(P){_(R,P);function R(L,D){y(this,R),D.modules.toolbar!=null&&D.modules.toolbar.container==null&&(D.modules.toolbar.container=N);var T=j(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,L,D));return T.quill.container.classList.add("ql-bubble"),T}return o(R,[{key:"extendToolbar",value:function(D){this.tooltip=new S(this.quill,this.options.bounds),this.tooltip.root.appendChild(D.container),this.buildButtons([].slice.call(D.container.querySelectorAll("button")),x.default),this.buildPickers([].slice.call(D.container.querySelectorAll("select")),x.default)}}]),R})(m.default);C.DEFAULTS=(0,d.default)(!0,{},m.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(R){R?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var S=(function(P){_(R,P);function R(L,D){y(this,R);var T=j(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,L,D));return T.quill.on(g.default.events.EDITOR_CHANGE,function(O,M,U,z){if(O===g.default.events.SELECTION_CHANGE)if(M!=null&&M.length>0&&z===g.default.sources.USER){T.show(),T.root.style.left="0px",T.root.style.width="",T.root.style.width=T.root.offsetWidth+"px";var H=T.quill.getLines(M.index,M.length);if(H.length===1)T.position(T.quill.getBounds(M));else{var Y=H[H.length-1],G=T.quill.getIndex(Y),$=Math.min(Y.length()-1,M.index+M.length-G),I=T.quill.getBounds(new p.Range(G,$));T.position(I)}}else document.activeElement!==T.textbox&&T.quill.hasFocus()&&T.hide()}),T}return o(R,[{key:"listen",value:function(){var D=this;a(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){D.root.classList.remove("ql-editing")}),this.quill.on(g.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!D.root.classList.contains("ql-hidden")){var T=D.quill.getSelection();T!=null&&D.position(D.quill.getBounds(T))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(D){var T=a(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"position",this).call(this,D),O=this.root.querySelector(".ql-tooltip-arrow");if(O.style.marginLeft="",T===0)return T;O.style.marginLeft=-1*T-O.offsetWidth/2+"px"}}]),R})(f.BaseTooltip);S.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=S,r.default=C}),(function(n,r,i){n.exports=i(63)})]).default})})(sh)),sh.exports}var ns,p2;function JK(){if(p2)return ns;p2=1;var e=ns&&ns.__extends||(function(){var g=function(f,m){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,w){p.__proto__=w}||function(p,w){for(var x in w)w.hasOwnProperty(x)&&(p[x]=w[x])},g(f,m)};return function(f,m){g(f,m);function p(){this.constructor=f}f.prototype=m===null?Object.create(m):(p.prototype=m.prototype,new p)}})(),t=ns&&ns.__assign||function(){return t=Object.assign||function(g){for(var f,m=1,p=arguments.length;m<p;m++){f=arguments[m];for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&(g[w]=f[w])}return g},t.apply(this,arguments)},n=ns&&ns.__spreadArrays||function(){for(var g=0,f=0,m=arguments.length;f<m;f++)g+=arguments[f].length;for(var p=Array(g),w=0,f=0;f<m;f++)for(var x=arguments[f],v=0,y=x.length;v<y;v++,w++)p[w]=x[v];return p},r=ns&&ns.__importDefault||function(g){return g&&g.__esModule?g:{default:g}},i=r(qu()),a=r(Y0()),o=r(YK()),c=r(XK()),d=(function(g){e(f,g);function f(m){var p=g.call(this,m)||this;p.dirtyProps=["modules","formats","bounds","theme","children"],p.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],p.state={generation:0},p.selection=null,p.onEditorChange=function(x,v,y,j){var _,N,C,S;x==="text-change"?(N=(_=p).onEditorChangeText)===null||N===void 0||N.call(_,p.editor.root.innerHTML,v,j,p.unprivilegedEditor):x==="selection-change"&&((S=(C=p).onEditorChangeSelection)===null||S===void 0||S.call(C,v,j,p.unprivilegedEditor))};var w=p.isControlled()?m.value:m.defaultValue;return p.value=w??"",p}return f.prototype.validateProps=function(m){var p;if(i.default.Children.count(m.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(i.default.Children.count(m.children)){var w=i.default.Children.only(m.children);if(((p=w)===null||p===void 0?void 0:p.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&m.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},f.prototype.shouldComponentUpdate=function(m,p){var w=this,x;if(this.validateProps(m),!this.editor||this.state.generation!==p.generation)return!0;if("value"in m){var v=this.getEditorContents(),y=(x=m.value,x??"");this.isEqualValue(y,v)||this.setEditorContents(this.editor,y)}return m.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,m.readOnly),n(this.cleanProps,this.dirtyProps).some(function(j){return!o.default(m[j],w.props[j])})},f.prototype.shouldComponentRegenerate=function(m){var p=this;return this.dirtyProps.some(function(w){return!o.default(m[w],p.props[w])})},f.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},f.prototype.componentWillUnmount=function(){this.destroyEditor()},f.prototype.componentDidUpdate=function(m,p){var w=this;if(this.editor&&this.shouldComponentRegenerate(m)){var x=this.editor.getContents(),v=this.editor.getSelection();this.regenerationSnapshot={delta:x,selection:v},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==p.generation){var y=this.regenerationSnapshot,x=y.delta,j=y.selection;delete this.regenerationSnapshot,this.instantiateEditor();var _=this.editor;_.setContents(x),h(function(){return w.setEditorSelection(_,j)})}},f.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},f.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},f.prototype.isControlled=function(){return"value"in this.props},f.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},f.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},f.prototype.createEditor=function(m,p){var w=new c.default(m,p);return p.tabIndex!=null&&this.setEditorTabIndex(w,p.tabIndex),this.hookEditor(w),w},f.prototype.hookEditor=function(m){this.unprivilegedEditor=this.makeUnprivilegedEditor(m),m.on("editor-change",this.onEditorChange)},f.prototype.unhookEditor=function(m){m.off("editor-change",this.onEditorChange)},f.prototype.getEditorContents=function(){return this.value},f.prototype.getEditorSelection=function(){return this.selection},f.prototype.isDelta=function(m){return m&&m.ops},f.prototype.isEqualValue=function(m,p){return this.isDelta(m)&&this.isDelta(p)?o.default(m.ops,p.ops):o.default(m,p)},f.prototype.setEditorContents=function(m,p){var w=this;this.value=p;var x=this.getEditorSelection();typeof p=="string"?m.setContents(m.clipboard.convert(p)):m.setContents(p),h(function(){return w.setEditorSelection(m,x)})},f.prototype.setEditorSelection=function(m,p){if(this.selection=p,p){var w=m.getLength();p.index=Math.max(0,Math.min(p.index,w-1)),p.length=Math.max(0,Math.min(p.length,w-1-p.index)),m.setSelection(p)}},f.prototype.setEditorTabIndex=function(m,p){var w,x;!((x=(w=m)===null||w===void 0?void 0:w.scroll)===null||x===void 0)&&x.domNode&&(m.scroll.domNode.tabIndex=p)},f.prototype.setEditorReadOnly=function(m,p){p?m.disable():m.enable()},f.prototype.makeUnprivilegedEditor=function(m){var p=m;return{getHTML:function(){return p.root.innerHTML},getLength:p.getLength.bind(p),getText:p.getText.bind(p),getContents:p.getContents.bind(p),getSelection:p.getSelection.bind(p),getBounds:p.getBounds.bind(p)}},f.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var m=a.default.findDOMNode(this.editingArea);if(!m)throw new Error("Cannot find element for editing area");if(m.nodeType===3)throw new Error("Editing area cannot be a text node");return m},f.prototype.renderEditingArea=function(){var m=this,p=this.props,w=p.children,x=p.preserveWhitespace,v=this.state.generation,y={key:v,ref:function(j){m.editingArea=j}};return i.default.Children.count(w)?i.default.cloneElement(i.default.Children.only(w),y):x?i.default.createElement("pre",t({},y)):i.default.createElement("div",t({},y))},f.prototype.render=function(){var m;return i.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(m=this.props.className,m??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},f.prototype.onEditorChangeText=function(m,p,w,x){var v,y;if(this.editor){var j=this.isDelta(this.value)?x.getContents():x.getHTML();j!==this.getEditorContents()&&(this.lastDeltaChangeSet=p,this.value=j,(y=(v=this.props).onChange)===null||y===void 0||y.call(v,m,p,w,x))}},f.prototype.onEditorChangeSelection=function(m,p,w){var x,v,y,j,_,N;if(this.editor){var C=this.getEditorSelection(),S=!C&&m,P=C&&!m;o.default(m,C)||(this.selection=m,(v=(x=this.props).onChangeSelection)===null||v===void 0||v.call(x,m,p,w),S?(j=(y=this.props).onFocus)===null||j===void 0||j.call(y,m,p,w):P&&((N=(_=this.props).onBlur)===null||N===void 0||N.call(_,C,p,w)))}}
606,f.prototype.focus=function(){this.editor&&this.editor.focus()},f.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},f.displayName="React Quill",f.Quill=c.default,f.defaultProps={theme:"snow",modules:{},readOnly:!1},f})(i.default.Component);function h(g){Promise.resolve().then(g)}return ns=d,ns}var ZK=JK();const eG=Dl(ZK);function PO({article:e}){const t=e.published_date?Yt(new Date(e.published_date),"MMMM d, yyyy"):Yt(new Date,"MMMM d, yyyy"),n=()=>{switch(e.template){case"hero":return s.jsx(g2,{article:e,publishDate:t});case"magazine":return s.jsx(tG,{article:e,publishDate:t});case"gallery":return s.jsx(nG,{article:e,publishDate:t});default:return s.jsx(g2,{article:e,publishDate:t})}};return s.jsx("div",{className:"bg-white rounded-xl overflow-hidden shadow-lg",children:n()})}function g2({article:e,publishDate:t}){var r;const n=((r=e.template_images)==null?void 0:r.hero_image)||e.main_image_url;return s.jsxs("div",{children:[s.jsxs("div",{className:"relative h-[60vh] min-h-[400px] max-h-[600px]",children:[n?s.jsx("img",{src:n,alt:e.title,className:"absolute inset-0 w-full h-full object-cover"}):s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-800 to-gray-600"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent"}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-6 md:p-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.category&&s.jsx(rt,{className:"bg-white/90 text-gray-900 font-bold mb-4",children:e.category.charAt(0).toUpperCase()+e.category.slice(1)}),s.jsx("h1",{className:"text-3xl md:text-5xl lg:text-6xl font-black text-white mb-4 leading-tight",children:e.title||"Article Title"}),e.isPreview&&s.jsx("p",{className:"text-lg md:text-xl text-white/90 max-w-2xl",children:e.excerpt||"Article excerpt will appear here..."}),s.jsxs("div",{className:"flex items-center gap-6 mt-6 text-white/80",children:[e.author&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Is,{className:"w-4 h-4"}),s.jsx("span",{children:e.author})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(an,{className:"w-4 h-4"}),s.jsx("span",{children:t})]})]})]})})]}),s.jsx("div",{className:"max-w-3xl mx-auto px-6 py-12",children:s.jsx("div",{className:"prose prose-lg max-w-none",children:e.content?s.jsx("div",{dangerouslySetInnerHTML:{__html:e.content}}):s.jsx("p",{className:"text-gray-500",children:"Full article content will appear here..."})})})]})}function tG({article:e,publishDate:t}){var i,a;const n=((i=e.template_images)==null?void 0:i.main_image)||e.main_image_url,r=(a=e.template_images)==null?void 0:a.inline_image;return s.jsxs("div",{children:[s.jsx("div",{className:"bg-gray-50 py-8 md:py-12 px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.category&&s.jsx(rt,{className:"bg-orange-100 text-orange-800 font-bold mb-4",children:e.category.charAt(0).toUpperCase()+e.category.slice(1)}),s.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-black text-gray-900 mb-4",children:e.title||"Article Title"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-gray-600",children:[e.author&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Is,{className:"w-4 h-4"}),s.jsx("span",{className:"font-medium",children:e.author})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(an,{className:"w-4 h-4"}),s.jsx("span",{children:t})]})]})]})}),s.jsx("div",{className:"max-w-6xl mx-auto px-6 py-12",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 items-start",children:[s.jsx("div",{className:"lg:sticky lg:top-6",children:n?s.jsx("img",{src:n,alt:e.title,className:"w-full rounded-xl shadow-lg"}):s.jsx("div",{className:"w-full aspect-[4/3] bg-gray-200 rounded-xl flex items-center justify-center",children:s.jsx("span",{className:"text-gray-400",children:"Main Image"})})}),s.jsxs("div",{children:[e.isPreview&&s.jsx("p",{className:"text-xl text-gray-700 font-medium mb-6 leading-relaxed border-l-4 border-orange-500 pl-4",children:e.excerpt||"Article excerpt will appear here..."}),s.jsx("div",{className:"prose prose-lg max-w-none",children:e.content?s.jsx("div",{dangerouslySetInnerHTML:{__html:e.content}}):s.jsx("p",{className:"text-gray-500",children:"Full article content will appear here..."})}),r&&s.jsx("div",{className:"mt-8",children:s.jsx("img",{src:r,alt:"Article inline",className:"w-full rounded-lg shadow-md"})})]})]})})]})}function nG({article:e,publishDate:t}){var i,a,o,c;const n=((i=e.template_images)==null?void 0:i.main_image)||e.main_image_url,r=[(a=e.template_images)==null?void 0:a.gallery_1,(o=e.template_images)==null?void 0:o.gallery_2,(c=e.template_images)==null?void 0:c.gallery_3].filter(
606Boolean);return s.jsxs("div",{children:[s.jsxs("div",{className:"grid md:grid-cols-3 gap-1",children:[s.jsx("div",{className:"md:col-span-2 md:row-span-2",children:n?s.jsx("img",{src:n,alt:e.title,className:"w-full h-64 md:h-[500px] object-cover"}):s.jsx("div",{className:"w-full h-64 md:h-[500px] bg-gray-300 flex items-center justify-center",children:s.jsx("span",{className:"text-gray-500",children:"Lead Image"})})}),r.length>0?r.slice(0,2).map((d,h)=>s.jsx("div",{className:"hidden md:block",children:s.jsx("img",{src:d,alt:`Gallery ${h+1}`,className:"w-full h-[248px] object-cover"})},h)):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"hidden md:flex w-full h-[248px] bg-gray-200 items-center justify-center",children:s.jsx("span",{className:"text-gray-400 text-sm",children:"Gallery 1"})}),s.jsx("div",{className:"hidden md:flex w-full h-[248px] bg-gray-200 items-center justify-center",children:s.jsx("span",{className:"text-gray-400 text-sm",children:"Gallery 2"})})]})]}),s.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-12",children:[s.jsxs("div",{className:"mb-8",children:[e.category&&s.jsx(rt,{className:"bg-purple-100 text-purple-800 font-bold mb-4",children:e.category.charAt(0).toUpperCase()+e.category.slice(1)}),s.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-black text-gray-900 mb-4",children:e.title||"Article Title"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-gray-600",children:[e.author&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Is,{className:"w-4 h-4"}),s.jsx("span",{className:"font-medium",children:e.author})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(an,{className:"w-4 h-4"}),s.jsx("span",{children:t})]})]})]}),e.isPreview&&s.jsx("p",{className:"text-xl text-gray-700 font-medium mb-8 leading-relaxed",children:e.excerpt||"Article excerpt will appear here..."}),s.jsx("div",{className:"prose prose-lg max-w-none",children:e.content?s.jsx("div",{dangerouslySetInnerHTML:{__html:e.content}}):s.jsx("p",{className:"text-gray-500",children:"Full article content will appear here..."})}),r.length>2&&s.jsxs("div",{className:"mt-12",children:[s.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"More Photos"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:r.slice(2).map((d,h)=>s.jsx("img",{src:d,alt:`Additional ${h+1}`,className:"w-full h-40 object-cover rounded-lg"},h))})]}),r.length>0&&s.jsxs("div",{className:"md:hidden mt-8",children:[s.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Photo Gallery"}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:r.map((d,h)=>s.jsx("img",{src:d,alt:`Gallery ${h+1}`,className:"w-full h-32 object-cover rounded-lg"},h))})]})]})]})}const y2=[{id:"hero",name:"Hero Feature",description:"Full-width hero image with overlay text. Best for major stories.",imageSlots:[{id:"hero_image",label:"Hero Image",required:!0,description:"Main hero image (recommended: 1920x1080)"}]},{id:"magazine",name:"Magazine Style",description:"Side-by-side layout with image and text. Professional editorial look.",imageSlots:[{id:"main_image",label:"Main Image",required:!0,description:"Primary article image (recommended: 800x600)"},{id:"inline_image",label:"Inline Image",required:!1,description:"Secondary image for article body"}]},{id:"gallery",name:"Photo Gallery",description:"Multiple images with story. Perfect for event coverage.",imageSlots:[{id:"main_image",label:"Lead Image",required:!0,description:"Primary featured image"},{id:"gallery_1",label:"Gallery Image 1",required:!1,description:"Additional photo"},{id:"gallery_2",label:"Gallery Image 2",required:!1,description:"Additional photo"},{id:"gallery_3",label:"Gallery Image 3",required:!1,description:"Additional photo"}]},{id:"immersive",name:"Immersive Story",description:"Full-screen images with text overlays. Modern and engaging.",imageSlots:[{id:"main_image",label:"Hero Image",required:!0,description:"Opening full-screen image"},{id:"immersive_1",label:"Section Image 1",required:!1,description:"First story section image"},{id:"immersive_2",label:"Section Image 2",required:!1,description:"Second story section image"},{id:"immersive_3",label:"Section Image 3",required:!1,description:"Third story section image"},{id:"immersive_4",label:"Section Image 4",required:!1,description:"Fourth story section image"}]},{id:"grid_story",name:"Grid Story",description:"Modern grid layout with images and text blocks.",imageSlots:[{id:"main_image",label:"Hero Image",required:!0,description:"Main featured image"},{id:"grid_1",label:"Grid Image 1",required:!1,description:"Sidebar image 1"},{id:"grid_2",label:"Grid Image 2",required:!1,description:"Sidebar image 2"},{id:"grid_3",label:"Grid Image 3",required:!1,description:"Sidebar image 3"},{id:"grid_4",label:"Grid Image 4",required:!1,description:"Sidebar image 4"},{id:"grid_5",label:"Grid Image 5",required:!1,description:"Sidebar image 5"}]},{id:"business_showcase",name:"Business Showcase",description:"Feature up to 5 local businesses with 2 images each.",imageSlots:[{id:"main_image",label:"Hero Banner",required:!0,description:"Main showcase banner image"}],isBusinessShowcase:!0}],rG=["community","business","development","safety","environment","transport","education","events","lifestyle","other"];function sG({onClose:e,editArticle:t=null}){var C;const n=dn(),[r,i]=E.useState(t?2:1),[a,o]=E.useState(!1),[c,d]=E.useState({}
606),[h,g]=E.useState({title:(t==null?void 0:t.title)||"",excerpt:(t==null?void 0:t.excerpt)||"",content:(t==null?void 0:t.content)||"",category:(t==null?void 0:t.category)||"",author:(t==null?void 0:t.author)||"This is Randburg Team",featured:(t==null?void 0:t.featured)||!1,published_date:t!=null&&t.published_date?new Date(t.published_date).toISOString().slice(0,16):"",status:(t==null?void 0:t.status)||"published",template:(t==null?void 0:t.template)||"hero",template_images:(t==null?void 0:t.template_images)||{},main_image_url:(t==null?void 0:t.main_image_url)||"",additional_image_urls:(t==null?void 0:t.additional_image_urls)||[],business_entries:(t==null?void 0:t.business_entries)||[],tags:(t==null?void 0:t.tags)||[]}),[f,m]=E.useState(((C=t==null?void 0:t.business_entries)==null?void 0:C.length)>0?t.business_entries:[{name:"",description:"",website:"",image_1:"",image_2:""}]),p=y2.find(S=>S.id===h.template),w=Ct({mutationFn:S=>ie.entities.NewsArticle.create(S),onSuccess:()=>{n.invalidateQueries({queryKey:["allNews"]}),e(!0)}}),x=Ct({mutationFn:({id:S,data:P})=>ie.entities.NewsArticle.update(S,P),onSuccess:()=>{n.invalidateQueries({queryKey:["allNews"]}),e(!0)}}),v=(S,P)=>g(R=>({...R,[S]:P})),y=async(S,P)=>{const R=P.target.files[0];if(!R)return;d(D=>({...D,[S]:!0}));const L=await ie.integrations.Core.UploadFile({file:R});if((S==="hero_image"||S==="main_image")&&v("main_image_url",L.file_url),v("template_images",{...h.template_images,[S]:L.file_url}),S.startsWith("gallery_")){const D=h.additional_image_urls||[];v("additional_image_urls",[...D,L.file_url])}S==="inline_image"&&v("additional_image_urls",[L.file_url]),d(D=>({...D,[S]:!1}))},j=S=>{const P={...h.template_images};delete P[S],v("template_images",P),(S==="hero_image"||S==="main_image")&&v("main_image_url","")},_=S=>{const P={...h,status:S||h.status,published_date:h.published_date?new Date(h.published_date).toISOString():new Date().toISOString()};p!=null&&p.isBusinessShowcase&&(P.business_entries=f.filter(R=>R.name&&R.description)),t?x.mutate({id:t.id,data:P}):w.mutate(P)},N=w.isPending||x.isPending;return a?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(ge,{variant:"outline",onClick:()=>o(!1),children:[s.jsx(fr,{className:"w-4 h-4 mr-2"}),"Back to Editor"]}),s.jsx("span",{className:"text-sm text-gray-500",children:"Preview Mode"})]}),s.jsx(PO,{article:{...h,isPreview:!0}})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(ge,{variant:"outline",onClick:()=>e(!1),children:[s.jsx(fr,{className:"w-4 h-4 mr-2"}),"Cancel"]}),s.jsx("div",{className:"flex gap-2",children:s.jsxs(ge,{variant:"outline",onClick:()=>o(!0),children:[s.jsx(zu,{className:"w-4 h-4 mr-2"}),"Preview"]})})]}),r===1&&s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsxs(En,{className:"flex items-center gap-2",children:[s.jsx(MI,{className:"w-5 h-5"}),"Choose a Template"]})}),s.jsxs(Rt,{children:[s.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:y2.map(S=>s.jsxs("div",{onClick:()=>v("template",S.id),className:`border-2 rounded-lg p-4 cursor-pointer transition-all ${h.template===S.id?"border-blue-600 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,children:[s.jsxs("div",{className:"mb-3",children:[S.id==="hero"&&s.jsx("div",{className:"h-24 bg-gradient-to-br from-gray-800 to-gray-600 rounded flex items-end p-2",children:s.jsx("div",{className:"bg-white/90 h-6 w-3/4 rounded"})}),S.id==="magazine"&&s.jsxs("div",{className:"h-24 flex gap-2",children:[s.jsx("div",{className:"w-1/2 bg-gray-300 rounded"}),s.jsxs("div",{className:"w-1/2 space-y-1 py-1",children:[s.jsx("div",{className:"h-3 bg-gray-800 rounded w-full"}),s.jsx("div",{className:"h-2 bg-gray-400 rounded w-3/4"}),s.jsx("div",{className:"h-2 bg-gray-300 rounded w-full"})]})]}),S.id==="gallery"&&s.jsxs("div",{className:"h-24 grid grid-cols-3 gap-1",children:[s.jsx("div",{className:"col-span-2 row-span-2 bg-gray-400 rounded"}),s.jsx("div",{className:"bg-gray-300 rounded"}),s.jsx("div",{className:"bg-gray-300 rounded"})]}),S.id==="immersive"&&s.jsx("div",{className:"h-24 bg-gradient-to-br from-blue-600 to-purple-600 rounded flex items-center justify-center",children:s.jsx("div",{className:"text-white text-xs font-bold",children:"IMMERSIVE"})}),S.id==="grid_story"&&s.jsxs("div",{className:"h-24 grid grid-cols-4 gap-1",children:[s.jsx("div",{className:"col-span-3 bg-gray-400 rounded"}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"h-4 bg-gray-300 rounded"}),s.jsx("div",{className:"h-4 bg-gray-300 rounded"}),s.jsx("div",{className:"h-4 bg-gray-300 rounded"})]})]}),S.id==="business_showcase"&&s.jsxs("div",{className:"h-24 space-y-1",children:[s.jsx("div",{className:"h-4 bg-gradient-to-r from-purple-500 to-blue-500 rounded"}),s.jsxs("div",{className:"grid grid-cols-2 gap-1 flex-1",children:[s.jsx("div",{className:"h-4 bg-gray-300 rounded"}),s.jsx("div",{className:"h-4 bg-gray-300 rounded"})]})]})]}),s.jsx("h3",{className:"font-bold text-gray-900",children:S.name}),s.jsx("p",{className:"text-sm text-gray-600 mt-1",children:S.description})]},S.id))}),s.jsx("div",{className:"mt-6 flex justify-end",children:s.jsx(ge,{onClick:()=>i(2),disabled:!h.template,children:"Continue"})})]})]}),r===2&&s.jsxs("div",{className:"grid lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsx(En,{children:"Article Content"})}),s.jsxs(Rt,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"title",children:"Title *"}),s.jsx(de,{id:"title",value:h.title,onChange:S=>v("title",S.target.value),placeholder:"Enter a compelling headline...",className:"text-lg"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"excerpt",children:"Excerpt *"}),s.jsx(un,{id:"excerpt",value:h.excerpt,onChange:S=>v("excerpt",S.target.value),placeholder:"A brief summary that appears in article previews...",rows:3})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"content",children:"Full Article *"}),s.jsx(eG,{theme:"snow",value:h.content,onChange:S=>v("content",S),placeholder:"Write your full article here...",modules:{toolbar:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],[{align:[]}],["blockquote","code-block"],["link"],[{color:[]},{background:[]}],["clean"]]},className:"bg-white",style:{height:"300px",marginBottom:"50px"}})]})]})]}),s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsxs(En,{className:"flex items-center gap-2",children:[s.jsx(TI,{className:"w-5 h-5"}),"Images for ",p==null?void 0:p.name]})}),s.jsx(Rt,{children:s.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:p==null?void 0:p.imageSlots.map(S=>s.jsxs("div",{className:"space-y-2",children:[s.jsxs(ee,{className:"flex items-center gap-1",children:[S.label,S.required&&s.jsx("span",{className:"text-red-500",children:"*"})]}),s.jsx("p",{className:"text-xs text-gray-500",children:S.description}),h.template_images[S.id]?s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:h.template_images[S.id],alt:S.label,className:"w-full h-40 object-cover rounded-lg"}),s.jsx("button",{type:"button",onClick:()=>j(S.id),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-4 h-4"})})]}
606):s.jsxs("div",{children:[s.jsx("input",{type:"file",id:`image-${S.id}`,accept:"image/*",onChange:P=>y(S.id,P),className:"hidden"}),s.jsx("label",{htmlFor:`image-${S.id}`,children:s.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",children:c[S.id]?s.jsx(Ke,{className:"w-8 h-8 text-gray-400 mx-auto animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsx(li,{className:"w-8 h-8 text-gray-400 mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Click to upload"})]})})})]})]},S.id))})})]}),(p==null?void 0:p.isBusinessShowcase)&&s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsx(En,{children:"Featured Businesses (up to 5)"})}),s.jsx(Rt,{children:s.jsxs("div",{className:"space-y-6",children:[f.map((S,P)=>s.jsxs(Ge,{className:"p-4 bg-gray-50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("h4",{className:"font-semibold",children:["Business ",P+1]}),f.length>1&&s.jsx(ge,{variant:"ghost",size:"sm",onClick:()=>m(f.filter((R,L)=>L!==P)),children:"Remove"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(de,{placeholder:"Business Name *",value:S.name,onChange:R=>{const L=[...f];L[P].name=R.target.value,m(L)}}),s.jsx(un,{placeholder:"Business Description *",value:S.description,onChange:R=>{const L=[...f];L[P].description=R.target.value,m(L)},className:"h-24"}),s.jsx(de,{placeholder:"Website URL (optional)",value:S.website,onChange:R=>{const L=[...f];L[P].website=R.target.value,m(L)}}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(ee,{className:"mb-2 block text-sm",children:"Image 1 *"}),S.image_1?s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:S.image_1,className:"w-full h-32 object-cover rounded"}),s.jsx("button",{type:"button",onClick:()=>{const R=[...f];R[P].image_1="",m(R)},className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-3 h-3"})})]}):s.jsxs("div",{children:[s.jsx("input",{type:"file",id:`biz-img1-${P}`,accept:"image/*",className:"hidden",onChange:async R=>{const L=R.target.files[0];if(L){d(O=>({...O,[`biz-img1-${P}`]:!0}));const{file_url:D}=await ie.integrations.Core.UploadFile({file:L}),T=[...f];T[P].image_1=D,m(T),d(O=>({...O,[`biz-img1-${P}`]:!1}))}}}),s.jsx("label",{htmlFor:`biz-img1-${P}`,children:s.jsx("div",{className:"border-2 border-dashed rounded p-4 text-center cursor-pointer hover:border-gray-400",children:c[`biz-img1-${P}`]?s.jsx(Ke,{className:"w-6 h-6 mx-auto animate-spin text-gray-400"}):s.jsxs(s.Fragment,{children:[s.jsx(li,{className:"w-6 h-6 mx-auto text-gray-400 mb-1"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Upload"})]})})})]})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"mb-2 block text-sm",children:"Image 2 *"}),S.image_2?s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:S.image_2,className:"w-full h-32 object-cover rounded"}),s.jsx("button",{type:"button",onClick:()=>{const R=[...f];R[P].image_2="",m(R)},className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-3 h-3"})})]}):s.jsxs("div",{children:[s.jsx("input",{type:"file",id:`biz-img2-${P}`,accept:"image/*",className:"hidden",onChange:async R=>{const L=R.target.files[0];if(L){d(O=>({...O,[`biz-img2-${P}`]:!0}));const{file_url:D}=await ie.integrations.Core.UploadFile({file:L}),T=[...f];T[P].image_2=D,m(T),d(O=>({...O,[`biz-img2-${P}`]:!1}))}}}),s.jsx("label",{htmlFor:`biz-img2-${P}`,children:s.jsx("div",{className:"border-2 border-dashed rounded p-4 text-center cursor-pointer hover:border-gray-400",children:c[`biz-img2-${P}`]?s.jsx(Ke,{className:"w-6 h-6 mx-auto animate-spin text-gray-400"}):s.jsxs(s.Fragment,{children:[s.jsx(li,{className:"w-6 h-6 mx-auto text-gray-400 mb-1"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Upload"})]})})})]})]})]})]})]},P)),f.length<5&&s.jsx(ge,{variant:"outline",onClick:()=>m([...f,{name:"",description:"",website:"",image_1:"",image_2:""}]),className:"w-full",children:"+ Add Another Business"})]})})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsx(En,{children:"Settings"})}),s.jsxs(Rt,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Category *"}),s.jsxs(pt,{value:h.category,onValueChange:S=>v("category",S),children:[s.jsx(dt,{children:s.jsx(gt,{placeholder:"Select category"})}),s.jsx(ft,{children:rG.map(S=>s.jsx(Ae,{value:S,children:S.charAt(0).toUpperCase()+S.slice(1)},S))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Author"}),s.jsx(de,{value:h.author,onChange:S=>v("author",S.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Publication Date"}),s.jsx(de,{type:"datetime-local",value:h.published_date,onChange:S=>v("published_date",S.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Status"}),s.jsxs(pt,{value:h.status,onValueChange:S=>v("status",S),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"published",children:"Published"}),s.jsx(Ae,{value:"draft",children:"Draft"})]})]})]}),s.jsxs("div",{className:"flex items-center space-x-2 pt-2",children:[s.jsx(Ub,{id:"featured",checked:h.featured,onCheckedChange:S=>v("featured",S)}),s.jsx(ee,{htmlFor:"featured",children:"Featured Article"})]})]})]}),s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsx(En,{children:"Discoverability Tags"})}),s.jsxs(Rt,{children:[s.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"Tags help this story appear on mood & intention collection pages."}),s.jsx(ma,{tags:h.tags,onChange:S=>
606v("tags",S),context:{name:h.title,description:h.excerpt,category:h.category,content:h.content},entityType:"news_article"})]})]}),s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsx(En,{children:"Template"})}),s.jsxs(Rt,{children:[s.jsxs("p",{className:"text-sm text-gray-600 mb-3",children:["Using: ",s.jsx("strong",{children:p==null?void 0:p.name})]}),s.jsx(ge,{variant:"outline",className:"w-full",onClick:()=>i(1),children:"Change Template"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ge,{className:"w-full",size:"lg",onClick:()=>_("published"),disabled:N||!h.title||!h.content||!h.category,children:N?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),t?"Updating...":"Publishing..."]}):t?"Update & Publish":"Publish Article"}),s.jsx(ge,{variant:"outline",className:"w-full",size:"lg",onClick:()=>_("draft"),disabled:N||!h.title||!h.content||!h.category,children:N?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):t?"Save as Draft":"Save Draft"})]})]})]})]})}function iG(){const e=dn(),[t,n]=E.useState(""),[r,i]=E.useState(!1),[a,o]=E.useState(null),[c,d]=E.useState(!1),{data:h,isLoading:g}=De({queryKey:["allNews"],queryFn:()=>ie.entities.NewsArticle.list("-published_date"),initialData:[]}),f=Ct({mutationFn:({id:j,data:_})=>ie.entities.NewsArticle.update(j,_),onSuccess:()=>e.invalidateQueries({queryKey:["allNews"]})}),m=Ct({mutationFn:j=>ie.entities.NewsArticle.delete(j),onSuccess:()=>e.invalidateQueries({queryKey:["allNews"]})}),p=j=>f.mutate({id:j.id,data:{featured:!j.featured}}),w=j=>{window.confirm("Are you sure you want to delete this article?")&&m.mutate(j)},x=j=>{i(!1),o(null),j&&(d(!0),setTimeout(()=>d(!1),3e3))},v=j=>{o(j),i(!0)},y=h.filter(j=>j.title.toLowerCase().includes(t.toLowerCase()));return r?s.jsx(sG,{onClose:x,editArticle:a}):s.jsxs("div",{className:"space-y-8",children:[c&&s.jsxs(ya,{className:"bg-green-50 border-green-200",children:[s.jsx(go,{children:"Success!"}),s.jsx(xa,{children:"The news article has been saved."})]}),s.jsxs(Ge,{children:[s.jsxs(Cn,{children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs(En,{children:["Manage News Articles (",h.length,")"]}),s.jsxs(ge,{onClick:()=>i(!0),children:[s.jsx(Cr,{className:"w-4 h-4 mr-2"}),"Write Article"]})]}),s.jsxs("div",{className:"relative mt-4",children:[s.jsx(us,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),s.jsx(de,{placeholder:"Filter by title...",value:t,onChange:j=>n(j.target.value),className:"pl-10"})]})]}),s.jsx(Rt,{children:s.jsxs(hm,{children:[s.jsx(mm,{children:s.jsxs(Ps,{children:[s.jsx(Hn,{children:"Title"}),s.jsx(Hn,{children:"Date"}),s.jsx(Hn,{children:"Featured"}),s.jsx(Hn,{className:"text-right",children:"Actions"})]})}),s.jsx(pm,{children:g?s.jsx(Ps,{children:s.jsx(bn,{colSpan:4,className:"text-center",children:s.jsx(Ke,{className:"mx-auto animate-spin"})})}):y.length===0?s.jsx(Ps,{children:s.jsx(bn,{colSpan:4,className:"text-center text-gray-500",children:'No articles found. Click "Add New Article" to create one.'})}):y.map(j=>s.jsxs(Ps,{children:[s.jsx(bn,{className:"font-medium",children:j.title}),s.jsx(bn,{children:j.published_date?Yt(new Date(j.published_date),"MMM d, yyyy"):"N/A"}),s.jsx(bn,{children:s.jsx(ge,{variant:"ghost",size:"sm",onClick:()=>p(j),children:j.featured?s.jsx(v6,{className:"w-6 h-6 text-green-600"}):s.jsx(y6,{className:"w-6 h-6 text-gray-400"})})}),s.jsxs(bn,{className:"text-right space-x-2",children:[s.jsx(ge,{variant:"outline",size:"icon",onClick:()=>v(j),children:s.jsx(X0,{className:"w-4 h-4"})}),s.jsx(ge,{variant:"destructive",size:"icon",onClick:()=>w(j.id),children:s.jsx(oT,{className:"w-4 h-4"})})]})]},j.id))})]})})]})]})}function aG(){const e=dn(),[t,n]=E.useState(!1),[r,i]=E.useState(null),[a,o]=E.useState({code:"",description:"",discount_type:"percentage",discount_value:0,applicable_packages:[],usage_limit:1,expiry_date:"",active:!0}),{data:c,isLoading:d}=De({queryKey:["coupons"],queryFn:()=>ie.entities.Coupon.list("-created_date"),initialData:[]}),{data:h=[]}=De({queryKey:["all-commercial-requests"],queryFn:()=>ie.entities.CommercialRequest.list()}),g=_=>h.filter(N=>N.coupon_code===_&&N.status==="approved").length,f=Ct({mutationFn:_=>ie.entities.Coupon.create(_),onSuccess:()=>
606{e.invalidateQueries({queryKey:["coupons"]}),w()}}),m=Ct({mutationFn:({id:_,data:N})=>ie.entities.Coupon.update(_,N),onSuccess:()=>{e.invalidateQueries({queryKey:["coupons"]}),w()}}),p=Ct({mutationFn:_=>ie.entities.Coupon.delete(_),onSuccess:()=>{e.invalidateQueries({queryKey:["coupons"]})}}),w=()=>{o({code:"",description:"",discount_type:"percentage",discount_value:0,applicable_packages:[],usage_limit:1,expiry_date:"",active:!0}),n(!1),i(null)},x=_=>{i(_),o({code:_.code,description:_.description||"",discount_type:_.discount_type,discount_value:_.discount_value||0,applicable_packages:_.applicable_packages||[],usage_limit:_.usage_limit,expiry_date:_.expiry_date||"",active:_.active}),n(!0)},v=_=>{_.preventDefault(),r?m.mutate({id:r.id,data:a}):f.mutate({...a,times_used:0})},y=_=>{confirm("Are you sure you want to delete this coupon?")&&p.mutate(_)},j=_=>_.discount_type==="free"?"FREE":_.discount_type==="percentage"?`${_.discount_value}% OFF`:`R${_.discount_value} OFF`;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Coupon Management"}),s.jsx("p",{className:"text-gray-600",children:"Create and manage discount coupons"})]}),s.jsxs(ge,{onClick:()=>n(!t),children:[t?s.jsx(kt,{className:"w-4 h-4 mr-2"}):s.jsx(Cr,{className:"w-4 h-4 mr-2"}),t?"Cancel":"Add Coupon"]})]}),t&&s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsx(En,{children:r?"Edit Coupon":"Create New Coupon"})}),s.jsx(Rt,{children:s.jsxs("form",{onSubmit:v,className:"space-y-4",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"code",children:"Coupon Code *"}),s.jsx(de,{id:"code",value:a.code,onChange:_=>o({...a,code:_.target.value.toUpperCase()}),placeholder:"e.g., LAUNCH2024",required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"usage_limit",children:"Usage Limit *"}),s.jsx(de,{id:"usage_limit",type:"number",min:"1",value:a.usage_limit,onChange:_=>o({...a,usage_limit:parseInt(_.target.value)}),required:!0})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"description",children:"Description"}),s.jsx(un,{id:"description",value:a.description,onChange:_=>o({...a,description:_.target.value}),placeholder:"Internal notes about this coupon",rows:2})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"applicable_packages",children:"Applicable Packages *"}),s.jsx("div",{className:"space-y-2 mt-2",children:["1_business","2_businesses","4_businesses"].map(_=>s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Ub,{id:_,checked:a.applicable_packages.includes(_),onCheckedChange:N=>{o(N?{...a,applicable_packages:[...a.applicable_packages,_]}:{...a,applicable_packages:a.applicable_packages.filter(C=>C!==_)})}}),s.jsx(ee,{htmlFor:_,className:"cursor-pointer",children:_==="1_business"?"1 Business":_==="2_businesses"?"2 Businesses":"4 Businesses"})]},_))})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"discount_type",children:"Discount Type"}),s.jsxs(pt,{value:a.discount_type,onValueChange:_=>o({...a,discount_type:_}),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"percentage",children:"Percentage Off"}),s.jsx(Ae,{value:"fixed_amount",children:"Fixed Amount Off"}),s.jsx(Ae,{value:"free",children:"Free (100% Off)"})]})]})]}),a.discount_type!=="free"&&s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"discount_value",children:a.discount_type==="percentage"?"Percentage":"Amount (R)"}),s.jsx(de,{id:"discount_value",type:"number",min:"0",max:a.discount_type==="percentage"?100:void 0,value:a.discount_value,onChange:_=>o({...a,discount_value:parseFloat(_.target.value)})})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"expiry_date",children:"Expiry Date (Optional)"}),s.jsx(de,{id:"expiry_date",type:"date",value:a.expiry_date,onChange:_=>o({...a,expiry_date:_.target.value})})]}),s.jsxs("div",{className:"flex items-center space-x-2 pt-7",children:[s.jsx(Vs,{id:"active",checked:a.active,onCheckedChange:_=>o({...a,active:_})}),s.jsx(ee,{htmlFor:"active",children:"Active"})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[s.jsx(ge,{type:"button",variant:"outline",onClick:w,children:"Cancel"}),s.jsx(ge,{type:"submit",disabled:f.isPending||m.isPending,children:r?"Update Coupon":"Create Coupon"})]})]})})]}),d?s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-500",children:"Loading coupons..."})}):c.length===0?s.jsx(Ge,{children:s.jsxs(Rt,{className:"py-12 text-center",children:[s.jsx(ch,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),s.jsx("p",{className:"text-gray-500",children:"No coupons created yet"})]})}):s.jsx("div",{className:"grid gap-4",children:c.map(_=>{var P;const N=_.expiry_date&&new Date(_.expiry_date)<new Date,C=_.times_used>=_.usage_limit,S=_.active&&!N&&!C;return s.jsx(Ge,{children:s.jsx(Rt,{className:"p-6",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("h3",{className:"text-xl font-bold text-gray-900",children:_.code}),S?s.jsx(rt,{className:"bg-green-100 text-green-800",children:"Active"}):s.jsx(rt,{variant:"secondary",children:_.active?N?"Expired":"Used Up":"Inactive"}),s.jsx(rt,{className:"bg-blue-100 text-blue-800",children:j(_)})]}),_.description&&s.jsx("p",{className:"text-gray-600 mb-3",children:_.description}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Usage:"}),s.jsxs("p",{className:"font-semibold",children:[g(_.code)," / ",_.usage_limit]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"For Packages:"}),s.jsx("p",{className:"font-semibold text-xs",children:((P=_.applicable_packages)==null?void 0:P.map(R=>R==="1_business"?"1 Bus":R==="2_businesses"?"2 Bus":"4 Bus").join(", "))||"All"})]}),_.expiry_date&&s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Expires:"}),s.jsx("p",{className:"font-semibold",children:Yt(new Date(_.expiry_date),"MMM d, yyyy")})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500",children:"Created:"}),s.jsx("p",{className:"font-semibold",children:Yt(new Date(_.created_date),"MMM d, yyyy")})]})]})]}),s.jsxs("div",{className:"flex gap-2 ml-4",children:[s.jsx(ge,{variant:"outline",size:"icon",onClick:()=>x(_),children:s.jsx(X0,{className:"w-4 h-4"})}),s.jsx(ge,{variant:"outline",size:"icon",onClick:()=>y(_.id),className:"text-red-600 hover:text-red-700",children:s.jsx(Us,{className:"w-4 h-4"})})]})]})})},_.id)})})]})}const oG={restaurant:"Restaurant",cafe:"Café",bar_lounge:"Bar/Lounge",retail:"Retail",services:"Services",healthcare:"Healthcare",education:"Education",entertainment:"Entertainment",fitness:"Fitness",beauty:"Beauty",spa_wellness:"Spa & Wellness",professional:"Professional Services",automotive:"Automotive",home_services:"Home Services",real_estate:"Real Estate",hospital
606ity:"Hospitality",pet_services:"Pet Services",technology:"Technology",financial_services:"Financial Services",other:"Other"};function lG(){const e=dn(),[t,n]=E.useState(null),[r,i]=E.useState("all"),{data:a=[],isLoading:o}=De({queryKey:["business-shoutouts"],queryFn:()=>ie.entities.BusinessShoutout.list("-submission_date")}),c=Ct({mutationFn:({id:p,data:w})=>ie.entities.BusinessShoutout.update(p,w),onSuccess:()=>{e.invalidateQueries({queryKey:["business-shoutouts"]})}}),d=Ct({mutationFn:p=>ie.entities.BusinessShoutout.delete(p),onSuccess:()=>{e.invalidateQueries({queryKey:["business-shoutouts"]})}}),h=(p,w)=>{const x={status:w};w==="featured"&&!p.featured_date&&(x.featured_date=new Date().toISOString()),c.mutate({id:p.id,data:x})},g=p=>{confirm("Delete this shoutout submission?")&&d.mutate(p)},f=r==="all"?a:a.filter(p=>p.status===r),m={new:"bg-blue-100 text-blue-800",contacted:"bg-yellow-100 text-yellow-800",featured:"bg-green-100 text-green-800",declined:"bg-gray-100 text-gray-800"};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Business Shoutout Submissions"}),s.jsx("p",{className:"text-gray-600",children:"Manage feature requests from local businesses"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{className:"text-sm text-gray-600",children:"Filter:"}),s.jsxs(pt,{value:r,onValueChange:i,children:[s.jsx(dt,{className:"w-32",children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Status"}),s.jsx(Ae,{value:"new",children:"New"}),s.jsx(Ae,{value:"contacted",children:"Contacted"}),s.jsx(Ae,{value:"featured",children:"Featured"}),s.jsx(Ae,{value:"declined",children:"Declined"})]})]})]})]}),o?s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-500",children:"Loading submissions..."})}):f.length===0?s.jsx(Ge,{children:s.jsxs(Rt,{className:"py-12 text-center",children:[s.jsx(nT,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),s.jsx("p",{className:"text-gray-500",children:"No shoutout submissions yet"})]})}):s.jsx("div",{className:"grid gap-4",children:f.map(p=>s.jsx(Ge,{children:s.jsxs(Rt,{className:"p-6",children:[s.jsxs("div",{className:"flex items-start justify-between mb-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("h3",{className:"text-xl font-bold text-gray-900",children:p.business_name}),s.jsx(rt,{className:m[p.status],children:p.status}),s.jsx(rt,{variant:"outline",children:oG[p.category]})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-2 text-sm text-gray-600",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Contact:"})," ",p.contact_name]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Email:"})," ",p.email]}),p.phone&&s.jsxs("p",{children:[s.jsx("strong",{children:"Phone:"})," ",p.phone]}),p.website&&s.jsxs("p",{children:[s.jsx("strong",{children:"Website:"})," ",s.jsx("a",{href:p.website,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:p.website})]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Submitted:"})," ",Yt(new Date(p.submission_date),"MMM d, yyyy")]})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ge,{variant:"outline",size:"icon",onClick:()=>n(t===p.id?null:p.id),children:t===p.id?s.jsx(yI,{className:"w-4 h-4"}):s.jsx(zu,{className:"w-4 h-4"})}),s.jsx(ge,{variant:"outline",size:"icon",onClick:()=>g(p.id),className:"text-red-600 hover:text-red-700",children:s.jsx(Us,{className:"w-4 h-4"})})]})]}),t===p.id&&s.jsxs("div",{className:"border-t pt-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx(ee,{className:"text-sm font-semibold text-gray-700",children:"What Makes Them Special:"}),s.jsx("p",{className:"text-gray-600 mt-1",children:p.description})]}),p.why_feature&&s.jsxs("div",{children:[s.jsx(ee,{className:"text-sm font-semibold text-gray-700",children:"Why They Want to Be Featured:"}),s.jsx("p",{className:"text-gray-600 mt-1",children:p.why_feature})]}),p.image_urls&&p.image_urls.length>0&&s.jsxs("div",{children:[s.jsx(ee,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:"Submitted Images:"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:p.image_urls.map((w,x)=>s.jsx("a",{href:w,target:"_blank",rel:"noopener noreferrer",children:s.jsx("img",{src:w,alt:`${p.business_name} ${x+1}`,className:"w-full h-32 object-cover rounded-lg border hover:opacity-90 transition-opacity"})},x))})]}),p.featured_date&&s.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3",children:s.jsxs("p",{className:"text-sm text-green-800",children:[s.jsx("strong",{children:"Featured on:"})," ",Yt(new Date(p.featured_date),"MMMM d, yyyy")]})}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:`status-${p.id}`,className:"text-sm font-semibold text-gray-700",children:"Update Status:"}),s.jsxs(pt,{value:p.status,onValueChange:w=>h(p,w),children:[s.jsx(dt,{className:"mt-1",children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"new",children:"New"}),s.jsx(Ae,{value:"contacted",children:"Contacted"}),s.jsx(Ae,{value:"featured",children:"Featured"}),s.jsx(Ae,{value:"declined",children:"Declined"})]})]})]})]})]})},p.id))})]})}function Ot({className:e,...t}){return s.jsx("div",{className:He("animate-pulse rounded-md bg-primary/10",e),...t})}function cG(){const{data:e,isLoading:t}=De({queryKey:["businesses-all"],queryFn:()=>ie.entities.Business.list("name"),initialData:[]}),{data:n,isLoading:r}=De({queryKey:["business-views"],queryFn:()=>ie.entities.BusinessView.list("-created_date",1e4),initialData:[]}),i=E.useMemo(()=>{const d={};return e.forEach(h=>{d[h.id]={id:h.id,name:h.name,category:h.category,suburb:h.suburb,featured:h.featured,views:0,
606clicks:0,uniqueViewers:new Set}}),n.forEach(h=>{d[h.business_id]&&(h.event_type==="view"?d[h.business_id].views++:h.event_type==="click"&&d[h.business_id].clicks++,h.user_email&&d[h.business_id].uniqueViewers.add(h.user_email))}),Object.values(d).map(h=>({...h,uniqueViewers:h.uniqueViewers.size,clickRate:h.views>0?(h.clicks/h.views*100).toFixed(1):"0.0"})).sort((h,g)=>g.views-h.views)},[e,n]),a=n.filter(d=>d.event_type==="view").length,o=n.filter(d=>d.event_type==="click").length,c=a>0?(o/a*100).toFixed(1):"0.0";return t||r?s.jsxs("div",{className:"space-y-4",children:[s.jsx(Ot,{className:"h-32 w-full"}),s.jsx(Ot,{className:"h-96 w-full"})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(Ge,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600 mb-1",children:"Total Listing Views"}),s.jsx("p",{className:"text-3xl font-black text-gray-900",children:a.toLocaleString()})]}),s.jsx(zu,{className:"w-10 h-10 text-blue-500"})]})}),s.jsx(Ge,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600 mb-1",children:"Total Clicks"}),s.jsx("p",{className:"text-3xl font-black text-gray-900",children:o.toLocaleString()})]}),s.jsx(HI,{className:"w-10 h-10 text-green-500"})]})}),s.jsx(Ge,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-600 mb-1",children:"Overall Click Rate"}),s.jsxs("p",{className:"text-3xl font-black text-gray-900",children:[c,"%"]})]}),s.jsx(N6,{className:"w-10 h-10 text-purple-500"})]})})]}),s.jsx(Ge,{children:s.jsxs("div",{className:"p-6",children:[s.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Business Performance"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(hm,{children:[s.jsx(mm,{children:s.jsxs(Ps,{children:[s.jsx(Hn,{children:"Business Name"}),s.jsx(Hn,{children:"Category"}),s.jsx(Hn,{children:"Suburb"}),s.jsx(Hn,{className:"text-right",children:"Views"}),s.jsx(Hn,{className:"text-right",children:"Clicks"}),s.jsx(Hn,{className:"text-right",children:"Unique Viewers"}),s.jsx(Hn,{className:"text-right",children:"Click Rate"})]})}),s.jsx(pm,{children:i.length>0?i.map(d=>{var h;return s.jsxs(Ps,{children:[s.jsx(bn,{className:"font-medium",children:s.jsxs("div",{className:"flex items-center gap-2",children:[d.name,d.featured&&s.jsx(rt,{className:"bg-orange-100 text-orange-800 text-xs",children:"Featured"})]})}),s.jsx(bn,{className:"text-sm text-gray-600",children:(h=d.category)==null?void 0:h.split("_").map(g=>g.charAt(0).toUpperCase()+g.slice(1)).join(" ")}),s.jsx(bn,{className:"text-sm text-gray-600",children:d.suburb||"-"}),s.jsx(bn,{className:"text-right font-semibold",children:d.views.toLocaleString()}),s.jsx(bn,{className:"text-right font-semibold",children:d.clicks.toLocaleString()}),s.jsx(bn,{className:"text-right",children:d.uniqueViewers}),s.jsx(bn,{className:"text-right",children:s.jsxs(rt,{className:parseFloat(d.clickRate)>50?"bg-green-100 text-green-800":parseFloat(d.clickRate)>25?"bg-yellow-100 text-yellow-800":"bg-gray-100 text-gray-800",children:[d.clickRate,"%"]})})]},d.id)}):s.jsx(Ps,{children:s.jsx(bn,{colSpan:7,className:"text-center text-gray-500 py-8",children:"No business data available"})})})]})})]})})]})}var Nm="Dialog",[AO]=Kr(Nm),[uG,gs]=AO(Nm),RO=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,c=E.useRef(null),d=E.useRef(null),[h,g]=pi({prop:r,defaultProp:i??!1,onChange:a,caller:Nm});return s.jsx(uG,{scope:t,triggerRef:c,contentRef:d,contentId:Rs(),titleId:Rs(),descriptionId:Rs(),open:h,onOpenChange:g,onOpenToggle:E.useCallback(()=>g(f=>!f),[g]),modal:o,children:n})};RO.displayName=Nm;var OO="DialogTrigger",dG=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs(OO,n),a=bt(t,i.triggerRef);return s.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Kb(i.open),...r,ref:a,onClick:Ie(e.onClick,i.onOpenToggle)})});dG.displayName=OO;var Hb="DialogPortal",[fG,MO]=AO(Hb,{forceMount:void 0}),LO=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=gs(Hb,t);return s.jsx(fG,{scope:t,forceMount:n,children:E.Children.map(r,o=>s.jsx(zs,{present:n||a.open,children:s.jsx(tm,{asChild:!0,container:i,children:o})}))})};LO.displayName=Hb;var Sh="DialogOverlay",DO=E.forwardRef((e,t)=>
vendor: 4,887 bytes, lines 606-610
606{const n=MO(Sh,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=gs(Sh,e.__scopeDialog);return a.modal?s.jsx(zs,{present:r||a.open,children:s.jsx(mG,{...i,ref:t})}):null});DO.displayName=Sh;var hG=lo("DialogOverlay.RemoveScroll"),mG=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs(Sh,n);return s.jsx(sm,{as:hG,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(Ze.div,{"data-state":Kb(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ho="DialogContent",IO=E.forwardRef((e,t)=>{const n=MO(ho,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=gs(ho,e.__scopeDialog);return s.jsx(zs,{present:r||a.open,children:a.modal?s.jsx(pG,{...i,ref:t}):s.jsx(gG,{...i,ref:t})})});IO.displayName=ho;var pG=E.forwardRef((e,t)=>{const n=gs(ho,e.__scopeDialog),r=E.useRef(null),i=bt(t,n.contentRef,r);return E.useEffect(()=>{const a=r.current;if(a)return Mb(a)},[]),s.jsx(FO,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0;(o.button===2||c)&&a.preventDefault()}),onFocusOutside:Ie(e.onFocusOutside,a=>a.preventDefault())})}),gG=E.forwardRef((e,t)=>{const n=gs(ho,e.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return s.jsx(FO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,c;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((h=n.triggerRef.current)==null?void 0:h.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),FO=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,c=gs(ho,n),d=E.useRef(null),h=bt(t,d);return Sb(),s.jsxs(s.Fragment,{children:[s.jsx(Gh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:s.jsx(Kh,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Kb(c.open),...o,ref:h,onDismiss:()=>c.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(yG,{titleId:c.titleId}),s.jsx(vG,{contentRef:d,descriptionId:c.descriptionId})]})]})}),Wb="DialogTitle",BO=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs(Wb,n);return s.jsx(Ze.h2,{id:i.titleId,...r,ref:t})});BO.displayName=Wb;var qO="DialogDescription",UO=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs(qO,n);return s.jsx(Ze.p,{id:i.descriptionId,...r,ref:t})});UO.displayName=qO;var $O="DialogClose",zO=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs($O,n);return s.jsx(Ze.button,{type:"button",...r,ref:t,onClick:Ie(e.onClick,()=>i.onOpenChange(!1))})});zO.displayName=$O;function Kb(e){return e?"open":"closed"}var VO="DialogTitleWarning",[woe,HO]=v$(VO,{contentName:ho,titleName:Wb,docsSlug:"dialog"}),yG=({titleId:e})=>{const t=HO(VO),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 607 608If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 609 610For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},xG="DialogDescriptionWarning",vG=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${HO(xG).contentName}}.`;return E.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},bG=RO,wG=LO,WO=DO,KO=IO,GO=BO,YO=UO,jG=zO;const Tn=bG,_G=wG,QO=E.forwardRef(({className:e,...t},n)=>s.jsx(WO,{ref:n,className:He("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));QO.displayName=WO.displayName;const wn=E.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(_G,{children:[s.jsx(QO,{}),s.jsxs(KO,{ref:r,className:He("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
610nded-lg",e),...n,children:[t,s.jsxs(jG,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[s.jsx(kt,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wn.displayName=KO.displayName;const Er=({className:e,...t})=>s.jsx("div",{className:He("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Er.displayName="DialogHeader";const Tr=({className:e,...t})=>s.jsx("div",{className:He("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Tr.displayName="DialogFooter";const Pr=E.forwardRef(({className:e,...t},n)=>s.jsx(GO,{ref:n,className:He("text-lg font-semibold leading-none tracking-tight",e),...t}));Pr.displayName=GO.displayName;const Sm=E.forwardRef(({className:e,...t},n)=>s.jsx(YO,{ref:n,className:He("text-sm text-muted-foreground",e),...t}));Sm.displayName=YO.displayName;const Mx={label:"",icon:"",type:"event_filter",filter_value:"",display_order:0,active:!0};function NG(){const[e,t]=E.useState([]),[n,r]=E.useState(!0),[i,a]=E.useState(!1),[o,c]=E.useState(null),[d,h]=E.useState(Mx),[g,f]=E.useState(!1),m=async()=>{r(!0);try{const v=await ie.entities.QuickFindShortcut.list("display_order");t(v||[])}catch(v){console.error(v)}r(!1)};E.useEffect(()=>{m()},[]);const p=async v=>{v.preventDefault(),f(!0);try{o?await ie.entities.QuickFindShortcut.update(o.id,d):await ie.entities.QuickFindShortcut.create(d),a(!1),c(null),h(Mx),m()}catch(y){console.error(y)}f(!1)},w=v=>{c(v),h({label:v.label,icon:v.icon||"",type:v.type,filter_value:v.filter_value,display_order:v.display_order||0,active:v.active}),a(!0)},x=async v=>{confirm("Delete this shortcut?")&&(await ie.entities.QuickFindShortcut.delete(v),m())};return n?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin text-gray-400"})}):s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Manage the Quick Find shortcuts shown on the homepage hero."}),s.jsxs(ge,{size:"sm",onClick:()=>{c(null),h(Mx),a(!0)},children:[s.jsx(Cr,{className:"w-4 h-4 mr-1"})," Add Shortcut"]})]}),s.jsxs("div",{className:"space-y-2",children:[e.map(v=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl border border-gray-100 bg-white",children:[s.jsx(_I,{className:"w-4 h-4 text-gray-300"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-semibold text-sm text-gray-900",children:v.label}),s.jsxs("div",{className:"text-xs text-gray-400",children:[v.type," · ",v.filter_value," ",v.icon?`· ${v.icon}`:""]})]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${v.active?"bg-green-50 text-green-600":"bg-gray-100 text-gray-400"}`,children:v.active?"Active":"Hidden"}),s.jsxs("span",{className:"text-xs text-gray-400",children:["#",v.display_order||0]}),s.jsx("button",{onClick:()=>w(v),className:"p-1.5 hover:bg-gray-100 rounded",children:s.jsx(Il,{className:"w-4 h-4 text-gray-500"})}),s.jsx("button",{onClick:()=>x(v.id),className:"p-1.5 hover:bg-red-50 rounded",children:s.jsx(Us,{className:"w-4 h-4 text-red-400"})})]},v.id)),e.length===0&&s.jsx("p",{className:"text-center text-gray-400 text-sm py-8",children:"No shortcuts yet. Add one to get started."})]}),s.jsx(Tn,{open:i,onOpenChange:a,children:s.jsxs(wn,{children:[s.jsx(Er,{children:s.jsx(Pr,{children:o?"Edit Shortcut":"Add Shortcut"})}),s.jsxs("form",{onSubmit:p,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Label"}),s.jsx(de,{value:d.label,onChange:v=>h({...d,label:v.target.value}),placeholder:"e.g. Today, Coffee",required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Icon (Lucide name)"}),s.jsx(de,{value:d.icon,onChange:v=>h({...d,icon:v.target.value}),placeholder:"e.g. CalendarClock, Coffee"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Type"}),s.jsxs(pt,{value:d.type,onValueChange:v=>h({...d,type:v}),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"event_filter",children:"Event Time Filter"}),s.jsx(Ae,{value:"business_category",children:"Business Category"}),s.jsx(Ae,{value:"business_subcategory",children:"Business Subcategory"}),s.jsx(Ae,{value:"custom",children:"Custom URL"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Filter Value"}),s.jsx(de,{value:d.filter_value,onChange:v=>h({...d,filter_value:v.target.value}),placeholder:d.type==="event_filter"?"today, tonight, this_weekend, free":d.type==="business_category"?"restaurant, cafe, ...":"/custom-path",required:!0})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{children:"Display Order"}),s.jsx(de,{type:"number",value:d.display_order,onChange:v=>h({...d,display_order:parseInt(v.target.value)||0}),className:"w-24"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Vs,{checked:d.active,onCheckedChange:v=>h({...d,active:v})}),s.jsx(ee,{children:"Active"})]}),s.jsx(Tr,{children:s.jsx(ge,{type:"submit",disabled:g,children:g?s.jsx(Ke,{className:"w-4 h-4 animate-spin"}):"Save"})})]})]})})]})}const x2=[{value:"eat_drink",label:"Eat & drink"},{value:"events",label:"Events"},{value:"outdoors",label:"Outdoors"},{value:"culture",label:"Culture"},{value:"markets",label:"Markets"}],Lx={title:"",entity_type:"business",entity_id:"",section:"eat_drink",curator_note:"",display_order:0,active:!0};function SG(){const[e,t]=E.useState([]),[n,r]=E.useState([]),[i,a]=E.useState([]),[o,c]=E.useState(!0),[d,h]=E.useState(!1),[g,f]=E.useState(null),[m,p]=E.useState(Lx),[w,x]=E.useState(!1),v=async()=>{c(!0);try{const[S,P,R]=await Promise.all([ie.entities.CuratedPick.list("display_order"),ie.entities.Business.list(),ie.entities.Event.list()]);t(S||[]),r(P||[]),a(R||[])}catch(S){console.error(S)}c(!1)};E.useEffect(()=>
610{v()},[]);const y=m.entity_type==="business"?n:i,j=async S=>{S.preventDefault(),x(!0);try{g?await ie.entities.CuratedPick.update(g.id,m):await ie.entities.CuratedPick.create(m),h(!1),f(null),p(Lx),v()}catch(P){console.error(P)}x(!1)},_=S=>{f(S),p({title:S.title,entity_type:S.entity_type,entity_id:S.entity_id,section:S.section,curator_note:S.curator_note||"",display_order:S.display_order||0,active:S.active}),h(!0)},N=async S=>{confirm("Delete this curated pick?")&&(await ie.entities.CuratedPick.delete(S),v())},C=S=>{var P,R;return S.entity_type==="business"?((P=n.find(L=>L.id===S.entity_id))==null?void 0:P.name)||"Unknown business":((R=i.find(L=>L.id===S.entity_id))==null?void 0:R.title)||"Unknown event"};return o?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin text-gray-400"})}):s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("p",{className:"text-sm text-gray-500",children:'Curate the "Worth doing in Randburg" picks. Link to existing businesses or events.'}),s.jsxs(ge,{size:"sm",onClick:()=>{f(null),p(Lx),h(!0)},children:[s.jsx(Cr,{className:"w-4 h-4 mr-1"})," Add Pick"]})]}),s.jsxs("div",{className:"space-y-2",children:[e.map(S=>{var P;return s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl border border-gray-100 bg-white",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-semibold text-sm text-gray-900",children:S.title}),s.jsxs("div",{className:"text-xs text-gray-400",children:[S.entity_type," · ",C(S)," · ",(P=x2.find(R=>R.value===S.section))==null?void 0:P.label]}),S.curator_note&&s.jsxs("div",{className:"text-xs text-gray-400 mt-0.5",children:["Note: ",S.curator_note]})]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${S.active?"bg-green-50 text-green-600":"bg-gray-100 text-gray-400"}`,children:S.active?"Active":"Hidden"}),s.jsx("button",{onClick:()=>_(S),className:"p-1.5 hover:bg-gray-100 rounded",children:s.jsx(Il,{className:"w-4 h-4 text-gray-500"})}),s.jsx("button",{onClick:()=>N(S.id),className:"p-1.5 hover:bg-red-50 rounded",children:s.jsx(Us,{className:"w-4 h-4 text-red-400"})})]},S.id)}),e.length===0&&s.jsx("p",{className:"text-center text-gray-400 text-sm py-8",children:"No curated picks yet. Add one to get started."})]}),s.jsx(Tn,{open:d,onOpenChange:h,children:s.jsxs(wn,{children:[s.jsx(Er,{children:s.jsx(Pr,{children:g?"Edit Pick":"Add Pick"})}),s.jsxs("form",{onSubmit:j,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Title"}),s.jsx(de,{value:m.title,onChange:S=>p({...m,title:S.target.value}),placeholder:"e.g. Best coffee in Ferndale",required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Entity Type"}),s.jsxs(pt,{value:m.entity_type,onValueChange:S=>p({...m,entity_type:S,entity_id:""}),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"business",children:"Business"}),s.jsx(Ae,{value:"event",children:"Event"})]})]})]}),s.jsxs("div",{children:[s.jsxs(ee,{children:["Linked ",m.entity_type==="business"?"Business":"Event"]}),s.jsxs(pt,{value:m.entity_id,onValueChange:S=>p({...m,entity_id:S}),children:[s.jsx(dt,{children:s.jsx(gt,{placeholder:`Select a ${m.entity_type}`})}),s.jsx(ft,{children:y.map(S=>s.jsx(Ae,{value:S.id,children:S.name||S.title},S.id))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Section"}),s.jsxs(pt,{value:m.section,onValueChange:S=>p({...m,section:S}),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsx(ft,{children:x2.map(S=>s.jsx(Ae,{value:S.value,children:S.label},S.value))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Curator Note"}),s.jsx(un,{value:m.curator_note,onChange:S=>p({...m,curator_note:S.target.value}),placeholder:"Why it's worth doing",rows:2})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{children:"Order"}),s.jsx(de,{type:"number",value:m.display_order,onChange:S=>p({...m,display_order:parseInt(S.target.value)||0}),className:"w-24"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Vs,{checked:m.active,onCheckedChange:S=>p({...m,active:S})}),s.jsx(ee,{children:"Active"})]})]}),s.jsx(Tr,{children:s.jsx(ge,{type:"submit",disabled:w,children:w?s.jsx(Ke,{className:"w-4 h-4 animate-spin"}):"Save"})})]})]})})]})}const Dx={name:"",slug:"",subtitle:"",image_url:"",match_tags:"",match_categories:"",display_order:0,active:!0};function kG(){const[e,t]=E.useState([]),[n,r]=E.useState(!0),[i,a]=E.useState(!1),[o,c]=E.useState(null),[d,h]=E.useState(Dx),[g,f]=E.useState(!1),m=async()=>{r(!0);try{const v=await ie.entities.MoodCollection.list("display_order");t(v||[])}catch(v){console.error(v)}r(!1)};E.useEffect(()=>{m()},[]);const p=async v=>{v.preventDefault(),f(!0);const y={...d,slug:d.slug?d.slug.toLowerCase().replace(/[^a-z0-9-]/g,""):"",match_tags:d.match_tags?d.match_tags.split(",").map(j=>
610j.trim()).filter(Boolean):[],match_categories:d.match_categories?d.match_categories.split(",").map(j=>j.trim()).filter(Boolean):[]};try{o?await ie.entities.MoodCollection.update(o.id,y):await ie.entities.MoodCollection.create(y),a(!1),c(null),h(Dx),m()}catch(j){console.error(j)}f(!1)},w=v=>{c(v),h({name:v.name,slug:v.slug||"",subtitle:v.subtitle||"",image_url:v.image_url,match_tags:(v.match_tags||[]).join(", "),match_categories:(v.match_categories||[]).join(", "),display_order:v.display_order||0,active:v.active}),a(!0)},x=async v=>{confirm("Delete this collection?")&&(await ie.entities.MoodCollection.delete(v),m())};return n?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin text-gray-400"})}):s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("p",{className:"text-sm text-gray-500",children:'Manage mood collections shown in "Choose your Randburg mood".'}),s.jsxs(ge,{size:"sm",onClick:()=>{c(null),h(Dx),a(!0)},children:[s.jsx(Cr,{className:"w-4 h-4 mr-1"})," Add Collection"]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.map(v=>s.jsxs("div",{className:"rounded-xl border border-gray-100 overflow-hidden bg-white",children:[s.jsxs("div",{className:"h-32 overflow-hidden relative",children:[s.jsx("img",{src:v.image_url,alt:v.name,className:"w-full h-full object-cover"}),s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1",children:[s.jsx("button",{onClick:()=>w(v),className:"p-1.5 bg-white/90 rounded",children:s.jsx(Il,{className:"w-3.5 h-3.5 text-gray-600"})}),s.jsx("button",{onClick:()=>x(v.id),className:"p-1.5 bg-white/90 rounded",children:s.jsx(Us,{className:"w-3.5 h-3.5 text-red-400"})})]})]}),s.jsxs("div",{className:"p-3",children:[s.jsx("div",{className:"font-semibold text-sm text-gray-900",children:v.name}),s.jsx("div",{className:"text-xs text-gray-400",children:v.subtitle}),s.jsxs("div",{className:"text-xs text-gray-400 mt-1",children:["Tags: ",(v.match_tags||[]).join(", ")||"â"," · Cats: ",(v.match_categories||[]).join(", ")||"â"]})]})]},v.id)),e.length===0&&s.jsx("p",{className:"text-center text-gray-400 text-sm py-8 col-span-full",children:"No collections yet."})]}),s.jsx(Tn,{open:i,onOpenChange:a,children:s.jsxs(wn,{children:[s.jsx(Er,{children:s.jsx(Pr,{children:o?"Edit Collection":"Add Collection"})}),s.jsxs("form",{onSubmit:p,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Name"}),s.jsx(de,{value:d.name,onChange:v=>h({...d,name:v.target.value}),placeholder:"e.g. Slow & scenic",required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Slug (for /collections/:slug URL)"}),s.jsx(de,{value:d.slug,onChange:v=>h({...d,slug:v.target.value}),placeholder:"slow-scenic"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Subtitle"}),s.jsx(de,{value:d.subtitle,onChange:v=>h({...d,subtitle:v.target.value}),placeholder:"e.g. A beautiful day without rushing"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Image URL"}),s.jsx(de,{value:d.image_url,onChange:v=>h({...d,image_url:v.target.value}),placeholder:"https://...",required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Match Tags (comma-separated)"}),s.jsx(de,{value:d.match_tags,onChange:v=>h({...d,match_tags:v.target.value}),placeholder:"scenic, relaxed, calm"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Match Categories (comma-separated)"}),s.jsx(de,{value:d.match_categories,onChange:v=>h({...d,match_categories:v.target.value}),placeholder:"spa_wellness, cafe"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{children:"Order"}),s.jsx(de,{type:"number",value:d.display_order,onChange:v=>h({...d,display_order:parseInt(v.target.value)||0}),className:"w-24"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Vs,{checked:d.active,onCheckedChange:v=>h({...d,active:v})}),s.jsx(ee,{children:"Active"})]})]}),s.jsx(Tr,{children:s.jsx(ge,{type:"submit",disabled:g,children:g?s.jsx(Ke,{className:"w-4 h-4 animate-spin"}):"Save"})})]})]})})]})}const Ix={name:"",slug:"",description:"",category:"sport",suburb:"",meeting_schedule:"",venue_name:"",contact_email:"",contact_phone:"",website:"",main_image_url:"",membership_info:"",featured:!1,status:"active",tags:""},CG=[{value:"sport",label:"Sport & Active"},{value:"social",label:"Social"},{value:"hobby",label:"Hobby & Interest"},{value:"professional",label:"Professional"},{value:"volunteer",label:"Volunteer"},{value:"other",label:"Community"}];function EG(){const[e,t]=E.useState([]),[n,r]=E.useState(!0),[i,a]=E.useState(!1),[o,c]=E.useState(null),[d,h]=E.useState(Ix),[g,f]=E.useState(!1),m=async()=>{r(!0);try{const y=await ie.entities.CommunityGroup.list();t(y||[])}catch(y){console.error(y)}r(!1)};E.useEffect(()=>{m()},[]);const p=y=>y.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim(),w=async y=>{y.preventDefault(),f(!0);const j={...d,slug:d.slug||p(d.name),tags:d.tags?d.tags.split(",").map(_=>
610_.trim()).filter(Boolean):[]};try{o?await ie.entities.CommunityGroup.update(o.id,j):await ie.entities.CommunityGroup.create(j),a(!1),c(null),h(Ix),m()}catch(_){console.error(_)}f(!1)},x=y=>{c(y),h({name:y.name,slug:y.slug,description:y.description,category:y.category,suburb:y.suburb,meeting_schedule:y.meeting_schedule||"",venue_name:y.venue_name||"",contact_email:y.contact_email||"",contact_phone:y.contact_phone||"",website:y.website||"",main_image_url:y.main_image_url,membership_info:y.membership_info||"",featured:y.featured,status:y.status,tags:(y.tags||[]).join(", ")}),a(!0)},v=async y=>{confirm("Delete this group?")&&(await ie.entities.CommunityGroup.delete(y),m())};return n?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin text-gray-400"})}):s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Manage community groups and clubs shown in the Community section."}),s.jsxs(ge,{size:"sm",onClick:()=>{c(null),h(Ix),a(!0)},children:[s.jsx(Cr,{className:"w-4 h-4 mr-1"})," Add Group"]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.map(y=>s.jsxs("div",{className:"rounded-xl border border-gray-100 overflow-hidden bg-white",children:[s.jsxs("div",{className:"h-28 overflow-hidden relative",children:[s.jsx("img",{src:y.main_image_url,alt:y.name,className:"w-full h-full object-cover"}),s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1",children:[s.jsx("button",{onClick:()=>x(y),className:"p-1.5 bg-white/90 rounded",children:s.jsx(Il,{className:"w-3.5 h-3.5 text-gray-600"})}),s.jsx("button",{onClick:()=>v(y.id),className:"p-1.5 bg-white/90 rounded",children:s.jsx(Us,{className:"w-3.5 h-3.5 text-red-400"})})]}),y.featured&&s.jsx("span",{className:"absolute bottom-2 left-2 px-2 py-0.5 rounded-full text-xs font-bold",style:{backgroundColor:"#cafc05",color:"#000"},children:"Featured"})]}),s.jsxs("div",{className:"p-3",children:[s.jsx("div",{className:"font-semibold text-sm text-gray-900",children:y.name}),s.jsxs("div",{className:"text-xs text-gray-400",children:[y.category," · ",y.suburb]}),s.jsx("div",{className:"text-xs text-gray-400 mt-1",children:y.meeting_schedule||"No schedule set"})]})]},y.id)),e.length===0&&s.jsx("p",{className:"text-center text-gray-400 text-sm py-8 col-span-full",children:"No groups yet. Add one to get started."})]}),s.jsx(Tn,{open:i,onOpenChange:a,children:s.jsxs(wn,{className:"max-w-lg max-h-[85vh] overflow-y-auto",children:[s.jsx(Er,{children:s.jsx(Pr,{children:o?"Edit Group":"Add Group"})}),s.jsxs("form",{onSubmit:w,className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Name"}),s.jsx(de,{value:d.name,onChange:y=>h({...d,name:y.target.value}),required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Slug (leave blank to auto-generate)"}),s.jsx(de,{value:d.slug,onChange:y=>h({...d,slug:y.target.value}),placeholder:"auto-generated"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Description"}),s.jsx(un,{value:d.description,onChange:y=>h({...d,description:y.target.value}),required:!0,rows:3})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Category"}),s.jsxs(pt,{value:d.category,onValueChange:y=>h({...d,category:y}),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsx(ft,{children:CG.map(y=>s.jsx(Ae,{value:y.value,children:y.label},y.value))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Suburb"}),s.jsx(de,{value:d.suburb,onChange:y=>h({...d,suburb:y.target.value}),required:!0})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Meeting Schedule"}),s.jsx(de,{value:d.meeting_schedule,onChange:y=>h({...d,meeting_schedule:y.target.value}),placeholder:"e.g. Every Tuesday 18:00"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Venue Name"}),s.jsx(de,{value:d.venue_name,onChange:y=>h({...d,venue_name:y.target.value})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Contact Email"}),s.jsx(de,{value:d.contact_email,onChange:y=>h({...d,contact_email:y.target.value})})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Contact Phone"}),s.jsx(de,{value:d.contact_phone,onChange:y=>h({...d,contact_phone:y.target.value})})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Website"}),s.jsx(de,{value:d.website,onChange:y=>h({...d,website:y.target.value})})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Main Image URL"}),s.jsx(de,{value:d.main_image_url,onChange:y=>h({...d,main_image_url:y.target.value}),required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Membership Info"}),s.jsx(de,{value:d.membership_info,onChange:y=>h({...d,membership_info:y.target.value}),placeholder:"e.g. R500/year, beginners welcome"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Tags (comma-separated)"}),s.jsx(de,{value:d.tags,onChange:y=>h({...d,tags:y.target.value}),placeholder:"tennis, beginners, social"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Vs,{checked:d.featured,onCheckedChange:y=>h({...d,featured:y})}),s.jsx(ee,{children:"Featured"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Status"}),s.jsxs(pt,{value:d.status,onValueChange:y=>h({...d,status:y}),children:[s.jsx(dt,{className:"w-32",children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"active",children:"Active"}),s.jsx(Ae,{value:"inactive",children:"Inactive"})]})]})]})]}),s.jsx(Tr,{children:s.jsx(ge,{type:"submit",disabled:g,children:g?s.jsx(Ke,{className:"w-4 h-4 animate-spin"}):"Save"})})]})]})})]})}
610const v2=["activity","mood","practical"],Fx={name:"",category:"practical",parent_categories:[],description:"",active:!0};function TG(){const[e,t]=E.useState([]),[n,r]=E.useState(!0),[i,a]=E.useState(!1),[o,c]=E.useState(null),[d,h]=E.useState(Fx),[g,f]=E.useState(!1),[m,p]=E.useState("all"),w=async()=>{r(!0);try{const N=await ie.entities.TagTaxonomy.list();t((N||[]).sort((C,S)=>(C.category||"").localeCompare(S.category||"")||(C.name||"").localeCompare(S.name||"")))}catch(N){console.error(N)}r(!1)};E.useEffect(()=>{w()},[]);const x=async N=>{N.preventDefault(),f(!0);const C={...d,name:d.name.toLowerCase().trim()};try{o?await ie.entities.TagTaxonomy.update(o.id,C):await ie.entities.TagTaxonomy.create(C),a(!1),c(null),h(Fx),w()}catch(S){console.error(S)}f(!1)},v=N=>{c(N),h({name:N.name,category:N.category,parent_categories:N.parent_categories||[],description:N.description||"",active:N.active}),a(!0)},y=async N=>{confirm("Delete this tag? Existing listings using it will keep the text but it leaves the vocabulary.")&&(await ie.entities.TagTaxonomy.delete(N),w())},j=async N=>{await ie.entities.TagTaxonomy.update(N.id,{active:!N.active}),w()},_=m==="all"?e:e.filter(N=>N.category===m);return n?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin text-gray-400"})}):s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 flex-wrap gap-2",children:[s.jsx("p",{className:"text-sm text-gray-500",children:"The controlled vocabulary AI tagging draws from and collection pages resolve against."}),s.jsxs(ge,{size:"sm",onClick:()=>{c(null),h(Fx),a(!0)},children:[s.jsx(Cr,{className:"w-4 h-4 mr-1"})," Add Tag"]})]}),s.jsx("div",{className:"flex gap-2 mb-4",children:["all",...v2].map(N=>s.jsx("button",{onClick:()=>p(N),className:`px-3 py-1.5 rounded-full text-xs font-semibold capitalize ${m===N?"bg-gray-900 text-white":"bg-gray-100 text-gray-600"}`,children:N},N))}),s.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-2",children:[_.map(N=>s.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-xl border border-gray-100 bg-white",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-semibold text-sm text-gray-900 lowercase",children:N.name}),s.jsx(rt,{variant:"outline",className:"text-[10px] capitalize",children:N.category})]}),N.description&&s.jsx("p",{className:"text-xs text-gray-400 mt-0.5 line-clamp-1",children:N.description})]}),s.jsx("button",{onClick:()=>j(N),className:`text-[10px] px-2 py-1 rounded-full ${N.active?"bg-green-50 text-green-600":"bg-gray-100 text-gray-400"}`,children:N.active?"Active":"Inactive"}),s.jsx("button",{onClick:()=>v(N),className:"p-1.5 hover:bg-gray-100 rounded",children:s.jsx(Il,{className:"w-3.5 h-3.5 text-gray-500"})}),s.jsx("button",{onClick:()=>y(N.id),className:"p-1.5 hover:bg-red-50 rounded",children:s.jsx(Us,{className:"w-3.5 h-3.5 text-red-400"})})]},N.id)),_.length===0&&s.jsx("p",{className:"text-center text-gray-400 text-sm py-8 col-span-full",children:"No tags in this category yet."})]}),s.jsx(Tn,{open:i,onOpenChange:a,children:s.jsxs(wn,{children:[s.jsx(Er,{children:s.jsx(Pr,{children:o?"Edit Tag":"Add Tag"})}),s.jsxs("form",{onSubmit:x,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Name"}),s.jsx(de,{value:d.name,onChange:N=>h({...d,name:N.target.value}),placeholder:"e.g. family-friendly",required:!0}),s.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Lowercase, 1-2 words, hyphenated."})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Category"}),s.jsxs(pt,{value:d.category,onValueChange:N=>h({...d,category:N}),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsx(ft,{children:v2.map(N=>s.jsx(Ae,{value:N,className:"capitalize",children:N},N))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Related Business Categories"}),s.jsx(Ju,{value:d.parent_categories,onChange:N=>h({...d,parent_categories:N})})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Description"}),s.jsx(un,{value:d.description,onChange:N=>h({...d,description:N.target.value}),placeholder:"What this tag means and when it applies",rows:2})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Vs,{checked:d.active,onCheckedChange:N=>h({...d,active:N})}),s.jsx(ee,{children:"Active"})]}),s.jsx(Tr,{children:s.jsx(ge,{type:"submit",disabled:g,children:g?s.jsx(Ke,{className:"w-4 h-4 animate-spin"}):"Save"})})]})]})})]})}const Bx={label:"",slug:"",subtitle:"",icon:"Sparkles",icon_bg:"#eadcc8",match_tags:"",match_categories:"",display_order:0,active:!0};function PG(){const[e,t]=E.useState([]),[n,r]=E.useState(!0),[i,a]=E.useState(!1),[o,c]=E.useState(null),[d,h]=E.useState(Bx),[g,f]=E.useState(!1),m=async()=>{r(!0);try{const v=await ie.entities.IntentionTile.list("display_order");t(v||[])}catch(v){console.error(v)}r(!1)};E.useEffect(()=>{m()},[]);const p=async v=>{v.preventDefault(),f(!0);const y={...d,slug:d.slug.toLowerCase().replace(/[^a-z0-9-]/g,""),match_tags:d.match_tags?d.match_tags.split(",").map(j=>
610j.trim().toLowerCase()).filter(Boolean):[],match_categories:d.match_categories?d.match_categories.split(",").map(j=>j.trim().toLowerCase()).filter(Boolean):[],display_order:Number(d.display_order)||0};try{o?await ie.entities.IntentionTile.update(o.id,y):await ie.entities.IntentionTile.create(y),a(!1),c(null),h(Bx),m()}catch(j){console.error(j)}f(!1)},w=v=>{c(v),h({label:v.label,slug:v.slug||"",subtitle:v.subtitle||"",icon:v.icon||"Sparkles",icon_bg:v.icon_bg||"#eadcc8",match_tags:(v.match_tags||[]).join(", "),match_categories:(v.match_categories||[]).join(", "),display_order:v.display_order||0,active:v.active}),a(!0)},x=async v=>{confirm("Delete this intention tile?")&&(await ie.entities.IntentionTile.delete(v),m())};return n?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin text-gray-400"})}):s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("p",{className:"text-sm text-gray-500",children:'Homepage "What are you up for?" tiles. Each links to a collection page.'}),s.jsxs(ge,{size:"sm",onClick:()=>{c(null),h(Bx),a(!0)},children:[s.jsx(Cr,{className:"w-4 h-4 mr-1"})," Add Tile"]})]}),s.jsxs("div",{className:"space-y-2",children:[e.map(v=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl border border-gray-100 bg-white",children:[s.jsx("div",{className:"w-9 h-9 grid place-items-center rounded-xl flex-shrink-0",style:{backgroundColor:v.icon_bg||"#eadcc8"},children:s.jsx("span",{className:"text-xs font-bold text-[#17201d]",children:(v.icon||"?").slice(0,2)})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-semibold text-sm text-gray-900",children:v.label}),s.jsxs("div",{className:"text-xs text-gray-400 truncate",children:["/collections/",v.slug," · tags: ",(v.match_tags||[]).join(", ")||"â"," · cats: ",(v.match_categories||[]).join(", ")||"â"]})]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${v.active?"bg-green-50 text-green-600":"bg-gray-100 text-gray-400"}`,children:v.active?"Active":"Hidden"}),s.jsx("button",{onClick:()=>w(v),className:"p-1.5 hover:bg-gray-100 rounded",children:s.jsx(Il,{className:"w-4 h-4 text-gray-500"})}),s.jsx("button",{onClick:()=>x(v.id),className:"p-1.5 hover:bg-red-50 rounded",children:s.jsx(Us,{className:"w-4 h-4 text-red-400"})})]},v.id)),e.length===0&&s.jsx("p",{className:"text-center text-gray-400 text-sm py-8",children:"No intention tiles yet."})]}),s.jsx(Tn,{open:i,onOpenChange:a,children:s.jsxs(wn,{children:[s.jsx(Er,{children:s.jsx(Pr,{children:o?"Edit Tile":"Add Tile"})}),s.jsxs("form",{onSubmit:p,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Label"}),s.jsx(de,{value:d.label,onChange:v=>h({...d,label:v.target.value}),placeholder:"Eat & drink",required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Slug"}),s.jsx(de,{value:d.slug,onChange:v=>h({...d,slug:v.target.value}),placeholder:"eat-drink",required:!0})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Subtitle"}),s.jsx(de,{value:d.subtitle,onChange:v=>h({...d,subtitle:v.target.value}),placeholder:"Restaurants & bars"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Icon (Lucide name)"}),s.jsx(de,{value:d.icon,onChange:v=>h({...d,icon:v.target.value}),placeholder:"UtensilsCrossed"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Icon background (hex)"}),s.jsx(de,{value:d.icon_bg,onChange:v=>h({...d,icon_bg:v.target.value}),placeholder:"#f9dacc"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Match Tags (comma-separated)"}),s.jsx(de,{value:d.match_tags,onChange:v=>h({...d,match_tags:v.target.value}),placeholder:"eat, drink, dinner"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Match Categories (comma-separated)"}),s.jsx(de,{value:d.match_categories,onChange:v=>h({...d,match_categories:v.target.value}),placeholder:"restaurant, cafe, bar_lounge"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{children:"Order"}),s.jsx(de,{type:"number",value:d.display_order,onChange:v=>h({...d,display_order:v.target.value}),className:"w-24"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Vs,{checked:d.active,onCheckedChange:v=>h({...d,active:v})}),s.jsx(ee,{children:"Active"})]})]}),s.jsx(Tr,{children:s.jsx(ge,{type:"submit",disabled:g,children:g?s.jsx(Ke,{className:"w-4 h-4 animate-spin"}):"Save"})})]})]})})]})}const AG={business:"Business",event:"Event",property:"Property",community_group:"Community Group",news_article:"News Article"},RG={business:"Business",event:"Event",property:"Property",community_group:"CommunityGroup",news_article:"NewsArticle"};function OG(){const[e,t]=E.useState([]),[n,r]=E.useState(!0),[i,a]=E.useState(!1),[o,c]=E.useState(null),[d,h]=E.useState({}),g=async()=>{r(!0);try{const x=await ie.entities.TagSuggestion.list("-created_date");t((x||[]).filter(v=>v.status==="pending"))}catch(x){console.error(x)}r(!1)};E.useEffect(()=>{g()},[]);const f=async()=>{a(!0),c(null);try{let x=0,v=!0;for(;v;){const y=await ie.functions.invoke("bulkTagBackfill",{max_per_call:25}),j=(y==null?void 0:y.data)||{};if(x+=j.created||0,v=j.has_more,(j.created||0)===0)break}c({created:x}),g()}catch(x){c({error:x.message})}finally{a(!1)}},m=(x,v)=>{h(y=>
610({...y,[x]:v}))},p=async x=>{var j;const v=d[x.id]!==void 0?d[x.id]:x.suggested_tags,y=RG[x.entity_type];try{const _={tags:v};x.entity_type==="business"&&((j=x.suggested_parent_categories)!=null&&j.length)&&(_.parent_categories=x.suggested_parent_categories),await ie.entities[y].update(x.entity_id,_),await ie.entities.TagSuggestion.update(x.id,{status:"approved",suggested_tags:v}),t(N=>N.filter(C=>C.id!==x.id))}catch(_){alert("Could not apply tags: "+_.message)}},w=async x=>{try{await ie.entities.TagSuggestion.update(x.id,{status:"rejected"}),t(v=>v.filter(y=>y.id!==x.id))}catch(v){console.error(v)}};return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 flex-wrap gap-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500",children:"AI-proposed tags awaiting review. Approve to apply tags to the live listing."}),o&&s.jsx("p",{className:`text-xs mt-1 ${o.error?"text-red-500":"text-green-600"}`,children:o.error?`Error: ${o.error}`:`Backfill complete â ${o.created} new suggestions queued.`})]}),s.jsx(ge,{size:"sm",onClick:f,disabled:i,children:i?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-1 animate-spin"}),"Running backfill..."]}):s.jsxs(s.Fragment,{children:[s.jsx(A6,{className:"w-4 h-4 mr-1"}),"Run AI Backfill"]})})]}),n?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin text-gray-400"})}):e.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(t6,{className:"w-8 h-8 text-gray-300 mx-auto mb-3"}),s.jsx("p",{className:"text-gray-500 font-medium",children:"No pending suggestions"}),s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Run the AI backfill to scan untagged listings and queue suggestions."})]}):s.jsx("div",{className:"space-y-3",children:e.map(x=>{var y;const v=d[x.id]!==void 0?d[x.id]:x.suggested_tags||[];return s.jsxs("div",{className:"rounded-xl border border-gray-100 bg-white p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-sm text-gray-900",children:x.entity_name||"Untitled"}),s.jsx(rt,{variant:"outline",className:"text-[10px] mt-1",children:AG[x.entity_type]||x.entity_type})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(ge,{size:"sm",variant:"outline",onClick:()=>w(x),className:"text-red-500 border-red-200 hover:bg-red-50",children:[s.jsx(kt,{className:"w-3.5 h-3.5 mr-1"})," Reject"]}),s.jsxs(ge,{size:"sm",onClick:()=>p(x),className:"bg-green-600 hover:bg-green-700",children:[s.jsx(Ds,{className:"w-3.5 h-3.5 mr-1"})," Approve & Apply"]})]})]}),x.entity_type==="business"&&((y=x.suggested_parent_categories)==null?void 0:y.length)>0&&s.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[s.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"Main categories:"}),x.suggested_parent_categories.map(j=>s.jsx(rt,{className:"bg-gray-900 text-white",children:j},j))]}),(x.new_tag_proposals||[]).length>0&&s.jsxs("p",{className:"text-xs text-amber-600 mb-2 flex items-center gap-1",children:[s.jsx(ln,{className:"w-3 h-3"})," New tags proposed: ",x.new_tag_proposals.map(j=>j.name).join(", ")," (added to taxonomy as inactive)"]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[v.map((j,_)=>s.jsxs(rt,{variant:"secondary",className:"flex items-center gap-1 px-2.5 py-1 bg-purple-50 text-purple-700",children:[j,s.jsx("button",{type:"button",onClick:()=>m(x.id,v.filter((N,C)=>C!==_)),className:"ml-0.5 hover:text-red-600",children:s.jsx(kt,{className:"w-3 h-3"})})]},_)),v.length===0&&s.jsx("span",{className:"text-xs text-gray-400",children:"All tags removed â approving will clear this listing's tags."})]})]},x.id)})})]})}const ss={business:{label:"Businesses",icon:Zn,entity:"Business",pendingStatus:"pending",publishStatus:"active",titleField:"name",subtitleFields:["category","suburb"],editFields:["name","description","parent_categories","category","suburb","tags"],linkPrefix:"/business/",linkKey:"slug"},event:{label:"Events",icon:an,entity:"Event",pendingStatus:"draft",publishStatus:"published",titleField:"title",subt
610itleFields:["category","suburb"],editFields:["title","description","category","suburb","tags"],linkPrefix:"/event/",linkKey:"id"},club:{label:"Clubs",icon:ll,entity:"CommunityGroup",pendingStatus:"pending",publishStatus:"active",titleField:"name",subtitleFields:["category","suburb"],editFields:["name","description","category","suburb","tags"],linkPrefix:"/community/",linkKey:"slug"},property:{label:"Properties",icon:El,entity:"Property",pendingStatus:"pending",publishStatus:"available",titleField:"title",subtitleFields:["property_type","suburb"],editFields:["title","description","property_type","suburb","bedrooms","bathrooms","rent_amount","tags"],linkPrefix:"/property/",linkKey:"id"},story:{label:"Stories",icon:fi,entity:"NewsArticle",pendingStatus:"draft",publishStatus:"published",titleField:"title",subtitleFields:["category"],editFields:["title","excerpt","category","tags"],linkPrefix:"/news/",linkKey:"slug"}},MG=["restaurant","cafe","bar_lounge","retail","services","healthcare","education","entertainment","fitness","beauty","spa_wellness","professional","automotive","home_services","real_estate","hospital
610ity","pet_services","technology","financial_services","other"],LG=["entertainment","sports","food","family","arts","culture","education","business","community","music","festival","market","other"],DG=["sport","social","hobby","professional","volunteer","other"],IG=["community","business","development","safety","environment","transport","education","events","lifestyle","other"],FG={business:MG,event:LG,club:DG,story:IG};function BG({item:e,typeKey:t,onPublish:n,onReject:r,onView:i}){const a=ss[t],o=e[a.titleField],c=a.subtitleFields.map(g=>e[g]).filter(Boolean).join(" · "),d=e.main_image_url,h=e.discovery_source;return s.jsx(Ge,{className:"overflow-hidden",children:s.jsxs("div",{className:"flex flex-col sm:flex-row",children:[d?s.jsx("img",{src:d,alt:o,className:"w-full sm:w-40 h-32 sm:h-auto object-cover flex-shrink-0"}):s.jsx("div",{className:"w-full sm:w-40 h-32 sm:h-auto bg-gray-100 flex items-center justify-center flex-shrink-0",children:s.jsx(a.icon,{className:"w-8 h-8 text-gray-300"})}),s.jsxs(Rt,{className:"flex-1 p-4 flex flex-col gap-2",children:[s.jsx("div",{className:"flex items-start justify-between gap-2",children:s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h3",{className:"font-bold text-gray-900 truncate",children:o}),h&&s.jsxs(rt,{className:"bg-purple-100 text-purple-700 border-0 gap-1",children:[s.jsx(ln,{className:"w-3 h-3"})," AI"]})]}),c&&s.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:c})]})}),s.jsx("p",{className:"text-sm text-gray-600 line-clamp-2",children:e.description||e.excerpt}),s.jsxs("div",{className:"flex items-center gap-2 pt-1 flex-wrap",children:[s.jsxs(ge,{size:"sm",variant:"outline",onClick:()=>i(e),children:[s.jsx(zu,{className:"w-4 h-4 mr-1"})," Review"]}),s.jsxs(ge,{size:"sm",className:"bg-green-600 hover:bg-green-700",disabled:n.isPending,onClick:()=>n.mutate({id:e.id}),children:[n.isPending?s.jsx(Ke,{className:"w-4 h-4 mr-1 animate-spin"}):s.jsx(Ds,{className:"w-4 h-4 mr-1"}),"Publish"]}),s.jsxs(ge,{size:"sm",variant:"destructive",disabled:r.isPending,onClick:()=>{window.confirm("Reject and delete this listing?")&&r.mutate(e.id)},children:[r.isPending?s.jsx(Ke,{className:"w-4 h-4 mr-1 animate-spin"}):s.jsx(kt,{className:"w-4 h-4 mr-1"}),"Reject"]})]})]})]})})}function qG({open:e,onOpenChange:t,item:n,typeKey:r,onPublish:i,onReject:a}){const o=ss[r],[c,d]=E.useState({}),[h,g]=E.useState(!1),f=wt();if(Ce.useEffect(()=>{if(n&&e){const x={};o.editFields.forEach(v=>{x[v]=n[v]??(Array.isArray(n[v])?[]:"")}),d(x)}},[n,e]),!n)return null;const m=(x,v)=>d(y=>({...y,[x]:v})),p=async()=>{var x;if(r==="business"&&!((x=c.parent_categories)!=null&&x.length)){alert("Select at least one main category before publishing.");return}g(!0);try{await i.mutateAsync({id:n.id,data:c}),t(!1)}finally{g(!1)}},w=x=>({name:"Name",title:"Title",description:"Description",excerpt:"Excerpt",parent_categories:"Main Categories",category:"Specific Category",suburb:"Suburb",tags:"Tags",property_type:"Property Type",bedrooms:"Bedrooms",bathrooms:"Bathrooms",rent_amount:"Monthly Rent (R)"})[x]||x;return s.jsx(Tn,{open:e,onOpenChange:t,children:s.jsxs(wn,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[s.jsxs(Er,{children:[s.jsx(Pr,{children:"Review & Publish"}),s.jsx(Sm,{children:"Edit any AI-generated details, then publish to make it live."})]}),n.main_image_url&&s.jsx("img",{src:n.main_image_url,alt:"preview",className:"w-full h-48 object-cover rounded-lg"}),s.jsx("div",{className:"space-y-4",children:o.editFields.map(x=>{const v=w(x);return x==="description"||x==="excerpt"?s.jsxs("div",{children:[s.jsx(ee,{children:v}),s.jsx(un,{value:c[x]||"",onChange:y=>m(x,y.target.value),rows:4})]},x):x==="parent_categories"?s.jsxs("div",{children:[s.jsxs(ee,{children:[v," * (choose up to 3)"]}),s.jsx(Ju,{value:c[x]||[],onChange:y=>m(x,y)})]},x):x==="category"?s.jsxs("div",{children:[s.jsx(ee,{children:v}),s.jsxs(pt,{value:c[x],onValueChange:y=>m(x,y),children:[s.jsx(dt,{children:s.jsx(gt,{placeholder:"Select category"})}),s.jsx(ft,{children:FG[r].map(y=>s.jsx(Ae,{value:y,children:y},y))})]})]},x):x==="tags"?s.jsxs("div",{children:[s.jsxs(ee,{children:[v," (comma-separated)"]}),s.jsx(de,{value:Array.isArray(c[x])?c[x].join(", "):c[x],onChange:y=>m(x,y.target.value.split(",").map(j=>
610j.trim()).filter(Boolean))})]},x):s.jsxs("div",{children:[s.jsx(ee,{children:v}),s.jsx(de,{value:c[x]||"",onChange:y=>m(x,y.target.value)})]},x)})}),n.discovery_source&&s.jsxs("p",{className:"text-xs text-gray-400",children:["Discovered via: ",n.discovery_source]}),s.jsxs(Tr,{className:"gap-2",children:[s.jsxs(ge,{variant:"outline",onClick:()=>f(`${o.linkPrefix}${n[o.linkKey]}`),children:[s.jsx(zu,{className:"w-4 h-4 mr-1"})," View live preview"]}),s.jsxs(ge,{variant:"destructive",disabled:h||(a==null?void 0:a.isPending),onClick:()=>{window.confirm("Reject and delete?")&&(a.mutate(n.id),t(!1))},children:[a!=null&&a.isPending?s.jsx(Ke,{className:"w-4 h-4 mr-1 animate-spin"}):s.jsx(Us,{className:"w-4 h-4 mr-1"})," Reject"]}),s.jsxs(ge,{className:"bg-green-600 hover:bg-green-700",disabled:h,onClick:p,children:[h?s.jsx(Ke,{className:"w-4 h-4 mr-1 animate-spin"}):s.jsx(Ds,{className:"w-4 h-4 mr-1"}),"Publish"]})]})]})})}function UG(){const e=dn(),[t,n]=E.useState("all"),[r,i]=E.useState({item:null,typeKey:null}),a=De({queryKey:["pending_Business"],queryFn:()=>ie.entities.Business.filter({status:"pending"}),initialData:[]}),o=De({queryKey:["pending_Event"],queryFn:()=>ie.entities.Event.filter({status:"draft"}),initialData:[]}),c=De({queryKey:["pending_CommunityGroup"],queryFn:()=>ie.entities.CommunityGroup.filter({status:"pending"}),initialData:[]}),d=De({queryKey:["pending_Property"],queryFn:()=>ie.entities.Property.filter({status:"pending"}),initialData:[]}),h=De({queryKey:["pending_NewsArticle"],queryFn:()=>ie.entities.NewsArticle.filter({status:"draft"}),initialData:[]}),g={business:a,event:o,club:c,property:d,story:h},f={business:(a.data||[]).map(_=>({..._,_typeKey:"business"})),event:(o.data||[]).map(_=>({..._,_typeKey:"event"})),club:(c.data||[]).map(_=>({..._,_typeKey:"club"})),property:(d.data||[]).map(_=>({..._,_typeKey:"property"})),story:(h.data||[]).map(_=>({..._,_typeKey:"story"}))},m=Object.values(f).reduce((_,N)=>_+N.length,0),p=_=>Ct({mutationFn:async({id:N,data:C})=>{const S=ss[_],P=C?{...C,status:S.publishStatus}:{status:S.publishStatus};return ie.entities[S.entity].update(N,P)},onSuccess:()=>e.invalidateQueries({queryKey:[`pending_${ss[_].entity}`]})}),w=_=>Ct({mutationFn:N=>ie.entities[ss[_].entity].delete(N),onSuccess:()=>e.invalidateQueries({queryKey:[`pending_${ss[_].entity}`]})}),x={business:p("business"),event:p("event"),club:p("club"),property:p("property"),story:p("story")},v={business:w("business"),event:w("event"),club:w("club"),property:w("property"),story:w("story")},y=Object.values(g).some(_=>_.isLoading),j=(_,N)=>_.length===0?s.jsxs("div",{className:"text-center py-12 text-gray-400",children:[s.jsx(Ds,{className:"w-10 h-10 mx-auto mb-2 text-green-400"}),s.jsxs("p",{children:["No pending ",ss[N].label.toLowerCase()," to review."]})]}):s.jsx("div",{className:"space-y-3",children:_.map(C=>s.jsx(BG,{item:C,typeKey:N,onPublish:x[N],onReject:v[N],onView:S=>i({item:S,typeKey:N})},C.id))});return[...Object.keys(ss)],s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ln,{className:"w-5 h-5 text-purple-600"}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-bold",children:"Review Queue"}),s.jsxs("p",{className:"text-sm text-gray-500",children:["Unpublished & AI-discovered listings awaiting approval. ",m," pending."]})]})]}),s.jsxs(Ib,{value:t,onValueChange:n,children:[s.jsxs(um,{className:"flex flex-wrap gap-1 w-full",children:[s.jsxs(Kt,{value:"all",children:["All (",m,")"]}),Object.entries(ss).map(([_,N])=>s.jsxs(Kt,{value:_,children:[N.label," (",f[_].length,")"]},_))]}),y?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(Ke,{className:"w-8 h-8 animate-spin text-gray-400"})}):t==="all"?s.jsxs("div",{className:"space-y-6 pt-4",children:[Object.keys(ss).map(_=>f[_].length>0?s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-sm uppercase tracking-wide text-gray-400 mb-2",children:ss[_].label}),j(f[_],_)]},_):null),m===0&&s.jsxs("div",{className:"text-center py-12 text-gray-400",children:[s.jsx(Ds,{className:"w-10 h-10 mx-auto mb-2 text-green-400"}),s.jsx("p",{children:"Nothing pending. All caught up."})]})]}):s.jsx("div",{className:"pt-4",children:j(f[t],t)})]}),s.jsx(qG,{open:!!r.item,onOpenChange:_=>!_&&i({item:null,typeKey:null}),item:r.item,typeKey:r.typeKey,onPublish:r.typeKey?x[r.typeKey]:null,onReject:r.typeKey?v[r.typeKey]:null})]})}const b2=[{type:"business",entity:"Business",title:"name",status:"active"},{type:"news_article",entity:"NewsArticle",title:"title",status:"published"},{type:"event",entity:"Event",title:"title",status:"published"},{type:"property",entity:"Property",title:"title",status:"available"}];function $G(){const e=dn(),[t,n]=E.useState(""),{data:r=[]}=De({queryKey:["suburbs"],queryFn:()=>ie.entities.Suburb.list("name")}
610),{data:i=[]}=De({queryKey:["area-highlights",t],enabled:!!t,queryFn:()=>ie.entities.AreaHighlight.filter({suburb_slug:t},"display_order",5)}),a=VF({queries:b2.map(p=>({queryKey:["highlight-candidates",p.entity],queryFn:()=>ie.entities[p.entity].list("-featured")}))}),o=r.find(p=>p.slug===t),c=E.useMemo(()=>b2.flatMap((p,w)=>(a[w].data||[]).filter(x=>x.status===p.status).filter(x=>p.type==="news_article"?[x.title,x.excerpt,...x.tags||[]].join(" ").toLowerCase().includes(((o==null?void 0:o.name)||"").toLowerCase()):String(x.suburb||"").toLowerCase().includes(((o==null?void 0:o.name)||"").toLowerCase())).map(x=>({id:x.id,type:p.type,title:x[p.title],image:x.main_image_url}))),[a.map(p=>p.data),o]),d=()=>e.invalidateQueries({queryKey:["area-highlights",t]}),h=Ct({mutationFn:p=>ie.entities.AreaHighlight.create({suburb_slug:t,entity_type:p.type,entity_id:p.id,display_order:i.reduce((w,x)=>Math.max(w,x.display_order||0),-1)+1}),onSuccess:d}),g=Ct({mutationFn:p=>ie.entities.AreaHighlight.delete(p),onSuccess:d}),f=async(p,w)=>{const x=p+w;x<0||x>=i.length||(await ie.entities.AreaHighlight.bulkUpdate([{id:i[p].id,display_order:x},{id:i[x].id,display_order:p}]),d())},m=i.map(p=>({...p,item:c.find(w=>w.id===p.entity_id&&w.type===p.entity_type)}));return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-black",children:"Area Highlights"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Curate and order up to five highlights for each suburb page."})]}),s.jsxs(pt,{value:t,onValueChange:n,children:[s.jsx(dt,{className:"max-w-sm",children:s.jsx(gt,{placeholder:"Choose a suburb"})}),s.jsx(ft,{children:r.map(p=>s.jsx(Ae,{value:p.slug,children:p.name},p.id))})]}),t&&s.jsxs("div",{className:"grid lg:grid-cols-2 gap-5",children:[s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsxs(En,{children:["Selected (",i.length,"/5)"]})}),s.jsxs(Rt,{className:"space-y-2",children:[m.length===0&&s.jsx("p",{className:"text-sm text-gray-400 py-8 text-center",children:"No highlights selected yet."}),m.map((p,w)=>{var x;return s.jsxs("div",{className:"flex items-center gap-3 border rounded-xl p-3",children:[s.jsx("span",{className:"w-7 h-7 rounded-full bg-[#153f34] text-white grid place-items-center text-xs font-bold",children:w+1}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-semibold text-sm truncate",children:((x=p.item)==null?void 0:x.title)||"Unavailable item"}),s.jsx("p",{className:"text-[10px] uppercase tracking-wider text-gray-400",children:p.entity_type.replace("_"," ")})]}),s.jsx(ge,{size:"icon",variant:"ghost",onClick:()=>f(w,-1),children:s.jsx(UD,{})}),s.jsx(ge,{size:"icon",variant:"ghost",onClick:()=>f(w,1),children:s.jsx(LD,{})}),s.jsx(ge,{size:"icon",variant:"ghost",onClick:()=>g.mutate(p.id),children:s.jsx(kt,{})})]},p.id)})]})]}),s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsxs(En,{children:["Available in ",o==null?void 0:o.name]})}),s.jsx(Rt,{className:"space-y-2 max-h-[520px] overflow-y-auto",children:c.map(p=>{const w=i.some(x=>x.entity_id===p.id&&x.entity_type===p.type);return s.jsxs("button",{disabled:!w&&i.length>=5,onClick:()=>w?g.mutate(i.find(x=>x.entity_id===p.id&&x.entity_type===p.type).id):h.mutate(p),className:"w-full flex items-center gap-3 text-left border rounded-xl p-3 disabled:opacity-40",children:[s.jsx("span",{className:`w-8 h-8 rounded-lg grid place-items-center ${w?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:w?s.jsx(Ds,{className:"w-4 h-4"}):s.jsx(Cr,{className:"w-4 h-4"})}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("strong",{className:"block text-sm truncate",children:p.title}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] uppercase text-gray-400",children:[s.jsx(pn,{className:"w-3 h-3"}),p.type.replace("_"," ")]})]})]},`${p.type}-${p.id}`)})})]})]})]})}function zG(){Mt("Admin Panel | This is Randburg","",{noindex:!0});const[e,t]=Ce.useState(!0),[n,r]=Ce.useState(!1),i=wt();return Ce.useEffect(()=>{(async()=>{try{const o=await ie.auth.me();
610(o==null?void 0:o.role)==="admin"?r(!0):i(xt("Dashboard"))}catch{i(xt("Dashboard"))}finally{t(!1)}})()},[i]),e?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx(Ke,{className:"w-8 h-8 animate-spin"})}):n?s.jsx("div",{className:"min-h-screen bg-gray-50 py-10",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[s.jsx(iT,{className:"w-6 h-6 text-blue-600"}),s.jsx("h1",{className:"text-3xl font-black text-gray-900",children:"Admin Panel"})]}),s.jsx(Ge,{className:"p-4",children:s.jsxs(Ib,{defaultValue:"analytics",children:[s.jsxs(um,{className:"flex flex-wrap gap-1 w-full",children:[s.jsx(Kt,{value:"review",children:"Review Queue"}),s.jsx(Kt,{value:"analytics",children:"Analytics"}),s.jsx(Kt,{value:"site",children:"Settings"}),s.jsx(Kt,{value:"banners",children:"Banners"}),s.jsx(Kt,{value:"ads",children:"Ads"}),s.jsx(Kt,{value:"coupons",children:"Coupons"}),s.jsx(Kt,{value:"news",children:"News"}),s.jsx(Kt,{value:"shoutouts",children:"Shoutouts"}),s.jsx(Kt,{value:"quickfind",children:"Quick Find"}),s.jsx(Kt,{value:"curated",children:"Curated Picks"}),s.jsx(Kt,{value:"area-highlights",children:"Area Highlights"}),s.jsx(Kt,{value:"moods",children:"Mood Collections"}),s.jsx(Kt,{value:"intentions",children:"Intention Tiles"}),s.jsx(Kt,{value:"tags",children:"Tag Taxonomy"}),s.jsx(Kt,{value:"tagreview",children:"Tag Review"}),s.jsx(Kt,{value:"community",children:"Community Groups"})]}),s.jsx(rn,{value:"review",className:"pt-6",children:s.jsx(UG,{})}),s.jsx(rn,{value:"analytics",className:"pt-6",children:s.jsx(cG,{})}),s.jsx(rn,{value:"site",className:"pt-6",children:s.jsx(cH,{})}),s.jsx(rn,{value:"banners",className:"pt-6",children:s.jsx(gH,{})}),s.jsx(rn,{value:"ads",className:"pt-6",children:s.jsx(yH,{})}),s.jsx(rn,{value:"coupons",className:"pt-6",children:s.jsx(aG,{})}),s.jsx(rn,{value:"news",className:"pt-6",children:s.jsx(iG,{})}),s.jsx(rn,{value:"shoutouts",className:"pt-6",children:s.jsx(lG,{})}),s.jsx(rn,{value:"quickfind",className:"pt-6",children:s.jsx(NG,{})}),s.jsx(rn,{value:"curated",className:"pt-6",children:s.jsx(SG,{})}),s.jsx(rn,{value:"area-highlights",className:"pt-6",children:s.jsx($G,{})}),s.jsx(rn,{value:"moods",className:"pt-6",children:s.jsx(kG,{})}),s.jsx(rn,{value:"intentions",className:"pt-6",children:s.jsx(PG,{})}),s.jsx(rn,{value:"tags",className:"pt-6",children:s.jsx(TG,{})}),s.jsx(rn,{value:"tagreview",className:"pt-6",children:s.jsx(OG,{})}),s.jsx(rn,{value:"community",className:"pt-6",children:s.jsx(EG,{})})]})})]})}):null}const bi="https://schema.org",_u="This is Randburg";function nd(e){return JSON.parse(JSON.stringify(e))}function yo(e=""){return _b(e)}function VG(){return{"@context":bi,"@type":"Organization",name:_u}}function HG(){return{"@context":bi,"@type":"WebSite",name:_u}}function va(e,t,n=""){const r=yo(n),i={"@context":bi,"@type":"WebPage",name:e||_u,description:t||""};return r&&(i["@id"]=r+"#webpage",i.url=r,i.isPartOf={"@type":"WebSite",name:_u,url:r$()}),nd(i)}function wi(e=[]){const t=e.map((n,r)=>{const i={"@type":"ListItem",position:r+1,name:n.name},a=n.path?yo(n.path):"";return a&&(i.item=a),i});return{"@context":bi,"@type":"BreadcrumbList",itemListElement:t}}function WG(e,t=""){if(!e)return null;const n=yo(t),r=e.published_date?new Date(e.published_date).toISOString():null,i=e.updated_date?new Date(e.updated_date).toISOString():r,a={"@context":bi,"@type":"Article",headline:e.title,description:e.excerpt||"",image:e.main_image_url?[e.main_image_url]:void 0,datePublished:r||void 0,dateModified:i||void 0,author:{"@type":"Organization",name:e.author||"This is Randburg Team"},publisher:{"@type":"Organization",name:_u}};return n&&(a.mainEntityOfPage={"@type":"WebPage","@id":n}),nd(a)}function XO(e,t=""){if(!e)return null;const n=yo(t),r={"@context":bi,"@type":"LocalBusiness",name:e.name,description:e.description||"",image:e.main_image_url?[e.main_image_url]:void 0,telephone:e.contact_phone||void 0,email:e.contact_email||void 0,url:e.website||void 0,priceRange:void 0};return(e.address||e.suburb)&&(r.address={"@type":"PostalAddress",addressLocality:e.suburb||"Randburg",streetAddress:e.address||""}),e.rating&&(r.aggregateRating={"@type":"AggregateRating",ratingValue:e.rating}),n&&(r["@id"]=n),delete r.priceRange,nd(r)}function KG(e,t=""){if(!e)return null;
610const n=yo(t),r={"@context":bi,"@type":"Event",name:e.title,description:e.description||"",image:e.main_image_url?[e.main_image_url]:void 0,startDate:e.start_date?new Date(e.start_date).toISOString():void 0,endDate:e.end_date?new Date(e.end_date).toISOString():void 0,eventStatus:"https://schema.org/EventScheduled",location:{"@type":"Place",name:e.venue_name||"",address:{"@type":"PostalAddress",addressLocality:e.suburb||"Randburg",streetAddress:e.address||""}}};return(e.ticket_price||e.booking_url)&&(r.offers={"@type":"Offer",price:e.ticket_price||"0",url:e.booking_url||void 0,availability:"https://schema.org/InStock"}),n&&(r["@id"]=n),nd(r)}function GG(e,t=""){if(!e)return null;const n=yo(t),r={"@context":bi,"@type":"Place",name:e.name,description:e.description||"",image:e.hero_image_url?[e.hero_image_url]:void 0,address:{"@type":"PostalAddress",addressLocality:e.name,addressRegion:e.area||"Randburg",addressCountry:"ZA"}};return n&&(r["@id"]=n,r.url=n),nd(r)}function YG(e=""){const t=yo(e),n={"@context":bi,"@type":"ContactPage",name:"Contact This is Randburg"};return t&&(n["@id"]=t,n.url=t),n}function km({page:e}){const{data:t}=De({queryKey:["page-banner",e],queryFn:async()=>{const a=await ie.entities.PageBanner.filter({page_name:e});return a&&a.length?a[0]:null},initialData:null}),n=Ce.useMemo(()=>{if(!t)return[];const a=[t.banner_image_1,t.banner_image_2,t.banner_image_3].filter(Boolean);return a.length?a:[]},[t]),[r,i]=Ce.useState(0);return Ce.useEffect(()=>{if(t!=null&&t.slider_enabled&&n.length>1){const a=setInterval(()=>{i(o=>(o+1)%n.length)},4e3);return()=>clearInterval(a)}},[t==null?void 0:t.slider_enabled,n.length]),!t||n.length===0?s.jsx("section",{className:"relative h-[25vh] md:h-[35vh] bg-gray-100 flex items-center justify-center",children:s.jsx("div",{className:"text-center",children:s.jsx("h2",{className:"text-2xl font-bold text-gray-400 capitalize",children:e})})}):s.jsxs("section",{className:"relative h-[25vh] md:h-[35vh] overflow-hidden",children:[n.map((a,o)=>s.jsx("img",{src:a,alt:`${e}-banner-${o}`,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-700 ${o===r?"opacity-100":"opacity-0"}`},o)),s.jsx("div",{className:"absolute inset-0 bg-black/20"})]})}const w2=e=>e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");function QG(){Mt("Randburg Business Directory | Local Shops, Restaurants & Services","Find trusted local businesses in Randburg â restaurants, cafes, retailers, health, beauty and professional services. Search by category and suburb across Randburg.",{jsonLd:[va("Randburg Business Directory","Browse and discover the best local businesses in Randburg.","/Businesses"),wi([{name:"Home",path:"/"},{name:"Businesses",path:"/Businesses"}])]});const e=hr(),t=new URLSearchParams(e.search),[n,r]=E.useState(""),[i,a]=E.useState(t.get("parent")||"all"),[o,c]=E.useState(t.get("category")||"all"),[d,h]=E.useState(t.get("tags")||""),[g,f]=E.useState(t.get("subcategory")||"all"),[m,p]=E.useState(t.get("suburb")||"all"),[w,x]=E.useState("name"),v=wt();E.useEffect(()=>{const T=new URLSearchParams(e.search);a(T.get("parent")||"all"),c(T.get("category")||"all"),h(T.get("tags")||""),f(T.get("subcategory")||"all"),p(T.get("suburb")||"all")},[e.search]);const y=T=>{const O=new URLSearchParams(e.search);T==="all"?O.delete("parent"):O.set("parent",T),O.delete("category"),v({pathname:e.pathname,search:O.toString()?`?${O}`:""})},j=T=>{const O=new URLSearchParams(e.search);T==="all"?O.delete("suburb"):O.set("suburb",T),v({pathname:e.pathname,search:O.toString()?`?${O}`:""})},_=E.useRef(new Set),{data:N,isLoading:C}=De({queryKey:["businesses"],queryFn:async()=>(await ie.entities.Business.list("name")).filter(O=>O.status==="active"),initialData:[]}),S=N.filter(T=>
610{const O=T.name.toLowerCase().includes(n.toLowerCase())||T.description&&T.description.toLowerCase().includes(n.toLowerCase()),M=i==="all"||Nb(T).includes(i),U=o==="all"||T.category===o,z=g==="all"||T.subcategory===g,H=m==="all"||T.suburb===m,Y=!d||T.tags&&T.tags.some(G=>d.split(",").map($=>$.trim()).includes(G));return O&&M&&U&&z&&H&&Y}).sort((T,O)=>w==="rating"?(O.rating||0)-(T.rating||0):T.name.localeCompare(O.name)),P=[...new Set(N.map(T=>T.suburb).filter(Boolean))].sort((T,O)=>T.localeCompare(O)),R=S.filter(T=>!T.discovery_source||T.owner_email),L=S.filter(T=>T.discovery_source&&!T.owner_email);E.useEffect(()=>{(async()=>{const O=await ie.auth.me().catch(()=>null);S.forEach(M=>{_.current.has(M.id)||(_.current.add(M.id),ie.analytics.track({eventName:"business_listing_view",properties:{business_id:M.id,business_name:M.name,business_category:M.category,business_suburb:M.suburb,is_featured:M.featured||!1}}),ie.entities.BusinessView.create({business_id:M.id,business_name:M.name,event_type:"view",business_category:M.category,business_suburb:M.suburb,user_email:(O==null?void 0:O.email)||null}))})})()},[S]);const D=async T=>{const O=await ie.auth.me().catch(()=>null);ie.analytics.track({eventName:"business_listing_click",properties:{business_id:T.id,business_name:T.name,business_category:T.category,business_suburb:T.suburb,is_featured:T.featured||!1}}),ie.entities.BusinessView.create({business_id:T.id,business_name:T.name,event_type:"click",business_category:T.category,business_suburb:T.suburb,user_email:(O==null?void 0:O.email)||null}),v(`/business/${T.slug||T.id}`)};return s.jsxs("div",{className:"min-h-screen bg-white overflow-x-hidden",children:[s.jsx(km,{page:"businesses"}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 md:py-14",children:[s.jsxs("div",{className:"mb-6 md:mb-10",children:[s.jsx("p",{className:"text-xs font-bold uppercase tracking-widest mb-1.5",style:{color:"#d395ff"},children:"Explore"}),s.jsx("h1",{className:"text-2xl md:text-5xl font-black text-gray-900 mb-1",children:"Business Directory"}),s.jsx("p",{className:"text-gray-500 text-sm md:text-lg",children:"Discover the best local businesses in Randburg"})]}),s.jsx("div",{className:"bg-gray-50 rounded-2xl p-3 md:p-5 mb-8 md:mb-10 border border-gray-100",children:s.jsxs("div",{className:"flex flex-col md:flex-row gap-3",children:[s.jsxs("div",{className:"relative w-full",children:[s.jsx(us,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx(de,{placeholder:"Search businesses by name or description...",value:n,onChange:T=>r(T.target.value),className:"pl-11 h-10 md:h-11 bg-white border-gray-200 rounded-xl text-sm"})]}),s.jsxs(pt,{value:i,onValueChange:y,children:[s.jsx(dt,{className:"w-full md:w-56 h-10 md:h-11 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"All Categories"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Categories"}),eA.map(T=>s.jsx(Ae,{value:T.value,children:T.label},T.value))]})]}),s.jsxs(pt,{value:m,onValueChange:j,children:[s.jsx(dt,{className:"w-full md:w-52 h-10 md:h-11 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"All Suburbs"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Suburbs"}),P.map(T=>s.jsx(Ae,{value:T,children:T},T))]})]}),s.jsxs(pt,{value:w,onValueChange:x,children:[s.jsx(dt,{className:"w-full md:w-44 h-10 md:h-11 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"Sort by"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"name",children:"Name (AâZ)"}),s.jsx(Ae,{value:"rating",children:"Top Rated"})]})]})]})}),!C&&s.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3 mb-5 md:mb-6",children:[s.jsxs("p",{className:"text-sm text-gray-400",children:[S.length," ",S.length===1?"business":"businesses"," found",m!=="all"?` in ${m}`:""]}),m!=="all"&&s.jsx("button",{onClick:()=>j("all"),className:"text-xs font-bold text-gray-700 underline underline-offset-4",children:"Show all Randburg"})]}),C?s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6",children:Array(6).fill(0).map((T,O)=>s.jsxs("div",{className:"rounded-2xl overflow-hidden bg-gray-100 animate-pulse",children:[s.jsx("div",{className:"h-40 sm:h-52 bg-gray-200"}),s.jsxs("div",{className:"p-4 sm:p-5 space-y-3",children:[s.jsx("div",{className:"h-5 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded w-5/6"})]})]},O))}):s.jsxs(s.Fragment,{children:[R.length>0&&s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6",children:R.map(T=>s.jsxs("div",{className:"group rounded-2xl overflow-hidden border border-gray-100 shadow-sm hover:shadow-xl transition-all duration-300 cursor-pointer bg-white",onClick:()=>D(T),children:[s.jsxs("div",{className:"relative overflow-hidden h-40 sm:h-52",children:[T.main_image_url?s.jsx("img",{src:T.main_image_url,alt:T.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):s.jsx("div",{className:"w-full h-full bg-gradient-to-br from-purple-100 to-purple-200"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/20 to-transparent"}),s.jsx(rt,{className:"absolute top-3 left-3 bg-white/95 text-gray-800 font-semibold text-xs rounded-full px-3 border-0",children:w2(T.category)}),T.featured&&s.jsx(rt,{className:"absolute top-3 right-3 font-bold text-xs rounded-full px-3 border-0",style:{backgroundColor:"#cafc05",color:"#000"},children:"Featured"}),T.rating&&s.jsxs("div",{className:"absolute bottom-3 right-3 flex items-center gap-1 bg-black/60 backdrop-blur-sm text-white text-xs font-bold px-2.5 py-1 rounded-full",children:[s.jsx(mu,{className:"w-3 h-3 fill-yellow-400 text-yellow-400"}),T.rating]})]}),s.jsxs("div",{className:"p-3.5 sm:p-5",children:[s.jsx("h3",{className:"text-base font-bold text-gray-900 mb-1",children:T.name}),T.tagline&&s.jsx("p",{className:"text-xs font-semibold mb-2",style:{color:"#d395ff"},children:T.tagline}),s.jsx("p",{className:"text-gray-500 mb-4 line-clamp-2 text-sm leading-relaxed",children:T.description}),s.jsxs("div",{className:"space-y-1.5 text-xs text-gray-400",children:[T.address&&s.jsxs("div",{className:"flex items-start gap-1.5",children:[s.jsx(pn,{className:"w-3.5 h-3.5 flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"line-clamp-1",children:T.address})]}),T.contact_phone&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(ro,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:T.contact_phone})]})]})]})]},T.id))}),L.length>0&&s.jsxs("section",{className:"mt-10 md:mt-12",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx(ln,{className:"w-4 h-4 text-purple-600"}),s.jsx("h2",{className:"text-base md:text-lg font-bold text-gray-900",children:"Discovered in Randburg"}),s.jsxs("span",{className:"text-xs md:text-sm text-gray-400",children:[L.length," ",L.length===1?"listing":"listings"," pending review"]})]}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:L.map(T=>s.jsxs("div",{onClick:()=>D(T),className:"group rounded-2xl p-4 sm:p-5 bg-gray-950 text-white hover:bg-gray-900 transition-colors cursor-pointer flex flex-col gap-2 overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx(rt,{className:"bg-white/10 text-white font-semibold text-xs rounded-full px-3 border-0",children:w2(T.category)}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold rounded-full px-2 py-0.5",style:{backgroundColor:"#cafc05",color:"#000"},children:[s.jsx(ln,{className:"w-3 h-3"})," Discovered"]})]}),s.jsx("h3",{className:"text-sm sm:text-base font-bold leading-tight line-clamp-2",children:T.name}),T.description&&s.jsx("p",{className:"text-xs text-white/60 line-clamp-2",children:T.description}),s.jsxs("div",{className:"mt-auto space-y-1 text-xs text-white/70 pt-2 min-w-0",children:[T.suburb&&s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[s.jsx(pn,{className:"w-3.5 h-3.5 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:T.suburb})]}),T.contact_phone&&s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[s.jsx(ro,{className:"w-3.5 h-3.5 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:T.contact_phone})]}),T.website&&s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[s.jsx(Vu,{className:"w-3.5 h-3.5 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:T.website})]})]})]},T.id))})]}),R.length===0&&L.length===0&&s.jsxs("div",{className:"text-center py-20",children:[s.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(us,{className:"w-7 h-7 text-gray-300"})}),s.jsx("p",{className:"text-gray-500 font-medium",children:"No businesses found matching your criteria"}),s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Try adjusting your search or filters"})]})]})]})]})}
610function XG(){Mt("Contact This is Randburg | Advertise, Partner or Send a Tip","Get in touch with This is Randburg to advertise your business, explore partnership opportunities, send a news tip or get support. We'd love to hear from you.",{jsonLd:YG("/Contact")});const[e,t]=E.useState({name:"",email:"",phone:"",enquiry_type:"",message:""}),[n,r]=E.useState(!1),i=Ct({mutationFn:c=>ie.entities.ContactEnquiry.create(c),onSuccess:()=>{r(!0),t({name:"",email:"",phone:"",enquiry_type:"",message:""}),setTimeout(()=>r(!1),5e3)}}),a=(c,d)=>{t(h=>({...h,[c]:d}))},o=c=>{c.preventDefault(),i.mutate(e)};return s.jsx("div",{className:"min-h-screen bg-gray-50 py-8 md:py-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"text-center mb-8 md:mb-12",children:[s.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-black text-gray-900 mb-3 md:mb-4",children:"Contact Us"}),s.jsx("p",{className:"text-base md:text-lg text-gray-600",children:"Have a question or want to partner with us? Get in touch!"})]}),s.jsxs("div",{className:"grid lg:grid-cols-2 gap-6 md:gap-8",children:[s.jsxs(Ge,{className:"p-6 md:p-8",children:[s.jsx("h2",{className:"text-xl md:text-2xl font-black text-gray-900 mb-4 md:mb-6",children:"Send Us a Message"}),n&&s.jsxs(ya,{className:"mb-4 md:mb-6 bg-green-50 border-green-200",children:[s.jsx(cs,{className:"h-4 w-4 text-green-600"}),s.jsx(go,{className:"text-green-800",children:"Message Sent!"}),s.jsx(xa,{className:"text-green-700",children:"Thank you for contacting us. We'll get back to you soon."})]}),s.jsxs("form",{onSubmit:o,className:"space-y-4 md:space-y-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"name",children:"Your Name *"}),s.jsx(de,{id:"name",required:!0,value:e.name,onChange:c=>a("name",c.target.value),className:"mt-2"})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"email",children:"Email Address *"}),s.jsx(de,{id:"email",type:"email",required:!0,value:e.email,onChange:c=>a("email",c.target.value),className:"mt-2"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"phone",children:"Phone Number"}),s.jsx(de,{id:"phone",type:"tel",value:e.phone,onChange:c=>a("phone",c.target.value),className:"mt-2"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"enquiry_type",children:"Enquiry Type *"}),s.jsxs(pt,{required:!0,value:e.enquiry_type,onValueChange:c=>a("enquiry_type",c),children:[s.jsx(dt,{className:"mt-2",children:s.jsx(gt,{placeholder:"Select enquiry type"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"general_information",children:"General Information"}),s.jsx(Ae,{value:"partner_advertise",children:"Partner / Advertise"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"message",children:"Message *"}),s.jsx(un,{id:"message",required:!0,rows:6,value:e.message,onChange:c=>a("message",c.target.value),className:"mt-2",placeholder:"Tell us how we can help..."})]}),s.jsx(ge,{type:"submit",disabled:i.isPending,className:"w-full bg-blue-600 hover:bg-blue-700",children:i.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Sending..."]}):"Send Message"})]})]}),s.jsxs(Ge,{className:"p-6 md:p-8 bg-gradient-to-br from-blue-600 to-purple-600 text-white",children:[s.jsx("h2",{className:"text-xl md:text-2xl font-black mb-3 md:mb-4",children:"Partner With Us"}),s.jsx("p",{className:"mb-4 md:mb-6 text-sm md:text-base",children:`Interested in advertising or partnering with This is Randburg? We'd love to hear from you! Select "Partner / Advertise" in the form and tell us about your business.`}),s.jsxs("ul",{className:"space-y-2 md:space-y-3 text-sm md:text-base",children:[s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(cs,{className:"w-5 h-5 flex-shrink-0 mt-0.5"}),s.jsx("span",{children:"Reach thousands of local residents"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(cs,{className:"w-5 h-5 flex-shrink-0 mt-0.5"}),s.jsx("span",{children:"Targeted advertising opportunities"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(cs,{className:"w-5 h-5 flex-shrink-0 mt-0.5"}),s.jsx("span",{children:"Community-focused partnerships"})]})]})]})]})]})})}function JO({pageLocation:e,position:t}){const{data:n,isLoading:r}=De({queryKey:["adSlot",e,t],queryFn:async()=>{const c=await ie.entities.AdSlot.filter({active:!0,page_location:e,position:t});return c&&c.length>0?c[0]:null},initialData:null});if(r||!n||!n.desktop_image_url)return null;const i=typeof window<"u"&&window.innerWidth<768,a=i&&n.mobile_image_url?n.mobile_image_url:n.desktop_image_url,o=i&&n.mobile_image_url?"500px":"250px";return s.jsx("div",{className:"w-full py-6 md:py-8 bg-gray-50",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("div",{className:"text-xs text-gray-400 text-center mb-2",children:"Advertisement"}),s.jsx("a",{href:n.link_url||"#",target:"_blank",rel:"noopener noreferrer",className:"block max-w-[800px] mx-auto rounded-lg overflow-hidden hover:opacity-90 transition-opacity",children:s.jsx("img",{src:a,alt:n.slot_name||"Advertisement",className:"w-full h-auto object-contain",style:{maxHeight:o},onError:c=>{console.error("Ad image failed to load:",a),c.target.style.display="none"}})})]})})}const JG={CalendarClock:QE,Moon:zI,CalendarDays:YD,Gift:bI,Coffee:JE,UtensilsCrossed:cT,ShoppingBag:aT,Music:rT,Trees:lT,Palette:sT,Dumbbell:ZE,Sparkles:ln};function ZG(){const e=wt(),{data:t}=De({queryKey:["quick-find-shortcuts"],queryFn:async()=>(await ie.entities.QuickFindShortcut.list("display_order")).filter(i=>i.active),initialData:[]}),n=r=>{r.type==="event_filter"?e(`/events?time=${r.filter_value}`):r.type==="business_category"?e(`/businesses?category=${r.filter_value}`):r.type==="business_subcategory"?e(`/businesses?subcategory=${r.filter_value}`):r.type==="custom"&&e(r.filter_value)};return s.jsxs("section",{className:"relative min-h-[440px] md:min-
610h-[640px] flex items-end overflow-hidden bg-[#1f5142] rounded-b-[24px] md:rounded-b-[34px]",children:[s.jsx("img",{src:"https://media.base44.com/images/public/68eab176214c38838029465f/20c614b3b_Banner.png",alt:"Randburg cityscape",className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(90deg, rgba(10,29,24,.93) 0%, rgba(10,29,24,.72) 43%, rgba(10,29,24,.12) 78%)"}}),s.jsxs("div",{className:"relative max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8 pb-10 md:pb-20 w-full",children:[s.jsx("p",{className:"text-[10px] md:text-[11px] font-black uppercase tracking-[.8px] mb-2 md:mb-3",style:{color:"#d9f26f"},children:"Randburg, right now"}),s.jsxs("h1",{className:"text-3xl sm:text-5xl lg:text-6xl font-black text-white leading-[1.04] tracking-[-2px] max-w-2xl",children:["Your city has",s.jsx("br",{}),"plans for you."]}),s.jsx("p",{className:"mt-4 text-sm sm:text-base text-white/80 max-w-xl leading-relaxed",children:"Find the places, flavours and moments worth leaving home for in Randburg â shaped by where you are, how much time you have and the mood you are in."}),t.length>0&&s.jsx("div",{className:"mt-5 sm:mt-6 flex flex-wrap gap-1.5 sm:gap-2",children:t.map(r=>{const i=JG[r.icon]||ln;return s.jsxs("button",{onClick:()=>n(r),className:"inline-flex items-center gap-1.5 px-2.5 sm:px-3.5 py-1.5 sm:py-2 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-[11px] sm:text-[13px] font-bold hover:bg-white hover:text-gray-900 transition-all duration-200",children:[s.jsx(i,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5"}),r.label]},r.id)})})]})]})}function eY(){const e=wt(),{data:t,isLoading:n}=De({queryKey:["happening-soon"],queryFn:async()=>{const i=await ie.entities.Event.list("start_date"),a=new Date,o=new Date(a.getTime()+2880*60*1e3);return i.filter(c=>c.status==="published"&&new Date(c.start_date)>=a&&new Date(c.start_date)<=o).slice(0,3)},initialData:[]});if(!n&&t.length===0)return null;const r=["#c9e9f2","#fce0d4","#e7efbb"];return s.jsx("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8 -mt-6 relative z-10",children:s.jsxs("div",{className:"bg-white rounded-[22px] p-4 md:p-5 shadow-[0_18px_50px_rgba(22,63,52,.12)] grid md:grid-cols-[190px_1fr] gap-3 md:gap-4 items-center",children:[s.jsxs("div",{className:"md:border-r md:border-gray-100 md:pr-4 pb-3 md:pb-0",children:[s.jsx("strong",{className:"block text-[15px] font-black text-[#17201d]",children:"Happening soon"}),s.jsx("span",{className:"block mt-1.5 text-xs text-gray-500",children:"Next 48 hours in Randburg"})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:n?Array(3).fill(0).map((i,a)=>s.jsx("div",{className:"h-14 rounded-[13px] bg-gray-100 animate-pulse"},a)):t.map((i,a)=>{const o=new Date(i.start_date);return s.jsxs("div",{onClick:()=>e(`/event/${i.id}`),className:"flex items-center gap-3 p-2 rounded-[13px] hover:bg-gray-50 cursor-pointer transition-colors min-w-0",children:[s.jsx("div",{className:"w-[46px] h-[46px] flex-shrink-0 grid place-items-center rounded-[13px] text-[11px] font-black text-[#163f34]",style:{backgroundColor:r[a%3]},children:Yt(o,"HH:mm")}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("strong",{className:"block text-[13px] font-bold text-[#17201d] truncate",children:i.title}),s.jsxs("span",{className:"block mt-1 text-[11px] text-gray-500 truncate",children:[i.venue_name," · ",i.suburb]})]})]},i.id)})})]})})}const tY={Sparkles:ln,UtensilsCrossed:cT,Music:rT,Trees:lT,Palette:sT,ShoppingBag:aT,Coffee:JE,Dumbbell:ZE,Heart:tT,BookOpen:HD,CalendarClock:QE,MapPin:pn,Zap:M6,Globe:Vu};function nY(){const e=wt(),{data:t,isLoading:n}=De({queryKey:["intention-tiles"],queryFn:async()=>(await ie.entities.IntentionTile.list("display_order")||[]).filter(i=>i.active),initialData:[]});return!n&&t.length===0?null:s.jsx("section",{className:"py-10 md:py-20",style:{backgroundColor:"#f5f3eb"},children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"mb-5 md:mb-10",children:[s.jsx("p",{className:"text-[11px] font-black uppercase tracking-[.8px] mb-2",style:{color:"#f47645"},children:"Start with an intention"}),s.jsx("h2",{className:"text-2xl md:text-5xl font-black text-[#17201d] leading-[1.04] tracking-[-2.3px]",children:"What are you up for?"})]}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-2.5 md:gap-3",children:n?Array(6).fill(0).map((r,i)=>s.jsx("div",{className:"h-28 rounded-[19px] bg-white/40 animate-pulse"},i)):t.map(r=>{const i=tY[r.icon]||ln;return s.jsxs("button",{onClick:()=>e(`/collections/${r.slug}`),className:"group p-3.5 md:p-5 rounded-[19px] border border-gray-200/60 text-center cursor-pointer transition-all duration-200 hover:-translate-y-1 hover:bg-white hover:border-transparent hover:shadow-[0_14px_30px_rgba(30,61,49,.1)]",style:{backgroundColor:"rgba(255,255,255,.56)"},children:[s.jsx("div",{className:"w-10 h-10 md:w-12 md:h-12 mx-auto mb-2 md:mb-3 grid place-items-center rounded-2xl transition-transform group-hover:scale-110",style:{backgroundColor:r.icon_bg||"#eadcc8"},children:s.jsx(i,{className:"w-4 h-4 md:w-5 md:h-5 text-[#17201d]"})}),s.jsx("strong",{className:"block text-xs md:text-sm font-bold text-[#17201d]",children:r.label}),r.subtitle&&s.jsx("span",{className:"block mt-0.5 md:mt-1 text-[10px] md:text-[11px] text-gray-500",children:r.subtitle})]},r.id)})})]})})}const rY=[{key:"all",label:"All"},{key:"eat_drink",label:"Eat & drink"},{key:"events",label:"Events"},{key:"outdoors",label:"Outdoors"},{key:"culture",label:"Culture"},{key:"markets",label:"Markets"}];function sY(){const e=wt(),[t,n]=E.useState("all"),[r,i]=E.useState("list"),{data:a,isLoading:o}=De({queryKey:["curated-picks"],queryFn:async()=>(await ie.entities.CuratedPick.list("display_order")).filter(w=>w.active),initialData:[]}),{data:c}=De({queryKey:["curated-businesses"],queryFn:async()=>ie.entities.Business.list(),initialData:[]}),{data:d}=De({queryKey:["curated-events"],queryFn:async()=>ie.entities.Event.list(),initialData:[]}),h=E.useMemo(()=>a.map(p=>{const w=p.entity_type==="business"?c.find(x=>x.id===p.entity_id):d.find(x=>x.id===p.entity_id);return{...p,entity:w}}).filter(p=>p.entity),[a,c,d]),g=t==="all"?h:h.filter(p=>p.section===t);if(!o&&h.length===0)return null;const f=p=>{p.entity_type==="business"?e(`/business/${p.entity.slug||p.entity.id}`):e(`/event/${p.entity.id}`)},m={eat_drink:"Editor pick",events:"Trending now",outdoors:"Get outside",culture:"Editor pick",markets:"Local favourite"};return s.jsx("section",{className:"py-16 md:py-20 bg-white",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"mb-8 md:mb-10",children:[s.jsx("p",{className:"text-[11px] font-black uppercase tracking-[.8px] mb-2",style:{color:"#f47645"},children:"Curated for the moment"}),s.jsx("h2",{className:"text-3xl md:text-5xl font-black text-[#17201d] leading-[1.04] tracking-[-2.3px]",children:"Worth doing in Randburg"})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-6 overflow-x-auto pb-1 scrollbar-hide",children:[rY.map(p=>s.jsx("button",{onClick:()=>n(p.key),className:`flex-shrink-0 px-4 py-2.5 rounded-full text-[13px] font-bold whitespace-nowrap transition-all ${t===p.key?"text-white border-transparent":"bg-white text-gray-700 border-gray-200 hover:bg-gray-50"}`,style:t===p.key?{backgroundColor:"#163f34"}:{},children:p.label},p.key)),s.jsxs("div",{className:"ml-auto flex-shrink-0 flex items-center gap-1 bg-gray-100 rounded-full p-1",children:[s.jsx("button",{onClick:()=>i("list"),className:`px-3 py-1.5 rounded-full text-xs font-bold transition-all ${r==="list"?"bg-white shadow-sm":"text-gray-500"}`,children:"List"}),s.jsx("button",{onClick:()=>i("map"),className:`px-3 py-1.5 rounded-full text-xs font-bold transition-all ${r==="map"?"bg-white shadow-sm":"text-gray-500"}`,children:"Map"})]})]}),o?s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:Array(3).fill(0).map((p,w)=>s.jsx(Ot,{className:"h-80 rounded-[24px]"},w))}):g.length===0?s.jsx("div",{className:"py-16 text-center text-gray-400 text-sm border border-dashed border-gray-200 rounded-[22px]",children:"No curated picks for this filter yet."}):s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:g.map(p=>{const w=p.entity,x=m[p.section]||"Editor pick";return s.jsxs("div",{onClick:()=>f(p),className:"group rounded-[24px] overflow-hidden border border-gray-100 hover:shadow-[0_20px_40px_rgba(29,71,56,.12)] hover:-translate-y-1 transition-all duration-300 cursor-pointer bg-white",children:[s.jsxs("div",{className:"relative overflow-hidden bg-gray-100",style:{aspectRatio:"1.35"},children:[s.jsx("img",{src:w.main_image_url,alt:w.name||w.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}
610),s.jsx("span",{className:"absolute left-3.5 top-3.5 px-2.5 py-2 rounded-full text-[10px] font-black backdrop-blur-md bg-white/90 text-[#17201d]",children:x}),s.jsx("button",{className:"absolute top-3 right-3 w-10 h-10 rounded-full bg-white/90 backdrop-blur-md grid place-items-center shadow-md hover:bg-[#d9f26f] transition-colors",children:s.jsx(tT,{className:"w-4 h-4 text-gray-700"})})]}),s.jsxs("div",{className:"p-4 md:p-5",children:[s.jsxs("div",{className:"flex items-center justify-between text-[10px] font-black uppercase tracking-[.5px] mb-2",style:{color:"#1d5b45"},children:[s.jsxs("span",{children:[p.entity_type==="business"?w.category||"Business":w.category||"Event"," · ",w.suburb]}),w.rating&&s.jsxs("span",{className:"flex items-center gap-1 text-gray-600 normal-case tracking-normal",children:[s.jsx(mu,{className:"w-3 h-3 fill-current"})," ",w.rating]})]}),s.jsx("h3",{className:"font-bold text-[#17201d] text-xl leading-tight mb-2 line-clamp-1",children:w.name||w.title}),s.jsx("p",{className:"text-gray-500 text-xs line-clamp-2 mb-4 min-h-[39px]",children:w.description}),s.jsxs("div",{className:"pt-3.5 border-t border-gray-100 flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-500",children:[p.entity_type==="event"&&w.start_date&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Q0,{className:"w-3.5 h-3.5"}),Yt(new Date(w.start_date),"EEE HH:mm")]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(pn,{className:"w-3.5 h-3.5"}),w.suburb]})]}),p.entity_type==="event"&&w.ticket_price?s.jsx("span",{className:"text-[13px] font-black text-[#17201d]",children:w.ticket_price}):p.entity_type==="business"?s.jsx("span",{className:"text-[10px] text-gray-400",children:"Open now"}):null]})]})]},p.id)})})]})})}function iY(){const e=wt(),{data:t,isLoading:n}=De({queryKey:["mood-collections"],queryFn:async()=>(await ie.entities.MoodCollection.list("display_order")).filter(o=>o.active),initialData:[]});if(!n&&t.length===0)return null;const r=a=>{const o=a.slug||(a.name||"").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim();e(`/collections/${o}`)},i=t.slice(0,5);return s.jsx("section",{className:"py-16 md:py-20",style:{backgroundColor:"#f5f3eb"},children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"mb-8 md:mb-10",children:[s.jsx("p",{className:"text-[11px] font-black uppercase tracking-[.8px] mb-2",style:{color:"#f47645"},children:"Browse differently"}),s.jsx("h2",{className:"text-3xl md:text-5xl font-black text-[#17201d] leading-[1.04] tracking-[-2.3px]",children:"Choose your Randburg mood"})]}),n?s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:Array(5).fill(0).map((a,o)=>s.jsx("div",{className:"rounded-[25px] bg-gray-200 animate-pulse h-56"},o))}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-[1.3fr_.85fr_.85fr] grid-rows-[220px_220px] gap-4",children:i.map((a,o)=>s.jsxs("button",{onClick:()=>r(a),className:`group relative overflow-hidden rounded-[25px] text-left cursor-pointer ${o===0?"md:row-span-2":""}`,children:[s.jsx("img",{src:a.image_url,alt:a.name,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),s.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(180deg, transparent 38%, rgba(8,22,18,.82))"}}),s.jsxs("div",{className:"absolute left-5 right-5 bottom-5 text-white z-10",children:[s.jsx("small",{className:"text-[10px] font-black uppercase tracking-[.7px]",style:{color:"#d9f26f"},children:a.subtitle||"Mood"}),s.jsx("strong",{className:`block mt-1.5 font-black leading-[1.05] tracking-[-.5px] ${o===0?"text-3xl":"text-xl"}`,children:a.name})]})]},a.id))})]})})}const aY={sport:"Sport & Active",social:"Social",hobby:"Hobby & Interest",professional:"Professional",volunteer:"Volunteer",other:"Community"};function oY(){const e=wt(),{data:t,isLoading:n}=De({queryKey:["home-community-groups"],queryFn:async()=>(await ie.entities.CommunityGroup.list()).filter(i=>i.status==="active"&&i.featured).slice(0,4),initialData:[]});return!n&&t.length===0?null:s.jsx("section",{className:"py-16 md:py-20 bg-white",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex items-end justify-between mb-8 md:mb-10",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[11px] font-black uppercase tracking-[.8px] mb-2",style:{color:"#f47645"},children:"Local memberships"}),s.jsx("h2",{className:"text-3xl md:text-5xl font-black text-[#17201d] leading-[1.04] tracking-[-2.3px]",children:"Find your people"})]}),s.jsxs("button",{onClick:()=>e("/community"),className:"hidden md:flex items-center gap-1 text-sm font-bold text-[#1d5b45] hover:text-[#163f34] transition-colors",children:["All groups ",s.jsx(Wr,{className:"w-4 h-4"})]})]}),n?s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-
6105",children:Array(4).fill(0).map((r,i)=>s.jsx("div",{className:"rounded-[24px] bg-gray-100 animate-pulse h-64"},i))}):s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-5",children:t.map(r=>s.jsxs("div",{onClick:()=>e(`/community/${r.slug}`),className:"group rounded-[24px] overflow-hidden border border-gray-100 hover:shadow-[0_20px_40px_rgba(29,71,56,.12)] hover:-translate-y-1 transition-all duration-300 cursor-pointer bg-white",children:[s.jsxs("div",{className:"relative h-40 overflow-hidden bg-gray-100",children:[s.jsx("img",{src:r.main_image_url,alt:r.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),s.jsx("span",{className:"absolute top-3 left-3 px-2.5 py-1.5 rounded-full bg-white/90 backdrop-blur-md text-[10px] font-black text-[#17201d]",children:aY[r.category]||r.category})]}),s.jsxs("div",{className:"p-5",children:[s.jsx("h3",{className:"font-bold text-[#17201d] text-base mb-1.5 line-clamp-1",children:r.name}),s.jsx("p",{className:"text-gray-500 text-xs line-clamp-2 mb-3",children:r.description}),s.jsxs("div",{className:"space-y-1.5 text-xs text-gray-500",children:[r.meeting_schedule&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(an,{className:"w-3.5 h-3.5"}),r.meeting_schedule]}),r.suburb&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(pn,{className:"w-3.5 h-3.5"}),r.suburb]})]})]})]},r.id))})]})})}function lY(){const e=wt(),{data:t,isLoading:n}=De({queryKey:["area-guide-suburbs"],queryFn:async()=>(await ie.entities.Suburb.list("name")).slice(0,10),initialData:[]});return!n&&t.length===0?null:s.jsx("section",{className:"pt-12 md:pt-16 pb-16 md:pb-20 bg-white",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex items-end justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[11px] font-black uppercase tracking-[.8px] mb-2",style:{color:"#f47645"},children:"Explore area by area"}),s.jsx("h2",{className:"text-3xl md:text-5xl font-black text-[#17201d] leading-[1.04] tracking-[-2.3px]",children:"Know a neighbourhood"})]}),s.jsxs("button",{onClick:()=>e("/suburbs"),className:"hidden md:flex items-center gap-1 text-sm font-bold text-[#1d5b45] hover:text-[#163f34] transition-colors",children:["All suburbs ",s.jsx(Wr,{className:"w-4 h-4"})]})]}),n?s.jsx("div",{className:"flex gap-3 overflow-hidden",children:Array(6).fill(0).map((r,i)=>s.jsx("div",{className:"flex-shrink-0 w-32 h-12 rounded-full bg-gray-100 animate-pulse"},i))}):s.jsx("div",{className:"flex gap-3 overflow-x-auto pb-3 scrollbar-hide",children:t.map(r=>s.jsx("button",{onClick:()=>e(`/suburbs/${r.slug}`),className:"flex-shrink-0 px-4 py-3 rounded-full border border-gray-200 font-bold text-[13px] text-[#17201d] hover:text-white hover:border-transparent transition-all",style:{backgroundColor:"rgba(255,255,255,.5)"},onMouseEnter:i=>{i.currentTarget.style.backgroundColor="#1d5b45"},onMouseLeave:i=>{i.currentTarget.style.backgroundColor="rgba(255,255,255,.5)"},children:r.name},r.id))})]})})}const cY=e=>(e||"").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim();function uY(){const e=wt(),{data:t,isLoading:n}=De({queryKey:["home-news"],queryFn:async()=>(await ie.entities.NewsArticle.list("-published_date")).filter(i=>i.status==="published").slice(0,3),initialData:[]});return!n&&t.length===0?null:s.jsx("section",{className:"py-16 md:py-20",style:{backgroundColor:"#f5f3eb"},children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex items-end justify-between mb-8 md:mb-10",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[11px] font-black uppercase tracking-[.8px] mb-2",style:{color:"#f47645"},children:"From the neighbourhood"}),s.jsx("h2",{className:"text-3xl md:text-5xl font-black text-[#17201d] leading-[1.04] tracking-[-2.3px]",children:"Local news & stories"})]}),s.jsxs("button",{onClick:()=>e("/news"),className:"hidden md:flex items-center gap-1 text-sm font-bold text-[#1d5b45] hover:text-[#163f34] transition-colors",children:["All stories ",s.jsx(Wr,{className:"w-4 h-4"})]})]}),n?s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:Array(3).fill(0).map((r,i)=>s.jsx("div",{className:"rounded-[24px] bg-gray-100 animate-pulse h-72"},i))}):s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:t.map(r=>s.jsxs("div",{onClick:()=>e(`/news/${cY(r.title)}`),className:"group rounded-[24px] overflow-hidden bg-white border border-gray-100 hover:shadow-[0_20px_40px_rgba(29,71,56,.12)] hover:-translate-y-1 transition-all duration-300 cursor-pointer",children:[s.jsx("div",{className:"relative overflow-hidden h-48 bg-gray-100",children:s.jsx("img",{src:r.main_image_url,alt:r.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),s.jsxs("div",{className:"p-5",children:[s.jsx("span",{className:"text-[10px] font-black uppercase tracking-[.5px] text-[#1d5b45]",children:r.category}),s.jsx("h3",{className:"font-bold text-[#17201d] text-lg leading-tight mt-2 mb-2 line-clamp-2 group-hover:text-[#1d5b45] transition-colors",children:r.title}),s.jsx("p",{className:"text-gray-500 text-xs line-clamp-2",children:r.excerpt})]})]},r.id))})]})})}function dY(){return Mt("This is Randburg | Discover Local Businesses, Events, Rentals & Community","Your Randburg discovery hub â find what's happening soon, explore by mood, browse curated local picks, discover community clubs and groups, and explore neighbourhoods. More useful than a directory.",{noindex:!1,canonicalPath:"/",jsonLd:[VG(),HG(),va("This is Randburg","Your local discovery hub for Randburg â what's happening soon, curated picks, community groups and more.","/")]}),s.jsxs("div",{className:"overflow-x-hidden",style:{backgroundColor:"#f5f3eb"},children:[s.jsx(ZG,{}),s.jsx(eY,{}),s.jsx(nY,{}),s.jsx(sY,{}),s.jsx(JO,{pageLocation:"home",position:"mid_section_banner"}),s.jsx(iY,{}),s.jsx(oY,{}),s.jsx(lY,{}),s.jsx(uY,{})]})}function fY(){Mt("Things to Do in Randburg | Local Events, Markets & Festivals","Discover what's on in Randburg â upcoming events, markets, live music, festivals, family activities and community gatherings near you. Find things to do this week.",{jsonLd:[va("Events in Randburg","Find out what's happening in Randburg. Explore upcoming events near you.","/Events"),wi([{name:"Home",path:"/"},{name:"Events",path:"/Events"}])]});const e=hr(),t=new URLSearchParams(e.search),[n,r]=E.useState(""),[i,a]=E.useState(t.get("category")||"all"),[o,c]=E.useState(t.get("suburb")||"all"),d=t.get("time"),[h,g]=E.useState(d==="this_weekend"?"weekend":d||"all"),[f,m]=E.useState(!1),p=wt();E.useEffect(()=>{const S=new URLSearchParams(e.search),P=S.get("time");a(S.get("category")||"all"),c(S.get("suburb")||"all"),g(P==="this_weekend"?"weekend":P||"all")},[e.search]);const w=(S,P)=>{const R=new URLSearchParams(e.search);P==="all"?R.delete(S):R.set(S,S==="time"&&P==="weekend"?"this_weekend":P),p({pathname:e.pathname,search:R.toString()?`?${R}`:""})},{data:x,isLoading:v}=De({queryKey:["events"],queryFn:async()=>(await ie.entities.Event.list("start_date")).filter(P=>P.status==="published"),initialData:[]}),y=Rl(new Date),j=RS(y,2),_=x.filter(S=>{const P=new Date(S.start_date),R=Rl(P),L=S.title.toLowerCase().includes(n.toLowerCase())||S.description&&S.description.toLowerCase().includes(n.toLowerCase())||S.venue_name&&S.venue_name.toLowerCase().includes(n.toLowerCase())||S.suburb&&S.suburb.toLowerCase().includes(n.toLowerCase()),D=i==="all"||S.category===i,T=o==="all"||S.suburb===o,O=ey(R,y),M=PS(R,j)||R.getTime()===j.getTime();if(f){if(!O||!M)return!1}else if(O)return!1;let U=!0;const z=h==="free"?!S.ticket_price||S.ticket_price.toLowerCase().includes("free")||S.ticket_price==="0":!0;if(!f)if(h==="today")U=AS(P);else if(h==="tonight")U=AS(P)&&P.getHours()>=18;else if(h==="weekend"){const H=OH(new Date,{weekStartsOn:0});U=(jH(P)||_H(P))&&PS(P,RS(new Date,0))&&ey(P,NS(H,1))}else h==="week"&&(U=ey(P,NS(new Date,7)));return L&&D&&T&&U&&z}),N=["entertainment","sports","food","family","arts","culture","education","business","community","music","festival","market","other"],C=[...new Set(x.map(S=>
610S.suburb).filter(Boolean))].sort((S,P)=>S.localeCompare(P));return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx(km,{page:"events"}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10 md:py-14",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3 mb-7 md:mb-10",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-bold uppercase tracking-widest mb-1.5 text-pink-500",children:"Discover"}),s.jsx("h1",{className:"text-3xl md:text-5xl font-black text-gray-900 mb-1.5",children:f?"Past Events":"Upcoming Events"}),s.jsx("p",{className:"text-gray-500 text-lg",children:f?"Events from the past 2 months":"What's happening in Randburg"})]}),s.jsxs(ge,{variant:f?"default":"outline",onClick:()=>m(!f),className:"rounded-full h-10 px-5 text-sm font-semibold flex-shrink-0",children:[s.jsx(kI,{className:"w-4 h-4 mr-2"}),f?"View Upcoming":"Past Events"]})]}),s.jsx("div",{className:"bg-gray-50 rounded-2xl p-4 md:p-5 mb-10 border border-gray-100",children:s.jsxs("div",{className:"flex flex-col md:flex-row gap-3",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(us,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx(de,{placeholder:"Search events by name, venue or suburb...",value:n,onChange:S=>r(S.target.value),className:"pl-11 h-11 bg-white border-gray-200 rounded-xl text-sm"})]}),s.jsxs(pt,{value:i,onValueChange:S=>w("category",S),children:[s.jsx(dt,{className:"md:w-52 h-11 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"All Categories"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Categories"}),N.map(S=>s.jsx(Ae,{value:S,children:S.charAt(0).toUpperCase()+S.slice(1)},S))]})]}),s.jsxs(pt,{value:o,onValueChange:S=>w("suburb",S),children:[s.jsx(dt,{className:"md:w-52 h-11 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"All Suburbs"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Suburbs"}),C.map(S=>s.jsx(Ae,{value:S,children:S},S))]})]}),!f&&s.jsxs(pt,{value:h,onValueChange:S=>w("time",S),children:[s.jsx(dt,{className:"md:w-44 h-11 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"All Dates"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Dates"}),s.jsx(Ae,{value:"today",children:"Today"}),s.jsx(Ae,{value:"tonight",children:"Tonight"}),s.jsx(Ae,{value:"weekend",children:"This Weekend"}),s.jsx(Ae,{value:"week",children:"Next 7 Days"}),s.jsx(Ae,{value:"free",children:"Free Events"})]})]})]})}),!v&&s.jsxs("p",{className:"text-sm text-gray-400 mb-6",children:[_.length," ",_.length===1?"event":"events"," found",o!=="all"?` in ${o}`:""]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:v?Array(4).fill(0).map((S,P)=>s.jsxs("div",{className:"rounded-2xl overflow-hidden bg-gray-100 animate-pulse",children:[s.jsx("div",{className:"h-64 bg-gray-200"}),s.jsxs("div",{className:"p-6 space-y-3",children:[s.jsx("div",{className:"h-6 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded w-5/6"})]})]},P)):_.length>0?_.map(S=>s.jsxs("div",{className:"group rounded-2xl overflow-hidden border border-gray-100 shadow-sm hover:shadow-xl transition-all duration-300 cursor-pointer bg-white flex flex-col md:flex-row",onClick:()=>p(`/event/${S.id}`),children:[s.jsxs("div",{className:"relative overflow-hidden md:w-56 flex-shrink-0 h-52 md:h-auto",children:[S.main_image_url?s.jsx("img",{src:S.main_image_url,alt:S.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):S.discovery_source?s.jsxs("div",{className:"w-full h-full bg-gray-50 flex flex-col justify-center gap-2 px-5",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx(rt,{className:"bg-white text-gray-700 font-semibold text-xs rounded-full px-3 border border-gray-200 border-0 capitalize",children:S.category}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-purple-600 bg-purple-50 rounded-full px-2 py-0.5",children:[s.jsx(ln,{className:"w-3 h-3"})," Discovered"]})]}),S.venue_name&&s.jsx("p",{className:"text-sm font-semibold text-gray-700 line-clamp-1",children:S.venue_name}),S.suburb&&s.jsx("p",{className:"text-xs text-gray-500",children:S.suburb})]}):s.jsx("div",{className:"w-full h-full bg-gradient-to-br from-pink-100 to-rose-200 flex items-center justify-center",children:s.jsx(an,{className:"w-14 h-14 text-pink-300"})}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/30 to-transparent md:bg-gradient-to-r"}),s.jsxs("div",{className:"absolute top-3 left-3 bg-white rounded-xl px-2.5 py-1.5 text-center shadow-md",children:[s.jsx("div",{className:"text-xs font-bold text-gray-400 uppercase",children:Yt(new Date(S.start_date),"MMM")}),s.jsx("div",{className:"text-xl font-black text-gray-900 leading-none",children:Yt(new Date(S.start_date),"d")})]})]}),s.jsxs("div",{className:"p-5 flex flex-col justify-center flex-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[s.jsx(rt,{className:"bg-pink-50 text-pink-700 border-0 font-semibold text-xs rounded-full px-3 capitalize",children:S.category}),S.featured&&s.jsx(rt,{className:"font-bold text-xs rounded-full px-3 border-0",style:{backgroundColor:"#cafc05",color:"#000"},children:"Featured"})]}),s.jsx("h3",{className:"text-base sm:text-xl font-bold text-gray-900 mb-2 line-clamp-2",children:S.title}),s.jsx("p",{className:"text-gray-500 text-xs sm:text-sm mb-3 line-clamp-2 leading-relaxed",children:S.description}),s.jsxs("div",{className:"space-y-2 text-xs text-gray-500",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(an,{className:"w-3.5 h-3.5 text-pink-400 flex-shrink-0"}),s.jsxs("span",{className:"font-medium",children:[Yt(new Date(S.start_date),"EEEE, MMMM d")," · ",Yt(new Date(S.start_date),"h:mm a")]})]}),s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(pn,{className:"w-3.5 h-3.5 text-pink-400 flex-shrink-0 mt-0.5"}),s.jsxs("span",{children:[S.venue_name,S.suburb?`, ${S.suburb}`:""]})]}),S.ticket_price&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ch,{className:"w-3.5 h-3.5 text-pink-400"}),s.jsx("span",{className:"font-semibold text-gray-700",children:S.ticket_price})]})]})]})]},S.id)):s.jsxs("div",{className:"col-span-full text-center py-20",children:[s.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(an,{className:"w-7 h-7 text-gray-300"})}),s.jsx("p",{className:"text-gray-500 font-medium",children:"No events found matching your criteria"}),s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Try adjusting your filters"})]})})]})]})}const hY=e=>e?e.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim():"";function mY(){Mt("Randburg News | Latest Community, Business & Local Updates","Stay informed with the latest Randburg news â community updates, business developments, safety, transport, environment and lifestyle stories from across Randburg.",{jsonLd:[va("Randburg Local News","Stay informed with the latest news from Randburg.","/news"),wi([{name:"Home",path:"/"},{name:"News",path:"/news"}])]});const[e,t]=E.useState(""),[n,r]=E.useState("all"),i=wt(),{data:a,isLoading:o}=De({queryKey:["news"],queryFn:()=>ie.entities.NewsArticle.list("-published_date"),initialData:[]}),c=a.filter(m=>{if(m.status!=="published")return!1;const p=m.title.toLowerCase().includes(e.toLowerCase())||m.excerpt.toLowerCase().includes(e.toLowerCase()),w=n==="all"||m.category===n;return p&&w}),d=["community","business","environment","transport","safety","development","other"],h=m=>{i(`/news/${hY(m.title)}`)},g=c[0],f=c.slice(1);return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx(km,{page:"news"}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10 md:py-14",children:[s.jsxs("div",{className:"mb-7 md:mb-10",children:[s.jsx("p",{className:"text-xs font-bold uppercase tracking-widest mb-1.5 text-orange-500",children:"Randburg"}),s.jsx("h1",{className:"text-3xl md:text-5xl font-black text-gray-900 mb-1",children:"Local News"}),s.jsx("p",{className:"text-gray-500 text-base md:text-lg",children:"Stay informed with the latest from Randburg"})]}),s.jsx("div",{className:"bg-gray-50 rounded-2xl p-4 md:p-5 mb-10 border border-gray-100",children:s.jsxs("div",{className:"flex flex-col md:flex-row gap-3",children:[s.jsxs("div",{className:"flex-1 relative",children:[s.jsx(us,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}
610),s.jsx(de,{placeholder:"Search news articles...",value:e,onChange:m=>t(m.target.value),className:"pl-11 h-11 bg-white border-gray-200 rounded-xl text-sm"})]}),s.jsxs(pt,{value:n,onValueChange:r,children:[s.jsx(dt,{className:"md:w-52 h-11 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"All Categories"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Categories"}),d.map(m=>s.jsx(Ae,{value:m,children:m.charAt(0).toUpperCase()+m.slice(1)},m))]})]})]})}),!o&&s.jsxs("p",{className:"text-sm text-gray-400 mb-8",children:[c.length," ",c.length===1?"article":"articles"," found"]}),o?s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"rounded-2xl overflow-hidden bg-gray-100 animate-pulse h-96"}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:Array(5).fill(0).map((m,p)=>s.jsxs("div",{className:"rounded-2xl overflow-hidden bg-gray-100 animate-pulse",children:[s.jsx("div",{className:"h-48 bg-gray-200"}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsx("div",{className:"h-5 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded"})]})]},p))})]}):c.length===0?s.jsxs("div",{className:"text-center py-20",children:[s.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(fi,{className:"w-7 h-7 text-gray-300"})}),s.jsx("p",{className:"text-gray-500 font-medium",children:"No articles found matching your criteria"}),s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Try adjusting your search or category filter"})]}):s.jsxs(s.Fragment,{children:[g&&s.jsxs("div",{className:"group relative rounded-2xl overflow-hidden cursor-pointer mb-8 h-[240px] sm:h-[340px] md:h-[460px]",onClick:()=>h(g),children:[g.main_image_url?s.jsx("img",{src:g.main_image_url,alt:g.title,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"}):s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-orange-400 to-rose-600"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent"}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-4 sm:p-6 md:p-10",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2 md:mb-4",children:[s.jsx(rt,{className:"bg-white/15 backdrop-blur-sm text-white border-0 font-semibold text-xs rounded-full px-3 capitalize",children:g.category}),g.featured&&s.jsx(rt,{className:"font-bold text-xs rounded-full px-3 border-0",style:{backgroundColor:"#cafc05",color:"#000"},children:"Featured"})]}),s.jsx("h2",{className:"text-base sm:text-xl md:text-4xl font-black text-white mb-1 md:mb-3 leading-tight max-w-3xl line-clamp-2 md:line-clamp-none",children:g.title}),s.jsx("p",{className:"hidden sm:block text-white/70 text-sm md:text-base line-clamp-2 max-w-2xl mb-3",children:g.excerpt}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/60",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Is,{className:"w-3 h-3"}),g.author||"Randburg News"]}),g.published_date&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(an,{className:"w-3 h-3"}),Yt(new Date(g.published_date),"MMM d, yyyy")]})]})]})]}),f.length>0&&s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:f.map(m=>s.jsxs("div",{className:"group rounded-2xl overflow-hidden border border-gray-100 shadow-sm hover:shadow-xl transition-all duration-300 cursor-pointer bg-white",onClick:()=>h(m),children:[s.jsxs("div",{className:"relative overflow-hidden h-40 sm:h-48",children:[m.main_image_url?s.jsx("img",{src:m.main_image_url,alt:m.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):s.jsx("div",{className:"w-full h-full bg-gradient-to-br from-orange-100 to-orange-200 flex items-center justify-center",children:s.jsx(fi,{className:"w-10 h-10 text-orange-300"})}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/20 to-transparent"}),s.jsxs("div",{className:"absolute top-3 left-3 flex gap-2",children:[s.jsx(rt,{className:"bg-white/95 text-gray-800 border-0 font-semibold text-xs rounded-full px-3 capitalize",children:m.category}),m.featured&&s.jsx(rt,{className:"font-bold text-xs rounded-full px-3 border-0",style:{backgroundColor:"#cafc05",color:"#000"},children:"Featured"})]})]}),s.jsxs("div",{className:"p-4 md:p-5",children:[s.jsx("h3",{className:"text-sm sm:text-base font-bold text-gray-900 mb-1.5 line-clamp-2 leading-snug",children:m.title}),s.jsx("p",{className:"text-gray-500 text-xs sm:text-sm mb-3 line-clamp-2 leading-relaxed",children:m.excerpt}),s.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-400",children:[s.jsxs("span",{className:"flex items-center gap-1 truncate mr-2",children:[s.jsx(Is,{className:"w-3 h-3 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:m.author||"Randburg News"})]}),m.published_date&&s.jsxs("span",{className:"flex items-center gap-1 flex-shrink-0",children:[s.jsx(an,{className:"w-3 h-3"}),Yt(new Date(m.published_date),"MMM d")]})]})]})]},m.id))})]})]})]})}function pY(){Mt("Property to Rent in Randburg | Apartments, Houses & Townhouses","Browse rental properties in Randburg â apartments, houses, townhouses and studios for rent with prices, photos and suburb details. Find your next Randburg home today.",{jsonLd:[va("Property Rentals in Randburg","Browse available rental properties in Randburg.","/Rentals"),wi([{name:"Home",path:"/"},{name:"Rentals",path:"/Rentals"}])]});const e=wt(),t=hr(),n=new URLSearchParams(t.search),[r,i]=E.useState(""),[a,o]=E.useState("all"),[c,d]=E.useState(n.get("suburb")||"all"),[h,g]=E.useState("rent_amount"),[f,m]=E.useState(""),[p,w]=E.useState(""),[x,v]=E.useState(""),[y,j]=E.useState(""),[_,N]=E.useState(!1),[C,S]=E.useState(!1);E.useEffect(()=>{d(new URLSearchParams(t.search).get("suburb")||"all")},[t.search]);const P=M=>{const U=new URLSearchParams(t.search);M==="all"?U.delete("suburb"):U.set("suburb",M),e({pathname:t.pathname,search:U.toString()?`?${U}`:""})},{data:R,isLoading:L}=De({queryKey:["properties"],queryFn:async()=>(await ie.entities.Property.list("rent_amount")).filter(U=>U.status==="available"),initialData:[]}),D=R.filter(M=>{const U=M.title.toLowerCase().includes(r.toLowerCase())||M.description&&M.description.toLowerCase().includes(r.toLowerCase())||M.suburb&&M.suburb.toLowerCase().includes(r.toLowerCase()),z=a==="all"||M.property_type===a,H=c==="all"||M.suburb===c,Y=Array.isArray(M.features)?M.features.map(J=>J.toLowerCase()):[],G=!_||Y.includes("garden"),$=!C||Y.includes("pool"),I=!f||(M.bedrooms??0)>
610=Number(f),B=!p||(M.bathrooms??0)>=Number(p),V=!x||(M.rent_amount??0)>=Number(x),q=!y||(M.rent_amount??0)<=Number(y);return U&&z&&H&&G&&$&&I&&B&&V&&q}).sort((M,U)=>h==="rent_amount"?(M.rent_amount||0)-(U.rent_amount||0):M.title.localeCompare(U.title)),T=["apartment","house","townhouse","studio","penthouse","duplex"],O=[...new Set(R.map(M=>M.suburb).filter(Boolean))].sort((M,U)=>M.localeCompare(U));return s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx(km,{page:"rentals"}),s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10 md:py-14",children:[s.jsxs("div",{className:"mb-7 md:mb-10",children:[s.jsx("p",{className:"text-xs font-bold uppercase tracking-widest mb-1.5",style:{color:"#0171d3"},children:"Browse"}),s.jsx("h1",{className:"text-3xl md:text-5xl font-black text-gray-900 mb-1",children:"Property Rentals"}),s.jsx("p",{className:"text-gray-500 text-base md:text-lg",children:"Find your perfect home in Randburg"})]}),s.jsxs("div",{className:"bg-gray-50 rounded-2xl p-4 md:p-6 mb-10 border border-gray-100",children:[s.jsxs("div",{className:"relative mb-4",children:[s.jsx(us,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx(de,{placeholder:"Search by name, suburb or description...",value:r,onChange:M=>i(M.target.value),className:"pl-11 h-11 bg-white border-gray-200 rounded-xl text-sm"})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsxs(pt,{value:a,onValueChange:o,children:[s.jsx(dt,{className:"h-10 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"All Types"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Types"}),T.map(M=>s.jsx(Ae,{value:M,children:M.charAt(0).toUpperCase()+M.slice(1)},M))]})]}),s.jsxs(pt,{value:c,onValueChange:P,children:[s.jsx(dt,{className:"h-10 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"All Suburbs"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All Suburbs"}),O.map(M=>s.jsx(Ae,{value:M,children:M},M))]})]}),s.jsxs(pt,{value:h,onValueChange:g,children:[s.jsx(dt,{className:"h-10 bg-white border-gray-200 rounded-xl text-sm",children:s.jsx(gt,{placeholder:"Sort by"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"rent_amount",children:"Price (LowâHigh)"}),s.jsx(Ae,{value:"title",children:"Name"})]})]}),s.jsx(de,{type:"number",min:"0",placeholder:"Min beds",value:f,onChange:M=>m(M.target.value),className:"h-10 bg-white border-gray-200 rounded-xl text-sm"}),s.jsx(de,{type:"number",min:"0",step:"0.5",placeholder:"Min baths",value:p,onChange:M=>w(M.target.value),className:"h-10 bg-white border-gray-200 rounded-xl text-sm"})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mt-3",children:[s.jsx(de,{type:"number",min:"0",placeholder:"Min price (R)",value:x,onChange:M=>v(M.target.value),className:"h-10 bg-white border-gray-200 rounded-xl text-sm"}),s.jsx(de,{type:"number",min:"0",placeholder:"Max price (R)",value:y,onChange:M=>j(M.target.value),className:"h-10 bg-white border-gray-200 rounded-xl text-sm"}),s.jsxs("label",{className:"flex items-center gap-2 px-3 h-10 bg-white border border-gray-200 rounded-xl cursor-pointer hover:bg-gray-50 text-sm",children:[s.jsx("input",{type:"checkbox",checked:_,onChange:M=>N(M.target.checked),className:"flex-shrink-0"}),s.jsx("span",{children:"Garden"})]}),s.jsxs("label",{className:"flex items-center gap-2 px-3 h-10 bg-white border border-gray-200 rounded-xl cursor-pointer hover:bg-gray-50 text-sm",children:[s.jsx("input",{type:"checkbox",checked:C,onChange:M=>S(M.target.checked),className:"flex-shrink-0"}),s.jsx("span",{children:"Pool"})]})]})]}),!L&&s.jsxs("p",{className:"text-sm text-gray-400 mb-6",children:[D.length," ",D.length===1?"property":"properties"," available",c!=="all"?` in ${c}`:""]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:L?Array(6).fill(0).map((M,U)=>s.jsxs("div",{className:"rounded-2xl overflow-hidden bg-gray-100 animate-pulse",children:[s.jsx("div",{className:"h-56 bg-gray-200"}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsx("div",{className:"h-5 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded"})]})]},U)):D.length>0?D.map(M=>{var U,z;return s.jsxs("div",{className:"group rounded-2xl overflow-hidden border border-gray-100 shadow-sm hover:shadow-xl transition-all duration-300 cursor-pointer bg-white",onClick:()=>e(`/property/${M.id}`),children:[s.jsxs("div",{className:"relative overflow-hidden h-44 sm:h-56",children:[M.main_image_url?s.jsx("img",{src:M.main_image_url,alt:M.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):M.discovery_source?s.jsxs("div",{className:"w-full h-full bg-gray-50 flex flex-col justify-center gap-2 px-5",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx(rt,{className:"bg-white text-gray-700 font-semibold text-xs rounded-full px-3 border border-gray-200 border-0 capitalize",children:M.property_type}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-purple-600 bg-purple-50 rounded-full px-2 py-0.5",children:[s.jsx(ln,{className:"w-3 h-3"})," Discovered"]})]}),s.jsxs("p",{className:"text-base font-black text-gray-900",children:["R",(U=M.rent_amount)==null?void 0:U.toLocaleStr
vendor: 8,351 bytes, line 610
610ing(),s.jsx("span",{className:"text-xs font-normal text-gray-400",children:"/mo"})]}),M.suburb&&s.jsx("p",{className:"text-xs text-gray-500",children:M.suburb})]}):s.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blue-100 to-blue-200 flex items-center justify-center",children:s.jsx(wv,{className:"w-14 h-14 text-blue-300"})}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 to-transparent"}),s.jsx(rt,{className:"absolute top-3 left-3 bg-white/95 text-gray-800 font-semibold text-xs rounded-full px-3 border-0 capitalize",children:M.property_type}),M.featured&&s.jsx(rt,{className:"absolute top-3 right-3 font-bold text-xs rounded-full px-3 border-0",style:{backgroundColor:"#cafc05",color:"#000"},children:"Featured"}),s.jsxs("div",{className:"absolute bottom-3 right-3 bg-black/70 backdrop-blur-sm text-white text-sm font-black px-3 py-1 rounded-full",children:["R",(z=M.rent_amount)==null?void 0:z.toLocaleString(),s.jsx("span",{className:"text-xs font-normal opacity-70",children:"/mo"})]})]}),s.jsxs("div",{className:"p-4 md:p-5",children:[s.jsx("h3",{className:"text-base font-bold text-gray-900 mb-1 line-clamp-1",children:M.title}),s.jsx("p",{className:"text-gray-500 text-sm mb-4 line-clamp-2 leading-relaxed",children:M.description}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3 text-sm text-gray-500",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(YE,{className:"w-4 h-4"}),M.bedrooms]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(GE,{className:"w-4 h-4"}),M.bathrooms]}),M.parking_spaces>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(XE,{className:"w-4 h-4"}),M.parking_spaces]})]}),M.suburb&&s.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-400",children:[s.jsx(pn,{className:"w-3.5 h-3.5"}),M.suburb]})]})]})]},M.id)}):s.jsxs("div",{className:"col-span-full text-center py-20",children:[s.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(us,{className:"w-7 h-7 text-gray-300"})}),s.jsx("p",{className:"text-gray-500 font-medium",children:"No properties found matching your criteria"}),s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Try adjusting your search or filters"})]})})]})]})}const Gb=E.createContext(null);function gY(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const ZO=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),e4=E.createContext({}),Sr=e=>e;let t4=Sr;function Yb(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ol=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ci=e=>e*1e3,ui=e=>e/1e3,Qb=typeof window<"u",yY=Qb?E.useLayoutEffect:E.useEffect,xY={useManualTiming:!1};function vY(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(h){a.has(h)&&(d.schedule(h),e()),h(o)}const d={schedule:(h,g=!1,f=!1)=>{const p=f&&r?t:n;return g&&a.add(h),p.has(h)||p.add(h),h},cancel:h=>{n.delete(h),a.delete(h)},process:h=>{if(o=h,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(c),t.clear(),r=!1,i&&(i=!1,d.process(h))}};return d}const Df=["read","resolveKeyframes","update","preRender","render","postRender"],bY=40;function n4(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Df.reduce((y,j)=>(y[j]=vY(a),y),{}),{read:c,resolveKeyframes:d,update:h,preRender:g,render:f,postRender:m}=o,p=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,bY),1),i.timestamp=y,i.isProcessing=!0,c.process(i),d.process(i),h.process(i),g.process(i),f.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},w=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Df.reduce((y,j)=>{const _=o[j];return y[j]=(N,C=!1,S=!1)=>(n||w(),_.schedule(N,C,S)),y},{}),cancel:y=>{for(let j=0;j<Df.length;j++)o[Df[j]].cancel(y)},state:i,steps:o}}const{schedule:$t,cancel:da,state:Mn,steps:qx}=n4(typeof requestAnimationFrame<"u"?requestAnimationFrame:Sr,!0),r4=E.createContext({strict:!1}),j2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ml={};for(const e in j2)Ml[e]={isEnabled:t=>j2[e].some(n=>!!t[n])};function wY(e){for(const t in e)Ml[t]={...Ml[t],...e[t]}}const jY=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function kh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jY.has(e)}let s4=e=>!kh(e);function _Y(e){e&&(s4=t=>t.startsWith("on")?!kh(t):e(t))}try{_Y(require("@emotion/is-prop-valid").default)}catch{}function NY(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(s4(i)||n===!0&&kh(i)||!t&&!kh(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function SY(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Cm=E.createContext({});function Nu(e){return typeof e=="string"||Array.isArray(e)}function Em(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Xb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Jb=["initial",...Xb];function Tm(e){return Em(e.animate)||Jb.some(t=>Nu(e[t]))}function i4(e){return!!(Tm(e)||e.variants)}function kY(e,t){if(Tm(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Nu(n)?n:void 0,animate:Nu(r)?r:void 0}}return e.inherit!==!1?t:{}}function CY(e){const{initial:t,animate:n}=kY(e,E.useContext(Cm));return E.useMemo(()=>({initial:t,animate:n}),[_2(t),_2(n)])}function _2(e){return Array.isArray(e)?e.join(" "):e}const EY=Symbol.for("motionComponentSymbol");function rl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TY(e,t,n){return E.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):rl(n)&&(n.current=r))},[t])}const Zb=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),PY="framerAppearId",a4="data-"+Zb(PY),{schedule:ew}=n4(queueMicrotask,!1),o4=E.createContext({});function AY(e,t,n,r,i){var a,o;const{visualElement:c}=E.useContext(Cm),d=E.useContext(r4),h=E.useContext(Gb),g=E.useContext(ZO).reducedMotion,f=E.useRef(null);r=r||d.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:g}));const m=f.current,p=E.useContext(o4);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&RY(f.current,n,i,p);const w=E.useRef(!1);E.useInsertionEffect(()=>{m&&w.current&&m.update(n,h)});const x=n[a4],v=E.useRef(!!x&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,x))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,x)));return yY(()=>{m&&(w.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),ew.render(m.render),v.current&&m.animationState&&m.animationState.animateChanges())}),E.useEffect(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,x)}),v.current=!1))}),m}function RY(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:c,layoutScroll:d,layoutRoot:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:l4(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||c&&rl(c),visualElement:e,animationType:typeof a=="str
610ing"?a:"both",initialPromotionConfig:r,layoutScroll:d,layoutRoot:h})}function l4(e){if(e)return e.options.allowProjection!==!1?e.projection:l4(e.parent)}function OY({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var a,o;e&&wY(e);function c(h,g){let f;const m={...E.useContext(ZO),...h,layoutId:MY(h)},{isStatic:p}=m,w=CY(h),x=r(h,p);if(!p&&Qb){LY();const v=DY(m);f=v.MeasureLayout,w.visualElement=AY(i,x,m,t,v.ProjectionNode)}return s.jsxs(Cm.Provider,{value:w,children:[f&&w.visualElement?s.jsx(f,{visualElement:w.visualElement,...m}):null,n(i,h,TY(x,w.visualElement,g),x,p,w.visualElement)]})}c.displayName=`motion.${typeof i=="string"?i:`create(${(o=(a=i.displayName)!==null&&a!==void 0?a:i.name)!==null&&o!==void 0?o:""})`}`;const d=E.forwardRef(c);return d[EY]=i,d}function MY({layoutId:e}){const t=E.useContext(e4).id;return t&&e!==void 0?t+"-"+e:e}function LY(e,t){E.useContext(r4).strict}function DY(e){const{drag:t,layout:n}=Ml;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const IY=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function tw(e){return typeof e!="string"||e.includes("-")?!1:!!(IY.indexOf(e)>-1||/[A-Z]/u.test(e))}function c4(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const u4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function d4(e,t,n,r){c4(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(u4.has(i)?i:Zb(i),t.attrs[i])}const Wn=e=>!!(e&&e.getVelocity),Ch={};function FY(e){Object.assign(Ch,e)}const rd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xo=new Set(rd);function f4(e,{layout:t,layoutId:n}){return xo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ch[e]||e==="opacity")}function nw(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(Wn(i[o])||t.style&&Wn(t.style[o])||f4(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return a}function h4(e,t,n){const r=nw(e,t,n);for(const i in e)if(Wn(e[i])||Wn(t[i])){const a=rd.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function N2(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function rw(e,t,n,r){if(typeof t=="function"){const[i,a]=N2(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=N2(r);t=t(n!==void 0?n:e.custom,i,a)}return t}const v0=e=>Array.isArray(e),BY=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),qY=e=>v0(e)?e[e.length-1]||0:e;function ih(e){const t=Wn(e)?e.get():e;return BY(t)?t.toValue():t}function UY({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:$Y(r,i,a,e),renderState:t()};return n&&(o.mount=c=>n(r,c,o)),o}const m4=e=>(t,n)=>{const r=E.useContext(Cm),i=E.useContext(Gb),a=()=>UY(e,t,r,i);return n?a():gY(a)};function $Y(e,t,n,r){const i={},a=r(e,{});for(const m in a)i[m]=ih(a[m]);let{initial:o,animate:c}=e;const d=Tm(e),h=i4(e);t&&h&&!d&&e.inherit!==!1&&(o===void 0&&(o=t.initial),c===void 0&&(c=t.animate));let g=n?n.initial===!1:!1;g=g||o===!1;const f=g?c:o;if(f&&typeof f!="boolean"&&!Em(f)){const m=Array.isArray(f)?f:[f];for(let p=0;p<m.length;p++){const w=rw(e,m[p]);if(w){const{transitionEnd:x,transition:v,...y}=w;for(const j in y){let _=y[j];if(Array.isArray(_)){const N=g?_.length-1:0;_=_[N]}_!==null&&(i[j]=_)}for(const j in x)i[j]=x[j]}}}return i}const sw=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),p4=()=>({...sw(),attrs:{}}),g4=(e,t)=>t&&typeof e=="number"?t.transform(e):e,gi=(e,t,n)=>n>t?t:n<e?e:n,Ql={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Su={...Ql,transform:e=>gi(0,1,e)},If={...Ql,default:1},sd=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ki=sd("deg"),Ms=sd("%"),nt=sd("px"),zY=sd("vh"),VY=sd("vw"),S2={...Ms,parse:e=>Ms.parse(e)/100,transform:e=>Ms.transform(e*100)},HY={borderWidth:nt,borderTopWidth:nt,borderRightWidth:nt,borderBottomWidth:nt,borderLeftWidth:nt,borderRadius:nt,radius:nt,borderTopLeftRadius:nt,borderTopRightRadius:nt,borderBottomRightRadius:nt,borderBottomLeftRadius:nt,width:nt,maxWidth:nt,height:nt,maxHeight:nt,top:nt,right:nt,bottom:nt,left:nt,padding:nt,paddingTop:nt,paddingRight:nt,paddingBottom:nt,paddingLeft:nt,margin:nt,marginTop:nt,marginRight:nt,marginBottom:nt,marginLeft:nt,backgroundPositionX:nt,backgroundPositionY:nt},WY={rotate:Ki,rotateX:Ki,rotateY:Ki,rotateZ:Ki,scale:If,scaleX:If,scaleY:If,scaleZ:If,skew:Ki,skewX:Ki,skewY:Ki,distance:nt,translateX:nt,translateY:nt,translateZ:nt,x:nt,y:nt,z:nt,perspective:nt,transformPerspective:nt,opacity:Su,originX:S2,originY:S2,originZ:nt},k2={...Ql,transform:Math.round},iw={...HY,...WY,zIndex:k2,size:nt,fillOpacity:Su,strokeOpacity:Su,numOctaves:k2},KY={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},GY=rd.length;
vendor: 26,866 bytes, line 610
610function YY(e,t,n){let r="",i=!0;for(let a=0;a<GY;a++){const o=rd[a],c=e[o];if(c===void 0)continue;let d=!0;if(typeof c=="number"?d=c===(o.startsWith("scale")?1:0):d=parseFloat(c)===0,!d||n){const h=g4(c,iw[o]);if(!d){i=!1;const g=KY[o]||o;r+=`${g}(${h}) `}n&&(t[o]=h)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}const y4=e=>t=>typeof t=="string"&&t.startsWith(e),x4=y4("--"),QY=y4("var(--"),aw=e=>QY(e)?XY.test(e.split("/*")[0].trim()):!1,XY=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ow(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,c=!1;for(const d in t){const h=t[d];if(xo.has(d)){o=!0;continue}else if(x4(d)){i[d]=h;continue}else{const g=g4(h,iw[d]);d.startsWith("origin")?(c=!0,a[d]=g):r[d]=g}}if(t.transform||(o||n?r.transform=YY(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:g=0}=a;r.transformOrigin=`${d} ${h} ${g}`}}function C2(e,t,n){return typeof e=="string"?e:nt.transform(t+n*e)}function JY(e,t,n){const r=C2(t,e.x,e.width),i=C2(n,e.y,e.height);return`${r} ${i}`}const ZY={offset:"stroke-dashoffset",array:"stroke-dasharray"},eQ={offset:"strokeDashoffset",array:"strokeDasharray"};function tQ(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?ZY:eQ;e[a.offset]=nt.transform(-r);const o=nt.transform(t),c=nt.transform(n);e[a.array]=`${o} ${c}`}function lw(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:c=1,pathOffset:d=0,...h},g,f){if(ow(e,h,f),g){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:p,dimensions:w}=e;m.transform&&(w&&(p.transform=m.transform),delete m.transform),w&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=JY(w,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(m.x=t),n!==void 0&&(m.y=n),r!==void 0&&(m.scale=r),o!==void 0&&tQ(m,o,c,d,!1)}const cw=e=>typeof e=="string"&&e.toLowerCase()==="svg",nQ={useVisualState:m4({scrapeMotionValuesFromProps:h4,createRenderState:p4,onMount:(e,t,{renderState:n,latestValues:r})=>{$t.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),$t.render(()=>{lw(n,r,cw(t.tagName),e.transformTemplate),d4(t,n)})}})},rQ={useVisualState:m4({scrapeMotionValuesFromProps:nw,createRenderState:sw})};function v4(e,t,n){for(const r in t)!Wn(t[r])&&!f4(r,n)&&(e[r]=t[r])}function sQ({transformTemplate:e},t){return E.useMemo(()=>{const n=sw();return ow(n,t,e),Object.assign({},n.vars,n.style)},[t])}function iQ(e,t){const n=e.style||{},r={};return v4(r,n,e),Object.assign(r,sQ(e,t)),r}function aQ(e,t){const n={},r=iQ(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function oQ(e,t,n,r){const i=E.useMemo(()=>{const a=p4();return lw(a,t,cw(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};v4(a,e.style,e),i.style={...a,...i.style}}return i}function lQ(e=!1){return(n,r,i,{latestValues:a},o)=>{const d=(tw(n)?oQ:aQ)(r,a,o,n),h=NY(r,typeof n=="string",e),g=n!==E.Fragment?{...h,...d,ref:i}:{},{children:f}=r,m=E.useMemo(()=>Wn(f)?f.get():f,[f]);return E.createElement(n,{...g,children:m})}}function cQ(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...tw(r)?nQ:rQ,preloadedFeatures:e,useRender:lQ(i),createVisualElement:t,Component:r};return OY(o)}}function b4(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Pm(e,t,n){const r=e.getProps();return rw(r,t,n!==void 0?n:r.custom,e)}const uQ=Yb(()=>window.ScrollTimeline!==void 0);class dQ{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(uQ()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class fQ extends dQ{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function uw(e,t){return e?e[t]||e.default||e:void 0}const b0=2e4;function w4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<b0;)t+=n,r=e.next(t);return t>=b0?1/0:t}function dw(e){return typeof e=="function"}function E2(e,t){e.timeline=t,e.onfinish=null}const fw=e=>Array.isArray(e)&&typeof e[0]=="number",hQ={linearEasing:void 0};function mQ(e,t){const n=Yb(e);return()=>{var r;return(r=hQ[t])!==null&&r!==void 0?r:n()}}const Eh=mQ(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),j4=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=e(Ol(0,i-1,a))+", ";return`linear(${r.substring(0,r.length-2)})`};function _4(e){return!!(typeof e=="function"&&Eh()||!e||typeof e=="string"&&(e in w0||Eh())||fw(e)||Array.isArray(e)&&e.every(_4))}const tu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,w0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tu([0,.65,.55,1]),circOut:tu([.55,0,1,.45]),backIn:tu([.31,.01,.66,-.59]),backOut:tu([.33,1.53,.69,.99])};function N4(e,t){if(e)return typeof e=="function"&&Eh()?j4(e,t):fw(e)?tu(e):Array.isArray(e)?e.map(n=>N4(n,t)||w0.easeOut):w0[e]}const is={x:!1,y:!1};function S4(){return is.x||is.y}function pQ(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const a=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function k4(e,t){const n=pQ(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function T2(e){return t=>{t.pointerType==="touch"||S4()||e(t)}}function gQ(e,t,n={}){const[r,i,a]=k4(e,n),o=T2(c=>{const{target:d}=c,h=t(c);if(typeof h!="function"||!d)return;const g=T2(f=>{h(f),d.removeEventListener("pointerleave",g)});d.addEventListener("pointerleave",g,i)});return r.forEach(c=>{c.addEventListener("pointerenter",o,i)}),a}const C4=(e,t)=>t?e===t?!0:C4(e,t.parentElement):!1,hw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yQ=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function xQ(e){return yQ.has(e.tagName)||e.tabIndex!==-1}const nu=new WeakSet;function P2(e){return t=>{t.key==="Enter"&&e(t)}}function Ux(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vQ=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=P2(()=>{if(nu.has(n))return;Ux(n,"down");const i=P2(()=>{Ux(n,"up")}),a=()=>Ux(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function A2(e){return hw(e)&&!S4()}function bQ(e,t,n={}){const[r,i,a]=k4(e,n),o=c=>{const d=c.currentTarget;if(!A2(c)||nu.has(d))return;nu.add(d);const h=t(c),g=(p,w)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),!(!A2(p)||!nu.has(d))&&(nu.delete(d),typeof h=="function"&&h(p,{success:w}))},f=p=>{g(p,n.useGlobalTarget||C4(d,p.target))},m=p=>{g(p,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(c=>{!xQ(c)&&c.getAttribute("tabindex")===null&&(c.tabIndex=0),(n.useGlobalTarget?window:c).addEventListener("pointerdown",o,i),c.addEventListener("focus",h=>vQ(h,i),i)}),a}function wQ(e){return e==="x"||e==="y"?is[e]?null:(is[e]=!0,()=>{is[e]=!1}):is.x||is.y?null:(is.x=is.y=!0,()=>{is.x=is.y=!1})}let ah;function jQ(){ah=void 0}const Ls={now:()=>(ah===void 0&&Ls.set(Mn.isProcessing||xY.useManualTiming?Mn.timestamp:performance.now()),ah),set:e=>{ah=e,queueMicrotask(jQ)}};function mw(e,t){e.indexOf(t)===-1&&e.push(t)}function pw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class gw{constructor(){this.subscriptions=[]}add(t){return mw(this.subscriptions,t),()=>pw(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function E4(e,t){return t?e*(1e3/t):0}const R2=30,_Q=e=>!isNaN(parseFloat(e));class NQ{constructor(t,n={}){this.version="11.16.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Ls.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ls.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=_Q(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new gw);const r=this.events[t].add(n);return t==="change"?()=>{r(),$t.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ls.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>R2)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,R2);return E4(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ku(e,t){return new NQ(e,t)}function SQ(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ku(n))}function kQ(e,t){const n=Pm(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const c=qY(a[o]);SQ(e,o,c)}}function CQ(e){return!!(Wn(e)&&e.add)}function j0(e,t){const n=e.getValue("willChange");if(CQ(n))return n.add(t)}function T4(e){return e.props[a4]}const P4=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,EQ=1e-7,TQ=12;function PQ(e,t,n,r,i){let a,o,c=0;do o=t+(n-t)/2,a=P4(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>EQ&&++c<TQ);return o}function id(e,t,n,r){if(e===t&&n===r)return Sr;const i=a=>PQ(a,0,1,e,n);return a=>a===0||a===1?a:P4(i(a),t,r)}const A4=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,R4=e=>t=>1-e(1-t),O4=id(.33,1.53,.69,.99),yw=R4(O4),M4=A4(yw),L4=e=>(e*=2)<1?.5*yw(e):.5*(2-Math.pow(2,-10*(e-1))),xw=e=>1-Math.sin(Math.acos(e)),D4=R4(xw),I4=A4(xw),F4=e=>/^0[^.\s]+$/u.test(e);function AQ(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||F4(e):!0}const B4=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),RQ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function OQ(e){const t=RQ.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function q4(e,t,n=1){const[r,i]=OQ(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return B4(o)?parseFloat(o):o}return aw(i)?q4(i,t,n+1):i}const MQ=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),O2=e=>e===Ql||e===nt,M2=(e,t)=>parseFloat(e.split(", ")[t]),L2=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return M2(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?M2(a[1],e):0}},LQ=new Set(["x","y","z"]),DQ=rd.filter(e=>!LQ.has(e));function IQ(e){const t=[];return DQ.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ll={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:L2(4,13),y:L2(5,14)};Ll.translateX=Ll.x;Ll.translateY=Ll.y;const U4=e=>t=>t.test(e),FQ={test:e=>e==="auto",parse:e=>e},$4=[Ql,nt,Ms,Ki,VY,zY,FQ],D2=e=>$4.find(U4(e)),no=new Set;let _0=!1,N0=!1;function z4(){if(N0){const e=Array.from(no).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=IQ(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var c;(c=r.getValue(a))===null||c===void 0||c.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}N0=!1,_0=!1,no.forEach(e=>e.complete()),no.clear()}function V4(){no.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(N0=!0)})}function BQ(){V4(),z4()}class vw{constructor(t,n,r,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(no.add(this),_0||(_0=!0,$t.read(V4),$t.resolveKeyframes(z4))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=i==null?void 0:i.get(),c=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const d=r.readValue(n,c);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=c),i&&o===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),no.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,no.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ou=e=>Math.round(e*1e5)/1e5,bw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qQ(e){return e==null}const UQ=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ww=(e,t)=>n=>!!(typeof n=="string"&&UQ.test(n)&&n.startsWith(e)||t&&!qQ(n)&&Object.prototype.hasOwnProperty.call(n,t)),H4=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,c]=r.match(bw);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:c!==void 0?parseFloat(c):1}},$Q=e=>gi(0,255,e),$x={...Ql,transform:e=>Math.round($Q(e))},Ha={test:ww("rgb","red"),parse:H4("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$x.transform(e)+", "+$x.transform(t)+", "+$x.transform(n)+", "+ou(Su.transform(r))+")"};function zQ(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const S0={test:ww("#"),parse:zQ,transform:Ha.transform},sl={test:ww("hsl","hue"),parse:H4("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ms.transform(ou(t))+", "+Ms.transform(ou(n))+", "+ou(Su.transform(r))+")"},zn={test:e=>Ha.test(e)||S0.test(e)||sl.test(e),parse:e=>Ha.test(e)?Ha.parse(e):sl.test(e)?sl.parse(e):S0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ha.transform(e):sl.transform(e)},VQ=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function HQ(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(bw))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(VQ))===null||n===void 0?void 0:n.length)||0)>0}const W4="number",K4="color",WQ="var",KQ="var(",I2="${}",GQ=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Cu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const c=t.replace(GQ,d=>(zn.test(d)?(r.color.push(a),i.push(K4),n.push(zn.parse(d))):d.startsWith(KQ)?(r.var.push(a),i.push(WQ),n.push(d)):(r.number.push(a),i.push(W4),n.push(parseFloat(d))),++a,I2)).split(I2);return{values:n,split:c,indexes:r,types:i}}function G4(e){return Cu(e).values}function Y4(e){const{split:t,types:n}=Cu(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const c=n[o];c===W4?a+=ou(i[o]):c===K4?a+=zn.transform(i[o]):a+=i[o]}return a}}const YQ=e=>typeof e=="number"?0:e;function QQ(e){const t=G4(e);return Y4(e)(t.map(YQ))}const fa={test:HQ,parse:G4,createTransformer:Y4,getAnimatableNone:QQ},XQ=new Set(["brightness","contrast","saturate","opacity"]);function JQ(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(bw)||[];if(!r)return e;const i=n.replace(r,"");let a=XQ.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const ZQ=/\b([a-z-]*)\(.*?\)/gu,k0={...fa,getAnimatableNone:e=>{const t=e.match(ZQ);return t?t.map(JQ).join(" "):e}},eX={...iw,color:zn,backgroundColor:zn,outlineColor:zn,fill:zn,stroke:zn,borderColor:zn,borderTopColor:zn,borderRightColor:zn,borderBottomColor:zn,borderLeftColor:zn,filter:k0,WebkitFilter:k0},jw=e=>eX[e];function Q4(e,t){let n=jw(e);return n!==k0&&(n=fa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const tX=new Set(["auto","none","0"]);function nX(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!tX.has(a)&&Cu(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=Q4(n,i)}class X4 extends vw{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),aw(h))){const g=q4(h,n.current);g!==void 0&&(t[d]=g),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!MQ.has(r)||t.length!==2)return;const[i,a]=t,o=D2(i),c=D2(a);if(o!==c)if(O2(o)&&O2(c))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)AQ(t[i])&&r.push(i);r.length&&nX(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ll[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,c=i[o];i[o]=Ll[r](n.measureViewportBox(),window.getComputedStyle(n.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([d,h])=>{n.getValue(d).set(h)}),this.resolveNoneKeyframes()}}const F2=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(fa.test(e)||e==="0")&&!e.startsWith("url("));function rX(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function sX(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=F2(i,t),c=F2(a,t);return!o||!c?!1:rX(e)||(n==="spring"||dw(n))&&r}const iX=e=>e!==null;function Am(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(iX),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const aX=40;class J4{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ls.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>aX?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&BQ(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ls.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:c,onUpdate:d,isGenerator:h}=this.options;if(!h&&!sX(t,r,i,a))if(o)this.options.duration=0;else{d==null||d(Am(t,this.options,n)),c==null||c(),this.resolveFinishedPromise();return}const g=this.initPlayback(t,n);g!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...g},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Gt=(e,t,n)=>e+(t-e)*n;function zx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function oX({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const c=n<.5?n*(1+t):n+t-n*t,d=2*n-c;i=zx(d,c,e+1/3),a=zx(d,c,e),o=zx(d,c,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Th(e,t){return n=>n>0?t:e}const Vx=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},lX=[S0,Ha,sl],cX=e=>lX.find(t=>t.test(e));function B2(e){const t=cX(e);if(!t)return!1;let n=t.parse(e);return t===sl&&(n=oX(n)),n}const q2=(e,t)=>{const n=B2(e),r=B2(t);if(!n||!r)return Th(e,t);const i={...n};return a=>(i.red=Vx(n.red,r.red,a),i.green=Vx(n.green,r.green,a),i.blue=Vx(n.blue,r.blue,a),i.alpha=Gt(n.alpha,r.alpha,a),Ha.transform(i))},uX=(e,t)=>n=>t(e(n)),ad=(...e)=>e.reduce(uX),C0=new Set(["none","hidden"]);function dX(e,t){return C0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function fX(e,t){return n=>Gt(e,t,n)}function _w(e){return typeof e=="number"?fX:typeof e=="string"?aw(e)?Th:zn.test(e)?q2:pX:Array.isArray(e)?Z4:typeof e=="object"?zn.test(e)?q2:hX:Th}function Z4(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>_w(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function hX(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=_w(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function mX(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],c=e.indexes[o][i[o]],d=(n=e.values[c])!==null&&n!==void 0?n:0;r[a]=d,i[o]++}return r}const pX=(e,t)=>{const n=fa.createTransformer(t),r=Cu(e),i=Cu(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?C0.has(e)&&!i.values.length||C0.has(t)&&!r.values.length?dX(e,t):ad(Z4(mX(r,i),i.values),n):Th(e,t)};function e5(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Gt(e,t,n):_w(e)(e,t)}const gX=5;function t5(e,t,n){const r=Math.max(t-gX,0);return E4(n-e(r),t-r)}const Zt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Hx=.001;function yX({duration:e=Zt.duration,bounce:t=Zt.bounce,velocity:n=Zt.velocity,mass:r=Zt.mass}){let i,a,o=1-t;o=gi(Zt.minDamping,Zt.maxDamping,o),e=gi(Zt.minDuration,Zt.maxDuration,ui(e)),o<1?(i=h=>{const g=h*o,f=g*e,m=g-n,p=E0(h,o),w=Math.exp(-f);return Hx-m/p*w},a=h=>{const f=h*o*e,m=f*n+n,p=Math.pow(o,2)*Math.pow(h,2)*e,w=Math.exp(-f),x=E0(Math.pow(h,2),o);return(-i(h)+Hx>0?-1:1)*((m-p)*w)/x}):(i=h=>{const g=Math.exp(-h*e),f=(h-n)*e+1;return-Hx+g*f},a=h=>{const g=Math.exp(-h*e),f=(n-h)*(e*e);return g*f});const c=5/e,d=vX(i,a,c);if(e=ci(e),isNaN(d))return{stiffness:Zt.stiffness,damping:Zt.damping,duration:e};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:o*2*Math.sqrt(r*h),duration:e}}}const xX=12;function vX(e,t,n){let r=n;for(let i=1;i<xX;i++)r=r-e(r)/t(r);return r}function E0(e,t){return e*Math.sqrt(1-t*t)}const bX=["duration","bounce"],wX=["stiffness","damping","mass"];function U2(e,t){return t.some(n=>e[n]!==void 0)}function jX(e){let t={velocity:Zt.velocity,stiffness:Zt.stiffness,damping:Zt.damping,mass:Zt.mass,isResolvedFromDuration:!1,...e};if(!U2(e,wX)&&U2(e,bX))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*gi(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Zt.mass,stiffness:i,damping:a}}else{const n=yX(e);t={...t,...n,mass:Zt.mass},t.isResolvedFromDuration=!0}return t}function n5(e=Zt.visualDuration,t=Zt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],c={done:!1,value:a},{stiffness:d,damping:h,mass:g,duration:f,velocity:m,isResolvedFromDuration:p}=jX({...n,velocity:-ui(n.velocity||0)}),w=m||0,x=h/(2*Math.sqrt(d*g)),v=o-a,y=ui(Math.sqrt(d/g)),j=Math.abs(v)<5;r||(r=j?Zt.restSpeed.granular:Zt.restSpeed.default),i||(i=j?Zt.restDelta.granular:Zt.restDelta.default);let _;if(x<1){const C=E0(y,x);_=S=>
vendor: 5,706 bytes, line 610
610{const P=Math.exp(-x*y*S);return o-P*((w+x*y*v)/C*Math.sin(C*S)+v*Math.cos(C*S))}}else if(x===1)_=C=>o-Math.exp(-y*C)*(v+(w+y*v)*C);else{const C=y*Math.sqrt(x*x-1);_=S=>{const P=Math.exp(-x*y*S),R=Math.min(C*S,300);return o-P*((w+x*y*v)*Math.sinh(R)+C*v*Math.cosh(R))/C}}const N={calculatedDuration:p&&f||null,next:C=>{const S=_(C);if(p)c.done=C>=f;else{let P=0;x<1&&(P=C===0?ci(w):t5(_,C,S));const R=Math.abs(P)<=r,L=Math.abs(o-S)<=i;c.done=R&&L}return c.value=c.done?o:S,c},toString:()=>{const C=Math.min(w4(N),b0),S=j4(P=>N.next(C*P).value,C,30);return C+"ms "+S}};return N}function $2({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:c,max:d,restDelta:h=.5,restSpeed:g}){const f=e[0],m={done:!1,value:f},p=R=>c!==void 0&&R<c||d!==void 0&&R>d,w=R=>c===void 0?d:d===void 0||Math.abs(c-R)<Math.abs(d-R)?c:d;let x=n*t;const v=f+x,y=o===void 0?v:o(v);y!==v&&(x=y-f);const j=R=>-x*Math.exp(-R/r),_=R=>y+j(R),N=R=>{const L=j(R),D=_(R);m.done=Math.abs(L)<=h,m.value=m.done?y:D};let C,S;const P=R=>{p(m.value)&&(C=R,S=n5({keyframes:[m.value,w(m.value)],velocity:t5(_,R,m.value),damping:i,stiffness:a,restDelta:h,restSpeed:g}))};return P(0),{calculatedDuration:null,next:R=>{let L=!1;return!S&&C===void 0&&(L=!0,N(R),P(R)),C!==void 0&&R>=C?S.next(R-C):(!L&&N(R),m)}}}const _X=id(.42,0,1,1),NX=id(0,0,.58,1),r5=id(.42,0,.58,1),SX=e=>Array.isArray(e)&&typeof e[0]!="number",kX={linear:Sr,easeIn:_X,easeInOut:r5,easeOut:NX,circIn:xw,circInOut:I4,circOut:D4,backIn:yw,backInOut:M4,backOut:O4,anticipate:L4},z2=e=>{if(fw(e)){t4(e.length===4);const[t,n,r,i]=e;return id(t,n,r,i)}else if(typeof e=="string")return kX[e];return e};function CX(e,t,n){const r=[],i=n||e5,a=e.length-1;for(let o=0;o<a;o++){let c=i(e[o],e[o+1]);if(t){const d=Array.isArray(t)?t[o]||Sr:t;c=ad(d,c)}r.push(c)}return r}function EX(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(t4(a===t.length),a===1)return()=>t[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=CX(t,r,i),c=o.length,d=h=>{let g=0;if(c>1)for(;g<e.length-2&&!(h<e[g+1]);g++);const f=Ol(e[g],e[g+1],h);return o[g](f)};return n?h=>d(gi(e[0],e[a-1],h)):d}function TX(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ol(0,t,r);e.push(Gt(n,1,i))}}function PX(e){const t=[0];return TX(t,e.length-1),t}function AX(e,t){return e.map(n=>n*t)}function RX(e,t){return e.map(()=>t||r5).splice(0,e.length-1)}function Ph({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=SX(r)?r.map(z2):z2(r),a={done:!1,value:t[0]},o=AX(n&&n.length===t.length?n:PX(t),e),c=EX(o,t,{ease:Array.isArray(i)?i:RX(t,i)});return{calculatedDuration:e,next:d=>(a.value=c(d),a.done=d>=e,a)}}const OX=e=>{const t=({timestamp:n})=>e(n);return{start:()=>$t.update(t,!0),stop:()=>da(t),now:()=>Mn.isProcessing?Mn.timestamp:Ls.now()}},MX={decay:$2,inertia:$2,tween:Ph,keyframes:Ph,spring:n5},LX=e=>e/100;class Nw extends J4{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:d}=this.options;d&&d()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||vw,c=(d,h)=>this.onKeyframesResolved(d,h);this.resolver=new o(a,c,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,c=dw(n)?n:MX[n]||Ph;let d,h;c!==Ph&&typeof t[0]!="number"&&(d=ad(LX,e5(t[0],t[1])),t=[0,100]);const g=c({...this.options,keyframes:t});a==="mirror"&&(h=c({...this.options,keyframes:[...t].reverse(),velocity:-o})),g.calculatedDuration===null&&(g.calculatedDuration=w4(g));const{calculatedDuration:f}=g,m=f+i,p=m*(r+1)-i;return{generator:g,mirroredGenerator:h,mapPercentToKeyframes:d,calculatedDuration:f,resolvedDuration:m,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:c,keyframes:d,calculatedDuration:h,totalDuration:g,resolvedDuration:f}=r;if(this.startTime===null)return a.next(0);const{delay:m,repeat:p,repeatType:w,repeatDelay:x,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-g/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-m*(this.speed>=0?1:-1),j=this.speed>=0?y<0:y>g;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let _=this.currentTime,N=a;if(p){const R=Math.min(this.currentTime,g)/f;let L=Math.floor(R),D=R%1;!D&&R>=1&&(D=1),D===1&&L--,L=Math.min(L,p+1),!!(L%2)&&(w==="reverse"?(D=1-D,x&&(D-=x/f)):w==="mirror"&&(N=o)),_=gi(0,1,D)*f}const C=j?{done:!1,value:d[0]}:N.next(_);c&&(C.value=c(C.value));let{done:S}=C;!j&&h!==null&&(S=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return P&&i!==void 0&&(C.value=Am(d,this.options,i)),v&&v(C.value),P&&this.finish(),C}get duration(){const{resolved:t}=this;return t?ui(t.calculatedDuration):0}
vendor: 66,848 bytes, line 610
610get time(){return ui(this.currentTime)}set time(t){t=ci(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ui(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=OX,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const DX=new Set(["opacity","clipPath","filter","transform"]);function IX(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:c="easeInOut",times:d}={}){const h={[t]:n};d&&(h.offset=d);const g=N4(c,i);return Array.isArray(g)&&(h.easing=g),e.animate(h,{delay:r,duration:i,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}const FX=Yb(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ah=10,BX=2e4;function qX(e){return dw(e.type)||e.type==="spring"||!_4(e.ease)}function UX(e,t){const n=new Nw({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&a<BX;)r=n.sample(a),i.push(r.value),a+=Ah;return{times:void 0,keyframes:i,duration:a-Ah,ease:"linear"}}const s5={anticipate:L4,backInOut:M4,circInOut:I4};function $X(e){return e in s5}class V2 extends J4{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new X4(a,(o,c)=>this.onKeyframesResolved(o,c),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:c,motionValue:d,name:h,startTime:g}=this.options;if(!(!((r=d.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Eh()&&$X(o)&&(o=s5[o]),qX(this.options)){const{onComplete:m,onUpdate:p,motionValue:w,element:x,...v}=this.options,y=UX(t,v);t=y.keyframes,t.length===1&&(t[1]=t[0]),i=y.duration,a=y.times,o=y.ease,c="keyframes"}const f=IX(d.owner.current,h,t,{...this.options,duration:i,times:a,ease:o});return f.startTime=g??this.calcStartTime(),this.pendingTimeline?(E2(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:m}=this.options;d.set(Am(t,this.options,n)),m&&m(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:a,type:c,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ui(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ui(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ci(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Sr;const{animation:r}=n;E2(r,t)}return Sr}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:o,times:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:h,onUpdate:g,onComplete:f,element:m,...p}=this.options,w=new Nw({...p,keyframes:r,duration:i,type:a,ease:o,times:c,isGenerator:!0}),x=ci(this.time);h.setWithVelocity(w.sample(x-Ah).value,w.sample(x).value,Ah)}const{onStop:d}=this.options;d&&d(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:c}=t;return FX()&&r&&DX.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&c!=="inertia"}}const zX={type:"spring",stiffness:500,damping:25,restSpeed:10},VX=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HX={type:"keyframes",duration:.8},WX={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},KX=(e,{keyframes:t})=>t.length>2?HX:xo.has(e)?e.startsWith("scale")?VX(t[1]):zX:WX;function GX({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:c,from:d,elapsed:h,...g}){return!!Object.keys(g).length}const Sw=(e,t,n,r={},i,a)=>o=>{const c=uw(r,e)||{},d=c.delay||r.delay||0;let{elapsed:h=0}=r;h=h-ci(d);let g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-h,onUpdate:m=>{t.set(m),c.onUpdate&&c.onUpdate(m)},onComplete:()=>{o(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:a?void 0:i};GX(c)||(g={...g,...KX(e,g)}),g.duration&&(g.duration=ci(g.duration)),g.repeatDelay&&(g.repeatDelay=ci(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let f=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(f=!0)),f&&!a&&t.get()!==void 0){const m=Am(g.keyframes,c);if(m!==void 0)return $t.update(()=>{g.onUpdate(m),g.onComplete()}),new fQ([])}return!a&&V2.supports(g)?new V2(g):new Nw(g)};function YX({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function i5(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:c,...d}=t;r&&(o=r);const h=[],g=i&&e.animationState&&e.animationState.getState()[i];for(const f in d){const m=e.getValue(f,(a=e.latestValues[f])!==null&&a!==void 0?a:null),p=d[f];if(p===void 0||g&&YX(g,f))continue;const w={delay:n,...uw(o||{},f)};let x=!1;if(window.MotionHandoffAnimation){const y=T4(e);if(y){const j=window.MotionHandoffAnimation(y,f,$t);j!==null&&(w.startTime=j,x=!0)}}j0(e,f),m.start(Sw(f,m,p,e.shouldReduceMotion&&xo.has(f)?{type:!1}:w,e,x));const v=m.animation;v&&h.push(v)}return c&&Promise.all(h).then(()=>{$t.update(()=>{c&&kQ(e,c)})}),h}function T0(e,t,n={}){var r;const i=Pm(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(i5(e,i,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:g=0,staggerChildren:f,staggerDirection:m}=a;return QX(e,t,g+h,f,m,n)}:()=>Promise.resolve(),{when:d}=a;if(d){const[h,g]=d==="beforeChildren"?[o,c]:[c,o];return h().then(()=>g())}else return Promise.all([o(),c(n.delay)])}function QX(e,t,n=0,r=0,i=1,a){const o=[],c=(e.variantChildren.size-1)*r,d=i===1?(h=0)=>h*r:(h=0)=>c-h*r;return Array.from(e.variantChildren).sort(XX).forEach((h,g)=>{h.notify("AnimationStart",t),o.push(T0(h,t,{...a,delay:n+d(g)}).then(()=>h.notify("AnimationComplete",t)))}),Promise.all(o)}function XX(e,t){return e.sortNodePosition(t)}function JX(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>T0(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=T0(e,t,n);else{const i=typeof t=="function"?Pm(e,t,n.custom):t;r=Promise.all(i5(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const ZX=Jb.length;function a5(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?a5(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ZX;n++){const r=Jb[n],i=e.props[r];(Nu(i)||i===!1)&&(t[r]=i)}return t}const eJ=[...Xb].reverse(),tJ=Xb.length;function nJ(e){return t=>Promise.all(t.map(({animation:n,options:r})=>JX(e,n,r)))}function rJ(e){let t=nJ(e),n=H2(),r=!0;const i=d=>(h,g)=>{var f;const m=Pm(e,g,d==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(m){const{transition:p,transitionEnd:w,...x}=m;h={...h,...x,...w}}return h};function a(d){t=d(e)}function o(d){const{props:h}=e,g=a5(e.parent)||{},f=[],m=new Set;let p={},w=1/0;for(let v=0;v<tJ;v++){const y=eJ[v],j=n[y],_=h[y]!==void 0?h[y]:g[y],N=Nu(_),C=y===d?j.isActive:null;C===!1&&(w=v);let S=_===g[y]&&_!==h[y]&&N;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),j.protectedKeys={...p},!j.isActive&&C===null||!_&&!j.prevProp||Em(_)||typeof _=="boolean")continue;const P=sJ(j.prevProp,_);let R=P||y===d&&j.isActive&&!S&&N||v>w&&N,L=!1;const D=Array.isArray(_)?_:[_];let T=D.reduce(i(y),{});C===!1&&(T={});const{prevResolvedValues:O={}}=j,M={...O,...T},U=Y=>{R=!0,m.has(Y)&&(L=!0,m.delete(Y)),j.needsAnimating[Y]=!0;const G=e.getValue(Y);G&&(G.liveStyle=!1)};for(const Y in M){const G=T[Y],$=O[Y];if(p.hasOwnProperty(Y))continue;let I=!1;v0(G)&&v0($)?I=!b4(G,$):I=G!==$,I?G!=null?U(Y):m.add(Y):G!==void 0&&m.has(Y)?U(Y):j.protectedKeys[Y]=!0}j.prevProp=_,j.prevResolvedValues=T,j.isActive&&(p={...p,...T}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(S&&P)||L)&&f.push(...D.map(Y=>({animation:Y,options:{type:y}})))}if(m.size){const v={};m.forEach(y=>{const j=e.getBaseTarget(y),_=e.getValue(y);_&&(_.liveStyle=!0),v[y]=j??null}),f.push({animation:v})}let x=!!f.length;return r&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(f):Promise.resolve()}function c(d,h){var g;if(n[d].isActive===h)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(m=>{var p;return(p=m.animationState)===null||p===void 0?void 0:p.setActive(d,h)}),n[d].isActive=h;const f=o(d);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:o,setActive:c,setAnimateFunction:a,getState:()=>n,reset:()=>{n=H2(),r=!0}}}function sJ(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!b4(t,e):!1}function Fa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function H2(){return{animate:Fa(!0),whileInView:Fa(),whileHover:Fa(),whileTap:Fa(),whileDrag:Fa(),whileFocus:Fa(),exit:Fa()}}class ba{constructor(t){this.isMounted=!1,this.node=t}update(){}}class iJ extends ba{constructor(t){super(t),t.animationState||(t.animationState=rJ(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Em(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let aJ=0;class oJ extends ba{constructor(){super(...arguments),this.id=aJ++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const lJ={animation:{Feature:iJ},exit:{Feature:oJ}};function Eu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function od(e){return{point:{x:e.pageX,y:e.pageY}}}const cJ=e=>t=>hw(t)&&e(t,od(t));function lu(e,t,n,r){return Eu(e,t,cJ(n),r)}const W2=(e,t)=>Math.abs(e-t);function uJ(e,t){const n=W2(e.x,t.x),r=W2(e.y,t.y);return Math.sqrt(n**2+r**2)}class o5{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Kx(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=uJ(f.offset,{x:0,y:0})>=3;if(!m&&!p)return;const{point:w}=f,{timestamp:x}=Mn;this.history.push({...w,timestamp:x});const{onStart:v,onMove:y}=this.handlers;m||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Wx(m,this.transformPagePoint),$t.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:p,onSessionEnd:w,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Kx(f.type==="pointercancel"?this.lastMoveEventInfo:Wx(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),w&&w(f,v)},!hw(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=od(t),c=Wx(o,this.transformPagePoint),{point:d}=c,{timestamp:h}=Mn;this.history=[{...d,timestamp:h}];const{onSessionStart:g}=n;g&&g(t,Kx(c,this.history)),this.removeListeners=ad(lu(this.contextWindow,"pointermove",this.handlePointerMove),lu(this.contextWindow,"pointerup",this.handlePointerUp),lu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),da(this.updatePoint)}}function Wx(e,t){return t?{point:t(e.point)}:e}function K2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kx({point:e},t){return{point:e,delta:K2(e,l5(t)),offset:K2(e,dJ(t)),velocity:fJ(t,.1)}}function dJ(e){return e[0]}function l5(e){return e[e.length-1]}function fJ(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=l5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ci(t)));)n--;if(!r)return{x:0,y:0};const a=ui(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const c5=1e-4,hJ=1-c5,mJ=1+c5,u5=.01,pJ=0-u5,gJ=0+u5;function kr(e){return e.max-e.min}function yJ(e,t,n){return Math.abs(e-t)<=n}function G2(e,t,n,r=.5){e.origin=r,e.originPoint=Gt(t.min,t.max,e.origin),e.scale=kr(n)/kr(t),e.translate=Gt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=hJ&&e.scale<=mJ||isNaN(e.scale))&&(e.scale=1),(e.translate>=pJ&&e.translate<=gJ||isNaN(e.translate))&&(e.translate=0)}function cu(e,t,n,r){G2(e.x,t.x,n.x,r?r.originX:void 0),G2(e.y,t.y,n.y,r?r.originY:void 0)}function Y2(e,t,n){e.min=n.min+t.min,e.max=e.min+kr(t)}function xJ(e,t,n){Y2(e.x,t.x,n.x),Y2(e.y,t.y,n.y)}function Q2(e,t,n){e.min=t.min-n.min,e.max=e.min+kr(t)}function uu(e,t,n){Q2(e.x,t.x,n.x),Q2(e.y,t.y,n.y)}function vJ(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Gt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Gt(n,e,r.max):Math.min(e,n)),e}function X2(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function bJ(e,{top:t,left:n,bottom:r,right:i}){return{x:X2(e.x,n,i),y:X2(e.y,t,r)}}function J2(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function wJ(e,t){return{x:J2(e.x,t.x),y:J2(e.y,t.y)}}function jJ(e,t){let n=.5;const r=kr(e),i=kr(t);return i>r?n=Ol(t.min,t.max-r,e.min):r>i&&(n=Ol(e.min,e.max-i,t.min)),gi(0,1,n)}function _J(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const P0=.35;function NJ(e=P0){return e===!1?e=0:e===!0&&(e=P0),{x:Z2(e,"left","right"),y:Z2(e,"top","bottom")}}function Z2(e,t,n){return{min:eC(e,t),max:eC(e,n)}}function eC(e,t){return typeof e=="number"?e:e[t]||0}const tC=()=>({translate:0,scale:1,origin:0,originPoint:0}),il=()=>({x:tC(),y:tC()}),nC=()=>({min:0,max:0}),sn=()=>({x:nC(),y:nC()});function Br(e){return[e("x"),e("y")]}function d5({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function SJ({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function kJ(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Gx(e){return e===void 0||e===1}function A0({scale:e,scaleX:t,scaleY:n}){return!Gx(e)||!Gx(t)||!Gx(n)}function Ua(e){return A0(e)||f5(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function f5(e){return rC(e.x)||rC(e.y)}function rC(e){return e&&e!=="0%"}function Rh(e,t,n){const r=e-n,i=t*r;return n+i}function sC(e,t,n,r,i){return i!==void 0&&(e=Rh(e,i,r)),Rh(e,n,r)+t}function R0(e,t=0,n=1,r,i){e.min=sC(e.min,t,n,r,i),e.max=sC(e.max,t,n,r,i)}function h5(e,{x:t,y:n}){R0(e.x,t.translate,t.scale,t.originPoint),R0(e.y,n.translate,n.scale,n.originPoint)}const iC=.999999999999,aC=1.0000000000001;function CJ(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let c=0;c<i;c++){a=n[c],o=a.projectionDelta;const{visualElement:d}=a.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&ol(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,h5(e,o)),r&&Ua(a.latestValues)&&ol(e,a.latestValues))}t.x<aC&&t.x>iC&&(t.x=1),t.y<aC&&t.y>iC&&(t.y=1)}function al(e,t){e.min=e.min+t,e.max=e.max+t}function oC(e,t,n,r,i=.5){const a=Gt(e.min,e.max,i);R0(e,t,n,a,r)}function ol(e,t){oC(e.x,t.x,t.scaleX,t.scale,t.originX),oC(e.y,t.y,t.scaleY,t.scale,t.originY)}function m5(e,t){return d5(kJ(e.getBoundingClientRect(),t))}function EJ(e,t,n){const r=m5(e,n),{scroll:i}=t;return i&&(al(r.x,i.offset.x),al(r.y,i.offset.y)),r}const p5=({current:e})=>e?e.ownerDocument.defaultView:null,TJ=new WeakMap;class PJ{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=sn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=g=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(od(g).point)},a=(g,f)=>{const{drag:m,dragPropagation:p,onDragStart:w}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wQ(m),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Br(v=>{let y=this.getAxisMotionValue(v).get()||0;if(Ms.test(y)){const{projection:j}=this.visualElement;if(j&&j.layout){const _=j.layout.layoutBox[v];_&&(y=kr(_)*(parseFloat(y)/100))}}this.originPoint[v]=y}),w&&$t.postRender(()=>w(g,f)),j0(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(g,f)=>{const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:w,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=AJ(v),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),x&&x(g,f)},c=(g,f)=>this.stop(g,f),d=()=>Br(g=>{var f;return this.getAnimationState(g)==="paused"&&((f=this.getAxisMotionValue(g).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:h}=this.getProps();this.panSession=new o5(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,contextWindow:p5(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&$t.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ff(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=vJ(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&rl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=bJ(i.layoutBox,n):this.constraints=!1,this.elastic=NJ(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Br(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=_J(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!rl(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=EJ(r,i.root,this.visualElement.getTransformPagePoint());let o=wJ(i.layout.layoutBox,a);if(n){const c=n(SJ(o));this.hasMutatedConstraints=!!c,c&&(o=d5(c))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:c}=this.getProps(),d=this.constraints||{},h=Br(g=>{if(!Ff(g,n,this.currentDirection))return;let f=d&&d[g]||{};o&&(f={min:0,max:0});const m=i?200:1e6,p=i?40:1e7,w={type:"inertia",velocity:r?t[g]:0,bounceStiffness:m,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(g,w)});return Promise.all(h).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return j0(this.visualElement,t),r.start(Sw(t,r,0,n,this.visualElement,!1))}stopAnimation(){Br(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Br(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Br(n=>{const{drag:r}=this.getProps();if(!Ff(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:c}=i.layout.layoutBox[n];a.set(t[n]-Gt(o,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!rl(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Br(o=>{const c=this.getAxisMotionValue(o);if(c&&this.constraints!==!1){const d=c.get();i[o]=jJ({min:d,max:d},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Br(o=>{if(!Ff(o,t,null))return;const c=this.getAxisMotionValue(o),{min:d,max:h}=this.constraints[o];c.set(Gt(d,h,i[o]))})}addListeners(){if(!this.visualElement.current)return;TJ.set(this.visualElement,this);const t=this.visualElement.current,n=lu(t,"pointerdown",d=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();rl(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),$t.read(r);const o=Eu(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Br(g=>{const f=this.getAxisMotionValue(g);f&&(this.originPoint[g]+=d[g].translate,f.set(f.get()+d[g].translate))}),this.visualElement.render())}));return()=>{o(),n(),a(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=P0,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:c}}}function Ff(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function AJ(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class RJ extends ba{constructor(t){super(t),this.removeGroupControls=Sr,this.removeListeners=Sr,this.controls=new PJ(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Sr}unmount(){this.removeGroupControls(),this.removeListeners()}}const lC=e=>(t,n)=>{e&&$t.postRender(()=>e(t,n))};class OJ extends ba{constructor(){super(...arguments),this.removePointerDownListener=Sr}onPointerDown(t){this.session=new o5(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:p5(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:lC(t),onStart:lC(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&$t.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=lu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function MJ(){const e=E.useContext(Gb);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=E.useId();E.useEffect(()=>r(i),[]);const a=E.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const oh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function cC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const $c={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(nt.test(e))e=parseFloat(e);else return e;const n=cC(e,t.target.x),r=cC(e,t.target.y);return`${n}% ${r}%`}},LJ={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=fa.parse(e);if(i.length>5)return r;const a=fa.createTransformer(e),o=typeof i[0]!="number"?1:0,c=n.x.scale*t.x,d=n.y.scale*t.y;i[0+o]/=c,i[1+o]/=d;const h=Gt(c,d,.5);return typeof i[2+o]=="number"&&(i[2+o]/=h),typeof i[3+o]=="number"&&(i[3+o]/=h),a(i)}};class DJ extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;FY(IJ),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),oh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||$t.postRender(()=>{const c=o.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ew.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function g5(e){const[t,n]=MJ(),r=E.useContext(e4);return s.jsx(DJ,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(o4),isPresent:t,safeToRemove:n})}const IJ={borderRadius:{...$c,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$c,borderTopRightRadius:$c,borderBottomLeftRadius:$c,borderBottomRightRadius:$c,boxShadow:LJ};function FJ(e,t,n){const r=Wn(e)?e:ku(e);return r.start(Sw("",r,t,n)),r.animation}function BJ(e){return e instanceof SVGElement&&e.tagName!=="svg"}const qJ=(e,t)=>e.depth-t.depth;class UJ{constructor(){this.children=[],this.isDirty=!1}add(t){mw(this.children,t),this.isDirty=!0}remove(t){pw(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(qJ),this.isDirty=!1,this.children.forEach(t)}}function $J(e,t){const n=Ls.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(da(r),e(a-t))};return $t.read(r,!0),()=>da(r)}const y5=["TopLeft","TopRight","BottomLeft","BottomRight"],zJ=y5.length,uC=e=>typeof e=="string"?parseFloat(e):e,dC=e=>typeof e=="number"||nt.test(e);function VJ(e,t,n,r,i,a){i?(e.opacity=Gt(0,n.opacity!==void 0?n.opacity:1,HJ(r)),e.opacityExit=Gt(t.opacity!==void 0?t.opacity:1,0,WJ(r))):a&&(e.opacity=Gt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<zJ;o++){const c=`border${y5[o]}Radius`;let d=fC(t,c),h=fC(n,c);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||dC(d)===dC(h)?(e[c]=Math.max(Gt(uC(d),uC(h),r),0),(Ms.test(h)||Ms.test(d))&&(e[c]+="%")):e[c]=h}(t.rotate||n.rotate)&&(e.rotate=Gt(t.rotate||0,n.rotate||0,r))}function fC(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const HJ=x5(0,.5,D4),WJ=x5(.5,.95,Sr);function x5(e,t,n){return r=>r<e?0:r>t?1:n(Ol(e,t,r))}function hC(e,t){e.min=t.min,e.max=t.max}function Fr(e,t){hC(e.x,t.x),hC(e.y,t.y)}function mC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function pC(e,t,n,r,i){return e-=t,e=Rh(e,1/n,r),i!==void 0&&(e=Rh(e,1/i,r)),e}function KJ(e,t=0,n=1,r=.5,i,a=e,o=e){if(Ms.test(t)&&(t=parseFloat(t),t=Gt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let c=Gt(a.min,a.max,r);e===a&&(c-=t),e.min=pC(e.min,t,n,c,i),e.max=pC(e.max,t,n,c,i)}function gC(e,t,[n,r,i],a,o){KJ(e,t[n],t[r],t[i],t.scale,a,o)}const GJ=["x","scaleX","originX"],YJ=["y","scaleY","originY"];function yC(e,t,n,r){gC(e.x,t,GJ,n?n.x:void 0,r?r.x:void 0),gC(e.y,t,YJ,n?n.y:void 0,r?r.y:void 0)}function xC(e){return e.translate===0&&e.scale===1}function v5(e){return xC(e.x)&&xC(e.y)}function vC(e,t){return e.min===t.min&&e.max===t.max}function QJ(e,t){return vC(e.x,t.x)&&vC(e.y,t.y)}function bC(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function b5(e,t){return bC(e.x,t.x)&&bC(e.y,t.y)}function wC(e){return kr(e.x)/kr(e.y)}function jC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class XJ{constructor(){this.members=[]}add(t){mw(this.members,t),t.scheduleRender()}remove(t){if(pw(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function JJ(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:g,rotateX:f,rotateY:m,skewX:p,skewY:w}=n;h&&(r=`perspective(${h}px) ${r}`),g&&(r+=`rotate(${g}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),p&&(r+=`skewX(${p}deg) `),w&&(r+=`skewY(${w}deg) `)}const c=e.x.scale*t.x,d=e.y.scale*t.y;return(c!==1||d!==1)&&(r+=`scale(${c}, ${d})`),r||"none"}const $a={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ru=typeof window<"u"&&window.MotionDebug!==void 0,Yx=["","X","Y","Z"],ZJ={visibility:"hidden"},_C=1e3;let eZ=0;function Qx(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function w5(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=T4(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",$t,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&w5(r)}function j5({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},c=t==null?void 0:t()){this.id=eZ++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ru&&($a.totalNodes=$a.resolvedTargetDeltas=$a.recalculatedProjection=0),this.nodes.forEach(rZ),this.nodes.forEach(lZ),this.nodes.forEach(cZ),this.nodes.forEach(sZ),ru&&window.MotionDebug.record($a)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new UJ)}addEventListener(o,c){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new gw),this.eventHandlers.get(o).add(c)}notifyListeners(o,...c){const d=this.eventHandlers.get(o);d&&d.notify(...c)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=BJ(o),this.instance=o;const{layoutId:d,layout:h,visualElement:g}=this.options;if(g&&!g.current&&g.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(h||d)&&(this.isLayoutDirty=!0),e){let f;const m=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=$J(m,250),oh.hasAnimatedSinceResize&&(oh.hasAnimatedSinceResize=!1,this.nodes.forEach(SC))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&g&&(d||h)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:m,hasRelativeTargetChanged:p,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||g.getDefaultTransition()||mZ,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=g.getProps(),j=!this.targetLayout||!b5(this.targetLayout,w)||p,_=!m&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||_||m&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,_);const N={...uw(x,"layout"),onPlay:v,onComplete:y};(g.shouldReduceMotion||this.options.layoutRoot)&&(N.delay=0,N.type=!1),this.startAnimation(N)}else m||SC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,da(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(uZ),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&w5(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const f=this.path[g];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:c,layout:d}=this.options;if(c===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(NC);return}this.isUpdating||this.nodes.forEach(aZ),this.isUpdating=!1,this.nodes.forEach(oZ),this.nodes.forEach(tZ),this.nodes.forEach(nZ),this.clearAllSnapshots();const c=Ls.now();Mn.delta=gi(0,1e3/60,c-Mn.timestamp),Mn.timestamp=c,Mn.isProcessing=!0,qx.update.process(Mn),qx.preRender.process(Mn),qx.render.process(Mn),Mn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ew.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(iZ),this.sharedNodes.forEach(dZ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$t.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$t.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=sn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(c=!1),c){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!v5(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,g=h!==this.prevTransformTemplateValue;o&&(c||Ua(this.latestValues)||g)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const c=this.measurePageBox();let d=this.removeElementScroll(c);return o&&(d=this.removeTransform(d)),pZ(d),{animationId:this.root.animationId,measuredBox:c,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:c}=this.options;if(!c)return sn();const d=c.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(gZ))){const{scroll:g}=this.root;g&&(al(d.x,g.offset.x),al(d.y,g.offset.y))}return d}removeElementScroll(o){var c;const d=sn();if(Fr(d,o),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return d;for(let h=0;h<this.path.length;h++){const g=this.path[h],{scroll:f,options:m}=g;g!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&Fr(d,o),al(d.x,f.offset.x),al(d.y,f.offset.y))}return d}applyTransform(o,c=!1){const d=sn();Fr(d,o);for(let h=0;h<this.path.length;h++){const g=this.path[h];!c&&g.options.layoutScroll&&g.scroll&&g!==g.root&&ol(d,{x:-g.scroll.offset.x,y:-g.scroll.offset.y}),Ua(g.latestValues)&&ol(d,g.latestValues)}return Ua(this.latestValues)&&ol(d,this.latestValues),d}removeTransform(o){const c=sn();Fr(c,o);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!Ua(h.latestValues))continue;A0(h.latestValues)&&h.updateSnapshot();const g=sn(),f=h.measurePageBox();Fr(g,f),yC(c,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,g)}return Ua(this.latestValues)&&yC(c,this.latestValues),c}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Mn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var c;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==d;if(!(o||h&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:m}=this.options;if(!(!this.layout||!(f||m))){if(this.resolvedRelativeTargetAt=Mn.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=sn(),this.relativeTargetOrigin=sn(),uu(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Fr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=sn(),this.targetWithTransforms=sn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xJ(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Fr(this.target,this.layout.layoutBox),h5(this.target,this.targetDelta)):Fr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=sn(),this.relativeTargetOrigin=sn(),uu(this.relativeTargetOrigin,this.target,p.target),Fr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ru&&$a.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||A0(this.parent.latestValues)||f5(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const c=this.getLead(),d=!!this.resumingFrom||this!==c;let h=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(h=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Mn.timestamp&&(h=!1),h)return;const{layout:g,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||f))return;Fr(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,p=this.treeScale.y;CJ(this.layoutCorrected,this.treeScale,this.path,d),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=sn());const{target:w}=c;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(mC(this.prevProjectionDelta.x,this.projectionDelta.x),mC(this.prevProjectionDelta.y,this.projectionDelta.y)),cu(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==p||!jC(this.projectionDelta.x,this.prevProjectionDelta.x)||!jC(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w)),ru&&$a.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var c;if((c=this.options.visualElement)===null||c===void 0||c.scheduleRender(),o){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=il(),this.projectionDelta=il(),this.projectionDeltaWithTransform=il()}setAnimationOrigin(o,c=!1){const d=this.snapshot,h=d?d.latestValues:{},g={...this.latestValues},f=il();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const m=sn(),p=d?d.source:void 0,w=this.layout?this.layout.source:void 0,x=p!==w,v=this.getStack(),y=!v||v.members.length<=1,j=!!(x&&!y&&this.options.crossfade===!0&&!this.path.some(hZ));this.animationProgress=0;let _;this.mixTargetDelta=N=>{const C=N/1e3;kC(f.x,o.x,C),kC(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(uu(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),fZ(this.relativeTarget,this.relativeTargetOrigin,m,C),_&&QJ(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=sn()),Fr(_,this.relativeTarget)),x&&(this.animationValues=g,VJ(g,h,this.latestValues,C,j,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(da(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$t.update(()=>{oh.hasAnimatedSinceResize=!0,this.currentAnimation=FJ(0,_C,{...o,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_C),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:c,target:d,layout:h,latestValues:g}=o;if(!(!c||!d||!h)){if(this!==o&&this.layout&&h&&_5(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||sn();const f=kr(this.layout.layoutBox.x);d.x.min=o.target.x.min,d.x.max=d.x.min+f;const m=kr(this.layout.layoutBox.y);d.y.min=o.target.y.min,d.y.max=d.y.min+m}Fr(c,d),ol(c,g),cu(this.projectionDeltaWithTransform,this.layoutCorrected,c,g)}}registerSharedNode(o,c){this.sharedNodes.has(o)||this.sharedNodes.set(o,new XJ),this.sharedNodes.get(o).add(c);const h=c.options.initialPromotionConfig;c.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(c):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:c}=this.options;return c?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:c}=this.options;return c?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:c,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),o&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let c=!1;const{latestValues:d}=o;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(c=!0),!c)return;const h={};d.z&&Qx("z",o,h,this.animationValues);for(let g=0;g<Yx.length;g++)Qx(`rotate${Yx[g]}`,o,h,this.animationValues),Qx(`skew${Yx[g]}`,o,h,this.animationValues);o.render();for(const g in h)o.setStaticValue(g,h[g]),this.animationValues&&(this.animationValues[g]=h[g]);o.scheduleRender()}getProjectionStyles(o){var c,d;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ZJ;const h={visibility:""},g=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,h.opacity="",h.pointerEvents=ih(o==null?void 0:o.pointerEvents)||"",h.transform=g?g(this.latestValues,""):"none",h;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=ih(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ua(this.latestValues)&&(x.transform=g?g({},""):"none",this.hasProjected=!1),x}const m=f.animationValues||f.latestValues;this.applyTransformsToTarget(),h.transform=JJ(this.projectionDeltaWithTransform,this.treeScale,m),g&&(h.transform=g(m,h.transform));const{x:p,y:w}=this.projectionDelta;h.transformOrigin=`${p.origin*100}% ${w.origin*100}% 0`,f.animationValues?h.opacity=f===this?(d=(c=m.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:h.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const x in Ch){if(m[x]===void 0)continue;const{correct:v,applyTo:y}=Ch[x],j=h.transform==="none"?m[x]:v(m[x],f);if(y){const _=y.length;for(let N=0;N<_;N++)h[y[N]]=j}else h[x]=j}return this.options.layoutId&&(h.pointerEvents=f===this?ih(o==null?void 0:o.pointerEvents)||"":"none"),h}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var c;return(c=o.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(NC),this.root.sharedNodes.clear()}}}function tZ(e){e.updateLayout()}function nZ(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?Br(f=>{const m=o?n.measuredBox[f]:n.layoutBox[f],p=kr(m);m.min=r[f].min,m.max=m.min+p}):_5(a,n.layoutBox,r)&&Br(f=>{const m=o?n.measuredBox[f]:n.layoutBox[f],p=kr(r[f]);m.max=m.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const c=il();cu(c,r,n.layoutBox);const d=il();o?cu(d,e.applyTransform(i,!0),n.measuredBox):cu(d,r,n.layoutBox);const h=!v5(c);let g=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:p}=f;if(m&&p){const w=sn();uu(w,n.layoutBox,m.layoutBox);const x=sn();uu(x,r,p.layoutBox),b5(w,x)||(g=!0),f.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=w,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:d,layoutDelta:c,hasLayoutChanged:h,hasRelativeTargetChanged:g})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function rZ(e){ru&&$a.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sZ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function iZ(e){e.clearSnapshot()}function NC(e){e.clearMeasurements()}function aZ(e){e.isLayoutDirty=!1}function oZ(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function SC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function lZ(e){e.resolveTargetDelta()}function cZ(e){e.calcProjection()}function uZ(e){e.resetSkewAndRotation()}function dZ(e){e.removeLeadSnapshot()}function kC(e,t,n){e.translate=Gt(t.translate,0,n),e.scale=Gt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function CC(e,t,n,r){e.min=Gt(t.min,n.min,r),e.max=Gt(t.max,n.max,r)}function fZ(e,t,n,r){CC(e.x,t.x,n.x,r),CC(e.y,t.y,n.y,r)}function hZ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const mZ={duration:.45,ease:[.4,0,.1,1]},EC=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),TC=EC("applewebkit/")&&!EC("chrome/")?Math.round:Sr;function PC(e){e.min=TC(e.min),e.max=TC(e.max)}function pZ(e){PC(e.x),PC(e.y)}function _5(e,t,n){return e==="position"||e==="preserve-aspect"&&!yJ(wC(t),wC(n),.2)}function gZ(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const yZ=j5({attachResizeListener:(e,t)=>Eu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xx={current:void 0},N5=j5({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xx.current){const e=new yZ({});e.mount(window),e.setOptions({layoutScroll:!0}),Xx.current=e}return Xx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xZ={pan:{Feature:OJ},drag:{Feature:RJ,ProjectionNode:N5,MeasureLayout:g5}};function AC(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&$t.postRender(()=>a(t,od(t)))}class vZ extends ba{mount(){const{current:t}=this.node;t&&(this.unmount=gQ(t,n=>(AC(this.node,n,"Start"),r=>AC(this.node,r,"End"))))}unmount(){}}class bZ extends ba{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ad(Eu(this.node.current,"focus",()=>this.onFocus()),Eu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function RC(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&$t.postRender(()=>a(t,od(t)))}class wZ extends ba{mount(){const{current:t}=this.node;t&&(this.unmount=bQ(t,n=>(RC(this.node,n,"Start"),(r,{success:i})=>RC(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const O0=new WeakMap,Jx=new WeakMap,jZ=e=>{const t=O0.get(e.target);t&&t(e)},_Z=e=>{e.forEach(jZ)};function NZ({root:e,...t}){const n=e||document;Jx.has(n)||Jx.set(n,{});const r=Jx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(_Z,{root:e,...t})),r[i]}function SZ(e,t,n){const r=NZ(t);return O0.set(e,n),r.observe(e),()=>{O0.delete(e),r.unobserve(e)}}const kZ={some:0,all:1};class CZ extends ba{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:kZ[i]},c=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,a&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:g,onViewportLeave:f}=this.node.getProps(),m=h?g:f;m&&m(d)};return SZ(this.node.current,o,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(EZ(t,n))&&this.startObserver()}unmount(){}}function EZ({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const TZ={inView:{Feature:CZ},tap:{Feature:wZ},focus:{Feature:bZ},hover:{Feature:vZ}},PZ={layout:{ProjectionNode:N5,MeasureLayout:g5}},M0={current:null},S5={current:!1};function AZ(){if(S5.current=!0,!!Qb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>M0.current=e.matches;e.addListener(t),t()}else M0.current=!1}function RZ(e,t,n){for(const r in t){const i=t[r],a=n[r];if(Wn(i))e.addValue(r,i);else if(Wn(a))e.addValue(r,ku(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,ku(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const OC=new WeakMap,OZ=[...$4,zn,fa],MZ=e=>OZ.find(U4(e)),MC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class LZ{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=vw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Ls.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,$t.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=o;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=Tm(n),this.isVariantNode=i4(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const p=f[m];d[m]!==void 0&&Wn(p)&&p.set(d[m],!1)}}mount(t){this.current=t,OC.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),S5.current||AZ(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:M0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){OC.delete(this.current),this.projection&&this.projection.unmount(),da(this.notifyUpdate),da(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xo.has(t),i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&$t.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ml){const n=Ml[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):sn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<MC.length;r++){const i=MC[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=RZ(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ku(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(B4(i)||F4(i))?i=parseFloat(i):!MZ(i)&&fa.test(n)&&(i=Q4(t,n)),this.setBaseTarget(t,Wn(i)?i.get():i)),Wn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=rw(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Wn(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new gw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class k5 extends LZ{constructor(){super(...arguments),this.KeyframeResolver=X4}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Wn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function DZ(e){return window.getComputedStyle(e)}class IZ extends k5{constructor(){super(...arguments),this.type="html",this.renderInstance=c4}readValueFromInstance(t,n){if(xo.has(n)){const r=jw(n);return r&&r.default||0}else{const r=DZ(t),i=(x4(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return m5(t,n)}build(t,n,r){ow(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return nw(t,n,r)}}class FZ extends k5{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=sn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xo.has(n)){const r=jw(n);return r&&r.default||0}return n=u4.has(n)?n:Zb(n),t.getAttribute(n)}
610scrapeMotionValuesFromProps(t,n,r){return h4(t,n,r)}build(t,n,r){lw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){d4(t,n,r,i)}mount(t){this.isSVGTag=cw(t.tagName),super.mount(t)}}const BZ=(e,t)=>tw(e)?new FZ(t):new IZ(t,{allowProjection:e!==E.Fragment}),qZ=cQ({...lJ,...TZ,...xZ,...PZ},BZ),Bf=SY(qZ),UZ={restaurant:"Restaurant",cafe:"Café",bar_lounge:"Bar/Lounge",retail:"Retail",services:"Services",healthcare:"Healthcare",education:"Education",entertainment:"Entertainment",fitness:"Fitness",beauty:"Beauty",spa_wellness:"Spa & Wellness",professional:"Professional Services",automotive:"Automotive",home_services:"Home Services",real_estate:"Real Estate",hospitality:"Hospitality",pet_services:"Pet Services",technology:"Technology",financial_services:"Financial Services",other:"Other"};function $Z(){Mt("Get Your Business Featured | This is Randburg","Nominate your Randburg business to be featured in our community blog. Share your story and reach thousands of local customers â free.",{jsonLd:[va("Get Your Business Featured","Nominate your Randburg business to be featured in our community blog.","/Shoutout"),wi([{name:"Home",path:"/"},{name:"Get Featured",path:"/Shoutout"}])]});const[e,t]=E.useState(!1),[n,r]=E.useState({business_name:"",contact_name:"",email:"",phone:"",website:"",category:"",description:"",why_feature:"",image_urls:[]}),[i,a]=E.useState(!1),[o,c]=E.useState(""),d=Ct({mutationFn:p=>ie.entities.BusinessShoutout.create(p),onSuccess:()=>{t(!0),window.scrollTo({top:0,behavior:"smooth"})}}),h=p=>{p.preventDefault(),d.mutate({...n,submission_date:new Date().toISOString()})},g=()=>{ie.auth.redirectToLogin(window.location.origin+"/user-dashboard")},f=async p=>{const w=Array.from(p.target.files);if(w.length){if(c(""),n.image_urls.length+w.length>2){c("Maximum 2 images allowed");return}for(const x of w){if(!x.type.match(/^image\/(jpeg|jpg|png)$/)){c("Only JPEG and PNG images are allowed");return}if(x.size>2*1024*1024){c(`${x.name} exceeds 2MB limit`);return}}a(!0);try{const x=[];for(const v of w){const{file_url:y}=await ie.integrations.Core.UploadFile({file:v});x.push(y)}r({...n,image_urls:[...n.image_urls,...x]})}catch{c("Failed to upload images. Please try again.")}finally{a(!1)}}},m=p=>{r({...n,image_urls:n.image_urls.filter((w,x)=>x!==p)})};return e?s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-purple-50 via-white to-lime-50 flex items-center justify-center p-4",children:s.jsx(Bf.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"max-w-md w-full",children:s.jsx(Ge,{className:"border-2 border-green-200",children:s.jsxs(Rt,{className:"p-8 text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(vv,{className:"w-8 h-8 text-green-600"})}),s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Thank You!"}),s.jsxs("p",{className:"text-gray-600 mb-6",children:["We've received your submission for ",n.business_name,". Our team will review it and reach out to you soon."]}),s.jsxs("div",{className:"bg-gradient-to-r from-purple-50 to-lime-50 rounded-lg p-6 mb-6",children:[s.jsx("h3",{className:"font-bold text-gray-900 mb-2",children:"Ready to get your business listed?"}),s.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Sign up now to create your full business profile on This is Randburg and reach thousands of local customers."}),s.jsx(ge,{onClick:g,className:"w-full font-bold text-black",style:{backgroundColor:"#cafc05"},children:"Sign Up & List Your Business"})]}),s.jsx(ge,{variant:"outline",className:"w-full",onClick:()=>window.location.href="/",children:"Back to Home"})]})})})}):s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-purple-50 via-white to-lime-50",children:[s.jsx("div",{className:"bg-gradient-to-r from-purple-600 to-indigo-700 text-white py-12 sm:py-16",children:s.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 text-center",children:s.jsxs(Bf.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"bg-white/10 backdrop-blur-sm rounded-full p-4",children:s.jsx(nT,{className:"w-12 h-12"})})}),s.jsx("h1",{className:"text-3xl sm:text-5xl font-black mb-4",children:"Get Your Business Featured!"}),s.jsx("p",{className:"text-lg sm:text-xl text-purple-100 max-w-2xl mx-auto",children:"We're spotlighting amazing local businesses in Randburg. Share your story and get featured in our community blog."})]})})}),s.jsx("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-8 sm:py-12",children:s.jsxs(Bf.div,{initial:{opacity:0,y:30}
610,animate:{opacity:1,y:0},transition:{delay:.2},children:[s.jsx(Ge,{className:"shadow-xl border-0",children:s.jsxs(Rt,{className:"p-6 sm:p-8",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx(ln,{className:"w-6 h-6",style:{color:"#d395ff"}}),s.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Submit Your Business"})]}),s.jsxs("form",{onSubmit:h,className:"space-y-5",children:[s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"business_name",children:"Business Name *"}),s.jsx(de,{id:"business_name",value:n.business_name,onChange:p=>r({...n,business_name:p.target.value}),placeholder:"Your business name",required:!0,className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"category",children:"Category *"}),s.jsxs(pt,{value:n.category,onValueChange:p=>r({...n,category:p}),required:!0,children:[s.jsx(dt,{className:"mt-1",children:s.jsx(gt,{placeholder:"Select category"})}),s.jsx(ft,{children:Object.entries(UZ).map(([p,w])=>s.jsx(Ae,{value:p,children:w},p))})]})]})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"contact_name",children:"Your Name *"}),s.jsx(de,{id:"contact_name",value:n.contact_name,onChange:p=>r({...n,contact_name:p.target.value}),placeholder:"Full name",required:!0,className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"email",children:"Email *"}),s.jsx(de,{id:"email",type:"email",value:n.email,onChange:p=>r({...n,email:p.target.value}),placeholder:"[email protected]",required:!0,className:"mt-1"})]})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"phone",children:"Phone Number"}),s.jsx(de,{id:"phone",type:"tel",value:n.phone,onChange:p=>r({...n,phone:p.target.value}),placeholder:"Optional",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"website",children:"Website"}),s.jsx(de,{id:"website",type:"url",value:n.website,onChange:p=>r({...n,website:p.target.value}),placeholder:"https://yoursite.com",className:"mt-1"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"description",children:"What Makes Your Business Special? *"}),s.jsx(un,{id:"description",value:n.description,onChange:p=>r({...n,description:p.target.value}),placeholder:"Tell us about your unique offerings, story, or what sets you apart...",required:!0,rows:4,className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"why_feature",children:"Why Do You Want to Be Featured?"}),s.jsx(un,{id:"why_feature",value:n.why_feature,onChange:p=>r({...n,why_feature:p.target.value}),placeholder:"Share your goals, recent milestones, or what you'd like to showcase...",rows:3,className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Business Images (Optional, Max 2)"}),s.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"JPEG or PNG, max 2MB per image"}),n.image_urls.length<2&&s.jsxs("div",{className:"mt-2",children:[s.jsxs("label",{htmlFor:"image-upload",className:"flex items-center justify-center gap-2 border-2 border-dashed border-gray-300 rounded-lg p-6 cursor-pointer hover:border-purple-400 hover:bg-purple-50 transition-all",children:[s.jsx(li,{className:"w-5 h-5 text-gray-400"}),s.jsx("span",{className:"text-sm text-gray-600",children:i?"Uploading...":`Upload ${n.image_urls.length===0?"Images":"1 More Image"}`})]}),s.jsx("input",{id:"image-upload",type:"file",accept:"image/jpeg,image/jpg,image/png",multiple:n.image_urls.length===0,onChange:f,disabled:i,className:"hidden"})]}),o&&s.jsx("p",{className:"text-xs text-red-600 mt-2",children:o}),n.image_urls.length>0&&s.jsx("div",{className:"grid grid-cols-2 gap-3 mt-3",children:n.image_urls.map((p,w)=>s.jsxs("div",{className:"relative group",children:[s.jsx("img",{src:p,alt:`Upload ${w+1}`,className:"w-full h-32 object-cover rounded-lg border-2 border-gray-200"}),s.jsx("button",{type:"button",onClick:()=>m(w),className:"absolute top-2 right-2 bg-red-500 text-white rounded-full p-1 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(kt,{className:"w-4 h-4"})})]},w))})]}),s.jsx("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-4",children:s.jsxs("p",{className:"text-sm text-gray-700",children:[s.jsx("strong",{children:"What happens next?"})," Our team reviews all submissions. If selected, we'll contact you to schedule your feature and gather additional details for the blog post."]})}),s.jsx(ge,{type:"submit",disabled:d.isPending||!n.business_name||!n.contact_name||!n.email||!n.category||!n.description,className:"w-full h-12 text-lg font-bold text-black",style:{backgroundColor:"#cafc05"},children:d.isPending?"Submitting...":"Submit for Feature"})]})]})}),s.jsx("div",{className:"mt-8 grid sm:grid-cols-3 gap-4",children:[{title:"Free Exposure",desc:"Get featured on our blog at no cost"},{title:"Local Reach",desc:"Connect with the Randburg community"},{title:"SEO Boost",desc:"Improve your online visibility"}].map((p,w)=>s.jsxs(Bf.div,{initial:{opacity:0,y:20}
610,animate:{opacity:1,y:0},transition:{delay:.4+w*.1},className:"bg-white rounded-lg p-4 text-center shadow-sm border border-gray-100",children:[s.jsx("h3",{className:"font-bold text-gray-900 mb-1",children:p.title}),s.jsx("p",{className:"text-sm text-gray-600",children:p.desc})]},w))})]})})]})}function zZ(){return Mt("Terms, Privacy & Cookie Policy | This is Randburg","Read the Terms & Conditions, Privacy Policy and Cookie Policy for This is Randburg â your trusted local digital hub for Randburg, South Africa.",{noindex:!0}),s.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("h1",{className:"text-4xl font-black text-gray-900 mb-4",children:"This is Randburg"}),s.jsx("h2",{className:"text-2xl font-bold text-gray-700 mb-6",children:"Terms & Conditions, Privacy Policy & Cookie Policy"}),s.jsx("p",{className:"text-sm text-gray-500 mb-8",children:"Last updated: 04 November 2025"}),s.jsxs("div",{className:"prose max-w-none text-gray-700 space-y-8",children:[s.jsxs("section",{id:"terms",children:[s.jsx("h2",{className:"text-3xl font-black text-gray-900 mb-4",children:"1. Terms and Conditions"}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.1 Acceptance of Terms"}),s.jsx("p",{children:'By accessing or using This is Randburg ("the Website"), you agree to be bound by these Terms and Conditions. If you do not agree, please stop using the Website.'}),s.jsx("p",{children:'"This is Randburg" ("we," "us," or "our") operates as a digital platform showcasing businesses, services, events and community information relating to Randburg, South Africa.'}),s.jsx("p",{children:"We reserve the right to update, change or replace any part of these Terms. Continued use of the Website constitutes acceptance of the latest version."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.2 Eligibility"}),s.jsx("p",{children:"You must be 18 years or older, or have parental consent, to use this Website."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.3 Use of the Website"}),s.jsx("p",{children:"You agree not to:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Violate any applicable laws"}),s.jsx("li",{children:"Upload harmful, defamatory or misleading content"}),s.jsx("li",{children:"Attempt to gain unauthorized access to any part of the Website"})]}),s.jsx("p",{children:"We may suspend or terminate access if you violate these Terms."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.4 User Accounts & Content Submissions"}),s.jsx("p",{children:"If you create an account or submit a business, listing, review or advertisement:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"You are responsible for the accuracy of the information submitted"}),s.jsx("li",{children:"You are responsible for keeping your login credentials secure"}),s.jsx("li",{children:"You grant This is Randburg a non-exclusive, worldwide, royalty-free license to use, display or promote your submitted content on the platform and related digital channels"})]}),s.jsx("p",{children:"We may edit or remove submissions at our discretion."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.5 Business Eligibility & Prohibited Categories"}),s.jsx("p",{className:"font-semibold",children:'"This is Randburg" is a family-friendly platform designed to promote positive and community-focused businesses.'}),s.jsx("p",{className:"font-semibold",children:"We reserve the full right to approve, decline, suspend or remove any business or listing at our sole discretion, without providing a reason."}),s.jsx("p",{children:"The following business types, services or content are not allowed, including but not limited to:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Nightclubs, strip clubs, adult clubs or sexually explicit services"}),s.jsx("li",{children:"Bars, taverns, shisa nyamas selling alcohol for on-site consumption"}),s.jsx("li",{children:"Liquor stores and businesses selling alcoholic beverages"}),s.jsx("li",{children:"Tobacco, hookah, vape, e-cigarette or nicotine product retailers"}),s.jsx("li",{children:"Gambling, casinos, betting platforms, gaming machines or lottery services"}),s.jsx("li",{children:"Businesses selling illegal drugs or drug-related items"}),s.jsx("li",{children:"Pornography, escort services, adult toys or adult content platforms"}),s.jsx("li",{children:"Unethical spiritual or supernatural services (e.g. witchcraft, spells, tarot, fortune telling, psychics, spiritual healing for payment, occult or similar services)"}),s.jsx("li",{children:"Companies offering identity-altering procedures, treatments or drugs"}),s.jsx("li",{children:"Pharmacies or providers promoting gender-altering or appearance-altering chemicals or medications"}),s.jsx("li",{children:"Abortion services or abortion-related drugs and counseling"}),s.jsx("li",{children:"Companies promoting violence, hate, discrimination or criminal activities"}),s.jsx("li",{children:"Pyramid schemes, illegal lending, financial scams or misleading investment services"}),s.jsx("li",{children:"Criminal, harmful, defamatory, misleading or fraudulent business activities"}),s.jsx("li",{children:"Political parties and businesses promoting specific political parties"})]}
610),s.jsx("p",{children:"We may also reject or remove:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Any listing that conflicts with our brand values or community purpose"}),s.jsx("li",{children:"Businesses we consider high risk, unethical, misleading or inappropriate"})]}),s.jsx("p",{className:"font-semibold",children:"Submitting a business does not guarantee approval, publication or continued listing."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.6 Intellectual Property"}),s.jsx("p",{children:"All logos, text, graphics, code and content on the Website belong to This is Randburg and/or licensed providers. You may not copy, reproduce or redistribute any content without written consent."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.7 Third-Party Links & Advertising"}),s.jsx("p",{children:"The Website may include third-party links or adverts."}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"We are not responsible for the content, safety or accuracy of external websites."}),s.jsx("li",{children:"Any transactions with third parties are between you and them."})]}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.8 Disclaimer & Limitation of Liability"}),s.jsx("p",{children:'The Website is provided "as is". We do not guarantee:'}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Uninterrupted access"}),s.jsx("li",{children:"Error-free data"}),s.jsx("li",{children:"Accuracy or completeness of information"})]}),s.jsx("p",{children:"To the extent allowed by law, we are not liable for any losses or damages arising from use of the Website or reliance on its content."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.9 Indemnification"}),s.jsx("p",{children:"You agree to indemnify and hold harmless This is Randburg from any claims, losses or damages resulting from:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Your use of the Website"}),s.jsx("li",{children:"Your violation of these Terms"}),s.jsx("li",{children:"Content you upload or submit"})]}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"1.10 Governing Law"}),s.jsx("p",{children:"These Terms are governed by the laws of the Republic of South Africa. Any disputes will be handled in South African courts."})]}),s.jsxs("section",{id:"privacy",className:"pt-8 border-t border-gray-300",children:[s.jsx("h2",{className:"text-3xl font-black text-gray-900 mb-4",children:"2. Privacy Policy"}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"2.1 Purpose"}),s.jsx("p",{children:"This Privacy Policy explains how This is Randburg collects, uses and protects personal information, in accordance with the Protection of Personal Information Act (POPIA) and the General Data Protection Regulation (GDPR)."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"2.2 Information We Collect"}),s.jsx("p",{children:"We may collect:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Name, contact details, business information"}),s.jsx("li",{children:"Email or phone number"}),s.jsx("li",{children:"Account details and login data"}),s.jsx("li",{children:"Analytics data: IP address, pages viewed, device type, browser type"}),s.jsx("li",{children:"Marketing and communication preferences"}),s.jsx("li",{children:"Information submitted through forms, listings or advertising requests"})]}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"2.3 How We Collect Information"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Website forms & account registrations"}),s.jsx("li",{children:"Cookies and tracking technologies"}),s.jsx("li",{children:"Email, messaging or support communications"}),s.jsx("li",{children:"Analytics tools and advertising platforms"})]}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"2.4 Why We Use Personal Information"}),s.jsx("p",{children:"To:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Provide and improve our services"}),s.jsx("li",{children:"Manage listings, profiles and submissions"}),s.jsx("li",{children:"Respond to inquiries"}),s.jsx("li",{children:"Send newsletters or marketing (only if c
610onsented)"}),s.jsx("li",{children:"Monitor website performance and user activity"}),s.jsx("li",{children:"Comply with regulatory or legal obligations"})]}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"2.5 Legal Basis for Processing (GDPR Compliance)"}),s.jsx("p",{children:"We rely on:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Consent (when you provide data)"}),s.jsx("li",{children:"Contractual necessity (to list or promote your business)"}),s.jsx("li",{children:"Legitimate interest (analytics, platform improvement, advertising)"}),s.jsx("li",{children:"Legal obligations"})]}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"2.6 Data Retention"}),s.jsx("p",{children:"We keep personal information only as long as required for its purpose or by law. When no longer needed, data is securely deleted or anonymised."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"2.7 Data Security"}),s.jsx("p",{children:"We implement reasonable technical and organisational safeguards to protect personal data from loss, misuse, unauthorised access or alteration."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"2.8 Your Rights"}),s.jsx("p",{children:"You may:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsx("li",{children:"Request access to your personal information"}),s.jsx("li",{children:"Correct, update or delete your data"}),s.jsx("li",{children:"Withdraw consent for marketing"}),s.jsx("li",{children:"Request account removal"}),s.jsx("li",{children:"Lodge a complaint with the Information Regulator of South Africa or a GDPR authority"})]}),s.jsx("p",{className:"font-semibold",children:"Requests: www.thisisrandburg.co.za/contact"}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"2.9 Data Transfers Outside SA or EU"}),s.jsx("p",{children:"If data is stored or processed outside South Africa or the EU, we ensure proper data protection safeguards and legal compliance."})]}),s.jsxs("section",{id:"cookies",className:"pt-8 border-t border-gray-300",children:[s.jsx("h2",{className:"text-3xl font-black text-gray-900 mb-4",children:"3. Cookie Policy"}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"3.1 What are Cookies?"}),s.jsx("p",{children:"Cookies are small files stored on your device to improve browsing experience, performance and functionality."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"3.2 Types of Cookies Used"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Necessary cookies"})," â site functionality"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Performance cookies"})," â analytics and traffic tracking"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Preference cookies"})," â save user settings"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Advertising cookies"})," â help deliver more relevant ads"]})]}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"3.3 Managing Cookies"}),s.jsx("p",{children:"You may disable or delete cookies in your browser settings. However, some functionality may be affected."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"3.4 Third-Party Cookies"}),s.jsx("p",{children:"Some cookies come from analytics or ad partners (e.g., Google Analytics, Meta Pixel). These third parties may have their own policies and settings."}),s.jsx("h3",{className:"text-xl font-bold text-gray-900 mt-6 mb-3",children:"3.5 Changes to This Policy"}),s.jsx("p",{children:"Cookie usage may change. Updated versions will be posted on this page with a revised date."})]}),s.jsxs("section",{className:"pt-8 border-t border-gray-300",children:[s.jsx("h2",{className:"text-3xl font-black text-gray-900 mb-4",children:"Contact Information"}),s.jsx("p",{children:"Questions about these Terms, Privacy Policy or Cookies:"}),s.jsxs("p",{className:"font-semibold",children:["ð ",s.jsx("a",{href:"https://www.thisisrandburg.co.za/contact",className:"text-blue-600 hover:text-blue-700 underline",children:"www.thisisrandburg.co.za/contact"})]})]})]})]})})}var Zx={exports:{}},ev={};/** 611 * @license React 612 * use-sync-external-store-shim.production.js 613 * 614 * Copyright (c) Meta Platforms, Inc. and affiliates. 615 * 616 * This source code is licensed under the MIT license found in the 617 * LICENSE file in the root directory of this source tree. 618 */var LC;function VZ(){if(LC)return ev;LC=1;var e=qu();function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function c(f,m){var p=m(),w=r({inst:{value:p,getSnapshot:m}}),x=w[0].inst,v=w[1];return a(function(){x.value=p,x.getSnapshot=m,d(x)&&v({inst:x})},[f,p,m]),i(function(){return d(x)&&v({inst:x}),f(function(){d(x)&&v({inst:x})})},[f]),o(p),p}function d(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!n(f,p)}catch{return!0}}function h(f,m){return m()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return ev.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,ev}var DC;function HZ(){return DC||(DC=1,Zx.exports=VZ()),Zx.exports}var WZ=HZ();function KZ(){return WZ.useSyncExternalStore(GZ,()=>!0,()=>!1)}function GZ(){return()=>{}}var kw="Avatar",[YZ]=Kr(kw),[QZ,C5]=YZ(kw),E5=E.forwardRef((e,t)=>
618{const{__scopeAvatar:n,...r}=e,[i,a]=E.useState("idle");return s.jsx(QZ,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:s.jsx(Ze.span,{...r,ref:t})})});E5.displayName=kw;var T5="AvatarImage",P5=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=C5(T5,n),c=XZ(r,a),d=ds(h=>{i(h),o.onImageLoadingStatusChange(h)});return jn(()=>{c!=="idle"&&d(c)},[c,d]),c==="loaded"?s.jsx(Ze.img,{...a,ref:t,src:r}):null});P5.displayName=T5;var A5="AvatarFallback",R5=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=C5(A5,n),[o,c]=E.useState(r===void 0);return E.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(d)}},[r]),o&&a.imageLoadingStatus!=="loaded"?s.jsx(Ze.span,{...i,ref:t}):null});R5.displayName=A5;function IC(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function XZ(e,{referrerPolicy:t,crossOrigin:n}){const r=KZ(),i=E.useRef(null),a=r?(i.current||(i.current=new window.Image),i.current):null,[o,c]=E.useState(()=>IC(a,e));return jn(()=>{c(IC(a,e))},[a,e]),jn(()=>{const d=f=>()=>{c(f)};if(!a)return;const h=d("loaded"),g=d("error");return a.addEventListener("load",h),a.addEventListener("error",g),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",h),a.removeEventListener("error",g)}},[a,n,t]),o}var O5=E5,M5=P5,L5=R5;const D5=E.forwardRef(({className:e,...t},n)=>s.jsx(O5,{ref:n,className:He("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));D5.displayName=O5.displayName;const I5=E.forwardRef(({className:e,...t},n)=>s.jsx(M5,{ref:n,className:He("aspect-square h-full w-full",e),...t}));I5.displayName=M5.displayName;const F5=E.forwardRef(({className:e,...t},n)=>s.jsx(L5,{ref:n,className:He("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));F5.displayName=L5.displayName;function JZ({user:e}){var m;const t=dn(),[n,r]=E.useState({full_name:e.full_name||"",contact_phone:e.contact_phone||"",address:e.address||"",profile_image_url:e.profile_image_url||""}),[i,a]=E.useState(!1),[o,c]=E.useState(!1),d=Ct({mutationFn:p=>ie.auth.updateMe(p),onSuccess:()=>{t.invalidateQueries({queryKey:["me"]}),c(!0),setTimeout(()=>c(!1),3e3)}}),h=(p,w)=>{r(x=>({...x,[p]:w}))},g=async p=>{const w=p.target.files[0];if(w){a(!0);try{const{file_url:x}=await ie.integrations.Core.UploadFile({file:w});h("profile_image_url",x)}catch(x){console.error("Image upload failed:",x)}a(!1)}},f=p=>{p.preventDefault(),d.mutate(n)};return s.jsx(Ge,{children:s.jsxs("form",{onSubmit:f,children:[s.jsx(Cn,{children:s.jsx(En,{children:"My Profile"})}),s.jsxs(Rt,{className:"space-y-6",children:[o&&s.jsxs(ya,{className:"bg-green-50 border-green-200",children:[s.jsx(cs,{className:"h-4 w-4"}),s.jsx(go,{children:"Success!"}),s.jsx(xa,{children:"Your profile has been updated."})]}),s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsxs(D5,{className:"w-24 h-24",children:[s.jsx(I5,{src:n.profile_image_url,alt:e.full_name}),s.jsx(F5,{children:(m=e.full_name)==null?void 0:m.charAt(0)})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"profile-image-upload",children:"Profile Picture"}),s.jsx(de,{id:"profile-image-upload",type:"file",onChange:g,className:"hidden"}),s.jsx(ge,{type:"button",variant:"outline",size:"sm",asChild:!0,children:s.jsxs("label",{htmlFor:"profile-image-upload",className:"cursor-pointer flex items-center",children:[i?s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}):s.jsx(li,{className:"w-4 h-4 mr-2"}),i?"Uploading...":"Change Image"]})})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"full_name",children:"Full Name"}),s.jsx(de,{id:"full_name",value:n.full_name,onChange:p=>h("full_name",p.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"email",children:"Email"}),s.jsx(de,{id:"email",value:e.email,disabled:!0})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"contact_phone",children:"Contact Phone"}),s.jsx(de,{id:"contact_phone",value:n.contact_phone,onChange:p=>h("contact_phone",p.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"address",children:"Address"}),s.jsx(de,{id:"address",value:n.address,onChange:p=>h("address",p.target.value)})]})]})]}),s.jsx(Xu,{children:s.jsx(ge,{type:"submit",disabled:d.isPending,children:d.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):"Save Changes"})})]})})}
618const ZZ=["apartment","house","townhouse","studio","penthouse","duplex","cottage","bachelor"];function eee({open:e,onClose:t,item:n}){var v;const r=dn(),[i,a]=Ce.useState(null),[o,c]=Ce.useState(!1),[d,h]=Ce.useState(!1);Ce.useEffect(()=>{a(n?{title:n.title||"",description:n.description||"",property_type:n.property_type||"",bedrooms:n.bedrooms??0,bathrooms:n.bathrooms??0,parking_spaces:n.parking_spaces??0,rent_amount:n.rent_amount??0,deposit_amount:n.deposit_amount??0,available_from:n.available_from||"",suburb:n.suburb||"",address:n.address||"",main_image_url:n.main_image_url||"",additional_image_urls:n.additional_image_urls||[],contact_name:n.contact_name||"",contact_email:n.contact_email||"",contact_phone:n.contact_phone||"",features:Array.isArray(n.features)?n.features.join(", "):n.features||"",pet_friendly:!!n.pet_friendly,furnished:!!n.furnished,status:n.status||"available",featured:!!n.featured,tags:n.tags||[]}:null)},[n]);const g=Ct({mutationFn:y=>ie.entities.Property.update(n.id,{...y,features:y.features?y.features.split(",").map(j=>j.trim()).filter(Boolean):[]}),onSuccess:()=>{r.invalidateQueries({queryKey:["properties"]}),r.invalidateQueries(),t==null||t(!0)}}),f=(y,j)=>a(_=>({..._,[y]:j})),m=async y=>{var _;const j=(_=y.target.files)==null?void 0:_[0];
618if(j){if(!j.type.match(/^image\/(jpeg|jpg|png)$/)){alert("Please upload a JPEG or PNG image.");return}if(j.size>1024*1024){alert("Please upload an image smaller than 1MB.");return}c(!0);try{const{file_url:N}=await ie.integrations.Core.UploadFile({file:j});f("main_image_url",N)}finally{c(!1)}}},p=async y=>{var C;const j=Array.from(y.target.files||[]);if(j.length===0)return;if(j.filter(S=>!S.type.match(/^image\/(jpeg|jpg|png)$/)).length>0){alert("Please upload only JPEG or PNG images.");return}if(j.find(S=>S.size>500*1024)){alert("Gallery images must be smaller than 500KB each.");return}if((((C=i.additional_image_urls)==null?void 0:C.length)||0)+j.length>5){alert("You can upload up to 5 additional images.");return}h(!0);try{const P=(await Promise.all(j.map(R=>ie.integrations.Core.UploadFile({file:R})))).map(R=>R.file_url);f("additional_image_urls",[...i.additional_image_urls||[],...P].slice(0,5))}finally{h(!1)}},w=y=>{f("additional_image_urls",(i.additional_image_urls||[]).filter((j,_)=>_!==y))},x=y=>{y.preventDefault(),g.mutate(i)};return s.jsx(Tn,{open:e,onOpenChange:y=>!y&&(t==null?void 0:t()),children:s.jsxs(wn,{className:"max-w-3xl max-h-[85vh] overflow-y-auto",children:[s.jsx(Er,{children:s.jsx(Pr,{children:"Edit Property"})}),i?s.jsxs("form",{onSubmit:x,className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Title"}),s.jsx(de,{value:i.title,onChange:y=>f("title",y.target.value),required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Property Type"}),s.jsxs(pt,{value:i.property_type,onValueChange:y=>f("property_type",y),children:[s.jsx(dt,{children:s.jsx(gt,{placeholder:"Select type"})}),s.jsx(ft,{children:ZZ.map(y=>s.jsx(Ae,{value:y,children:y},y))})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Description"}),s.jsx(un,{rows:4,value:i.description,onChange:y=>f("description",y.target.value)})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Bedrooms"}),s.jsx(de,{type:"number",min:"0",value:i.bedrooms,onChange:y=>f("bedrooms",parseInt(y.target.value||"0",10))})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Bathrooms"}),s.jsx(de,{type:"number",min:"0",step:"0.5",value:i.bathrooms,onChange:y=>f("bathrooms",parseFloat(y.target.value||"0"))})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Parking Spaces"}),s.jsx(de,{type:"number",min:"0",value:i.parking_spaces,onChange:y=>f("parking_spaces",parseInt(y.target.value||"0",10))})]})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Rent Amount (R)"}),s.jsx(de,{type:"number",min:"0",value:i.rent_amount,onChange:y=>f("rent_amount",parseFloat(y.target.value||"0"))})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Deposit (R)"}),s.jsx(de,{type:"number",min:"0",value:i.deposit_amount,onChange:y=>f("deposit_amount",parseFloat(y.target.value||"0"))})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Available From"}),s.jsx(de,{type:"date",value:i.available_from,onChange:y=>f("available_from",y.target.value)})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Suburb"}),s.jsx(po,{value:i.suburb,onChange:y=>f("suburb",y)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Address"}),s.jsx(de,{value:i.address,onChange:y=>f("address",y.target.value)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Features (comma separated)"}),s.jsx(de,{value:i.features,onChange:y=>f("features",y.target.value),placeholder:"e.g., Pool, Garden, Security"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Discoverability Tags"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Add tags to help people find your property in search."}),s.jsx("div",{className:"mt-2",children:s.jsx(ma,{tags:i.tags||[],onChange:y=>f("tags",y),context:{name:i.title,description:i.description,category:i.property_type,suburb:i.suburb},entityType:"property"})})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Status"}),s.jsxs(pt,{value:i.status,onValueChange:y=>f("status",y),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"available",children:"Available"}),s.jsx(Ae,{value:"rented",children:"Rented"})]})]})]}),s.jsxs("div",{className:"flex items-end gap-3",children:[s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",checked:i.featured,onChange:y=>f("featured",y.target.checked)}),s.jsx("span",{children:"Featured"})]}),s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",checked:i.pet_friendly,onChange:y=>f("pet_friendly",y.target.checked)}),s.jsx("span",{children:"Pet friendly"})]}),s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",checked:i.furnished,onChange:y=>f("furnished",y.target.checked)}),s.jsx("span",{children:"Furnished"})]})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Main Image (max 1MB, JPEG/PNG)"}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"prop_main_image",accept:"image/jpeg,image/jpg,image/png",onCh
618ange:m,className:"hidden"}),s.jsx("label",{htmlFor:"prop_main_image",className:"block border-2 border-dashed rounded-lg p-4 text-center cursor-pointer",children:o?"Uploading...":i.main_image_url?s.jsx("img",{src:i.main_image_url,alt:"Main",className:"h-32 mx-auto object-cover rounded"}):"Click to upload main image"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Gallery Images (up to 5, max 500KB each, JPEG/PNG)"}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"prop_gallery_images",accept:"image/jpeg,image/jpg,image/png",multiple:!0,onChange:p,className:"hidden"}),s.jsx("label",{htmlFor:"prop_gallery_images",className:"block border-2 border-dashed rounded-lg p-4 text-center cursor-pointer",children:d?"Uploading...":"Click to upload gallery images"}),((v=i.additional_image_urls)==null?void 0:v.length)>0&&s.jsx("div",{className:"grid grid-cols-3 gap-3 mt-3",children:i.additional_image_urls.map((y,j)=>s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:y,alt:`img-${j}`,className:"w-full h-24 object-cover rounded"}),s.jsx("button",{type:"button",onClick:()=>w(j),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-4 h-4"})})]},j))})]})]})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Contact Name"}),s.jsx(de,{value:i.contact_name,onChange:y=>f("contact_name",y.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Contact Email"}),s.jsx(de,{type:"email",value:i.contact_email,onChange:y=>f("contact_email",y.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Contact Phone"}),s.jsx(de,{value:i.contact_phone,onChange:y=>f("contact_phone",y.target.value)})]})]}),s.jsxs(Tr,{children:[s.jsx(ge,{type:"button",variant:"outline",onClick:()=>t==null?void 0:t(),children:"Cancel"}),s.jsx(ge,{type:"submit",disabled:g.isPending,children:g.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):"Save changes"})]})]}):s.jsx("div",{className:"py-10 flex justify-center",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin"})})]})})}const tee=["restaurant","cafe","bar_lounge","retail","services","healthcare","education","entertainment","fitness","beauty","spa_wellness","professional","automotive","home_services","real_estate","hospital
618ity","pet_services","technology","financial_services","other"],nee=e=>e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");function ree({open:e,onClose:t,item:n}){var T,O;const r=dn(),[i,a]=Ce.useState(null),[o,c]=Ce.useState(!1),[d,h]=Ce.useState(!1),[g,f]=Ce.useState(""),[m,p]=Ce.useState(""),[w,x]=Ce.useState("");Ce.useEffect(()=>{a(n?{name:n.name||"",slug:n.slug||"",tagline:n.tagline||"",description:n.description||"",category:n.category||"",parent_categories:Nb(n),suburb:n.suburb||"",address:n.address||"",contact_phone:n.contact_phone||"",contact_email:n.contact_email||"",website:n.website||"",social_links:n.social_links||[],main_image_url:n.main_image_url||"",additional_image_urls:n.additional_image_urls||[],operating_hours:n.operating_hours||"",features:n.features||[],status:n.status||"active",tags:n.tags||[]}:null)},[n]);const v=Ct({mutationFn:M=>ie.entities.Business.update(n.id,M),onSuccess:()=>{r.invalidateQueries(),t==null||t(!0)}}),y=(M,U)=>a(z=>({...z,[M]:U})),j=M=>{M.replace(/\s/g,"").length<=30&&y("tagline",M)},_=async M=>{var z;const U=(z=M.target.files)==null?void 0:z[0];if(U){if(!U.type.match(/^image\/(jpeg|jpg|png)$/)){alert("Please upload a JPEG or PNG image.");return}if(U.size>1024*1024){alert("Please upload an image smaller than 1MB.");return}c(!0);try{const{file_url:H}=await ie.integrations.Core.UploadFile({file:U});y("main_image_url",H)}finally{c(!1)}}},N=async M=>{var Y;const U=Array.from(M.target.files||[]);if(U.length===0)return;if(U.filter(G=>!G.type.match(/^image\/(jpeg|jpg|png)$/)).length>0){alert("Please upload only JPEG or PNG images for the gallery.");return}if(U.find(G=>G.size>500*1024)){alert("Gallery images must be smaller than 500KB each.");return}if((((Y=i.additional_image_urls)==null?void 0:Y.length)||0)+U.length>5){alert("You can upload up to 5 additional images.");return}h(!0);try{const $=(await Promise.all(U.map(I=>ie.integrations.Core.UploadFile({file:I})))).map(I=>I.file_url);y("additional_image_urls",[...i.additional_image_urls||[],...$].slice(0,5))}finally{h(!1)}},C=M=>{y("additional_image_urls",(i.additional_image_urls||[]).filter((U,z)=>z!==M))},S=()=>{g.trim()&&(y("features",[...i.features||[],g.trim()]),f(""))},P=M=>{y("features",(i.features||[]).filter((U,z)=>z!==M))},R=()=>{if(m.trim()&&w.trim()){const M={platform:m.trim(),url:w.trim()};y("social_links",[...i.social_links||[],M]),p(""),x("")}},L=M=>{y("social_links",(i.social_links||[]).filter((U,z)=>z!==M))},D=M=>{var U;if(M.preventDefault(),!((U=i.parent_categories)!=null&&U.length)){alert("Please select at least one main category.");return}v.mutate(i)};return s.jsx(Tn,{open:e,onOpenChange:M=>!M&&(t==null?void 0:t()),children:s.jsxs(wn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[s.jsx(Er,{children:s.jsx(Pr,{children:"Edit Business"})}),i?s.jsxs("form",{onSubmit:D,className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Name"}),s.jsx(de,{value:i.name,onChange:M=>y("name",M.target.value),required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Slug"}),s.jsx(de,{value:i.slug,onChange:M=>y("slug",M.target.value)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Tagline"}),s.jsx(de,{value:i.tagline,onChange:M=>j(M.target.value),placeholder:"A short catchy phrase about your business"}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Max 30 characters (excluding spaces). ",30-(i.tagline||"").replace(/\s/g,"").length," remaining"]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Description"}),s.jsx(un,{rows:4,value:i.description,onChange:M=>y("description",M.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Main Categories * (choose up to 3)"}),s.jsx(Ju,{value:i.parent_categories||[],onChange:M=>y("parent_categories",M)})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Specific Category"}),s.jsxs(pt,{value:i.category,onValueChange:M=>y("category",M),children:[s.jsx(dt,{children:s.jsx(gt,{placeholder:"Select category"})}),s.jsx(ft,{children:tee.map(M=>
618s.jsx(Ae,{value:M,children:nee(M)},M))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Suburb"}),s.jsx(po,{value:i.suburb,onChange:M=>y("suburb",M)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Address"}),s.jsx(de,{value:i.address,onChange:M=>y("address",M.target.value)})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Phone"}),s.jsx(de,{value:i.contact_phone,onChange:M=>y("contact_phone",M.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Email"}),s.jsx(de,{type:"email",value:i.contact_email,onChange:M=>y("contact_email",M.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Website"}),s.jsx(de,{value:i.website,onChange:M=>y("website",M.target.value),placeholder:"https://..."})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Social Media Links (up to 10)"}),s.jsxs("div",{className:"space-y-3 mt-2",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(de,{value:m,onChange:M=>p(M.target.value),placeholder:"Platform (e.g., Facebook, Instagram)",className:"flex-1"}),s.jsx(de,{value:w,onChange:M=>x(M.target.value),placeholder:"https://...",className:"flex-1"}),s.jsx(ge,{type:"button",onClick:R,variant:"outline",size:"sm",disabled:(i.social_links||[]).length>=10||!m.trim()||!w.trim(),children:s.jsx(Cr,{className:"w-4 h-4"})})]}),(i.social_links||[]).length>0&&s.jsx("div",{className:"space-y-2",children:i.social_links.map((M,U)=>s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-gray-50 rounded",children:[s.jsxs("span",{className:"font-medium text-sm flex-shrink-0",children:[M.platform,":"]}),s.jsx("span",{className:"text-sm text-gray-600 truncate flex-1",children:M.url}),s.jsx("button",{type:"button",onClick:()=>L(U),className:"text-red-600 hover:text-red-700 flex-shrink-0",children:s.jsx(kt,{className:"w-4 h-4"})})]},U))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Operating Hours"}),s.jsx(un,{rows:3,value:i.operating_hours,onChange:M=>y("operating_hours",M.target.value),placeholder:"e.g. Mon-Fri: 9am-5pm, Sat: 10am-2pm"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Features & Amenities"}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsx(de,{value:g,onChange:M=>f(M.target.value),onKeyPress:M=>{M.key==="Enter"&&(M.preventDefault(),S())},placeholder:"Add a feature"}),s.jsx(ge,{type:"button",onClick:S,variant:"outline",size:"sm",disabled:!g.trim(),children:"Add"})]}),((T=i.features)==null?void 0:T.length)>0&&s.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:i.features.map((M,U)=>s.jsxs(rt,{variant:"secondary",className:"flex items-center gap-1",children:[M,s.jsx("button",{type:"button",onClick:()=>P(U),className:"ml-1 hover:text-red-600",children:s.jsx(kt,{className:"w-3 h-3"})})]},U))})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Discoverability Tags"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Add tags to help people find your business in search."}),s.jsx("div",{className:"mt-2",children:s.jsx(ma,{tags:i.tags||[],onChange:M=>y("tags",M),context:{name:i.name,description:i.description,category:i.category,parent_categories:i.parent_categories,suburb:i.suburb},entityType:"business",onParentCategoriesChange:M=>y("parent_categories",M)})})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Status"}),s.jsxs(pt,{value:i.status,onValueChange:M=>y("status",M),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"active",children:"Active"}),s.jsx(Ae,{value:"inactive",children:"Inactive"})]})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Main Image (max 1MB, JPEG/PNG)"}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"biz_main_image",accept:"image/jpeg,image/jpg,image/png",onChange:_,className:"hidden"}),s.jsx("label",{htmlFor:"biz_main_image",className:"block border-2 border-dashed rounded-lg p-4 text-center cursor-pointer",children:o?"Uploading...":i.main_image_url?s.jsx("img",{src:i.main_image_url,alt:"Main",className:"h-32 mx-auto object-cover rounded"}):"Click to upload main image"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Gallery Images (up to 5, max 500KB each, JPEG/PNG)"}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"biz_gallery_images",accept:"image/jpeg,image/jpg,image/png",multiple:!0,onChange:N,className:"hidden"}),s.jsx("label",{htmlFor:"biz_gallery_images",className:"block border-2 border-dashed rounded-lg p-4 text-center cursor-pointer",children:d?"Uploading...":"Click to upload gallery images"}),((O=i.additional_image_urls)==null?void 0:O.length)>0&&s.jsx("div",{className:"grid grid-cols-3 gap-3 mt-3",children:i.additional_image_urls.map((M,U)=>s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:M,alt:`img-${U}`,className:"w-full h-24 object-cover rounded"}),s.jsx("button",{type:"button",onClick:()=>C(U),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-4 h-4"})})]},U))})]})]})]}),s.jsxs(Tr,{children:[s.jsx(ge,{type:"button",variant:"outline",onClick:()=>t==null?void 0:t(),children:"Cancel"}),s.jsx(ge,{type:"submit",disabled:v.isPending,children:v.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):"Save changes"})]})]}):s.jsx("div",{className:"py-10 flex justify-center",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin"})})]})})}const see=["entertainment","sports","food","family","arts","culture","education","business","community","music","festival","market","other"];function iee({open:e,onClose:t,item:n}){var v;const r=dn(),[i,a]=Ce.useState(null),[o,c]=Ce.useState(!1),[d,h]=Ce.useState(!1);Ce.useEffect(()=>{a(n?{title:n.title||"",description:n.description||"",start_date:n.start_date?n.start_date.substring(0,16):"",end_date:n.end_date?n.end_date.substring(0,16):"",category:n.category||"",venue_name:n.venue_name||"",suburb:n.suburb||"",address:n.address||"",main_image_url:n.main_image_url||"",additional_image_urls:n.additional_image_urls||[],organizer:n.organizer||"",contact_email:n.contact_email||"",contact_phone:n.contact_phone||"",ticket_price:n.ticket_price||"",status:n.status||"published",featured:!!n.featured,tags:n.tags||[]}:null)},[n]);const g=Ct({mutationFn:y=>ie.entities.Event.update(n.id,{...y,start_date:y.start_date?new Date(y.start_date).toISOString():null,end_date:y.end_date?new Date(y.end_date).toISOString():null}),onSuccess:()=>{r.invalidateQueries(),t==null||t(!0)}}),f=(y,j)=>a(_=>({..._,[y]:j})),m=async y=>{var _;const j=(_=y.target.files)==null?void 0:_[0];
618if(j){if(!j.type.match(/^image\/(jpeg|jpg|png)$/)){alert("Please upload a JPEG or PNG image.");return}if(j.size>1024*1024){alert("Please upload an image smaller than 1MB.");return}c(!0);try{const{file_url:N}=await ie.integrations.Core.UploadFile({file:j});f("main_image_url",N)}finally{c(!1)}}},p=async y=>{var C;const j=Array.from(y.target.files||[]);if(j.length===0)return;if(j.filter(S=>!S.type.match(/^image\/(jpeg|jpg|png)$/)).length>0){alert("Please upload only JPEG or PNG images.");return}if(j.find(S=>S.size>500*1024)){alert("Gallery images must be smaller than 500KB each.");return}if((((C=i.additional_image_urls)==null?void 0:C.length)||0)+j.length>5){alert("You can upload up to 5 additional images.");return}h(!0);try{const P=(await Promise.all(j.map(R=>ie.integrations.Core.UploadFile({file:R})))).map(R=>R.file_url);f("additional_image_urls",[...i.additional_image_urls||[],...P].slice(0,5))}finally{h(!1)}},w=y=>{f("additional_image_urls",(i.additional_image_urls||[]).filter((j,_)=>_!==y))},x=y=>{y.preventDefault(),g.mutate(i)};return s.jsx(Tn,{open:e,onOpenChange:y=>!y&&(t==null?void 0:t()),children:s.jsxs(wn,{className:"max-w-3xl",children:[s.jsx(Er,{children:s.jsx(Pr,{children:"Edit Event"})}),i?s.jsxs("form",{onSubmit:x,className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Title"}),s.jsx(de,{value:i.title,onChange:y=>f("title",y.target.value),required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Description"}),s.jsx(un,{rows:4,value:i.description,onChange:y=>f("description",y.target.value)})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Start Date & Time"}),s.jsx(de,{type:"datetime-local",value:i.start_date,onChange:y=>f("start_date",y.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"End Date & Time"}),s.jsx(de,{type:"datetime-local",value:i.end_date,onChange:y=>f("end_date",y.target.value)})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Category"}),s.jsxs(pt,{value:i.category,onValueChange:y=>f("category",y),children:[s.jsx(dt,{children:s.jsx(gt,{placeholder:"Select category"})}),s.jsx(ft,{children:see.map(y=>s.jsx(Ae,{value:y,children:y},y))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Venue"}),s.jsx(de,{value:i.venue_name,onChange:y=>f("venue_name",y.target.value)})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Suburb"}),s.jsx(po,{value:i.suburb,onChange:y=>f("suburb",y)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Address"}),s.jsx(de,{value:i.address,onChange:y=>f("address",y.target.value)})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Status"}),s.jsxs(pt,{value:i.status,onValueChange:y=>f("status",y),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"published",children:"Published"}),s.jsx(Ae,{value:"draft",children:"Draft"})]})]})]}),s.jsx("div",{className:"flex items-end gap-3",children:s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",checked:i.featured,onChange:y=>f("featured",y.target.checked)}),s.jsx("span",{children:"Featured"})]})})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Discoverability Tags"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Add tags to help people find your event in search."}),s.jsx("div",{className:"mt-2",children:s.jsx(ma,{tags:i.tags||[],onChange:y=>f("tags",y),context:{name:i.title,description:i.description,category:i.category,suburb:i.suburb},entityType:"event"})})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Main Image (max 1MB, JPEG/PNG)"}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"evt_main_image",accept:"image/jpeg,image/jpg,image/png",onChange:m,className:"hidden"}),s.jsx("label",{htmlFor:"evt_main_image",className:"block border-2 border-dashed rounded-lg p-4 text-center cursor-pointer",children:o?"Uploading...":i.main_image_url?s.jsx("img",{src:i.main_image_url,alt:"Main",className:"h-32 mx-auto object-cover rounded"}):"Click to upload main image"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Gallery Images (up to 5, max 500KB each, JPEG/PNG)"}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"evt_gallery_images",accept:"image/jpeg,image/jpg,image/png",multiple:!0,onChange:p,className:"hidden"}),s.jsx("label",{htmlFor:"evt_gallery_images",className:"block border-2 border-dashed rounded-lg p-4 text-center cursor-pointer",children:d?"Uploading...":"Click to upload gallery images"}),((v=i.additional_image_urls)==null?void 0:v.length)>0&&s.jsx("div",{className:"grid grid-cols-3 gap-3 mt-3",children:i.additional_image_urls.map((y,j)=>s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:y,alt:`img-${j}`,className:"w-full h-24 object-cover rounded"}),s.jsx("button",{type:"button",onClick:()=>w(j),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-4 h-4"})})]},j))})]})]})]}),s.jsxs(Tr,{children:[s.jsx(ge,{type:"button",variant:"outline",onClick:()=>t==null?void 0:t(),children:"Cancel"}),s.jsx(ge,{type:"submit",disabled:g.isPending,children:g.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):"Save changes"})]})]}):s.jsx("div",{className:"py-10 flex justify-center",children:s.jsx(Ke,{className:"w-6 h-6 animate-spin"})})]})})}const aee={Property:{titleField:"title",dateField:"created_date",statusField:"status"},Business:{titleField:"name",dateField:"created_date",statusField:"status"},Event:{titleField:"title",dateField:"start_date",statusField:null}};function tv({entityName:e,userEmail:t,user:n,onRequestAccess:r}){const i=dn(),a=aee[e],[o,c]=Ce.useState(null),{data:d,isLoading:h}=De({queryKey:[`user-${e.toLowerCase()}s`,t],queryFn:()=>ie.entities[e].filter({created_by:t},"-created_date"),initialData:[]}),g=Ct({mutationFn:x=>ie.entities[e].delete(x),onSuccess:()=>{i.invalidateQueries({queryKey:[`user-${e.toLowerCase()}s`,t]})}}),f=x=>{window.confirm("Are you sure you want to delete this item? This action cannot be undone.")&&g.mutate(x)},m=x=>c(x),p=x=>{c(null),x&&i.invalidateQueries({queryKey:[`user-${e.toLowerCase()}s`,t]})},w=()=>o?e==="Property"?s.jsx(eee,{open:!!o,onClose:p,item:o}):e==="Business"?s.jsx(ree,{open:!!o,onClose:p,item:o}):e==="Event"?s.jsx(iee,{open:!!o,onClose:p,item:o}):null:null;return s.jsxs(Ge,{children:[s.jsx(Cn,{children:s.jsxs(En,{children:["My ",e,"s"]})}),s.jsx(Rt,{children:h?s.jsx("div",{className:"flex justify-center p-8",children:s.jsx(Ke,{className:"animate-spin"})}):d.length===0?s.jsx(ya,{children:s.jsxs(xa,{children:["You have not submitted any ",e.toLowerCase(),"s yet."]})}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(hm,{children:[s.jsx(mm,{children:s.jsxs(Ps,{children:[s.jsx(Hn,{children:a.titleField==="title"?"Title":"Name"}),s.jsx(Hn,{className:"hidden md:table-cell",children:a.dateField==="start_date"?"Event Date":"Date Submitted"}),a.statusField&&s.jsx(Hn,{className:"hidden sm:table-cell",children:"Status"}),s.jsx(Hn,{className:"text-right",children:"Actions"})]})}),s.jsx(pm,{children:d.map(x=>s.jsxs(Ps,{className:"cursor-pointer hover:bg-gray-50",onClick:()=>m(x),children:[s.jsx(bn,{className:"font-medium",children:x[a.titleField]}),s.jsx(bn,{className:"hidden md:table-cell",children:Yt(new Date(x[a.dateField]),"MMM d, yyyy")}),a.statusField&&s.jsx(bn,{className:"hidden sm:table-cell",children:s.jsx(rt,{variant:x[a.statusField]==="available"||x[a.statusField]==="active"?"default":"secondary",children:x[a.statusField]})}),s.jsxs(bn,{className:"text-right space-x-2",onClick:v=>v.stopPropagation(),children:[s.jsx(ge,{variant:"outline",size:"icon",onClick:()=>m(x),children:s.jsx(X0,{className:"w-4 h-4"})}),s.jsx(ge,{variant:"destructive",size:"icon",onClick:()=>f(x.id),children:s.jsx(oT,{className:"w-4 h-4"})})]})]},x.id))})]})})}),w()]})}function oee({open:e,onClose:t,user:n}){const[r,i]=Ce.useState(""),[a,o]=Ce.useState(""),[c,d]=Ce.useState(""),[h,g]=Ce.useState(""),[f,m]=Ce.useState(null),[p,w]=Ce.useState(""),[x,v]=Ce.useState(!1),[y,j]=Ce.useState(!1),[_,N]=Ce.useState(!1);Ce.useEffect(()=>{n!=null&&n.full_name&&o(n.full_name)},[n]);const C={"1_business":"R150 / month","2_businesses":"R400 / month","4_businesses":"R1000 / month"},S={"1_business":"1 Business","2_businesses":"2 Businesses","4_businesses":"4 Businesses"},P=async()=>
618{if(!(!r||!a||!c||!x)){j(!0);try{if(f){const z=(await ie.entities.Coupon.list()).find(G=>G.code===f.code),Y=(await ie.entities.CommercialRequest.list()).filter(G=>G.coupon_code===f.code&&G.status==="approved").length;if(!z||!z.active||Y>=z.usage_limit){m(null),w("Coupon is no longer valid or has reached its usage limit"),j(!1);return}}const O=f&&(f.discount_type==="free"||f.discount_type==="percentage"&&f.discount_value>=100);await ie.entities.CommercialRequest.create({user_email:(n==null?void 0:n.email)||"",full_name:a,package_selected:r,trading_name:c,status:O?"approved":"pending",request_date:new Date().toISOString(),coupon_code:(f==null?void 0:f.code)||""});const M=` 619 <body style="font-family: Arial, sans-serif; color: #333;"> 620 <h2 style="color: #1f2937;">${O?"Commercial Access Granted (Free Coupon)":"New Commercial Access Request"}</h2> 621 <p><strong>Package Selected:</strong> ${S[r]} (${C[r]})</p> 622 <p><strong>Full Name:</strong> ${a}</p> 623 <p><strong>Business/Trading Name:</strong> ${c}</p> 624 <p><strong>User Email:</strong> ${(n==null?void 0:n.email)||""}</p> 625 <p><strong>Request Date:</strong> ${new Date().toLocaleString()}</p> 626 ${f?`<p><strong>Coupon Applied:</strong> ${f.code} (${f.discount_type==="free"?"FREE":f.discount_type==="percentage"?f.discount_value+"% OFF":"R"+f.discount_value+" OFF"})</p>`:""} 627 ${O?'<p style="color: #16a34a; font-weight: bold;">â Access automatically approved - no payment required</p>':'<p style="color: #f59e0b;">â³ Awaiting payment confirmation</p>'} 628 </body> 629 `;await ie.integrations.Core.SendEmail({to:"[email protected]",subject:O?"Commercial Access Granted (Free Coupon) - This is Randburg":"New Commercial Access Request - This is Randburg",body:M}),N(!0)}catch(O){console.error("Error submitting request:",O),alert(`There was an error submitting your request: ${O.message||"Please try again."}`)}finally{j(!1)}}},R=async()=>{if(h.trim()){if(!r){w("Please select a package first");return}w("");try{const M=(await ie.entities.Coupon.list()).find(U=>U.code===h.toUpperCase());if(!M){w("Invalid coupon code");return}if(!M.active){w("This coupon is no longer active");return}if(M.expiry_date&&new Date(M.expiry_date)<new Date){w("This coupon has expired");return}if(M.times_used>=M.usage_limit){w("This coupon has reached its usage limit");return}if(M.applicable_packages&&M.applicable_packages.length>0&&!M.applicable_packages.includes(r)){w(`This coupon is only valid for: ${M.applicable_packages.map(U=>U==="1_business"?"1 Business":U==="2_businesses"?"2 Businesses":"4 Businesses").join(", ")}`);return}m(M)}catch(O){console.error("Coupon validation error:",O),w("Error validating coupon. Please try again.")}}},L=()=>{i(""),o((n==null?void 0:n.full_name)||""),d(""),g(""),m(null),w(""),v(!1),N(!1)},D=()=>{y||(L(),t==null||t())},T=()=>{window.open("https://pay.ikhokha.com/six8innovations/mpr/thisisrandburgfee","_blank")};return _?f&&(f.discount_type==="free"||f.discount_type==="percentage"&&f.discount_value>=100)?s.jsx(Tn,{open:e,onOpenChange:M=>!M&&D(),children:s.jsx(wn,{className:"max-w-[95vw] sm:max-w-md max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"text-center py-4 sm:py-6",children:[s.jsx("div",{className:"w-12 h-12 sm:w-16 sm:h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-3 sm:mb-4",children:s.jsx(cs,{className:"w-8 h-8 sm:w-10 sm:h-10 text-green-600"})}),s.jsx("h2",{className:"text-xl sm:text-2xl font-black text-gray-900 mb-2 sm:mb-3",children:"Access Granted! ð"}),s.jsx("p",{className:"text-sm sm:text-base text-gray-700 mb-3 sm:mb-4 px-2",children:"Your commercial access has been approved immediately!"}),s.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 sm:p-4 mb-3 sm:mb-4 text-left",children:[s.jsxs("div",{className:"flex items-start gap-2 mb-2",children:[s.jsx(ch,{className:"w-5 h-5 text-green-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-xs sm:text-sm font-semibold text-gray-800",children:["Coupon Applied: ",f.code]}),s.jsx("p",{className:"text-xs text-green-600",children:f.discount_type==="free"?"FREE ACCESS":"100% OF
629F"})]})]}),s.jsxs("p",{className:"text-xs sm:text-sm text-gray-700 mb-2",children:[s.jsx("strong",{children:"Package:"})," ",S[r]]}),s.jsxs("p",{className:"text-xs sm:text-sm text-gray-700",children:[s.jsx("strong",{children:"Business Name:"})," ",c]})]}),s.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 sm:p-4 mb-3 sm:mb-4 text-left",children:[s.jsx("p",{className:"text-xs sm:text-sm font-semibold text-gray-800 mb-2",children:"â
You can now:"}),s.jsxs("ul",{className:"text-xs sm:text-sm text-gray-700 space-y-1 list-disc pl-4",children:[s.jsxs("li",{children:["Add up to ",r==="1_business"?"1 business":r==="2_businesses"?"2 businesses":"4 businesses"]}),s.jsx("li",{children:"Manage your listings from your dashboard"}),s.jsx("li",{children:"Start getting visibility in Randburg"})]})]}),s.jsx(ge,{onClick:()=>{D(),window.location.reload()},className:"w-full font-bold text-black text-sm sm:text-base",style:{backgroundColor:"#cafc05"},children:"Go to Dashboard"})]})})}):s.jsx(Tn,{open:e,onOpenChange:M=>!M&&D(),children:s.jsx(wn,{className:"max-w-[95vw] sm:max-w-md max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"text-center py-4 sm:py-6",children:[s.jsx("div",{className:"w-12 h-12 sm:w-16 sm:h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-3 sm:mb-4",children:s.jsx(cs,{className:"w-8 h-8 sm:w-10 sm:h-10 text-green-600"})}),s.jsx("h2",{className:"text-xl sm:text-2xl font-black text-gray-900 mb-2 sm:mb-3",children:"Request Submitted!"}),s.jsx("p",{className:"text-sm sm:text-base text-gray-700 mb-3 sm:mb-4 px-2",children:"Your commercial access request has been submitted successfully."}),s.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 sm:p-4 mb-3 sm:mb-4 text-left",children:[s.jsx("p",{className:"text-xs sm:text-sm font-semibold text-gray-800 mb-2 sm:mb-3",children:"Next Step: Complete Your Payment"}),s.jsxs("p",{className:"text-xs sm:text-sm text-gray-700 mb-2 sm:mb-3",children:["All payments made now will cover ",s.jsx("strong",{children:"November and December"}),"."]}),s.jsxs("p",{className:"text-xs sm:text-sm text-gray-700 mb-2 sm:mb-3",children:[s.jsx("strong",{children:"Selected Package:"})," ",S[r],s.jsx("br",{}),s.jsx("strong",{children:"Amount:"})," ",C[r],f&&s.jsxs(s.Fragment,{children:[s.jsx("br",{}),s.jsx("strong",{children:"Discount:"})," ",f.discount_type==="percentage"?`${f.discount_value}% OFF`:`R${f.discount_value} OFF`]})]}),s.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded p-2 sm:p-3 mb-2 sm:mb-3",children:[s.jsx("p",{className:"text-xs font-semibold text-gray-800 mb-1 sm:mb-2",children:"Important Payment Instructions:"}),s.jsxs("ul",{className:"text-xs text-gray-700 space-y-1 list-disc pl-4",children:[s.jsxs("li",{children:["Use ",s.jsxs("strong",{children:['"',c,'"']})," as your payment reference"]}),s.jsx("li",{children:"Ensure you enter the correct amount for your package"}),s.jsxs("li",{children:["Payment will be processed under the parent company name ",s.jsx("strong",{children:"Six.8 Innovations"})]})]})]})]}),s.jsxs(ge,{onClick:T,className:"w-full font-bold text-black text-sm sm:text-base",style:{backgroundColor:"#cafc05"},children:[s.jsx(eT,{className:"w-4 h-4 mr-2"}),"Proceed to Payment"]})]})})}):s.jsx(Tn,{open:e,onOpenChange:O=>!O&&D(),children:s.jsxs(wn,{className:"max-w-[95vw] sm:max-w-lg max-h-[90vh] overflow-y-auto",children:[s.jsxs(Er,{children:[s.jsx(Pr,{className:"text-lg sm:text-xl",children:"Request Commercial Access"}),s.jsx(Sm,{className:"text-xs sm:text-sm",children:"Choose a package and complete the form below. Payments made now cover November & December."})]}),s.jsxs("div",{className:"space-y-4 py-2",children:[s.jsxs("div",{children:[s.jsx(ee,{className:"mb-2 block text-sm sm:text-base",children:"Choose a package *"}),s.jsx("div",{className:"grid grid-cols-1 gap-3",children:["1_business","2_businesses","4_businesses"].map(O=>s.jsxs("button",{type:"button",onClick:()=>i(O),className:`border rounded-lg p-3 sm:p-4 text-left hover:bg-gray-50 transition ${r===O?"border-blue-600 ring-1 ring-blue-600 bg-blue-50":"border-gray-200"}`,children:[s.jsx("div",{className:"font-bold text-sm sm:text-base mb-1",children:S[O]}),s.jsx("div",{className:"text-xs sm:text-sm text-gray-600",children:C[O]})]},O))})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"fullName",className:"text-sm sm:text-base",children:"Full Name *"}),s.jsx(de,{id:"fullName",value:a,onChange:O=>o(O.target.value),placeholder:"Your full name",className:"mt-1 text-sm sm:text-base"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"tradingName",className:"text-sm sm:text-base",children:"Business / Trading Name *"}),s.jsx(de,{id:"tradingName",value:c,onChange:O=>d(O.target.value),placeholder:"Your business or trading name",className:"mt-1 text-sm sm:text-base"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"This will be used as your payment reference"})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"text-sm sm:text-base mb-2 block",children:"Have a coupon code?"}),!r&&s.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Please select a package first to apply a coupon"}),f?s.jsxs("div",{className:"border border-green-200 bg-green-50 rounded-lg p-3 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ch,{className:"w-5 h-5 text-green-600"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-bold text-green-800 text-sm",children:f.code}),s.jsxs("p",{className:"text-xs text-green-600",children:[f.discount_type==="free"&&"FREE",f.discount_type==="percentage"&&`${f.discount_value}% OFF`,f.discount_type==="fixed_amount"&&`R${f.discount_value} OFF`]})]})]}),s.jsx("button",{type:"button",onClick:()=>{m(null),g("")},className:"text-green-600 hover:text-green-700",children:s.jsx(kt,{className:"w-4 h-4"})})]}):s.jsxs("div",{children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(de,{value:h,onChange:O=>{g(O.target.value.toUpperCase()),w("")},placeholder:"Enter coupon code",className:"text-sm sm:text-base",disabled:!r}),s.jsx(ge,{type:"button",variant:"outline",onClick:R,disabled:!h.trim()||!r,children:"Apply"})]}),p&&s.jsx("p",{className:"text-xs text-red-600 mt-1",children:p})]})]}),s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("input",{id:"terms",type:"checkbox",checked:x,onChange:O=>v(O.target.checked),className:"mt-1 flex-shrink-0"}),s.jsxs(ee,{htmlFor:"terms",className:"text-xs sm:text-sm text-gray-700 cursor-pointer",children:["I accept the"," ",s.jsx("a",{href:xt("Terms"),target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 underline",onClick:O=>O.stopPropagation(),children:"Terms of Use"})," ","and understand my business listings will go live immediately after approval."]})]})]}),s.jsxs(Tr,{className:"mt-2 flex-col sm:flex-row gap-2",children:[s.jsx(ge,{variant:"outline",onClick:D,disabled:y,className:"w-full sm:w-auto order-2 sm:order-1",children:"Cancel"}),s.jsx(ge,{onClick:P,disabled:!r||!a||!c||!x||y,className:"w-full sm:w-auto font-bold text-black hover:opacity-90 order-1
629sm:order-2",style:{backgroundColor:"#cafc05"},children:y?"Submitting...":"Submit Request"})]})]})})}function lee(e){const{data:t,isLoading:n}=De({queryKey:["commercial-access",e],queryFn:async()=>e?await ie.entities.CommercialRequest.filter({user_email:e,status:"approved"},"-created_date"):[],enabled:!!e,initialData:[]}),r=t&&t.length>0,i=r?t[0].package_selected:null;return{hasAccess:r,package:i,loading:n,businessLimit:i&&{"1_business":1,"2_businesses":2,"4_businesses":4}[i]||0}}function cee(){Mt("My Dashboard | This is Randburg","",{noindex:!0});const[e,t]=E.useState(null),[n,r]=E.useState(!0),[i,a]=E.useState(!1),o=wt();lee(e==null?void 0:e.email);const{data:c}=De({queryKey:["user-businesses",e==null?void 0:e.email],queryFn:()=>ie.entities.Business.filter({created_by:e==null?void 0:e.email},"-created_date"),initialData:[],enabled:!!(e!=null&&e.email)});E.useEffect(()=>{(async()=>{try{const g=await ie.auth.me();t(g)}catch{ie.auth.redirectToLogin(xt("UserDashboard"))}finally{r(!1)}})()},[]);const d=()=>{o(xt("AddBusiness"))};return n?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx(Ke,{className:"w-8 h-8 animate-spin"})}):e?s.jsxs("div",{className:"min-h-screen bg-gray-50 py-6 md:py-12",children:[s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx("h1",{className:"text-2xl md:text-4xl font-black text-gray-900 mb-6 md:mb-8",children:"My Dashboard"}),s.jsxs("div",{className:"flex flex-col gap-3 mb-6 md:mb-8",children:[(e==null?void 0:e.role)==="admin"&&s.jsxs(ge,{variant:"outline",onClick:()=>o(xt("AdminDashboard")),size:"sm",className:"w-full sm:w-auto",children:[s.jsx(iT,{className:"w-4 h-4 mr-2"}),"Admin Panel"]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[s.jsxs(ge,{onClick:()=>o(xt("AddRentalListing")),size:"sm",variant:"outline",className:"w-full",children:[s.jsx(wv,{className:"w-4 h-4 mr-2 hidden sm:inline"}),"List Property"]}),s.jsxs(ge,{onClick:d,size:"sm",variant:"outline",className:"w-full",children:[s.jsx(Zn,{className:"w-4 h-4 mr-2 hidden sm:inline"}),"Add Business"]}),s.jsxs(ge,{onClick:()=>o(xt("AddEvent")),size:"sm",variant:"outline",className:"w-full",children:[s.jsx(an,{className:"w-4 h-4 mr-2 hidden sm:inline"}),"Add Event"]})]})]}),s.jsxs(Ib,{defaultValue:"profile",className:"w-full",children:[s.jsxs(um,{className:"grid w-full grid-cols-2 md:grid-cols-4 mb-6 h-auto",children:[s.jsxs(Kt,{value:"profile",className:"text-xs sm:text-sm py-2",children:[s.jsx(Is,{className:"w-4 h-4 mr-1 sm:mr-2"}),"Profile"]}),s.jsxs(Kt,{value:"properties",className:"text-xs sm:text-sm py-2",children:[s.jsx(wv,{className:"w-4 h-4 mr-1 sm:mr-2"}),"Properties"]}),s.jsxs(Kt,{value:"businesses",className:"text-xs sm:text-sm py-2",children:[s.jsx(Zn,{className:"w-4 h-4 mr-1 sm:mr-2"}),"Businesses"]}),s.jsxs(Kt,{value:"events",className:"text-xs sm:text-sm py-2",children:[s.jsx(an,{className:"w-4 h-4 mr-1 sm:mr-2"}),"Events"]})]}),s.jsx(rn,{value:"profile",children:s.jsx(JZ,{user:e})}),s.jsx(rn,{value:"properties",children:s.jsx(tv,{entityName:"Property",userEmail:e.email,user:e})}),s.jsx(rn,{value:"businesses",children:s.jsx(tv,{entityName:"Business",userEmail:e.email,user:e})}),s.jsx(rn,{value:"events",children:s.jsx(tv,{entityName:"Event",userEmail:e.email,user:e})})]})]}),s.jsx(oee,{open:i,onClose:()=>a(!1),user:e})]}):null}var L0=["Enter"," "],uee=["ArrowDown","PageUp","Home"],B5=["ArrowUp","PageDown","End"],dee=[...uee,...B5],fee={ltr:[...L0,"ArrowRight"],rtl:[...L0,"ArrowLeft"]},hee={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ld="Menu",[Tu,mee,pee]=Wh(ld),[vo,q5]=Kr(ld,[pee,em,lm]),Rm=em(),U5=lm(),[gee,bo]=vo(ld),[yee,cd]=vo(ld),$5=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,c=Rm(t),[d,h]=E.useState(null),g=E.useRef(!1),f=ds(a),m=Zu(i);return E.useEffect(()=>{const p=()=>{g.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>g.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),s.jsx(SA,{...c,children:s.jsx(gee,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:h,children:s.jsx(yee,{scope:t,onClose:E.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:g,dir:m,modal:o,children:r})})})};$5.displayName=ld;var xee="MenuAnchor",Cw=E.forwardRef((e,t)=>
vendor: 12,955 bytes, line 629
629{const{__scopeMenu:n,...r}=e,i=Rm(n);return s.jsx(kA,{...i,...r,ref:t})});Cw.displayName=xee;var Ew="MenuPortal",[vee,z5]=vo(Ew,{forceMount:void 0}),V5=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=bo(Ew,t);return s.jsx(vee,{scope:t,forceMount:n,children:s.jsx(zs,{present:n||a.open,children:s.jsx(tm,{asChild:!0,container:i,children:r})})})};V5.displayName=Ew;var Hr="MenuContent",[bee,Tw]=vo(Hr),H5=E.forwardRef((e,t)=>{const n=z5(Hr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=bo(Hr,e.__scopeMenu),o=cd(Hr,e.__scopeMenu);return s.jsx(Tu.Provider,{scope:e.__scopeMenu,children:s.jsx(zs,{present:r||a.open,children:s.jsx(Tu.Slot,{scope:e.__scopeMenu,children:o.modal?s.jsx(wee,{...i,ref:t}):s.jsx(jee,{...i,ref:t})})})})}),wee=E.forwardRef((e,t)=>{const n=bo(Hr,e.__scopeMenu),r=E.useRef(null),i=bt(t,r);return E.useEffect(()=>{const a=r.current;if(a)return Mb(a)},[]),s.jsx(Pw,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ie(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),jee=E.forwardRef((e,t)=>{const n=bo(Hr,e.__scopeMenu);return s.jsx(Pw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_ee=lo("MenuContent.ScrollLock"),Pw=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:f,onInteractOutside:m,onDismiss:p,disableOutsideScroll:w,...x}=e,v=bo(Hr,n),y=cd(Hr,n),j=Rm(n),_=U5(n),N=mee(n),[C,S]=E.useState(null),P=E.useRef(null),R=bt(t,P,v.onContentChange),L=E.useRef(0),D=E.useRef(""),T=E.useRef(0),O=E.useRef(null),M=E.useRef("right"),U=E.useRef(0),z=w?sm:E.Fragment,H=w?{as:_ee,allowPinchZoom:!0}:void 0,Y=$=>{var Q,ne;const I=D.current+$,B=N().filter(se=>!se.disabled),V=document.activeElement,q=(Q=B.find(se=>se.ref.current===V))==null?void 0:Q.textValue,J=B.map(se=>se.textValue),te=Lee(J,I,q),K=(ne=B.find(se=>se.textValue===te))==null?void 0:ne.ref.current;(function se(ce){D.current=ce,window.clearTimeout(L.current),ce!==""&&(L.current=window.setTimeout(()=>se(""),1e3))})(I),K&&setTimeout(()=>K.focus())};E.useEffect(()=>()=>window.clearTimeout(L.current),[]),Sb();const G=E.useCallback($=>{var B,V;return M.current===((B=O.current)==null?void 0:B.side)&&Iee($,(V=O.current)==null?void 0:V.area)},[]);return s.jsx(bee,{scope:n,searchRef:D,onItemEnter:E.useCallback($=>{G($)&&$.preventDefault()},[G]),onItemLeave:E.useCallback($=>{var I;G($)||((I=P.current)==null||I.focus(),S(null))},[G]),onTriggerLeave:E.useCallback($=>{G($)&&$.preventDefault()},[G]),pointerGraceTimerRef:T,onPointerGraceIntentChange:E.useCallback($=>{O.current=$},[]),children:s.jsx(z,{...H,children:s.jsx(Gh,{asChild:!0,trapped:i,onMountAutoFocus:Ie(a,$=>{var I;$.preventDefault(),(I=P.current)==null||I.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:s.jsx(Kh,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:f,onInteractOutside:m,onDismiss:p,children:s.jsx(kR,{asChild:!0,..._,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:Ie(d,$=>{y.isUsingKeyboardRef.current||$.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(CA,{role:"menu","aria-orientation":"vertical","data-state":oM(v.open),"data-radix-menu-content":"",dir:y.dir,...j,...x,ref:R,style:{outline:"none",...x.style},onKeyDown:Ie(x.onKeyDown,$=>{const B=$.target.closest("[data-radix-menu-content]")===$.currentTarget,V=$.ctrlKey||$.altKey||$.metaKey,q=$.key.length===1;B&&($.key==="Tab"&&$.preventDefault(),!V&&q&&Y($.key));const J=P.current;if($.target!==J||!dee.includes($.key))return;$.preventDefault();const K=N().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);B5.includes($.key)&&K.reverse(),Oee(K)}),onBlur:Ie(e.onBlur,$=>{$.currentTarget.contains($.target)||(window.clearTimeout(L.current),D.current="")}),onPointerMove:Ie(e.onPointerMove,Pu($=>{const I=$.target,B=U.current!==$.clientX;if($.currentTarget.contains(I)&&B){const V=$.clientX>U.current?"right":"left";M.current=V,U.current=$.clientX}}))})})})})})})});H5.displayName=Hr;var Nee="MenuGroup",Aw=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ze.div,{role:"group",...r,ref:t})});Aw.displayName=Nee;var See="MenuLabel",W5=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ze.div,{...r,ref:t})});W5.displayName=See;var Oh="MenuItem",FC="menu.itemSelect",Om=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=E.useRef(null),o=cd(Oh,e.__scopeMenu),c=Tw(Oh,e.__scopeMenu),d=bt(t,a),h=E.useRef(!1),g=()=>{const f=a.current;if(!n&&f){const m=new CustomEvent(FC,{bubbles:!0,cancelable:!0});f.addEventListener(FC,p=>r==null?void 0:r(p),{once:!0}),XP(f,m),m.defaultPrevented?h.current=!1:o.onClose()}};return s.jsx(K5,{...i,ref:d,disabled:n,onClick:Ie(e.onClick,g),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),h.current=!0},onPointerUp:Ie(e.onPointerUp,f=>{var m;h.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:Ie(e.onKeyDown,f=>{const m=c.searchRef.current!=="";n||m&&f.key===" "||L0.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Om.displayName=Oh;var K5=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Tw(Oh,n),c=U5(n),d=E.useRef(null),h=bt(t,d),[g,f]=E.useState(!1),[m,p]=E.useState("");return E.useEffect(()=>{const w=d.current;w&&p((w.textContent??"").trim())},[a.children]),s.jsx(Tu.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:s.jsx(CR,{asChild:!0,...c,focusable:!r,children:s.jsx(Ze.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:h,onPointerMove:Ie(e.onPointerMove,Pu(w=>{r?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ie(e.onPointerLeave,Pu(w=>o.onItemLeave(w))),onFocus:Ie(e.onFocus,()=>f(!0)),onBlur:Ie(e.onBlur,()=>f(!1))})})})}),kee="MenuCheckboxItem",G5=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return s.jsx(Z5,{scope:e.__scopeMenu,checked:n,children:s.jsx(Om,{role:"menuitemcheckbox","aria-checked":Mh(n)?"mixed":n,...i,ref:t,"data-state":Ow(n),onSelect:Ie(i.onSelect,()=>r==null?void 0:r(Mh(n)?!0:!n),{checkForDefaultPrevented:!1})})})});G5.displayName=kee;var Y5="MenuRadioGroup",[Cee,Eee]=vo(Y5,{value:void 0,onValueChange:()=>{}}),Q5=E.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=ds(r);return s.jsx(Cee,{scope:e.__scopeMenu,value:n,onValueChange:a,children:s.jsx(Aw,{...i,ref:t})})});Q5.displayName=Y5;var X5="MenuRadioItem",J5=E.forwardRef((e,t)=>{const{value:n,...r}=e,i=Eee(X5,e.__scopeMenu),a=n===i.value;return s.jsx(Z5,{scope:e.__scopeMenu,checked:a,children:s.jsx(Om,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ow(a),onSelect:Ie(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});J5.displayName=X5;var Rw="MenuItemIndicator",[Z5,Tee]=vo(Rw,{checked:!1}),eM=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=Tee(Rw,n);return s.jsx(zs,{present:r||Mh(a.checked)||a.checked===!0,children:s.jsx(Ze.span,{...i,ref:t,"data-state":Ow(a.checked)})})});eM.displayName=Rw;var Pee="MenuSeparator",tM=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ze.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});tM.displayName=Pee;var Aee="MenuArrow",nM=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Rm(n);return s.jsx(EA,{...i,...r,ref:t})});nM.displayName=Aee;var Ree="MenuSub",[_oe,rM]=vo(Ree),su="MenuSubTrigger",sM=E.forwardRef((e,t)=>{const n=bo(su,e.__scopeMenu),r=cd(su,e.__scopeMenu),i=rM(su,e.__scopeMenu),a=Tw(su,e.__scopeMenu),o=E.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=a,h={__scopeMenu:e.__scopeMenu},g=E.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return E.useEffect(()=>g,[g]),E.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),d(null)}},[c,d]),s.jsx(Cw,{asChild:!0,...h,children:s.jsx(K5,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":oM(n.open),...e,ref:Hh(t,i.onTriggerChange),onClick:f=>{var m;(m=e.onClick)==null||m.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ie(e.onPointerMove,Pu(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:Ie(e.onPointerLeave,Pu(f=>{var p,w;g();const m=(p=n.content)==null?void 0:p.getBoundingClientRect();if(m){const x=(w=n.content)==null?void 0:w.dataset.side,v=x==="right",y=v?-5:5,j=m[v?"left":"right"],_=m[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:j,y:m.top},{x:_,y:m.top},{x:_,y:m.bottom},{x:j,y:m.bottom}],side:x}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Ie(e.onKeyDown,f=>{var p;const m=a.searchRef.current!=="";e.disabled||m&&f.key===" "||fee[r.dir].includes(f.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),f.preventDefault())})})})});sM.displayName=su;var iM="MenuSubContent",aM=E.forwardRef((e,t)=>{const n=z5(Hr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=bo(Hr,e.__scopeMenu),o=cd(Hr,e.__scopeMenu),c=rM(iM,e.__scopeMenu),d=E.useRef(null),h=bt(t,d);return s.jsx(Tu.Provider,{scope:e.__scopeMenu,children:s.jsx(zs,{present:r||a.open,children:s.jsx(Tu.Slot,{scope:e.__scopeMenu,children:s.jsx(Pw,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:h,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var f;o.isUsingKeyboardRef.current&&((f=d.current)==null||f.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:Ie(e.onFocusOutside,g=>{g.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Ie(e.onEscapeKeyDown,g=>{o.onClose(),g.preventDefault()}),onKeyDown:Ie(e.onKeyDown,g=>{var p;const f=g.currentTarget.contains(g.target),m=hee[o.dir].includes(g.key);f&&m&&(a.onOpenChange(!1),(p=c.trigger)==null||p.focus(),g.preventDefault())})})})})})});aM.displayName=iM;function oM(e){return e?"open":"closed"}function Mh(e){return e==="indeterminate"}function Ow(e){return Mh(e)?"indeterminate":e?"checked":"unchecked"}function Oee(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Mee(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Lee(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=Mee(e,Math.max(a,0));i.length===1&&(o=o.filter(h=>h!==n));const d=o.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function Dee(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const c=t[a],d=t[o],h=c.x,g=c.y,f=d.x,m=d.y;g>r!=m>r&&n<(f-h)*(r-g)/(m-g)+h&&(i=!i)}return i}function Iee(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Dee(n,t)}function Pu(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Fee=$5,Bee=Cw,qee=V5,Uee=H5,$ee=Aw,zee=W5,Vee=Om,Hee=G5,Wee=Q5,Kee=J5,Gee=eM,Yee=tM,Qee=nM,Xee=sM,Jee=aM,Mm="DropdownMenu",[Zee]=Kr(Mm,[q5]),er=q5(),[ete,lM]=Zee(Mm),cM=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:c=!0}=e,d=er(t),h=E.useRef(null),[g,f]=pi({prop:i,defaultProp:a??!1,onChange:o,caller:Mm});return s.jsx(ete,{scope:t,triggerId:Rs(),triggerRef:h,contentId:Rs(),open:g,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(m=>!m),[f]),modal:c,children:s.jsx(Fee,{...d,open:g,onOpenChange:f,dir:r,modal:c,children:n})})};cM.displayName=Mm;var uM="DropdownMenuTrigger",dM=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=lM(uM,n),o=er(n);return s.jsx(Bee,{asChild:!0,...o,children:s.jsx(Ze.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Hh(t,a.triggerRef),onPointerDown:Ie(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:Ie(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});dM.displayName=uM;var tte="DropdownMenuPortal",fM=e=>{const{__scopeDropdownMenu:t,...n}=e,r=er(t);return s.jsx(qee,{...r,...n})};fM.displayName=tte;var hM="DropdownMenuContent",mM=E.forwardRef((e,t)=>
629{const{__scopeDropdownMenu:n,...r}=e,i=lM(hM,n),a=er(n),o=E.useRef(!1);return s.jsx(Uee,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Ie(e.onCloseAutoFocus,c=>{var d;o.current||(d=i.triggerRef.current)==null||d.focus(),o.current=!1,c.preventDefault()}),onInteractOutside:Ie(e.onInteractOutside,c=>{const d=c.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,g=d.button===2||h;(!i.modal||g)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mM.displayName=hM;var nte="DropdownMenuGroup",rte=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx($ee,{...i,...r,ref:t})});rte.displayName=nte;var ste="DropdownMenuLabel",pM=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(zee,{...i,...r,ref:t})});pM.displayName=ste;var ite="DropdownMenuItem",gM=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(Vee,{...i,...r,ref:t})});gM.displayName=ite;var ate="DropdownMenuCheckboxItem",yM=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(Hee,{...i,...r,ref:t})});yM.displayName=ate;var ote="DropdownMenuRadioGroup",lte=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(Wee,{...i,...r,ref:t})});lte.displayName=ote;var cte="DropdownMenuRadioItem",xM=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(Kee,{...i,...r,ref:t})});xM.displayName=cte;var ute="DropdownMenuItemIndicator",vM=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(Gee,{...i,...r,ref:t})});vM.displayName=ute;var dte="DropdownMenuSeparator",bM=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(Yee,{...i,...r,ref:t})});bM.displayName=dte;var fte="DropdownMenuArrow",hte=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(Qee,{...i,...r,ref:t})});hte.displayName=fte;var mte="DropdownMenuSubTrigger",wM=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(Xee,{...i,...r,ref:t})});wM.displayName=mte;var pte="DropdownMenuSubContent",jM=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=er(n);return s.jsx(Jee,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jM.displayName=pte;var gte=cM,yte=dM,xte=fM,_M=mM,NM=pM,SM=gM,kM=yM,CM=xM,EM=vM,TM=bM,PM=wM,AM=jM;const vte=gte,bte=yte,wte=E.forwardRef(({className:e,inset:t,children:n,...r},i)=>s.jsxs(PM,{ref:i,className:He("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,s.jsx($u,{className:"ml-auto"})]}));wte.displayName=PM.displayName;const jte=E.forwardRef(({className:e,...t},n)=>s.jsx(AM,{ref:n,className:He("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));jte.displayName=AM.displayName;const RM=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(xte,{children:s.jsx(_M,{ref:r,sideOffset:t,className:He("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
629de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));RM.displayName=_M.displayName;const OM=E.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(SM,{ref:r,className:He("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));OM.displayName=SM.displayName;const _te=E.forwardRef(({className:e,children:t,checked:n,...r},i)=>s.jsxs(kM,{ref:i,className:He("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(EM,{children:s.jsx(Ds,{className:"h-4 w-4"})})}),t]}));_te.displayName=kM.displayName;const Nte=E.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(CM,{ref:r,className:He("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(EM,{children:s.jsx(lI,{className:"h-2 w-2 fill-current"})})}),t]}));Nte.displayName=CM.displayName;const Ste=E.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(NM,{ref:r,className:He("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ste.displayName=NM.displayName;const kte=E.forwardRef(({className:e,...t},n)=>s.jsx(TM,{ref:n,className:He("-mx-1 my-1 h-px bg-muted",e),...t}));kte.displayName=TM.displayName;const BC=[{name:"Home",path:"",icon:El},{name:"Events",path:"Events",icon:an},{name:"News",path:"News",icon:fi},{name:"Businesses",path:"Businesses",icon:Zn},{name:"Rentals",path:"Rentals",icon:El}],Cte=[{name:"Rentals",path:"Rentals"},{name:"Businesses",path:"Businesses"},{name:"Events",path:"Events"},{name:"News",path:"News"},{name:"Suburbs",path:"Suburbs"},{name:"Contact",path:"Contact"}],qC=[{name:"Suburbs",to:"/suburbs"},{name:"Malls & Centres",to:"/malls-centres"},{name:"Food & Drink",to:"/businesses?parent=food-drink"},{name:"Shopping",to:"/businesses?parent=shopping"},{name:"Health",to:"/businesses?parent=health"},{name:"Services",to:"/businesses?parent=professional-services"},{name:"Entertainment",to:"/businesses?parent=entertainment-leisure"},{name:"Sports & Fitness",to:"/businesses?parent=fitness-sport"},{name:"Family Events",to:"/events?category=family"}];function Ete({children:e}){const[t,n]=E.useState(!1),[r,i]=E.useState(null),[a,o]=E.useState(!1),[c,d]=E.useState(!0),h=hr(),g=wt();E.useEffect(()=>{const w=document.createElement("script");w.innerHTML=`
vendor: 327 bytes, lines 629-633
629(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 630new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 631j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 632'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 633})(window,document,'script','dataLayer','
633GTM-KF5F5RDC
vendor: 3 bytes, line 633
633');
633`;const x=document.head.querySelector("script");return x?document.head.insertBefore(w,x):document.head.appendChild(w),()=>{w.parentNode&&w.parentNode.removeChild(w)}},[]);const{data:f}=De({queryKey:["site-settings"],queryFn:async()=>{const w=await ie.entities.SiteSetting.list();return w&&w.length?w[0]:null},initialData:null});E.useEffect(()=>{const w=localStorage.getItem("b44_auth_cache");let x=!1;if(w)try{const y=JSON.parse(w);typeof(y==null?void 0:y.isAuthenticated)=="boolean"&&(o(y.isAuthenticated),i(y.user||null),d(!1),x=!0)}catch{localStorage.removeItem("b44_auth_cache")}(async()=>{try{const y=await ie.auth.isAuthenticated();o(y);let j=null;y?(j=await ie.auth.me(),i(j)):i(null),localStorage.setItem("b44_auth_cache",JSON.stringify({isAuthenticated:y,user:j}))}catch{o(!1),i(null),localStorage.removeItem("b44_auth_cache")}finally{x||d(!1)}})()},[]),E.useEffect(()=>{window.scrollTo(0,0),n(!1)},[h.pathname]);const m=async()=>{await ie.auth.logout(),localStorage.removeItem("b44_auth_cache"),o(!1),i(null),g("/")},p=()=>{a?g(xt("UserDashboard")):ie.auth.redirectToLogin("/")};return s.jsxs("div",{className:"min-h-screen bg-white flex flex-col overflow-x-hidden",children:[s.jsx("noscript",{children:s.jsx("iframe",{src:"https://www.googletagmanager.com/ns.html?id=GTM-KF5F5RDC",height:"0",width:"0",style:{display:"none",visibility:"hidden"}})}),s.jsx("style",{children:` 634 :root { 635 --accent-purple: #d395ff; 636 --accent-lime: #cafc05; 637 --accent-blue: #0171d3; 638 } 639 `}),s.jsxs("header",{className:"sticky top-0 z-50 bg-white backdrop-blur-md border-b border-gray-100 shadow-sm",children:[s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex justify-between items-center h-18 md:h-20",children:[s.jsx(Jt,{to:"/",className:"flex items-center flex-shrink-0",children:s.jsx("div",{className:"h-16 flex items-center",children:(f==null?void 0:f.logo_url)&&s.jsx("img",{src:f.logo_url,alt:"This is Randburg logo",style:{width:`${f.logo_width||200}px`,height:`${f.logo_height||100}px`,maxHeight:"60px"},className:"object-contain"})})}),s.jsxs("nav",{className:"hidden lg:flex items-center gap-1 flex-shrink-0",children:[s.jsx(Jt,{to:"/",className:`px-3 xl:px-4 py-2 rounded-full font-semibold text-sm transition-all duration-200 ${h.pathname==="/"?"bg-gray-900 text-white":"text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`,children:"Home"}),s.jsxs(vte,{children:[s.jsxs(bte,{className:"px-3 xl:px-4 py-2 rounded-full font-semibold text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 flex items-center gap-1 outline-none",children:["Explore ",s.jsx(Ih,{className:"w-3.5 h-3.5"})]}),s.jsx(RM,{align:"start",className:"w-48",children:qC.map(w=>s.jsx(OM,{asChild:!0,children:s.jsx(Jt,{to:w.to,children:w.name})},w.name))})]}),BC.slice(1).map(w=>{const x=h.pathname===xt(w.path);return s.jsx(Jt,{to:xt(w.path),className:`px-3 xl:px-4 py-2 rounded-full font-semibold text-sm transition-all duration-200 ${x?"bg-gray-900 text-white":"text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`,children:w.name},w.name)})]}),s.jsxs("div",{className:"hidden lg:flex items-center gap-2 xl:gap-3 min-w-[240px] justify-end flex-shrink-0",children:[c?s.jsxs("div",{className:"flex items-center gap-2 w-full justify-end",children:[s.jsx("div",{className:"h-10 w-24 bg-gray-100 rounded-md animate-pulse"}),s.jsx("div",{className:"h-10 w-24 bg-gray-100 rounded-md animate-pulse"})]}):a?s.jsxs(s.Fragment,{children:[s.jsxs(ge,{variant:"outline",size:"sm",onClick:()=>g(xt("UserDashboard")),children:[s.jsx(Is,{className:"w-4 h-4 mr-1"}),s.jsx("span",{className:"hidden xl:inline",children:"Dashboard"})]}),s.jsxs(ge,{variant:"ghost",size:"sm",onClick:m,children:[s.jsx(H_,{className:"w-4 h-4 mr-1"}),s.jsx("span",{className:"hidden xl:inline",children:"Logout"})]})]}):s.jsx(ge,{variant:"outline",size:"sm",onClick:()=>ie.auth.redirectToLogin(),children:"Login"}),s.jsxs(ge,{onClick:p,size:"sm",className:"font-bold text-black hover:opacity-90 rounded-full px-5",style:{backgroundColor:"#cafc05"},children:[s.jsx(mu,{className:"w-4 h-4 mr-1"}),s.jsx("span",{className:"hidden xl:inline",children:"Get Listed"})]})]}),s.jsx("button",{onClick:()=>n(!t),className:"lg:hidden p-2 rounded-lg hover:bg-gray-100 flex-shrink-0",children:t?s.jsx(kt,{className:"w-6 h-6"}):s.jsx(UI,{className:"w-6 h-6"})})]})}),t&&s.jsx("div",{className:"lg:hidden bg-white border-t",children:s.jsxs("nav",{className:"px-4 py-4 space-y-2",children:[BC.map(w=>{const x=h.pathname===xt(w.path);return s.jsxs(Jt,{to:xt(w.path),className:`flex items-center gap-3 px-4 py-3 rounded-lg font-semibold ${x?"bg-gray-900 text-white":"text-gray-700 hover:bg-gray-100"}`,children:[s.jsx(w.icon,{className:"w-5 h-5"}),w.name]},w.name)}),s.jsxs("div",{className:"pt-2 pb-1",children:[s.jsx("p",{className:"px-4 text-xs font-bold uppercase tracking-widest text-gray-400 mb-2",children:"Explore"}),s.jsx("div",{className:"flex flex-wrap gap-2 px-4",children:qC.map(w=>s.jsx(Jt,{to:w.to,className:"text-xs font-semibold px-3 py-1.5 rounded-full bg-gray-100 text-gray-600 hover:bg-gray-200",children:w.name},w.name))})]}),s.jsxs("div",{className:"pt-4 space-y-3 border-t",children:[c?s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"h-10 w-full bg-gray-100 rounded-md animate-pulse"}),s.jsx("div",{className:"h-10 w-full bg-gray-100 rounded-md animate-pulse"})]}):a?s.jsxs(s.Fragment,{children:[s.jsxs(ge,{className:"w-full",variant:"outline",onClick:()=>g(xt("UserDashboard")),children:[s.jsx(Is,{className:"w-4 h-4 mr-2"}),"Dashboard"]}),s.jsxs(ge,{className:"w-full",variant:"ghost",onClick:m,children:[s.jsx(H_,{className:"w-4 h-4 mr-2"}),"Logout"]})]}):s.jsx(ge,{className:"w-full",variant:"outline",onClick:()=>ie.auth.redirectToLogin(),children:"Login"}),s.jsxs(ge,{className:"w-full font-bold text-black",style:{backgroundColor:"#cafc05"},onClick:p,children:[s.jsx(mu,{className:"w-4 h-4 mr-2"}),"Get Listed"]})]})]})})]}),s.jsx("main",{className:"flex-1",children:e}),s.jsx(JO,{pageLocation:"all",position:"above_footer_banner"}),s.jsx("footer",{className:"bg-gray-950 text-white mt-auto",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-black mb-4",children:"This is Randburg"}),s.jsx("p",{className:"text-gray-400 text-sm leading-relaxed",children:"Your ultimate digital hub for everything Randburg. Discover local property rentals, events, businesses, news and more."}),s.jsx("p",{className:"text-gray-500 text-xs mt-2",children:"This is Randburg is a Six.8 Innovations Product."})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-bold mb-4",children:"Qu
639ick Links"}),s.jsx("ul",{className:"space-y-2 text-sm",children:Cte.map(w=>s.jsx("li",{children:s.jsx(Jt,{to:xt(w.path),className:"text-gray-400 hover:text-white transition-colors",children:w.name})},w.name))})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-bold mb-4",children:"Legal"}),s.jsxs("ul",{className:"space-y-2 text-sm",children:[s.jsx("li",{children:s.jsx(Jt,{to:xt("Terms"),className:"text-gray-400 hover:text-white transition-colors",children:"Terms & Conditions"})}),s.jsx("li",{children:s.jsx(Jt,{to:xt("Terms")+"#privacy",className:"text-gray-400 hover:text-white transition-colors",children:"Privacy Policy"})}),s.jsx("li",{children:s.jsx(Jt,{to:xt("Terms")+"#cookies",className:"text-gray-400 hover:text-white transition-colors",children:"Cookie Policy"})})]})]})]}),s.jsx("div",{className:"border-t border-gray-800 mt-8 pt-8 text-center text-sm text-gray-400",children:s.jsxs("p",{children:["© ",new Date().getFullYear()," This is Randburg. All rights reserved."]})})]})})]})}const Tte={AddBusiness:kV,AddEvent:CV,AddRentalListing:EV,AdminDashboard:zG,Businesses:QG,Contact:XG,Dashboard:dY,Events:fY,News:mY,Rentals:pY,Shoutout:$Z,Terms:zZ,UserDashboard:cee},MM={mainPage:"Dashboard",Pages:Tte,Layout:Ete};function Pte(){const e=hr(),{isAuthenticated:t}=QP(),{Pages:n,mainPage:r}=MM,i=r;return E.useEffect(()=>{var a;(a=window.parent)==null||a.postMessage({type:"app_changed_url",url:window.location.href},"*")},[e]),E.useEffect(()=>{const a=e.pathname;let o;if(a==="/"||a==="")o=i;else{const c=a.replace(/^\//,"").split("/")[0];o=Object.keys(n).find(g=>g.toLowerCase()===c.toLowerCase())||null}t&&o&&ie.appLogs.logUserInApp(o).catch(()=>{})},[e,t,n,i]),null}function Ate({}){var i;const t=hr().pathname.substring(1),{data:n,isFetched:r}=De({queryKey:["user"],queryFn:async()=>{try{return{user:await ie.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return s.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:s.jsx("div",{className:"max-w-md w-full",children:s.jsxs("div",{className:"text-center space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),s.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),s.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",s.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),r&&n.isAuthenticated&&((i=n.user)==null?void 0:i.role)==="admin"&&s.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:s.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),s.jsxs("div",{className:"text-left space-y-1",children:[s.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),s.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),s.jsx("div",{className:"pt-6",children:s.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[s.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const Rte=()=>s.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:s.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:s.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),s.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),s.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),s.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[s.jsx("p",{children:"If you believe this is an error, you can:"}),s.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[s.jsx("li",{children:"Verify you are logged in with the correct account"}),s.jsx("li",{children:"Contact the app administrator for access"}),s.jsx("li",{children:"Try logging out and back in again"})]})]})]})})});function Ote(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Mte=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lte=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dte={};function UC(e,t){return(Dte.jsx?Lte:Mte).test(e)}const Ite=/[ \t\n\f\r]/g;function Fte(e){return typeof e=="object"?e.type==="text"?$C(e.value):!1:$
vendor: 5,417 bytes, line 639
639C(e)}function $C(e){return e.replace(Ite,"")===""}class ud{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ud.prototype.normal={};ud.prototype.property={};ud.prototype.space=void 0;function LM(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ud(n,r,t)}function D0(e){return e.toLowerCase()}class mr{constructor(t,n){this.attribute=n,this.property=t}}mr.prototype.attribute="";mr.prototype.booleanish=!1;mr.prototype.boolean=!1;mr.prototype.commaOrSpaceSeparated=!1;mr.prototype.commaSeparated=!1;mr.prototype.defined=!1;mr.prototype.mustUseProperty=!1;mr.prototype.number=!1;mr.prototype.overloadedBoolean=!1;mr.prototype.property="";mr.prototype.spaceSeparated=!1;mr.prototype.space=void 0;let Bte=0;const ut=wo(),hn=wo(),I0=wo(),Ne=wo(),Ft=wo(),dl=wo(),br=wo();function wo(){return 2**++Bte}const F0=Object.freeze(Object.defineProperty({__proto__:null,boolean:ut,booleanish:hn,commaOrSpaceSeparated:br,commaSeparated:dl,number:Ne,overloadedBoolean:I0,spaceSeparated:Ft},Symbol.toStringTag,{value:"Module"})),nv=Object.keys(F0);class Mw extends mr{constructor(t,n,r,i){let a=-1;if(super(t,n),zC(this,"space",i),typeof r=="number")for(;++a<nv.length;){const o=nv[a];zC(this,nv[a],(r&F0[o])===F0[o])}}}Mw.prototype.defined=!0;function zC(e,t,n){n&&(e[t]=n)}function Xl(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Mw(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[D0(r)]=r,n[D0(a.attribute)]=r}return new ud(t,n,e.space)}const DM=Xl({properties:{ariaActiveDescendant:null,ariaAtomic:hn,ariaAutoComplete:null,ariaBusy:hn,ariaChecked:hn,ariaColCount:Ne,ariaColIndex:Ne,ariaColSpan:Ne,ariaControls:Ft,ariaCurrent:null,ariaDescribedBy:Ft,ariaDetails:null,ariaDisabled:hn,ariaDropEffect:Ft,ariaErrorMessage:null,ariaExpanded:hn,ariaFlowTo:Ft,ariaGrabbed:hn,ariaHasPopup:null,ariaHidden:hn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ft,ariaLevel:Ne,ariaLive:null,ariaModal:hn,ariaMultiLine:hn,ariaMultiSelectable:hn,ariaOrientation:null,ariaOwns:Ft,ariaPlaceholder:null,ariaPosInSet:Ne,ariaPressed:hn,ariaReadOnly:hn,ariaRelevant:null,ariaRequired:hn,ariaRoleDescription:Ft,ariaRowCount:Ne,ariaRowIndex:Ne,ariaRowSpan:Ne,ariaSelected:hn,ariaSetSize:Ne,ariaSort:null,ariaValueMax:Ne,ariaValueMin:Ne,ariaValueNow:Ne,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function IM(e,t){return t in e?e[t]:t}function FM(e,t){return IM(e,t.toLowerCase())}const qte=Xl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:dl,acceptCharset:Ft,accessKey:Ft,action:null,allow:null,allowFullScreen:ut,allowPaymentRequest:ut,allowUserMedia:ut,alt:null,as:null,async:ut,autoCapitalize:null,autoComplete:Ft,autoFocus:ut,autoPlay:ut,blocking:Ft,capture:null,charSet:null,checked:ut,cite:null,className:Ft,cols:Ne,colSpan:null,content:null,contentEditable:hn,controls:ut,controlsList:Ft,coords:Ne|dl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ut,defer:ut,dir:null,dirName:null,disabled:ut,download:I0,draggable:hn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ut,formTarget:null,headers:Ft,height:Ne,hidden:I0,high:Ne,href:null,hrefLang:null,htmlFor:Ft,httpEquiv:Ft,id:null,imageSizes:null,imageSrcSet:null,inert:ut,inputMode:null,integrity:null,is:null,isMap:ut,itemId:null,itemProp:Ft,itemRef:Ft,itemScope:ut,itemType:Ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ut,low:Ne,manifest:null,max:null,maxLength:Ne,media:null,method:null,min:null,minLength:Ne,multiple:ut,muted:ut,name:null,nonce:null,noModule:ut,noValidate:ut,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ut,optimum:Ne,pattern:null,ping:Ft,placeholder:null,playsInl
639ine:ut,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ut,referrerPolicy:null,rel:Ft,required:ut,reversed:ut,rows:Ne,rowSpan:Ne,sandbox:Ft,scope:null,scoped:ut,seamless:ut,selected:ut,shadowRootClonable:ut,shadowRootDelegatesFocus:ut,shadowRootMode:null,shape:null,size:Ne,sizes:null,slot:null,span:Ne,spellCheck:hn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ne,step:null,style:null,tabIndex:Ne,target:null,title:null,translate:null,type:null,typeMustMatch:ut,useMap:null,value:hn,width:Ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ft,axis:null,background:null,bgColor:null,border:Ne,borderColor:null,bottomMargin:Ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ut,declare:ut,event:null,face:null,frame:null,frameBorder:null,hSpace:Ne,leftMargin:Ne,link:null,longDesc:null,lowSrc:null,marginHeight:Ne,marginWidth:Ne,noResize:ut,noHref:ut,noShade:ut,noWrap:ut,object:null,profile:null,prompt:null,rev:null,rightMargin:Ne,rules:null,scheme:null,scrolling:hn,standby:null,summary:null,text:null,topMargin:Ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ut,disableRemotePlayback:ut,prefix:null,property:null,results:Ne,security:null,unselectable:null},space:"html",transform:FM}),Ute=Xl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
639-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:br,accentHeight:Ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ne,amplitude:Ne,arabicForm:null,ascent:Ne,attributeName:null,attributeType:null,azimuth:Ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ne,by:null,calcMode:null,capHeight:Ne,className:Ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ne,diffuseConstant:Ne,direction:null,display:null,dur:null,divisor:Ne,dominantBaseline:null,download:ut,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ne,enableBackground:null,end:null,event:null,exponent:Ne,externalResourcesRequired:null,fill:null,fillOpacity:Ne,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:dl,g2:dl,glyphName:dl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ne,horizOriginX:Ne,horizOriginY:Ne,id:null,ideographic:Ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ne,k:Ne,k1:Ne,k2:Ne,k3:Ne,k4:Ne,kernelMatrix:br,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ne,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 9,117 bytes, lines 639-640
639Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ne,overlineThickness:Ne,paintOrder:null,panose1:null,path:null,pathLength:Ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ne,pointsAtY:Ne,pointsAtZ:Ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:br,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:br,rev:br,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:br,requiredFeatures:br,requiredFonts:br,requiredFormats:br,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ne,specularExponent:Ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ne,strikethroughThickness:Ne,string:null,stroke:null,strokeDashArray:br,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ne,strokeOpacity:Ne,strokeWidth:null,style:null,surfaceScale:Ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:br,tabIndex:Ne,tableValues:null,target:null,targetX:Ne,targetY:Ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:br,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ne,underlineThickness:Ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ne,values:null,vAlphabetic:Ne,vMathematical:Ne,vectorEffect:null,vHanging:Ne,vIdeographic:Ne,version:null,vertAdvY:Ne,vertOriginX:Ne,vertOriginY:Ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:IM}),BM=Xl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),qM=Xl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:FM}),UM=Xl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$te={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},zte=/[A-Z]/g,VC=/-[a-z]/g,Vte=/^data[-\w.:]+$/i;function Hte(e,t){const n=D0(t);let r=t,i=mr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Vte.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(VC,Kte);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!VC.test(a)){let o=a.replace(zte,Wte);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Mw}return new i(r,t)}function Wte(e){return"-"+e.toLowerCase()}function Kte(e){return e.charAt(1).toUpperCase()}const Gte=LM([DM,qte,BM,qM,UM],"html"),Lw=LM([DM,Ute,BM,qM,UM],"svg");function Yte(e){return e.join(" ").trim()}var Zo={},rv,HC;function Qte(){if(HC)return rv;HC=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,c=/^\s+|\s+$/g,d=` 640`,h="/",g="*",f="",m="comment",p="declaration";rv=function(x,v){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];v=v||{};var y=1,j=1;function _(M){var U=M.match(t);U&&(y+=U.length);var z=M.lastIndexOf(d);j=~z?M.length-z:j+M.length}function N(){var M={line:y,column:j};return function(U){return U.position=new C(M),R(),U}}function C(M){this.start=M,this.end={line:y,column:j},this.source=v.source}C.prototype.content=x;function S(M){var U=new Error(v.source+":"+y+":"+j+": "+M);if(U.reason=M,U.filename=v.source,U.line=y,U.column=j,U.source=x,!v.silent)throw U}function P(M){var U=M.exec(x);if(U){var z=U[0];return _(z),x=x.slice(z.length),U}}function R(){P(n)}function L(M){var U;for(M=M||[];U=D();)U!==!1&&M.push(U);return M}function D(){var M=N();if(!(h!=x.charAt(0)||g!=x.charAt(1))){for(var U=2;f!=x.charAt(U)&&(g!=x.charAt(U)||h!=x.charAt(U+1));)++U;if(U+=2,f===x.charAt(U-1))return S("End of comment missing");var z=x.slice(2,U-2);return j+=2,_(z),x=x.slice(U),j+=2,M({type:m,comment:z})}}function T(){var M=N(),U=P(r);if(U){if(D(),!P(i))return S("property missing ':'");var z=P(a),H=M({type:p,property:w(U[0].replace(e,f)),value:z?w(z[0].replace(e,f)):f});return P(o),H}}function O(){var M=[];L(M);for(var U;U=T();)U!==!1&&(M.push(U),L(M));return M}return R(),O()};function w(x){return x?x.replace(c,f):f}return rv}var WC;function Xte(){if(WC)return Zo;WC=1;var e=Zo&&Zo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=n;var t=e(Qte());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var o=(0,t.default)(r),c=typeof i=="function";return o.forEach(function(d){if(d.type==="declaration"){var h=d.property,g=d.value;c?i(h,g,d):g&&(a=a||{},a[h]=g)}}),a}return Zo}var zc={},KC;function Jte(){if(KC)return zc;KC=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},o=function(h,g){return g.toUpperCase()},c=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),a(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(i,c):h=h.replace(r,c),h.replace(t,o))};return zc.camelCase=d,zc}var Vc,GC;function Zte(){if(GC)return Vc;GC=1;var e=Vc&&Vc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Xte()),n=Jte();function r(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(c,d){c&&d&&(o[(0,n.camelCase)(c,a)]=d)}),o}return r.default=r,Vc=r,Vc}var ene=Zte();const tne=Dl(ene),$M=zM("end"),Dw=zM("start");function zM(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function nne(e){const t=Dw(e),n=$M(e);if(t&&n)return{start:t,end:n}}function du(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?YC(e.position):"start"in e||"end"in e?YC(e):"line"in e||"column"in e?B0(e):""}function B0(e){return QC(e&&e.line)+":"+QC(e&&e.column)}function YC(e){return B0(e&&e.start)+"-"+B0(e&&e.end)}function QC(e){return e&&typeof e=="number"?e:1}class Gn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=du(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Gn.prototype.file="";Gn.prototype.name="";Gn.prototype.reason="";Gn.prototype.message="";Gn.prototype.stack="";Gn.prototype.column=void 0;Gn.prototype.line=void 0;Gn.prototype.ancestors=void 0;Gn.prototype.cause=void 0;Gn.prototype.fatal=void 0;Gn.prototype.place=void 0;Gn.prototype.ruleId=void 0;Gn.prototype.source=void 0;const Iw={}.hasOwnProperty,rne=new Map,sne=/[A-Z]/g,ine=new Set(["table","tbody","thead","tfoot","tr"]),ane=new Set(["td","th"]),VM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function one(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=pne(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 6,347 bytes, line 640
640if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=mne(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Lw:Gte,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=HM(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function HM(e,t,n){if(t.type==="element")return lne(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return cne(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return dne(e,t,n);if(t.type==="mdxjsEsm")return une(e,t);if(t.type==="root")return fne(e,t,n);if(t.type==="text")return hne(e,t)}function lne(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Lw,e.schema=i),e.ancestors.push(t);const a=KM(e,t.tagName,!1),o=gne(e,t);let c=Bw(e,t);return ine.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Fte(d):!0})),WM(e,o,a,t),Fw(o,c),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function cne(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Au(e,t.position)}function une(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Au(e,t.position)}function dne(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Lw,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:KM(e,t.name,!0),o=yne(e,t),c=Bw(e,t);return WM(e,o,a,t),Fw(o,c),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function fne(e,t,n){const r={};return Fw(r,Bw(e,t)),e.create(t,e.Fragment,r,n)}function hne(e,t){return t.value}function WM(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Fw(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mne(e,t,n){return r;function r(i,a,o,c){const h=Array.isArray(o.children)?n:t;return c?h(a,o,c):h(a,o)}}function pne(e,t){return n;function n(r,i,a,o){const c=Array.isArray(a.children),d=Dw(r);return t(i,a,o,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function gne(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Iw.call(t.properties,i)){const a=xne(e,i,t.properties[i]);if(a){const[o,c]=a;e.tableCellAlignToStyle&&o==="align"&&typeof c=="string"&&ane.has(t.tagName)?r=c:n[o]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function yne(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const c=o.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Au(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Au(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Bw(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:rne;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const h=i.get(d)||0;o=d+"-"+h,i.set(d,h+1)}}const c=HM(e,a,o);c!==void 0&&n.push(c)}return n}function xne(e,t,n){const r=Hte(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ote(n):Yte(n)),r.property==="style"){let i=typeof n=="object"?n:vne(e,String(n));return e.stylePropertyNameCase==="css"&&(i=bne(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?$te[r.property]||r.property:r.attribute,n]}}function vne(e,t){try{return tne(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Gn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=VM+"#cannot-parse-style-attribute",i}}function KM(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const c=UC(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=o}else r=UC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Iw.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Au(e)}function Au(e,t){const n=new Gn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=VM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function bne(e){const t={};let n;for(n in e)Iw.call(e,n)&&(t[wne(n)]=e[n]);return t}function wne(e){let t=e.replace(sne,jne);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jne(e){return"-"+e.toLowerCase()}const sv={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},_ne={};function Nne(e,t){const n=_ne,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return GM(e,r,i)}function GM(e,t,n){if(Sne(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return XC(e.children,t,n)}return Array.isArray(e)?XC(e,t,n):""}function XC(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=GM(e[i],t,n);return r.join("")}function Sne(e){return!!(e&&typeof e=="object")}const JC=document.createElement("i");function qw(e){const t="&"+e+";";JC.innerHTML=t;const n=JC.textContent;
vendor: 12,043 bytes, line 640
640return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function qs(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Vr(e,t){return e.length>0?(qs(e,e.length,0,t),e):t}const ZC={}.hasOwnProperty;function kne(e){const t={};let n=-1;for(;++n<e.length;)Cne(t,e[n]);return t}function Cne(e,t){let n;for(n in t){const i=(ZC.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){ZC.call(i,o)||(i[o]=[]);const c=a[o];Ene(i[o],Array.isArray(c)?c:c?[c]:[])}}}function Ene(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);qs(e,0,0,r)}function YM(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function fl(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Es=wa(/[A-Za-z]/),_r=wa(/[\dA-Za-z]/),Tne=wa(/[#-'*+\--9=?A-Z^-~]/);function q0(e){return e!==null&&(e<32||e===127)}const U0=wa(/\d/),Pne=wa(/[\dA-Fa-f]/),Ane=wa(/[!-/:-@[-`{-~]/);function it(e){return e!==null&&e<-2}function dr(e){return e!==null&&(e<0||e===32)}function St(e){return e===-2||e===-1||e===32}const Rne=wa(new RegExp("\\p{P}|\\p{S}","u")),One=wa(/\s/);function wa(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Jl(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&_r(e.charCodeAt(n+1))&&_r(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(o=String.fromCharCode(a,c),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Bt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(d){return St(d)?(e.enter(n),c(d)):t(d)}function c(d){return St(d)&&a++<i?(e.consume(d),c):(e.exit(n),t(d))}}const Mne={tokenize:Lne};function Lne(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Bt(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,o(c)}function o(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return it(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),o)}}const Dne={tokenize:Ine},eE={tokenize:Fne};function Ine(e){const t=this,n=[];let r=0,i,a,o;return c;function c(_){if(r<n.length){const N=n[r];return t.containerState=N[1],e.attempt(N[0].continuation,d,h)(_)}return h(_)}function d(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&j();const N=t.events.length;let C=N,S;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){S=t.events[C][1].end;break}y(r);let P=N;for(;P<t.events.length;)t.events[P][1].end={...S},P++;return qs(t.events,C+1,0,t.events.slice(N)),t.events.length=P,h(_)}return c(_)}function h(_){if(r===n.length){if(!i)return m(_);if(i.currentConstruct&&i.currentConstruct.concrete)return w(_);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(eE,g,f)(_)}function g(_){return i&&j(),y(r),m(_)}function f(_){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,w(_)}function m(_){return t.containerState={},e.attempt(eE,p,w)(_)}function p(_){return r++,n.push([t.currentConstruct,t.containerState]),m(_)}function w(_){if(_===null){i&&j(),y(0),e.consume(_);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),x(_)}function x(_){if(_===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(_);return}return it(_)?(e.consume(_),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(_),x)}function v(_,N){const C=t.sliceStream(_);if(N&&C.push(null),_.previous=a,a&&(a.next=_),a=_,i.defineSkip(_.start),i.write(C),t.parser.lazy[_.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<o&&(!i.events[S][1].end||i.events[S][1].end.offset>o))return;const P=t.events.length;let R=P,L,D;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(L){D=t.events[R][1].end;break}L=!0}for(y(r),S=P;S<t.events.length;)t.events[S][1].end={...D},S++;qs(t.events,R+1,0,t.events.slice(P)),t.events.length=S}}function y(_){let N=n.length;for(;N-- >_;){const C=n[N];t.containerState=C[1],C[0].exit.call(t,e)}n.length=_}function j(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Fne(e,t,n){return Bt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tE(e){if(e===null||dr(e)||One(e))return 1;if(Rne(e))return 2}function Uw(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const $0={name:"attention",resolveAll:Bne,tokenize:qne};function Bne(e,t){let n=-1,r,i,a,o,c,d,h,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},m={...e[n][1].start};nE(f,-d),nE(m,d),o={type:d>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:d>1?"strong":"emphasis",start:{...o.start},end:{...c.end}},e[r][1].end={...o.start},e[n][1].start={...c.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Vr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Vr(h,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),h=Vr(h,Uw(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Vr(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=Vr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,qs(e,r-1,n-r+3,h),n=r+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function qne(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=tE(r);let a;return o;function o(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const h=e.exit("attentionSequence"),g=tE(d),f=!g||g===2&&i||n.includes(d),m=!i||i===2&&g||n.includes(r);return h._open=!!(a===42?f:f&&(i||!m)),h._close=!!(a===42?m:m&&(g||!f)),t(d)}}function nE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Une={name:"autolink",tokenize:$ne};function $ne(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return Es(p)?(e.consume(p),o):p===64?n(p):h(p)}function o(p){return p===43||p===45||p===46||_r(p)?(r=1,c(p)):h(p)}function c(p){return p===58?(e.consume(p),r=0,d):(p===43||p===45||p===46||_r(p))&&r++<32?(e.consume(p),c):(r=0,h(p))}function d(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||q0(p)?n(p):(e.consume(p),d)}function h(p){return p===64?(e.consume(p),g):Tne(p)?(e.consume(p),h):n(p)}function g(p){return _r(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,g):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||_r(p))&&r++<63){const w=p===45?m:f;return e.consume(p),w}return n(p)}}const Lm={partial:!0,tokenize:zne};function zne(e,t,n){return r;function r(a){return St(a)?Bt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||it(a)?t(a):n(a)}}const QM={continuation:{tokenize:Hne},exit:Wne,name:"blockQuote",tokenize:Vne};function Vne(e,t,n){const r=this;return i;function i(o){if(o===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return St(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Hne(e,t,n){const r=this;return i;function i(o){return St(o)?Bt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(QM,t,n)(o)}}function Wne(e){e.exit("blockQuote")}const XM={name:"characterEscape",tokenize:Kne};function Kne(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Ane(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const JM={name:"characterReference",tokenize:Gne};function Gne(e,t,n){const r=this;let i=0,a,o;return c;function c(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),d}function d(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,o=_r,g(f))}function h(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=Pne,g):(e.enter("characterReferenceValue"),a=7,o=U0,g(f))}function g(f){if(f===59&&i){const m=e.exit("characterReferenceValue");return o===_r&&!qw(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),g):n(f)}}const rE={partial:!0,tokenize:Qne},sE={concrete:!0,name:"codeFenced",tokenize:Yne};function Yne(e,t,n){const r=this,i={partial:!0,tokenize:C};let a=0,o=0,c;return d;function d(S){return h(S)}function h(S){const P=r.events[r.events.length-1];return a=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,c=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(S)}function g(S){return S===c?(o++,e.consume(S),g):o<3?n(S):(e.exit("codeFencedFenceSequence"),St(S)?Bt(e,f,"whitespace")(S):f(S))}function f(S){return S===null||it(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(rE,x,N)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||it(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(S)):St(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Bt(e,p,"whitespace")(S)):S===96&&S===c?n(S):(e.consume(S),m)}function p(S){return S===null||it(S)?f(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(S))}function w(S){return S===null||it(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(S)):S===96&&S===c?n(S):(e.consume(S),w)}function x(S){return e.attempt(i,N,v)(S)}function v(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return a>0&&St(S)?Bt(e,j,"linePrefix",a+1)(S):j(S)}function j(S){return S===null||it(S)?e.check(rE,x,N)(S):(e.enter("co
640deFlowValue"),_(S))}function _(S){return S===null||it(S)?(e.exit("codeFlowValue"),j(S)):(e.consume(S),_)}function N(S){return e.exit("codeFenced"),t(S)}function C(S,P,R){let L=0;return D;function D(z){return S.enter("lineEnding"),S.consume(z),S.exit("lineEnding"),T}function T(z){return S.enter("codeFencedFence"),St(z)?Bt(S,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):O(z)}function O(z){return z===c?(S.enter("codeFencedFenceSequence"),M(z)):R(z)}function M(z){return z===c?(L++,S.consume(z),M):L>=o?(S.exit("codeFencedFenceSequence"),St(z)?Bt(S,U,"whitespace")(z):U(z)):R(z)}function U(z){return z===null||it(z)?(S.exit("codeFencedFence"),P(z)):R(z)}}}function Qne(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const iv={name:"codeIndented",tokenize:Jne},Xne={partial:!0,tokenize:Zne};function Jne(e,t,n){const r=this;return i;function i(h){return e.enter("codeIndented"),Bt(e,a,"linePrefix",5)(h)}function a(h){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?o(h):n(h)}function o(h){return h===null?d(h):it(h)?e.attempt(Xne,o,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||it(h)?(e.exit("codeFlowValue"),o(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function Zne(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):it(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Bt(e,a,"linePrefix",5)(o)}function a(o){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(o):it(o)?i(o):n(o)}}const ere={name:"codeText",previous:nre,resolve:tre,tokenize:rre};function tre(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function nre(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function rre(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),c(f)}function c(f){return f===96?(e.consume(f),r++,c):(e.exit("codeTextSequence"),d(f))}function d(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),d):f===96?(a=e.enter("codeTextSequence"),i=0,g(f)):it(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(f))}function h(f){return f===null||f===32||f===96||it(f)?(e.exit("codeTextData"),d(f)):(e.consume(f),h)}function g(f){return f===96?(e.consume(f),i++,g):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",h(f))}}class sre{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Hc(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Hc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Hc(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Hc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Hc(this.left,n.reverse())}}}function Hc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ZM(e){const t={};let n=-1,r,i,a,o,c,d,h;const g=new sre(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ire(g,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=g.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(g.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...g.get(i)[1].start},c=g.slice(i,n),c.unshift(r),g.splice(i,n-i+1,c))}}return qs(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function ire(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const c=o.events,d=[],h={};let g,f,m=-1,p=n,w=0,x=0;const v=[x];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(g=r.sliceStream(p),p.next||g.push(null),f&&o.defineSki
vendor: 18,631 bytes, line 640
640p(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(g),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++m<c.length;)c[m][0]==="exit"&&c[m-1][0]==="enter"&&c[m][1].type===c[m-1][1].type&&c[m][1].start.line!==c[m][1].end.line&&(x=m+1,v.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),m=v.length;m--;){const y=c.slice(v[m],v[m+1]),j=a.pop();d.push([j,j+y.length-1]),e.splice(j,2,y)}for(d.reverse(),m=-1;++m<d.length;)h[w+d[m][0]]=w+d[m][1],w+=d[m][1]-d[m][0]-1;return h}const are={resolve:lre,tokenize:cre},ore={partial:!0,tokenize:ure};function lre(e){return ZM(e),e}function cre(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?a(c):it(c)?e.check(ore,o,a)(c):(e.consume(c),i)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function o(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ure(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Bt(e,a,"linePrefix")}function a(o){if(o===null||it(o))return n(o);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function e3(e,t,n,r,i,a,o,c,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return f;function f(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),m):y===null||y===32||y===41||q0(y)?n(y):(e.enter(r),e.enter(o),e.enter(c),e.enter("chunkString",{contentType:"string"}),x(y))}function m(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(c),m(y)):y===null||y===60||it(y)?n(y):(e.consume(y),y===92?w:p)}function w(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function x(y){return!g&&(y===null||y===41||dr(y))?(e.exit("chunkString"),e.exit(c),e.exit(o),e.exit(r),t(y)):g<h&&y===40?(e.consume(y),g++,x):y===41?(e.consume(y),g--,x):y===null||y===32||y===40||q0(y)?n(y):(e.consume(y),y===92?v:x)}function v(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function t3(e,t,n,r,i,a){const o=this;let c=0,d;return h;function h(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),g}function g(p){return c>999||p===null||p===91||p===93&&!d||p===94&&!c&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):it(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||it(p)||c++>999?(e.exit("chunkString"),g(p)):(e.consume(p),d||(d=!St(p)),p===92?m:f)}function m(p){return p===91||p===92||p===93?(e.consume(p),c++,f):f(p)}}function n3(e,t,n,r,i,a){let o;return c;function c(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,d):n(m)}function d(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(a),h(m))}function h(m){return m===o?(e.exit(a),d(o)):m===null?n(m):it(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Bt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(m))}function g(m){return m===o||m===null||it(m)?(e.exit("chunkString"),h(m)):(e.consume(m),m===92?f:g)}function f(m){return m===o||m===92?(e.consume(m),g):g(m)}}function fu(e,t){let n;return r;function r(i){return it(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):St(i)?Bt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const dre={name:"definition",tokenize:hre},fre={partial:!0,tokenize:mre};function hre(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return t3.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function c(p){return i=fl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),d):n(p)}function d(p){return dr(p)?fu(e,h)(p):h(p)}function h(p){return e3(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function g(p){return e.attempt(fre,f,f)(p)}function f(p){return St(p)?Bt(e,m,"whitespace")(p):m(p)}function m(p){return p===null||it(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function mre(e,t,n){return r;function r(c){return dr(c)?fu(e,i)(c):n(c)}function i(c){return n3(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return St(c)?Bt(e,o,"whitespace")(c):o(c)}function o(c){return c===null||it(c)?t(c):n(c)}}const pre={name:"hardBreakEscape",tokenize:gre};function gre(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return it(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const yre={name:"headingAtx",resolve:xre,tokenize:vre};function xre(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},qs(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function vre(e,t,n){let r=0;return i;function i(g){return e.enter("atxHeading"),a(g)}function a(g){return e.enter("atxHeadingSequence"),o(g)}function o(g){return g===35&&r++<6?(e.consume(g),o):g===null||dr(g)?(e.exit("atxHeadingSequence"),c(g)):n(g)}function c(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||it(g)?(e.exit("atxHeading"),t(g)):St(g)?Bt(e,c,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),c(g))}function h(g){return g===null||g===35||dr(g)?(e.exit("atxHeadingText"),c(g)):(e.consume(g),h)}}const bre=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],iE=["pre","script","style","textarea"],wre={concrete:!0,name:"htmlFlow",resolveTo:Nre,tokenize:Sre},jre={partial:!0,tokenize:Cre},_re={partial:!0,tokenize:kre};function Nre(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Sre(e,t,n){const r=this;let i,a,o,c,d;return h;function h(q){return g(q)}function g(q){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(q),f}function f(q){return q===33?(e.consume(q),m):q===47?(e.consume(q),a=!0,x):q===63?(e.consume(q),i=3,r.interrupt?t:I):Es(q)?(e.consume(q),o=String.fromCharCode(q),v):n(q)}function m(q){return q===45?(e.consume(q),i=2,p):q===91?(e.consume(q),i=5,c=0,w):Es(q)?(e.consume(q),i=4,r.interrupt?t:I):n(q)}function p(q){return q===45?(e.consume(q),r.interrupt?t:I):n(q)}function w(q){const J="CDATA[";return q===J.charCodeAt(c++)?(e.consume(q),c===J.length?r.interrupt?t:O:w):n(q)}function x(q){return Es(q)?(e.consume(q),o=String.fromCharCode(q),v):n(q)}function v(q){if(q===null||q===47||q===62||dr(q)){const J=q===47,te=o.toLowerCase();return!J&&!a&&iE.includes(te)?(i=1,r.interrupt?t(q):O(q)):bre.includes(o.toLowerCase())?(i=6,J?(e.consume(q),y):r.interrupt?t(q):O(q)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(q):a?j(q):_(q))}return q===45||_r(q)?(e.consume(q),o+=String.fromCharCode(q),v):n(q)}function y(q){return q===62?(e.consume(q),r.interrupt?t:O):n(q)}function j(q){return St(q)?(e.consume(q),j):D(q)}function _(q){return q===47?(e.consume(q),D):q===58||q===95||Es(q)?(e.consume(q),N):St(q)?(e.consume(q),_):D(q)}function N(q){return q===45||q===46||q===58||q===95||_r(q)?(e.consume(q),N):C(q)}function C(q){return q===61?(e.consume(q),S):St(q)?(e.consume(q),C):_(q)}function S(q){return q===null||q===60||q===61||q===62||q===96?n(q):q===34||q===39?(e.consume(q),d=q,P):St(q)?(e.consume(q),S):R(q)}function P(q){return q===d?(e.consume(q),d=null,L):q===null||it(q)?n(q):(e.consume(q),P)}function R(q){return q===null||q===34||q===39||q===47||q===60||q===61||q===62||q===96||dr(q)?C(q):(e.consume(q),R)}function L(q){return q===47||q===62||St(q)?_(q):n(q)}function D(q){return q===62?(e.consume(q),T):n(q)}function T(q){return q===null||it(q)?O(q):St(q)?(e.consume(q),T):n(q)}function O(q){return q===45&&i===2?(e.consume(q),H):q===60&&i===1?(e.consume(q),Y):q===62&&i===4?(e.consume(q),B):q===63&&i===3?(e.consume(q),I):q===93&&i===5?(e.consume(q),$):it(q)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(jre,V,M)(q)):q===null||it(q)?(e.exit("htmlFlowData"),M(q)):(e.consume(q),O)}function M(q){return e.check(_re,U,V)(q)}function U(q){return e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),z}function z(q){return q===null||it(q)?M(q):(e.enter("htmlFlowData"),O(q))}function H(q){return q===45?(e.consume(q),I):O(q)}function Y(q){return q===47?(e.consume(q),o="",G):O(q)}function G(q){if(q===62){const J=o.toLowerCase();return iE.includes(J)?(e.consume(q),B):O(q)}return Es(q)&&o.length<8?(e.consume(q),o+=String.fromCharCode(q),G):O(q)}function $(q){return q===93?(e.consume(q),I):O(q)}function I(q){return q===62?(e.consume(q),B):q===45&&i===2?(e.consume(q),I):O(q)}function B(q){return q===null||it(q)?(e.exit("htmlFlowData"),V(q)):(e.consume(q),B)}function V(q){return e.exit("htmlFlow"),t(q)}}function kre(e,t,n){const r=this;return i;function i(o){return it(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Cre(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Lm,t,n)}}const Ere={name:"htmlText",tokenize:Tre};function Tre(e,t,n){const r=this;let i,a,o;return c;function c(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),d}function d(I){return I===33?(e.consume(I),h):I===47?(e.consume(I),C):I===63?(e.consume(I),_):Es(I)?(e.consume(I),R):n(I)}function h(I){return I===45?(e.consume(I),g):I===91?(e.consume(I),a=0,w):Es(I)?(e.consume(I),j):n(I)}function g(I){return I===45?(e.consume(I),p):n(I)}function f(I){return I===null?n(I):I===45?(e.consume(I),m):it(I)?(o=f,Y(I)):(e.consume(I),f)}function m(I){return I===45?(e.consume(I),p):f(I)}function p(I){return I===62?H(I):I===45?m(I):f(I)}function w(I){const B="CDATA[";return I===B.charCodeAt(a++)?(e.consume(I),a===B.length?x:w):n(I)}function x(I){return I===null?n(I):I===93?(e.consume(I),v):it(I)?(o=x,Y(I)):(e.consume(I),x)}function v(I){return I===93?(e.consume(I),y):x(I)}function y(I){return I===62?H(I):I===93?(e.consume(I),y):x(I)}function j(I){return I===null||I===62?H(I):it(I)?(o=j,Y(I)):(e.consume(I),j)}function _(I){return I===null?n(I):I===63?(e.consume(I),N):it(I)?(o=_,Y(I)):(e.consume(I),_)}function N(I){return I===62?H(I):_(I)}function C(I){return Es(I)?(e.consume(I),S):n(I)}function S(I){return I===45||_r(I)?(e.consume(I),S):P(I)}function P(I){return it(I)?(o=P,Y(I)):St(I)?(e.consume(I),P):H(I)}function R(I){return I===45||_r(I)?(e.consume(I),R):I===47||I===62||dr(I)?L(I):n(I)}function L(I){return I===47?(e.consume(I),H):I===58||I===95||Es(I)?(e.consume(I),D):it(I)?(o=L,Y(I)):St(I)?(e.consume(I),L):H(I)}function D(I){return I===45||I===46||I===58||I===95||_r(I)?(e.consume(I),D):T(I)}function T(I){return I===61?(e.consume(I),O):it(I)?(o=T,Y(I)):St(I)?(e.consume(I),T):L(I)}function O(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),i=I,M):it(I)?(o=O,Y(I)):St(I)?(e.consume(I),O):(e.consume(I),U)}function M(I){return I===i?(e.consume(I),i=void 0,z):I===null?n(I):it(I)?(o=M,Y(I)):(e.consume(I),M)}function U(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||dr(I)?L(I):(e.consume(I),U)}function z(I){return I===47||I===62||dr(I)?L(I):n(I)}function H(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function Y(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),G}function G(I){return St(I)?Bt(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):$(I)}function $(I){return e.enter("htmlTextData"),o(I)}}const $w={name:"labelEnd",resolveAll:Ore,resolveTo:Mre,tokenize:Lre},Pre={tokenize:Dre},Are={tokenize:Ire},Rre={tokenize:Fre};function Ore(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&qs(e,0,e.length,n),e}function Mre(e,t){let n=e.length,r=0,i,a,o,c;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},g={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=Vr(c,e.slice(a+1,a+r+3)),c=Vr(c,[["enter",g,t]]),c=Vr(c,Uw(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),c=Vr(c,[["exit",g,t],e[o-2],e[o-1],["exit",h,t]]),c=Vr(c,e.slice(o+1)),c=Vr(c,[["exit",d,t]]),qs(e,a,e.length,c),e}function Lre(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return c;function c(m){return a?a._inactive?f(m):(o=r.parser.defined.includes(fl(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),d):n(m)}function d(m){return m===40?e.attempt(Pre,g,o?g:f)(m):m===91?e.attempt(Are,g,o?h:f)(m):o?g(m):f(m)}function h(m){return e.attempt(Rre,g,f)(m)}function g(m){return t(m)}function f(m){return a._balanced=!0,n(m)}}function Dre(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return dr(f)?fu(e,a)(f):a(f)}function a(f){return f===41?g(f):e3(e,o,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return dr(f)?fu(e,d)(f):g(f)}function c(f){return n(f)}function d(f){return f===34||f===39||f===40?n3(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):g(f)}function h(f){return dr(f)?fu(e,g)(f):g(f)}function g(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Ire(e,t,n){const r=this;return i;function i(c){return t3.call(r,e,a,o,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(fl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function o(c){return n(c)}}function Fre(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Bre={name:"labelStartImage",resolveAll:$w.resolveAll,tokenize:qre};function qre(e,t,n){const r=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),o):n(c)}function o(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Ure={name:"labelStartLink",resolveAll:$w.resolveAll,tokenize:$re};function $re(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const av={name:"lineEnding",tokenize:zre};function zre(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Bt(e,t,"linePrefix")}}const lh={name:"thematicBreak",tokenize:Vre};function Vre(e,t,n){let r=0,i;return a;function a(h){return e.enter("thematicBreak"),o(h)}function o(h){return i=h,c(h)}function c(h){return h===i?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||it(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===i?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),St(h)?Bt(e,c,"whitespace")(h):c(h))}}const or={continuation:{tokenize:Gre},exit:Qre,name:"list",tokenize:Kre},Hre={partial:!0,tokenize:Xre},Wre={partial:!0,tokenize:Yre};function Kre(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return c;function c(p){const w=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:U0(p)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(lh,n,h)(p):h(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(p)}return n(p)}function d(p){return U0(p)&&++o<10?(e.consume(p),d):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),h(p)):n(p)}function h(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Lm,r.interrupt?n:g,e.attempt(Hre,m,f))}
vendor: 4,432 bytes, line 640
640function g(p){return r.containerState.initialBlankLine=!0,a++,m(p)}function f(p){return St(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Gre(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Lm,i,a);function i(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Bt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!St(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Wre,t,o)(c))}function o(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Bt(e,e.attempt(or,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Yre(e,t,n){const r=this;return Bt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function Qre(e){e.exit(this.containerState.type)}function Xre(e,t,n){const r=this;return Bt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!St(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const aE={name:"setextUnderline",resolveTo:Jre,tokenize:Zre};function Jre(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function Zre(e,t,n){const r=this;let i;return a;function a(h){let g=r.events.length,f;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){f=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=h,o(h)):n(h)}function o(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===i?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),St(h)?Bt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||it(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ese={tokenize:tse};function tse(e){const t=this,n=e.attempt(Lm,r,e.attempt(this.parser.constructs.flowInitial,i,Bt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(are,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const nse={resolveAll:s3()},rse=r3("string"),sse=r3("text");function r3(e){return{resolveAll:s3(e==="text"?ise:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,c);return o;function o(g){return h(g)?a(g):c(g)}function c(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),d}function d(g){return h(g)?(n.exit("data"),a(g)):(n.consume(g),d)}function h(g){if(g===null)return!0;const f=i[g];let m=-1;if(f)for(;++m<f.length;){const p=f[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function s3(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function ise(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,c=0,d;for(;a--;){const h=i[a];if(typeof h=="string"){for(o=h.length;h.charCodeAt(o-1)===32;)c++,o--;if(o)break;o=-1}else if(h===-2)d=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||
vendor: 4,418 bytes, lines 640-642
640c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const ase={42:or,43:or,45:or,48:or,49:or,50:or,51:or,52:or,53:or,54:or,55:or,56:or,57:or,62:QM},ose={91:dre},lse={[-2]:iv,[-1]:iv,32:iv},cse={35:yre,42:lh,45:[aE,lh],60:wre,61:aE,95:lh,96:sE,126:sE},use={38:JM,92:XM},dse={[-5]:av,[-4]:av,[-3]:av,33:Bre,38:JM,42:$0,60:[Une,Ere],91:Ure,92:[pre,XM],93:$w,95:$0,96:ere},fse={null:[$0,nse]},hse={null:[42,95]},mse={null:[]},pse=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:hse,contentInitial:ose,disable:mse,document:ase,flow:cse,flowInitial:lse,insideSpan:fse,string:use,text:dse},Symbol.toStringTag,{value:"Module"}));function gse(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],c=[];const d={attempt:P(C),check:P(S),consume:j,enter:_,exit:N,interrupt:P(S,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:w,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:f};let g=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function f(T){return o=Vr(o,T),v(),o[o.length-1]!==null?[]:(R(t,0),h.events=Uw(a,h.events,h),h.events)}function m(T,O){return xse(p(T),O)}function p(T){return yse(o,T)}function w(){const{_bufferIndex:T,_index:O,line:M,column:U,offset:z}=r;return{_bufferIndex:T,_index:O,line:M,column:U,offset:z}}function x(T){i[T.line]=T.column,D()}function v(){let T;for(;r._index<o.length;){const O=o[r._index];if(typeof O=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<O.length;)y(O.charCodeAt(r._bufferIndex));else y(O)}}function y(T){g=g(T)}function j(T){it(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,D()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=T}function _(T,O){const M=O||{};return M.type=T,M.start=w(),h.events.push(["enter",M,h]),c.push(M),M}function N(T){const O=c.pop();return O.end=w(),h.events.push(["exit",O,h]),O}function C(T,O){R(T,O.from)}function S(T,O){O.restore()}function P(T,O){return M;function M(U,z,H){let Y,G,$,I;return Array.isArray(U)?V(U):"tokenize"in U?V([U]):B(U);function B(K){return Q;function Q(ne){const se=ne!==null&&K[ne],ce=ne!==null&&K.null,ye=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return V(ye)(ne)}}function V(K){return Y=K,G=0,K.length===0?H:q(K[G])}function q(K){return Q;function Q(ne){return I=L(),$=K,K.partial||(h.currentConstruct=K),K.name&&h.parser.constructs.disable.null.includes(K.name)?te():K.tokenize.call(O?Object.assign(Object.create(h),O):h,d,J,te)(ne)}}function J(K){return T($,I),z}function te(K){return I.restore(),++G<Y.length?q(Y[G]):H}}}function R(T,O){T.resolveAll&&!a.includes(T)&&a.push(T),T.resolve&&qs(h.events,O,h.events.length-O,T.resolve(h.events.slice(O),h)),T.resolveTo&&(h.events=T.resolveTo(h.events,h))}function L(){const T=w(),O=h.previous,M=h.currentConstruct,U=h.events.length,z=Array.from(c);return{from:U,restore:H};function H(){r=T,h.previous=O,h.currentConstruct=M,h.events.length=U,c=z,D()}}function D(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function yse(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const c=o[0];typeof c=="string"?o[0]=c.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function xse(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=` 641`;break}case-3:{o=`\r 642`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function vse(e){const r={constructs:kne([pse,...(e||{}).extensions||[]]),content:i(Mne),defined:[],document:i(Dne),flow:i(ese),lazy:{},string:i(rse),text:i(sse)};return r;function i(a){return o;function o(c){return gse(r,a,c)}}}function bse(e){for(;!ZM(e););return e}const oE=/[\0\t\n\r]/g;function wse(){let e=1,t="",n=!0,r;return i;function i(a,o,c){const d=[];let h,g,f,m,p;
vendor: 18,654 bytes, lines 642-646
642for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(oE.lastIndex=f,h=oE.exec(a),m=h&&h.index!==void 0?h.index:a.length,p=a.charCodeAt(m),!h){t=a.slice(f);break}if(p===10&&f===m&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),f<m&&(d.push(a.slice(f,m)),e+=m-f),p){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const jse=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _se(e){return e.replace(jse,Nse)}function Nse(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return YM(n.slice(a?2:1),a?16:10)}return qw(n)||e}const i3={}.hasOwnProperty;function Sse(e,t,n){return typeof t!="string"&&(n=t,t=void 0),kse(n)(bse(vse(n).document().write(wse()(e,t,!0))))}function kse(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(me),autolinkProtocol:L,autolinkEmail:L,atxHeading:a(et),blockQuote:a(ce),characterEscape:L,characterReference:L,codeFenced:a(ye),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ye,o),codeText:a(je,o),codeTextData:L,data:L,codeFlowValue:L,definition:a(Fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Ye),hardBreakEscape:a(Le),hardBreakTrailing:a(Le),htmlFlow:a(at,o),htmlFlowData:L,htmlText:a(at,o),htmlTextData:L,image:a(he),label:o,link:a(me),listItem:a(Pe),listItemValue:m,listOrdered:a(Ee,f),listUnordered:a(Ee),paragraph:a(xe),reference:q,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(et),strong:a(ot),thematicBreak:a(ct)},exit:{atxHeading:d(),atxHeadingSequence:C,autolink:d(),autolinkEmail:se,autolinkProtocol:ne,blockQuote:d(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:K,characterReference:Q,codeFenced:d(v),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:w,codeFlowValue:D,codeIndented:d(y),codeText:d(z),codeTextData:D,data:D,definition:d(),definitionDestinationString:N,definitionLabelString:j,definitionTitleString:_,emphasis:d(),hardBreakEscape:d(O),hardBreakTrailing:d(O),htmlFlow:d(M),htmlFlowData:D,htmlText:d(U),htmlTextData:D,image:d(Y),label:$,labelText:G,lineEnding:T,link:d(H),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:J,resourceDestinationString:I,resourceTitleString:B,resource:V,setextHeading:d(R),setextHeadingLineSequence:P,setextHeadingText:S,strong:d(),thematicBreak:d()}};a3(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(pe){let _e={type:"root",children:[]};const Oe={stack:[_e],tokenStack:[],config:t,enter:c,exit:h,buffer:o,resume:g,data:n},ht=[];let Qe=-1;for(;++Qe<pe.length;)if(pe[Qe][1].type==="listOrdered"||pe[Qe][1].type==="listUnordered")if(pe[Qe][0]==="enter")ht.push(Qe);else{const Lt=ht.pop();Qe=i(pe,Lt,Qe)}for(Qe=-1;++Qe<pe.length;){const Lt=t[pe[Qe][0]];i3.call(Lt,pe[Qe][1].type)&&Lt[pe[Qe][1].type].call(Object.assign({sliceSerialize:pe[Qe][2].sliceSerialize},Oe),pe[Qe][1])}if(Oe.tokenStack.length>0){const Lt=Oe.tokenStack[Oe.tokenStack.length-1];(Lt[1]||lE).call(Oe,void 0,Lt[0])}for(_e.position={start:Vi(pe.length>0?pe[0][1].start:{line:1,column:1,offset:0}),end:Vi(pe.length>0?pe[pe.length-2][1].end:{line:1,column:1,offset:0})},Qe=-1;++Qe<t.transforms.length;)_e=t.transforms[Qe](_e)||_e;return _e}function i(pe,_e,Oe){let ht=_e-1,Qe=-1,Lt=!1,Hs,Ar,ji,ja;for(;++ht<=Oe;){const Pn=pe[ht];switch(Pn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pn[0]==="enter"?Qe++:Qe--,ja=void 0;break}case"lineEndingBlank":{Pn[0]==="enter"&&(Hs&&!ja&&!Qe&&!ji&&(ji=ht),ja=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ja=void 0}if(!Qe&&Pn[0]==="enter"&&Pn[1].type==="listItemPrefix"||Qe===-1&&Pn[0]==="exit"&&(Pn[1].type==="listUnordered"||Pn[1].type==="listOrdered")){if(Hs){let ys=ht;for(Ar=void 0;ys--;){const pr=pe[ys];if(pr[1].type==="lineEnding"||pr[1].type==="lineEndingBlank"){if(pr[0]==="exit")continue;Ar&&(pe[Ar][1].type="lineEndingBlank",Lt=!0),pr[1].type="lineEnding",Ar=ys}else if(!(pr[1].type==="linePrefix"||pr[1].type==="blockQuotePrefix"||pr[1].type==="blockQuotePrefixWhitespace"||pr[1].type==="blockQuoteMarker"||pr[1].type==="listItemIndent"))break}ji&&(!Ar||ji<Ar)&&(Hs._spread=!0),Hs.end=Object.assign({},Ar?pe[Ar][1].start:Pn[1].end),pe.splice(Ar||ht,0,["exit",Hs,Pn[2]]),ht++,Oe++}if(Pn[1].type==="listItemPrefix"){const ys={type:"listItem",_spread:!1,start:Object.assign({},Pn[1].start),end:void 0};Hs=ys,pe.splice(ht,0,["enter",ys,Pn[2]]),ht++,Oe++,ji=void 0,ja=!0}}}return pe[_e][1]._spread=Lt,Oe}function a(pe,_e){return Oe;function Oe(ht){c.call(this,pe(ht),ht),_e&&_e.call(this,ht)}}function o(){this.stack.push({type:"fragment",children:[]})}function c(pe,_e,Oe){this.stack[this.stack.length-1].children.push(pe),this.stack.push(pe),this.tokenStack.push([_e,Oe||void 0]),pe.position={start:Vi(_e.start),end:void 0}}function d(pe){return _e;function _e(Oe){pe&&pe.call(this,Oe),h.call(this,Oe)}}function h(pe,_e){const Oe=this.stack.pop(),ht=this.tokenStack.pop();if(ht)ht[0].type!==pe.type&&(_e?_e.call(this,pe,ht[0]):(ht[1]||lE).call(this,pe,ht[0]));else throw new Error("Cannot close `"+pe.type+"` ("+du({start:pe.start,end:pe.end})+"): itâs not open");Oe.position.end=Vi(pe.end)}function g(){return Nne(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(pe){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(pe),10),this.data.expectingFirstListItemValue=void 0}}function p(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=pe}function w(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=pe}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe.replace(/(\r?\n|\r)$/g,"")}function j(pe){const _e=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=_e,Oe.identifier=fl(this.sliceSerialize(pe)).toLowerCase()}function _(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=pe}function N(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=pe}function C(pe){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Oe=this.sliceSerialize(pe).length;_e.depth=Oe}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function P(pe){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(pe).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function L(pe){const Oe=this.stack[this.stack.length-1].children;let ht=Oe[Oe.length-1];(!ht||ht.type!=="text")&&(ht=lt(),ht.position={start:Vi(pe.start),end:void 0},Oe.push(ht)),this.stack.push(ht)}function D(pe){const _e=this.stack.pop();_e.value+=this.sliceSerialize(pe),_e.position.end=Vi(pe.end)}function T(pe){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=_e.children[_e.children.length-1];Oe.position.end=Vi(pe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(L.call(this,pe),D.call(this,pe))}function O(){this.data.atHardBreak=!0}function M(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe}function U(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe}function z(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe}function H(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=_e,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function Y(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=_e,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function G(pe){const _e=this.sliceSerialize(pe),Oe=this.stack[this.stack.length-2];Oe.label=_se(_e),Oe.identifier=fl(_e).toLowerCase()}function $(){const pe=this.stack[this.stack.length-1],_e=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const ht=pe.children;Oe.children=ht}else Oe.alt=_e}function I(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=pe}function B(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=pe}function V(){this.data.inReference=void 0}function q(){this.data.referenceType="collapsed"}function J(pe){const _e=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=_e,Oe.identifier=fl(this.sliceSerialize(pe)).toLowerCase(),this.data.referenceType="full"}function te(pe){this.data.characterReferenceType=pe.type}function K(pe){const _e=this.sliceSerialize(pe),Oe=this.data.characterReferenceType;let ht;Oe?(ht=YM(_e,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ht=qw(_e);const Qe=this.stack[this.stack.length-1];Qe.value+=ht}function Q(pe){const _e=this.stack.pop();_e.position.end=Vi(pe.end)}function ne(pe){D.call(this,pe);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(pe)}function se(pe){D.call(this,pe);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(pe)}function ce(){return{type:"blockquote",children:[]}}function ye(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function Fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ye(){return{type:"emphasis",children:[]}}function et(){return{type:"heading",depth:0,children:[]}}function Le(){return{type:"break"}}function at(){return{type:"html",value:""}}function he(){return{type:"image",title:null,url:"",alt:null}}function me(){return{type:"link",title:null,url:"",children:[]}}function Ee(pe){return{type:"list",ordered:pe.type==="listOrdered",start:null,spread:pe._spread,children:[]}}function Pe(pe){return{type:"listItem",spread:pe._spread,checked:null,children:[]}}function xe(){return{type:"paragraph",children:[]}}function ot(){return{type:"strong",children:[]}}function lt(){return{type:"text",value:""}}function ct(){return{type:"thematicBreak"}}}function Vi(e){return{line:e.line,column:e.column,offset:e.offset}}function a3(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?a3(e,r):Cse(e,r)}}function Cse(e,t){let n;for(n in t)if(i3.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function lE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+du({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+du({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+du({start:t.start,end:t.end})+") is still open")}function Ese(e){const t=this;t.parser=n;function n(r){return Sse(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Tse(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Pse(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` 643`}]}function Ase(e,t){const n=t.value?t.value+` 644`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function Rse(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ose(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mse(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Jl(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function Lse(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dse(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function o3(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Ise(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return o3(e,t);const i={src:Jl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Fse(e,t){const n={src:Jl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Bse(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function qse(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return o3(e,t);const i={href:Jl(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Use(e,t){const n={href:Jl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $se(e,t,n){const r=e.all(t),i=n?zse(n):l3(t),a={},o=[];if(typeof t.checked=="boolean"){const g=r[0];let f;g&&g.type==="element"&&g.tagName==="p"?f=g:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const g=r[c];(i||c!==0||g.type!=="element"||g.tagName!=="p")&&o.push({type:"text",value:` 645`}),g.type==="element"&&g.tagName==="p"&&!i?o.push(...g.children):o.push(g)}const d=r[r.length-1];d&&(i||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:` 646`});const h={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,h),e.applyData(t,h)}function zse(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=l3(n[r])}return t}function l3(e){const t=e.spread;return t??e.children.length>1}function Vse(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Hse(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wse(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Kse(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gse(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Dw(t.children[1]),d=$M(t.children[t.children.length-1]);c&&d&&(o.position={start:c,end:d}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Yse(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,c=o?o.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const f=t.children[d],m={},p=o?o[d]:void 0;p&&(m.align=p);let w={type:"element",tagName:a,properties:m,children:[]};f&&(w.children=e.all(f),e.patch(f,w),w=e.applyData(f,w)),h.push(w)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function Qse(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const cE=9,uE=32;function Xse(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(dE(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(dE(t.slice(i),i>0,!1)),a.join("")}function dE(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===cE||a===uE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===cE||a===uE;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Jse(e,t){const n={type:"text",value:Xse(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Zse(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}
vendor: 4,902 bytes, lines 646-647
646const eie={blockquote:Tse,break:Pse,code:Ase,delete:Rse,emphasis:Ose,footnoteReference:Mse,heading:Lse,html:Dse,imageReference:Ise,image:Fse,inlineCode:Bse,linkReference:qse,link:Use,listItem:$se,list:Vse,paragraph:Hse,root:Wse,strong:Kse,table:Gse,tableCell:Qse,tableRow:Yse,text:Jse,thematicBreak:Zse,toml:qf,yaml:qf,definition:qf,footnoteDefinition:qf};function qf(){}const c3=-1,Dm=0,hu=1,Lh=2,zw=3,Vw=4,Hw=5,Ww=6,u3=7,d3=8,fE=typeof self=="object"?self:globalThis,tie=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Dm:case c3:return n(o,i);case hu:{const c=n([],i);for(const d of o)c.push(r(d));return c}case Lh:{const c=n({},i);for(const[d,h]of o)c[r(d)]=r(h);return c}case zw:return n(new Date(o),i);case Vw:{const{source:c,flags:d}=o;return n(new RegExp(c,d),i)}case Hw:{const c=n(new Map,i);for(const[d,h]of o)c.set(r(d),r(h));return c}case Ww:{const c=n(new Set,i);for(const d of o)c.add(r(d));return c}case u3:{const{name:c,message:d}=o;return n(new fE[c](d),i)}case d3:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:c}=new Uint8Array(o);return n(new DataView(c),o)}}return n(new fE[a](o),i)};return r},hE=e=>tie(new Map,e)(0),el="",{toString:nie}={},{keys:rie}=Object,Wc=e=>{const t=typeof e;if(t!=="object"||!e)return[Dm,t];const n=nie.call(e).slice(8,-1);switch(n){case"Array":return[hu,el];case"Object":return[Lh,el];case"Date":return[zw,el];case"RegExp":return[Vw,el];case"Map":return[Hw,el];case"Set":return[Ww,el];case"DataView":return[hu,n]}return n.includes("Array")?[hu,n]:n.includes("Error")?[u3,n]:[Lh,n]},Uf=([e,t])=>e===Dm&&(t==="function"||t==="symbol"),sie=(e,t,n,r)=>{const i=(o,c)=>{const d=r.push(o)-1;return n.set(c,d),d},a=o=>{if(n.has(o))return n.get(o);let[c,d]=Wc(o);switch(c){case Dm:{let g=o;switch(d){case"bigint":c=d3,g=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return i([c3],o)}return i([c,g],o)}case hu:{if(d){let m=o;return d==="DataView"?m=new Uint8Array(o.buffer):d==="ArrayBuffer"&&(m=new Uint8Array(o)),i([d,[...m]],o)}const g=[],f=i([c,g],o);for(const m of o)g.push(a(m));return f}case Lh:{if(d)switch(d){case"BigInt":return i([d,o.toString()],o);case"Boolean":case"Number":case"String":return i([d,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const g=[],f=i([c,g],o);for(const m of rie(o))(e||!Uf(Wc(o[m])))&&g.push([a(m),a(o[m])]);return f}case zw:return i([c,o.toISOString()],o);case Vw:{const{source:g,flags:f}=o;return i([c,{source:g,flags:f}],o)}case Hw:{const g=[],f=i([c,g],o);for(const[m,p]of o)(e||!(Uf(Wc(m))||Uf(Wc(p))))&&g.push([a(m),a(p)]);return f}case Ww:{const g=[],f=i([c,g],o);for(const m of o)(e||!Uf(Wc(m)))&&g.push(a(m));return f}}const{message:h}=o;return i([c,{name:d,message:h}],o)};return a},mE=(e,{json:t,lossy:n}={})=>{const r=[];return sie(!(t||n),!!t,new Map,r)(e),r},Dh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?hE(mE(e,t)):structuredClone(e):(e,t)=>hE(mE(e,t));function iie(e,t){const n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function aie(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function oie(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||iie,r=e.options.footnoteBackLabel||aie,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const g=e.all(h),f=String(h.identifier).toUpperCase(),m=Jl(f.toLowerCase());let p=0;const w=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++p<=x;){w.length>0&&w.push({type:"text",value:" "});let j=typeof n=="string"?n:n(d,p);typeof j=="string"&&(j={type:"text",value:j}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,p),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const v=g[g.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const j=v.children[v.children.length-1];j&&j.type==="text"?j.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...w)}else g.push(...w);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(g,!0)};e.patch(h,y),c.push(y)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Dh(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` 647`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)}
vendor: 4,621 bytes, lines 647-652
647,{type:"text",value:` 648`}]}}const f3=(function(e){if(e==null)return die;if(typeof e=="function")return Im(e);if(typeof e=="object")return Array.isArray(e)?lie(e):cie(e);if(typeof e=="string")return uie(e);throw new Error("Expected function, string, or object as test")});function lie(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=f3(e[n]);return Im(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function cie(e){const t=e;return Im(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function uie(e){return Im(t);function t(n){return n&&n.type===e}}function Im(e){return t;function t(n,r,i){return!!(fie(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function die(){return!0}function fie(e){return e!==null&&typeof e=="object"&&"type"in e}const h3=[],hie=!0,pE=!1,mie="skip";function pie(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=f3(i),o=r?-1:1;c(e,void 0,[])();function c(d,h,g){const f=d&&typeof d=="object"?d:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(d.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=h3,w,x,v;if((!t||a(d,h,g[g.length-1]||void 0))&&(p=gie(n(d,g)),p[0]===pE))return p;if("children"in d&&d.children){const y=d;if(y.children&&p[0]!==mie)for(x=(r?y.children.length:-1)+o,v=g.concat(y);x>-1&&x<y.children.length;){const j=y.children[x];if(w=c(j,x,v)(),w[0]===pE)return w;x=typeof w[1]=="number"?w[1]:x+o}}return p}}}function gie(e){return Array.isArray(e)?e:typeof e=="number"?[hie,e]:e==null?h3:[e]}function m3(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),pie(e,a,c,i);function c(d,h){const g=h[h.length-1],f=g?g.children.indexOf(d):void 0;return o(d,f,g)}}const z0={}.hasOwnProperty,yie={};function xie(e,t){const n=t||yie,r=new Map,i=new Map,a=new Map,o={...eie,...n.handlers},c={all:h,applyData:bie,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:d,options:n,patch:vie,wrap:jie};return m3(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const f=g.type==="definition"?r:i,m=String(g.identifier).toUpperCase();f.has(m)||f.set(m,g)}}),c;function d(g,f){const m=g.type,p=c.handlers[m];if(z0.call(c.handlers,m)&&p)return p(c,g,f);if(c.options.passThrough&&c.options.passThrough.includes(m)){if("children"in g){const{children:x,...v}=g,y=Dh(v);return y.children=c.all(g),y}return Dh(g)}return(c.options.unknownHandler||wie)(c,g,f)}function h(g){const f=[];if("children"in g){const m=g.children;let p=-1;for(;++p<m.length;){const w=c.one(m[p],g);if(w){if(p&&m[p-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=gE(w.value)),!Array.isArray(w)&&w.type==="element")){const x=w.children[0];x&&x.type==="text"&&(x.value=gE(x.value))}Array.isArray(w)?f.push(...w):f.push(w)}}}return f}}function vie(e,t){e.position&&(t.position=nne(e))}function bie(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Dh(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function wie(e,t){const n=t.data||{},r="value"in t&&!(z0.call(n,"hProperties")||z0.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function jie(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:` 649`});++r<e.length;)r&&n.push({type:"text",value:` 650`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:` 651`}),n}function gE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function yE(e,t){const n=xie(e,t),r=n.one(e,void 0),i=oie(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:` 652`},i),a}function _ie(e,t){return e&&"run"in e?async function(n,r){const i=yE(n,{file:r,...t});await e.run(i,r)}:function(n,r){return yE(n,{file:r,...e||t})}}function xE(e){if(e)throw e}var ov,vE;function Nie(){if(vE)return ov;vE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;
vendor: 4,121 bytes, line 652
652var g=e.call(h,"constructor"),f=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!f)return!1;var m;for(m in h);return typeof m>"u"||e.call(h,m)},o=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},c=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(r)return r(h,g).value}else return;return h[g]};return ov=function d(){var h,g,f,m,p,w,x=arguments[0],v=1,y=arguments.length,j=!1;for(typeof x=="boolean"&&(j=x,x=arguments[1]||{},v=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});v<y;++v)if(h=arguments[v],h!=null)for(g in h)f=c(x,g),m=c(h,g),x!==m&&(j&&m&&(a(m)||(p=i(m)))?(p?(p=!1,w=f&&i(f)?f:[]):w=f&&a(f)?f:{},o(x,{name:g,newValue:d(j,w,m)})):typeof m<"u"&&o(x,{name:g,newValue:m}));return x},ov}var Sie=Nie();const lv=Dl(Sie);function V0(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function kie(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);c(null,...i);function c(d,...h){const g=e[++a];let f=-1;if(d){o(d);return}for(;++f<i.length;)(h[f]===null||h[f]===void 0)&&(h[f]=i[f]);i=h,g?Cie(g,c)(...h):o(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Cie(e,t){let n;return r;function r(...o){const c=e.length>o.length;let d;c&&o.push(i);try{d=e.apply(this,o)}catch(h){const g=h;if(c&&n)throw g;return i(g)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,i):d instanceof Error?i(d):a(d))}function i(o,...c){n||(n=!0,t(o,...c))}function a(o){i(null,o)}}const _s={basename:Eie,dirname:Tie,extname:Pie,join:Aie,sep:"/"};function Eie(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');dd(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(r=i):(c=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Tie(e){if(dd(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Pie(e){dd(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const c=e.codePointAt(t);if(c===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),c===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Aie(...e){let t=-1,n;for(;++t<e.length;)dd(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Rie(n)}function Rie(e){dd(e);const t=e.codePointAt(0)===47;let n=Oie(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Oie(e,t){let n="",r=0,i=-1,a=0,o=-1,c,d;for(;++o<=e.length;){if(o<e.length)c=e.codePointAt(o);else{if(c===47)break;c=47}if(c===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else c===46&&a>-1?a++:a=-1}return n}function dd(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mie={cwd:Lie};function Lie(){return"/"}function H0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}
vendor: 11,031 bytes, line 652
652function Die(e){if(typeof e=="string")e=new URL(e);else if(!H0(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Iie(e)}function Iie(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const cv=["history","path","basename","stem","extname","dirname"];class p3{constructor(t){let n;t?H0(t)?n={path:t}:typeof t=="string"||Fie(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Mie.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<cv.length;){const a=cv[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)cv.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?_s.basename(this.path):void 0}set basename(t){dv(t,"basename"),uv(t,"basename"),this.path=_s.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?_s.dirname(this.path):void 0}set dirname(t){bE(this.basename,"dirname"),this.path=_s.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?_s.extname(this.path):void 0}set extname(t){if(uv(t,"extname"),bE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=_s.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){H0(t)&&(t=Die(t)),dv(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?_s.basename(this.path,this.extname):void 0}set stem(t){dv(t,"stem"),uv(t,"stem"),this.path=_s.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Gn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function uv(e,t){if(e&&e.includes(_s.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_s.sep+"`")}function dv(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function bE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Fie(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Bie=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),qie={}.hasOwnProperty;class Kw extends Bie{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=kie()}copy(){const t=new Kw;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(lv(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(mv("data",this.frozen),this.namespace[t]=n,this):qie.call(this.namespace,t)&&this.namespace[t]||void 0:t?(mv("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=$f(t),r=this.parser||this.Parser;return fv("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),fv("process",this.parser||this.Parser),hv("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const c=$f(t),d=r.parse(c);r.run(d,c,function(g,f,m){if(g||!f||!m)return h(g);const p=f,w=r.stringify(p,m);zie(w)?m.value=w:m.result=w,h(g,m)});function h(g,f){g||!f?o(g):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),fv("processSync",this.parser||this.Parser),hv("processSync",this.compiler||this.Compiler),this.process(t,i),jE("processSync","process",n),r;function i(a,o){n=!0,xE(a),r=o}}run(t,n,r){wE(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,c){const d=$f(n);i.run(t,d,h);function h(g,f,m){const p=f||t;g?c(g):o?o(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),jE("runSync","run",r),i;function a(o,c){xE(o),i=c,r=!0}}stringify(t,n){this.freeze();const r=$f(n),i=this.compiler||this.Compiler;return hv("stringify",i),wE(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(mv("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...f]=h;d(g,f)}else o(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function o(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(i.settings=lv(!0,i.settings,h.settings))}function c(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const f=h[g];a(f)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===h){m=f;break}if(m===-1)r.push([h,...g]);else if(g.length>0){let[p,...w]=g;const x=r[m][1];V0(x)&&V0(p)&&(p=lv(!0,x,p)),r[m]=[h,p,...w]}}}}const Uie=new Kw().freeze();function fv(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hv(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mv(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wE(e){if(!V0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $f(e){return $ie(e)?e:new p3(e)}function $ie(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function zie(e){return typeof e=="string"||Vie(e)}function Vie(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Hie="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_E=[],NE={allowDangerousHtml:!0},Wie=/^(https?|ircs?|mailto|xmpp)$/i,Kie=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Gie(e){const t=Yie(e),n=Qie(e);return Xie(t.runSync(t.parse(n),n),e)}function Yie(e){const t=e.rehypePlugins||_E,n=e.remarkPlugins||_E,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...NE}:NE;return Uie().use(Ese).use(n).use(_ie,r).use(t)}function Qie(e){const t=e.children||"",n=new p3;return typeof t=="string"&&(n.value=t),n}function Xie(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||Jie;for(const g of Kie)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+Hie+g.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),m3(e,h),one(e,{Fragment:s.Fragment,components:i,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function h(g,f,m){if(g.type==="raw"&&m&&typeof f=="number")return o?m.children.splice(f,1):m.children[f]={type:"text",value:g.value},f;if(g.type==="element"){let p;for(p in sv)if(Object.hasOwn(sv,p)&&Object.hasOwn(g.properties,p)){const w=g.properties[p],x=sv[p];(x===null||x.includes(g.tagName))&&(g.properties[p]=d(String(w||""),p,g))}}if(g.type==="element"){let p=n?!n.includes(g.tagName):a?a.includes(g.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(g,f,m)),p&&m&&typeof f=="number")return c&&g.children?m.children.splice(f,1,...g.children):m.children.splice(f,1),f}}}function Jie(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Wie.test(e.slice(0,t))?e:""}const SE={pending:{icon:Ke,spin:!0,text:"Queuedâ¦",color:"text-gray-500"},running:{icon:Ke,spin:!0,text:"Workingâ¦",color:"text-blue-500"},in_progress:{icon:Ke,spin:!0,text:"Workingâ¦",color:"text-blue-500"},completed:{icon:vv,text:"Done",color:"text-green-600"},success:{icon:vv,text:"Done",color:"text-green-600"},failed:{icon:V_,text:"Failed",color:"text-red-500"},error:{icon:V_,text:"Error",color:"text-red-500"}};function Zie(e){return String(e||"").replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function eae({toolCall:e}){const[t,n]=E.useState(!1),r=e.status||"pending",a=r==="failed"||r==="error"||/error|failed/i.test(typeof e.results=="string"?e.results:"")?"failed":r,o=SE[a]||SE.pending,c=o.icon,d=e.display_projection||{},h=d.hide_details&&d.details_redacted,g=d.label||Zie(e.name),f=d.active_label||`${g}â¦`,m=d.error_label||`${g} failed`,p=a==="failed"?m:["pending","running","in_progress"].includes(a)?f:g;let w=e.arguments_string;try{w=JSON.parse(e.arguments_string)}catch{}let x=e.results;
652if(typeof x=="string")try{x=JSON.parse(x)}catch{}return s.jsxs("div",{className:"mt-2 text-xs border border-gray-200 rounded-lg bg-gray-50 overflow-hidden",children:[s.jsxs("button",{onClick:()=>!h&&n(!t),className:`w-full flex items-center gap-2 px-3 py-2 ${h?"cursor-default":"hover:bg-gray-100"}`,children:[s.jsx(c,{className:`w-3.5 h-3.5 ${o.spin?"animate-spin":""} ${o.color}`}),s.jsx("span",{className:"font-medium text-gray-700",children:p}),!h&&s.jsx(Ih,{className:`w-3.5 h-3.5 ml-auto text-gray-400 transition-transform ${t?"rotate-180":""}`})]}),t&&!h&&s.jsxs("div",{className:"px-3 pb-3 space-y-2",children:[w&&Object.keys(w).length>0&&s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-500 mb-1",children:"Parameters:"}),s.jsx("pre",{className:"bg-white border border-gray-200 rounded p-2 overflow-x-auto whitespace-pre-wrap break-words",children:JSON.stringify(w,null,2)})]}),x!=null&&s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-gray-500 mb-1",children:"Result:"}),s.jsx("pre",{className:"bg-white border border-gray-200 rounded p-2 overflow-x-auto whitespace-pre-wrap break-words",children:typeof x=="string"?x:JSON.stringify(x,null,2)})]})]})]})}function tae({message:e}){var n;const t=e.role==="user";return s.jsx("div",{className:`flex ${t?"justify-end":"justify-start"} mb-4`,children:s.jsxs("div",{className:`max-w-[85%] ${t?"":"w-full"}`,children:[e.content&&(t?s.jsx("div",{className:"bg-gray-900 text-white rounded-2xl rounded-br-sm px-4 py-2.5 text-sm",children:e.content}):s.jsx("div",{className:"prose prose-sm max-w-none text-gray-800 prose-headings:font-bold prose-a:text-blue-600 prose-a:underline",children:s.jsx(Gie,{children:e.content})})),(n=e.tool_calls)==null?void 0:n.map((r,i)=>s.jsx(eae,{toolCall:r},i))]})})}const pv="randburg_experiences",nae=["Give me this week's Top 10 things to do in Randburg","Curate a family-friendly Top 10 for Randburg this week","Top 10 outdoor and adventure picks in Randburg this week","Put together a Top 10 and save it as a draft article"];function rae(){Mt("Randburg Experiences Agent | This is Randburg","",{noindex:!0});const[e,t]=E.useState([]),[n,r]=E.useState(null),[i,a]=E.useState([]),[o,c]=E.useState(""),[d,h]=E.useState(!0),[g,f]=E.useState(!1),m=E.useRef(null);E.useEffect(()=>{(async()=>{try{const y=await ie.agents.listConversations({agent_name:pv});t(y||[]),y&&y.length&&r(y[0].id)}catch{}finally{h(!1)}})()},[]),E.useEffect(()=>{if(!n){a([]);return}const v=e.find(j=>j.id===n);a((v==null?void 0:v.messages)||[]);const y=ie.agents.subscribeToConversation(n,j=>{a(j.messages||[])});return()=>y()},[n,e]),E.useEffect(()=>{m.current&&(m.current.scrollTop=m.current.scrollHeight)},[i]);const p=async()=>{try{const v=await ie.agents.createConversation({agent_name:pv,metadata:{name:`Randburg Guide â ${new Date().toLocaleDateString()}`}});t(y=>[v,...y]),r(v.id),a([])}catch{}},w=async()=>{const v=o.trim();if(!v||g)return;f(!0),c("");let y=e.find(j=>j.id===n);y||(y=await ie.agents.createConversation({agent_name:pv,metadata:{name:`Randburg Guide â ${new Date().toLocaleDateString()}`}}),t(j=>[y,...j]),r(y.id));try{await ie.agents.addMessage(y,{role:"user",content:v})}catch{}finally{f(!1)}},x=v=>{c(v)};return s.jsx("div",{className:"min-h-screen bg-gray-50",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[s.jsxs(Jt,{to:xt("Dashboard"),
652className:"inline-flex items-center text-sm text-gray-500 hover:text-gray-900 mb-4",children:[s.jsx(fr,{className:"w-4 h-4 mr-1"})," Back to home"]}),s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-purple-500 to-blue-500 flex items-center justify-center",children:s.jsx(ln,{className:"w-5 h-5 text-white"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-black text-gray-900",children:"Randburg Experiences Agent"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Curates the Top 10 things to do in Randburg and saves them as draft articles."})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[s.jsxs("div",{className:"lg:col-span-1",children:[s.jsx(ge,{onClick:p,className:"w-full mb-4",variant:"outline",children:"+ New Guide"}),s.jsx("div",{className:"space-y-2",children:d?s.jsx("div",{className:"space-y-2",children:[1,2,3].map(v=>s.jsx("div",{className:"h-12 bg-gray-100 rounded-lg animate-pulse"},v))}):e.length===0?s.jsx("p",{className:"text-sm text-gray-400 px-2",children:"No guides yet. Start a new conversation."}):e.map(v=>{var y;return s.jsx("button",{onClick:()=>r(v.id),className:`w-full text-left px-3 py-2 rounded-lg text-sm font-medium transition-colors ${n===v.id?"bg-gray-900 text-white":"bg-white text-gray-700 hover:bg-gray-100"}`,children:((y=v.metadata)==null?void 0:y.name)||"Untitled guide"},v.id)})})]}),s.jsx("div",{className:"lg:col-span-3",children:s.jsxs("div",{className:"bg-white rounded-2xl border border-gray-200 flex flex-col h-[70vh]",children:[s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto p-6",children:i.length===0?s.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[s.jsx(ln,{className:"w-10 h-10 text-purple-400 mb-3"}),s.jsx("p",{className:"text-gray-600 font-medium mb-1",children:"Ask for this week's Randburg guide"}),s.jsx("p",{className:"text-sm text-gray-400 mb-5",children:"The agent researches real venues and saves a draft article."}),s.jsx("div",{className:"flex flex-col gap-2 w-full max-w-md",children:nae.map(v=>s.jsx("button",{onClick:()=>x(v),className:"text-left text-sm px-4 py-2.5 rounded-lg border border-gray-200 hover:border-gray-900 hover:bg-gray-50 text-gray-700",children:v},v))})]}):i.map((v,y)=>s.jsx(tae,{message:v},y))}),s.jsx("div",{className:"border-t border-gray-100 p-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("textarea",{value:o,onChange:v=>c(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),w())},rows:1,placeholder:"Ask for a Randburg experiences guideâ¦",className:"flex-1 resize-none rounded-lg border border-gray-200 px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-gray-900 max-h-32"}),s.jsx(ge,{onClick:w,disabled:g||!o.trim(),size:"icon",className:"h-10 w-10 rounded-lg",children:g?s.jsx(Ke,{className:"w-4 h-4 animate-spin"}):s.jsx(s6,{className:"w-4 h-4"})})]})})]})})]})]})})}var gv={};const sae=pD(W9);var kE;function iae(){if(kE)return gv;kE=1;const{createClient:e}=sae;return gv.base44=e({appId:"68eab176214c38838029465f",serverUrl:"https://base44.app"}),gv}var yv,CE;function aae(){if(CE)return yv;CE=1;const{base44:e}=iae();return yv=new Proxy({},{get:(t,n)=>(...r)=>e.functions.invoke(n,...r)}),yv}var oae=aae();function lae({open:e,onClose:t,business:n}){const[r,i]=E.useState(!1),[a,o]=E.useState(!1),[c,d]=E.useState(""),h=dn(),g=wt(),f=async()=>{var p,w,x,v;d(""),o(!0);try{const y=await oae.claimBusiness({business_id:n.id});(p=y==null?void 0:y.data)!=null&&p.ok?(await h.invalidateQueries({queryKey:["business"]}),await h.invalidateQueries({queryKey:["businesses"]}),await h.invalidateQueries({queryKey:["user-businesses"]}),g(`/edit-business/${n.id}`),m()):d(((w=y==null?void 0:y.data)==null?void 0:w.error)||"Something went wrong. Please try again.")}catch(y){const j=((v=(x=y==null?void 0:y.response)==null?void 0:x.data)==null?void 0:v.error)||(y==null?void 0:y.message)||"Something went wrong. Please try again.";d(j)}finally{o(!1)}},m=()=>{a||(i(!1),d(""),t==null||t())};return s.jsx(Tn,{open:e,onOpenChange:p=>!p&&m(),children:s.jsx(wn,{className:"max-w-[95vw] sm:max-w-md",children:a?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(Ke,{className:"w-12 h-12 animate-spin text-gray-700 mb-4"}),s.jsx("p",{className:"text-lg font-bold text-gray-900",children:"Transferring ownershipâ¦"}),s.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Assigning this page to your account."})]}):s.jsxs(s.Fragment,{children:[s.jsxs(Er,{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(a6,{className:"w-5 h-5 text-amber-600"}),s.jsx(Pr,{className:"text-lg",children:"Claim this page"})]}),s.jsxs(Sm,{className:"text-sm leading-relaxed",children:["Are you sure you want to claim ",s.jsx("strong",{children:n==null?void 0:n.name}),"? By claiming it, you confirm you are the rightful owner or authorised representative of this business and accept our"," ",s.jsx("a",{href:xt("Terms"),target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"Terms & Conditions"}),". False claims may result in the listing being revoked."]})]}),c&&s.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-700",children:c}),s.jsxs("div",{className:"flex items-start gap-2 py-2",children:[s.jsx("input",{id:"claim-terms",type:"checkbox",checked:r,onChange:p=>i(p.target.checked),className:"mt-1 flex-shrink-0"}),s.jsx(ee,{htmlFor:"claim-terms",className:"text-xs sm:text-sm text-gray-700 cursor-pointer",children:"I confirm I am the rightful owner or authorised representative and accept the Terms & Conditions."})]}),s.jsxs(Tr,{className:"flex-col sm:flex-row gap-2",children:[s.jsx(ge,{variant:"outline",onClick:m,disabled:a,className:"w-full sm:w-auto order-2 sm:order-1",children:"Cancel"}),s.jsx(ge,{onClick:f,disabled:!r||a,className:"w-full sm:w-auto font-bold text-black order-1
652sm:order-2",style:{backgroundColor:"#cafc05"},children:"Proceed"})]})]})})})}const EE=e=>e?e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):"";function cae(){const e=wt(),{slug:t}=xi(),[n,r]=Ce.useState(""),[i,a]=Ce.useState(""),[o,c]=Ce.useState(""),[d,h]=Ce.useState(null);Mt(n,i,{image:o,jsonLd:d,canonicalPath:t?`/business/${t}`:""});const[g,f]=Ce.useState(0),[m,p]=Ce.useState(!1),[w,x]=Ce.useState(null),[v,y]=Ce.useState(!1);Ce.useEffect(()=>{ie.auth.isAuthenticated().then(async C=>{if(C)try{x(await ie.auth.me())}catch{}}).catch(()=>{})},[]);const{data:j,isLoading:_}=De({queryKey:["business",t],queryFn:async()=>(await ie.entities.Business.list()).find(S=>S.slug===t||S.id===t),enabled:!!t});if(Ce.useEffect(()=>{f(0)},[t]),Ce.useEffect(()=>{if(!j)return;const C=EE(j.category);r(`${j.name} | ${C} in ${j.suburb||"Randburg"}, Randburg | This is Randburg`);const S=j.description?j.description.slice(0,155).replace(/\s+\S*$/,"")+"â¦":`Discover ${j.name}, a ${C.toLowerCase()} in ${j.suburb||"Randburg"}, Randburg. See opening hours, contact details and more on This is Randburg.`;a(S),c(j.main_image_url||""),h(XO(j,`/business/${j.slug||j.id}`))},[j]),_)return s.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ot,{className:"h-96 w-full mb-8"}),s.jsx(Ot,{className:"h-12 w-3/4 mb-4"}),s.jsx(Ot,{className:"h-6 w-full mb-2"}),s.jsx(Ot,{className:"h-6 w-full mb-2"}),s.jsx(Ot,{className:"h-6 w-full mb-2"})]})});if(!j)return s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:s.jsxs(Ge,{className:"p-8 text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Business Not Found"}),s.jsx(ge,{onClick:()=>e(xt("Businesses")),children:"Back to Businesses"})]})});const N=[j.main_image_url,...j.additional_image_urls||[]].filter(Boolean);return s.jsxs("div",{className:"min-h-screen bg-gray-50 py-12",children:[s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs(ge,{variant:"outline",onClick:()=>e(xt("Businesses")),className:"mb-6",children:[s.jsx(fr,{className:"w-4 h-4 mr-2"}),"Back to Businesses"]}),N.length>0?s.jsxs("div",{className:"mb-8",children:[s.jsx("img",{src:N[g],alt:j.name,className:"w-full h-96 object-cover rounded-xl mb-4 cursor-pointer",onClick:()=>p(!0)}),N.length>1&&s.jsx("div",{className:"grid grid-cols-4 gap-4",children:N.map((C,S)=>s.jsx("img",{src:C,alt:`${j.name} ${S+1}`,className:`h-24 w-full object-cover rounded-lg cursor-pointer transition-all duration-200 ${S===g?"ring-2 ring-teal-600 shadow-md":"hover:ring-1 hover:ring-gray-300"}`,onClick:()=>f(S)},S))})]}):s.jsx("div",{className:"w-full h-96 bg-gray-200 flex items-center justify-center rounded-xl mb-8",children:s.jsx(Zn,{className:"w-24 h-24 text-gray-400"})}),s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(rt,{className:"bg-teal-100 text-teal-800 font-bold",children:EE(j.category)}),j.featured&&s.jsx(rt,{className:"bg-orange-100 text-orange-800 font-bold",children:"Featured"})]}),j.rating&&s.jsxs("div",{className:"flex items-center gap-2 bg-yellow-50 px-4 py-2 rounded-lg",children:[s.jsx(mu,{className:"w-5 h-5 text-yellow-600 fill-yellow-600"}),s.jsx("span",{className:"font-bold text-lg",children:j.rating})]})]}),s.jsx("h1",{className:"text-4xl md:text-5xl font-black text-gray-900 mb-2",children:j.name}),j.tagline&&s.jsx("p",{className:"text-xl font-medium mb-6",style:{color:"#d395ff"},children:j.tagline}),j.discovery_source&&!j.owner_email&&w&&s.jsxs("div",{className:"mb-6",children:[s.jsxs(ge,{onClick:()=>y(!0),className:"font-bold text-black",style:{backgroundColor:"#cafc05"},children:[s.jsx(W_,{className:"w-4 h-4 mr-2"}),"Claim this page"]}),s.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Is this your business? Claim this page to manage and update your listing."})]}),j.owner_email&&s.jsxs("div",{className:"mb-6 inline-flex items-center gap-2 bg-green-50 border border-green-200 rounded-full px-4 py-2",children:[s.jsx(W_,{className:"w-4 h-4 text-green-600"}),s.jsx("span",{className:"text-sm font-semibold text-green-700",children:"Claimed by owner"})]}),j.discovery_source&&!j.owner_email&&s.jsxs(ya,{variant:"destructive",className:"mb-8 bg-yellow-50 border-yellow-200 text-yellow-800",children:[s.jsx(J0,{className:"h-4 w-4 !text-yellow-800"}),s.jsx(go,{className:"font-bold",children:"Disclaimer"}
652),s.jsx(xa,{children:"Business details have not been verified by This is Randburg. Users are advised to exercise caution and perform their own due diligence."})]}),s.jsxs(Ge,{className:"p-8 mb-8",children:[s.jsx("h2",{className:"text-2xl font-black text-gray-900 mb-4",children:"About"}),s.jsx("p",{className:"text-gray-700 leading-relaxed text-lg",children:j.description})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-8",children:[j.address&&s.jsx(Ge,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(pn,{className:"w-6 h-6 text-teal-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 mb-1",children:"Address"}),s.jsx("p",{className:"font-semibold text-lg",children:j.address})]})]})}),j.operating_hours&&s.jsx(Ge,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Q0,{className:"w-6 h-6 text-teal-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 mb-1",children:"Operating Hours"}),s.jsx("p",{className:"font-semibold text-lg",children:j.operating_hours})]})]})})]}),s.jsxs(Ge,{className:"p-8",children:[s.jsx("h2",{className:"text-2xl font-black text-gray-900 mb-6",children:"Contact Information"}),s.jsxs("div",{className:"space-y-4",children:[j.contact_phone&&s.jsxs("a",{href:`tel:${j.contact_phone}`,className:"flex items-center gap-3 text-teal-600 hover:text-teal-700",children:[s.jsx(ro,{className:"w-5 h-5"}),s.jsx("span",{className:"text-lg",children:j.contact_phone})]}),j.contact_email&&s.jsxs("a",{href:`mailto:${j.contact_email}`,className:"flex items-center gap-3 text-teal-600 hover:text-teal-700",children:[s.jsx(Hu,{className:"w-5 h-5"}),s.jsx("span",{className:"text-lg",children:j.contact_email})]}),j.website&&s.jsxs("a",{href:j.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 text-teal-600 hover:text-teal-700",children:[s.jsx(Vu,{className:"w-5 h-5"}),s.jsx("span",{className:"text-lg",children:j.website})]})]})]})]}),s.jsx(Tn,{open:m,onOpenChange:p,children:s.jsx(wn,{className:"max-w-5xl p-0 bg-transparent border-0",children:s.jsxs("div",{className:"relative",children:[s.jsx("button",{className:"absolute top-4 right-4 z-10 bg-black/60 text-white rounded-full p-2",onClick:()=>p(!1),children:s.jsx(kt,{className:"w-5 h-5"})}),s.jsx("img",{src:N[g],alt:`${j.name} full`,className:"w-full max-h-[80vh] object-contain bg-black"}),N.length>1&&s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"absolute left-2 top-1/2 -translate-y-1/2 bg-black/60 text-white rounded-full p-2",onClick:()=>f((g-1+N.length)%N.length),children:s.jsx(Fh,{className:"w-6 h-6"})}),s.jsx("button",{className:"absolute right-2 top-1/2 -translate-y-1/2 bg-black/60 text-white rounded-full p-2",onClick:()=>f((g+1)%N.length),children:s.jsx($u,{className:"w-6 h-6"})})]})]})})}),s.jsx(lae,{open:v,onClose:()=>y(!1),business:j})]})}function uae(){const e=wt(),{id:t}=xi(),[n,r]=Ce.useState(0),[i,a]=Ce.useState(!1),[o,c]=Ce.useState(""),[d,h]=Ce.useState(""),[g,f]=Ce.useState(""),[m,p]=Ce.useState(null);Mt(o,d,{image:g,jsonLd:m,canonicalPath:t?`/event/${t}`:""});const{data:w,isLoading:x}=De({queryKey:["event",t],queryFn:async()=>(await ie.entities.Event.list()).find(j=>j.id===t),enabled:!!t});if(Ce.useEffect(()=>{if(!w)return;const y=w.start_date?Yt(new Date(w.start_date),"d MMMM yyyy"):"";c(`${w.title} | ${y?y+" · ":""}${w.venue_name||w.suburb||"Randburg"}, Randburg | This is Randburg`);const j=w.description?w.description.slice(0,155).replace(/\s+\S*$/,"")+"â¦":`Join ${w.title} on ${y||"soon"} at ${w.venue_name||w.suburb||"Randburg"}, Randburg. See dates, venue details and how to book on This is Randburg.`;h(j),f(w.main_image_url||""),p(KG(w,`/event/${w.id}`))},[w]),x)return s.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ot,{className:"h-96 w-full mb-8"}),s.jsx(Ot,{className:"h-12 w-3/4 mb-4"}),s.jsx(Ot,{className:"h-6 w-full mb-2"}
652),s.jsx(Ot,{className:"h-6 w-5/6"})]})});if(!w)return s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:s.jsxs(Ge,{className:"p-8 text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Event Not Found"}),s.jsx(ge,{onClick:()=>e(xt("Events")),children:"Back to Events"})]})});const v=[w.main_image_url,...w.additional_image_urls||[]].filter(Boolean);return s.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs(ge,{variant:"outline",onClick:()=>e(xt("Events")),className:"mb-6",children:[s.jsx(fr,{className:"w-4 h-4 mr-2"}),"Back to Events"]}),v.length>0&&s.jsxs("div",{className:"mb-8",children:[s.jsx("img",{src:v[n],alt:w.title,className:"w-full h-96 object-cover rounded-xl mb-4 cursor-pointer",onClick:()=>a(!0)}),v.length>1&&s.jsx("div",{className:"grid grid-cols-4 gap-4",children:v.map((y,j)=>s.jsx("img",{src:y,alt:`${w.title} ${j+1}`,className:`h-24 object-cover rounded-lg cursor-pointer ${j===n?"ring-2 ring-purple-600":""}`,onClick:()=>r(j)},j))})]}),s.jsx(Tn,{open:i,onOpenChange:a,children:s.jsx(wn,{className:"max-w-5xl p-0 bg-transparent border-0",children:s.jsxs("div",{className:"relative",children:[s.jsx("button",{className:"absolute top-4 right-4 z-10 bg-black/60 text-white rounded-full p-2",onClick:()=>a(!1),children:s.jsx(kt,{className:"w-5 h-5"})}),s.jsx("img",{src:v[n],alt:`${w.title} full`,className:"w-full max-h-[80vh] object-contain bg-black"}),v.length>1&&s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"absolute left-2 top-1/2 -translate-y-1/2 bg-black/60 text-white rounded-full p-2",onClick:()=>r((n-1+v.length)%v.length),children:s.jsx(Fh,{className:"w-6 h-6"})}),s.jsx("button",{className:"absolute right-2 top-1/2 -translate-y-1/2 bg-black/60 text-white rounded-full p-2",onClick:()=>r((n+1)%v.length),children:s.jsx($u,{className:"w-6 h-6"})})]})]})})}),s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(rt,{className:"bg-purple-100 text-purple-800 font-bold",children:w.category}),w.featured&&s.jsx(rt,{className:"bg-orange-100 text-orange-800 font-bold",children:"Featured"})]}),s.jsx("h1",{className:"text-4xl md:text-5xl font-black text-gray-900 mb-8",children:w.title}),s.jsxs(ya,{variant:"destructive",className:"mb-8 bg-yellow-50 border-yellow-200 text-yellow-800",children:[s.jsx(J0,{className:"h-4 w-4 !text-yellow-800"}),s.jsx(go,{className:"font-bold",children:"Disclaimer"}),s.jsx(xa,{children:"Event details have not been verified by This is Randburg. Please confirm with the organizer before making arrangements."})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-8",children:[s.jsx(Ge,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(an,{className:"w-6 h-6 text-purple-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 mb-1",children:"Date & Time"}),s.jsx("p",{className:"font-bold text-lg",children:Yt(new Date(w.start_date),"EEEE, MMMM d, yyyy")}),s.jsxs("p",{className:"text-gray-700",children:[Yt(new Date(w.start_date),"h:mm a"),w.end_date&&` - ${Yt(new Date(w.end_date),"h:mm a")}`]})]})]})}),s.jsx(Ge,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(pn,{className:"w-6 h-6 text-purple-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 mb-1",children:"Venue"}),s.jsx("p",{className:"font-bold text-lg",children:w.venue_name}),s.jsxs("p",{className:"text-gray-700",children:[w.suburb,w.address?`, ${w.address}`:""]})]})]})}),w.ticket_price&&s.jsx(Ge,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(hI,{className:"w-6 h-6 text-purple-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 mb-1",children:"Ticket Price"}),s.jsx("p",{className:"font-bold text-lg",children:w.ticket_price})]})]})}),w.organizer&&s.jsx(Ge,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Is,{className:"w-6 h-6 text-purple-600 flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 mb-1",children:"Organizer"}),s.jsx("p",{className:"font-bold text-lg",children:w.organizer})]})]})})]}),s.jsxs(Ge,{className:"p-8 mb-8",children:[s.jsx("h2",{className:"text-2xl font-black text-gray-900 mb-4",children:"About This Event"}),s.jsx("p",{className:"text-gray-700 whitespace-pre-line leading-relaxed text-lg",children:w.description})]}),(w.contact_email||w.contact_phone)&&s.jsxs(Ge,{className:"p-8",children:[s.jsx("h2",{className:"text-2xl font-black text-gray-900 mb-4",children:"Contact Information"}),s.jsxs("div",{className:"space-y-3",children:[w.contact_email&&s.jsxs("a",{href:`mailto:${w.contact_email}`,className:"flex items-center gap-3 text-purple-600 hover:text-purple-700",children:[s.jsx(Hu,{className:"w-5 h-5"}
652),s.jsx("span",{className:"text-lg",children:w.contact_email})]}),w.contact_phone&&s.jsxs("a",{href:`tel:${w.contact_phone}`,className:"flex items-center gap-3 text-purple-600 hover:text-purple-700",children:[s.jsx(ro,{className:"w-5 h-5"}),s.jsx("span",{className:"text-lg",children:w.contact_phone})]})]})]})]})})}function dae(){var j,_,N;const e=wt(),{id:t}=xi(),[n,r]=Ce.useState(0),[i,a]=Ce.useState(!1),[o,c]=Ce.useState(""),[d,h]=Ce.useState(""),[g,f]=Ce.useState(""),[m,p]=Ce.useState(null);Mt(o,d,{image:g,jsonLd:m,canonicalPath:t?`/property/${t}`:""});const{data:w,isLoading:x}=De({queryKey:["property",t],queryFn:async()=>(await ie.entities.Property.list()).find(S=>S.id===t),enabled:!!t});if(Ce.useEffect(()=>{if(!w)return;const C=w.property_type?w.property_type.charAt(0).toUpperCase()+w.property_type.slice(1):"Property";c(`${w.title} | ${C} to Rent in ${w.suburb||"Randburg"}, Randburg | This is Randburg`);const S=w.rent_amount?`R${w.rent_amount.toLocaleString()}/month. `:"",P=w.bedrooms?`${w.bedrooms} bed, ${w.bathrooms} bath. `:"",R=w.description?w.description.slice(0,130).replace(/\s+\S*$/,"")+"â¦":`${P}${S}${C} to rent in ${w.suburb||"Randburg"}, Randburg. View photos, features and contact the landlord on This is Randburg.`;h(R),f(w.main_image_url||""),p([va(w.title,R,`/property/${w.id}`),wi([{name:"Home",path:"/"},{name:"Rentals",path:"/Rentals"},{name:w.title}])])},[w]),x)return s.jsx("div",{className:"min-h-screen bg-gray-50 py-8 md:py-12",children:s.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ot,{className:"h-64 md:h-96 w-full mb-6 md:mb-8"}),s.jsx(Ot,{className:"h-8 md:h-12 w-3/4 mb-3 md:mb-4"}),s.jsx(Ot,{className:"h-4 md:h-6 w-full mb-2"}),s.jsx(Ot,{className:"h-4 md:h-6 w-5/6"})]})});if(!w)return s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:s.jsxs(Ge,{className:"p-6 md:p-8 text-center max-w-md w-full",children:[s.jsx("h2",{className:"text-xl md:text-2xl font-bold text-gray-900 mb-3 md:mb-4",children:"Property Not Found"}),s.jsx(ge,{onClick:()=>e(xt("Rentals")),children:"Back to Rentals"})]})});const v=[w.main_image_url,...w.additional_image_urls||[]].filter(Boolean),y=Array.isArray(w.features)?w.features:((j=w.features)==null?void 0:j.split(",").map(C=>C.trim()).filter(Boolean))||[];return s.jsx("div",{className:"min-h-screen bg-gray-50 py-8 md:py-12 overflow-x-hidden",children:s.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs(ge,{variant:"outline",onClick:()=>e(xt("Rentals")),className:"mb-4 md:mb-6",size:"sm",children:[s.jsx(fr,{className:"w-4 h-4 mr-2"}),"Back to Rentals"]}),v.length>0&&s.jsxs("div",{className:"mb-6 md:mb-8",children:[s.jsx("img",{src:v[n],alt:w.title,className:"w-full h-64 md:h-96 object-cover rounded-lg md:rounded-xl mb-3 md:mb-4 cursor-pointer",onClick:()=>a(!0)}),v.length>1&&s.jsx("div",{className:"grid grid-cols-4 gap-2 md:gap-4",children:v.map((C,S)=>s.jsx("img",{src:C,alt:`${w.title} ${S+1}`,className:`h-16 md:h-24 w-full object-cover rounded-md md:rounded-lg cursor-pointer ${S===n?"ring-2 ring-blue-600":""}`,onClick:()=>r(S)},S))})]}),s.jsxs("div",{className:"grid lg:grid-cols-3 gap-6 md:gap-8",children:[s.jsxs("div",{className:"lg:col-span-2",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 md:gap-3 mb-3 md:mb-4",children:[s.jsx(rt,{className:"bg-blue-100 text-blue-800 font-bold text-xs md:text-sm",children:w.property_type}),w.featured&&s.jsx(rt,{className:"bg-orange-100 text-orange-800 font-bold text-xs md:text-sm",children:"Featured"})]}),s.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-black text-gray-900 mb-3 md:mb-4 break-words",children:w.title}),s.jsxs("div",{className:"flex items-center gap-2 text-gray-600 mb-4 md:mb-6",children:[s.jsx(pn,{className:"w-4 h-4 md:w-5 md:h-5 flex-shrink-0"}),s.jsx("span",{className:"text-sm md:text-lg break-words",children:w.suburb})]}),s.jsxs(ya,{variant:"destructive",className:"mb-4 md:mb-6 bg-yellow-50 border-yellow-200 text-yellow-800",children:[s.jsx(J0,{className:"h-4 w-4 !text-yellow-800 flex-shrink-0"}),s.jsx(go,{className:"font-bold text-sm md:text-base",children:"Disclaimer"}
652),s.jsx(xa,{className:"text-xs md:text-sm",children:"Information on this listing has not been verified by This is Randburg. Users are advised to exercise caution and perform their own due diligence."})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-4 md:gap-6 mb-6 md:mb-8 pb-6 md:pb-8 border-b border-gray-200",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(YE,{className:"w-5 h-5 md:w-6 md:h-6 text-blue-600"}),s.jsx("span",{className:"text-lg md:text-xl font-bold",children:w.bedrooms}),s.jsx("span",{className:"text-sm md:text-base text-gray-600",children:"Bedrooms"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(GE,{className:"w-5 h-5 md:w-6 md:h-6 text-blue-600"}),s.jsx("span",{className:"text-lg md:text-xl font-bold",children:w.bathrooms}),s.jsx("span",{className:"text-sm md:text-base text-gray-600",children:"Bathrooms"})]}),w.parking_spaces>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(XE,{className:"w-5 h-5 md:w-6 md:h-6 text-blue-600"}),s.jsx("span",{className:"text-lg md:text-xl font-bold",children:w.parking_spaces}),s.jsx("span",{className:"text-sm md:text-base text-gray-600",children:"Parking"})]})]}),s.jsxs("div",{className:"mb-6 md:mb-8",children:[s.jsx("h2",{className:"text-xl md:text-2xl font-black text-gray-900 mb-3 md:mb-4",children:"Description"}),s.jsx("p",{className:"text-sm md:text-base text-gray-700 whitespace-pre-line leading-relaxed break-words",children:w.description})]}),y.length>0&&s.jsxs("div",{className:"mb-6 md:mb-8",children:[s.jsx("h2",{className:"text-xl md:text-2xl font-black text-gray-900 mb-3 md:mb-4",children:"Features & Amenities"}),s.jsx("div",{className:"grid sm:grid-cols-2 gap-2 md:gap-3",children:y.map((C,S)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ds,{className:"w-4 h-4 md:w-5 md:h-5 text-green-600 flex-shrink-0"}),s.jsx("span",{className:"text-sm md:text-base text-gray-700 break-words",children:C})]},S))})]}),s.jsxs("div",{className:"mb-6 md:mb-8",children:[s.jsx("h2",{className:"text-xl md:text-2xl font-black text-gray-900 mb-3 md:mb-4",children:"Location"}),s.jsx(Ge,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(pn,{className:"w-4 h-4 md:w-5 md:h-5 text-blue-600 flex-shrink-0 mt-1"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-semibold text-sm md:text-base text-gray-900 break-words",children:w.address}),s.jsxs("p",{className:"text-sm md:text-base text-gray-600 break-words",children:[w.suburb,", Randburg"]})]})]})})]})]}),s.jsx("div",{className:"lg:col-span-1",children:s.jsxs(Ge,{className:"p-4 md:p-6 lg:sticky lg:top-24",children:[s.jsxs("div",{className:"mb-4 md:mb-6",children:[s.jsxs("div",{className:"text-2xl sm:text-3xl md:text-4xl font-black text-blue-600 mb-2 break-words",children:["R",(_=w.rent_amount)==null?void 0:_.toLocaleString(),s.jsx("span",{className:"text-base md:text-lg font-normal text-gray-500",children:"/month"})]}),w.deposit_amount>0&&s.jsxs("p",{className:"text-sm md:text-base text-gray-600",children:["Deposit: R",(N=w.deposit_amount)==null?void 0:N.toLocaleString()]})]}),w.available_from&&s.jsxs("div",{className:"flex items-center gap-2 mb-4 md:mb-6 pb-4 md:pb-6 border-b border-gray-200",children:[s.jsx(an,{className:"w-4 h-4 md:w-5 md:h-5 text-blue-600 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-gray-500",children:"Available From"}),s.jsx("p",{className:"text-sm md:text-base font-semibold break-words",children:Yt(new Date(w.available_from),"MMMM d, yyyy")})]})]}),s.jsxs("div",{className:"space-y-3 md:space-y-4",children:[s.jsx("h3",{className:"font-bold text-sm md:text-base text-gray-900",children:"Contact"}),w.contact_name&&s.jsxs("p",{className:"text-sm md:text-base text-gray-700 break-words",children:[s.jsx("span",{className:"font-semibold",children:"Name:"})," ",w.contact_name]}),w.contact_phone&&s.jsxs("a",{href:`tel:${w.contact_phone}`,className:"flex items-center gap-2 text-sm md:text-base text-blue-600 hover:text-blue-700 break-all",children:[s.jsx(ro,{className:"w-4 h-4 md:w-5 md:h-5 flex-shrink-0"}
652),s.jsx("span",{children:w.contact_phone})]}),w.contact_email&&s.jsxs("a",{href:`mailto:${w.contact_email}`,className:"flex items-center gap-2 text-sm md:text-base text-blue-600 hover:text-blue-700 break-all",children:[s.jsx(Hu,{className:"w-4 h-4 md:w-5 md:h-5 flex-shrink-0"}),s.jsx("span",{children:w.contact_email})]})]})]})})]}),s.jsx(Tn,{open:i,onOpenChange:a,children:s.jsx(wn,{className:"max-w-[95vw] md:max-w-5xl p-0 bg-transparent border-0",children:s.jsxs("div",{className:"relative",children:[s.jsx("button",{className:"absolute top-2 right-2 md:top-4 md:right-4 z-10 bg-black/60 text-white rounded-full p-2",onClick:()=>a(!1),children:s.jsx(kt,{className:"w-4 h-4 md:w-5 md:h-5"})}),s.jsx("img",{src:v[n],alt:`${w.title} full`,className:"w-full max-h-[80vh] object-contain bg-black"}),v.length>1&&s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"absolute left-1 md:left-2 top-1/2 -translate-y-1/2 bg-black/60 text-white rounded-full p-1 md:p-2",onClick:()=>r((n-1+v.length)%v.length),children:s.jsx(Fh,{className:"w-5 h-5 md:w-6 md:h-6"})}),s.jsx("button",{className:"absolute right-1 md:right-2 top-1/2 -translate-y-1/2 bg-black/60 text-white rounded-full p-1 md:p-2",onClick:()=>r((n+1)%v.length),children:s.jsx($u,{className:"w-5 h-5 md:w-6 md:h-6"})})]})]})})})]})})}function fae({article:e,formattedDate:t}){var i,a,o,c;const n=[e.main_image_url,(i=e.template_images)==null?void 0:i.immersive_1,(a=e.template_images)==null?void 0:a.immersive_2,(o=e.template_images)==null?void 0:o.immersive_3,(c=e.template_images)==null?void 0:c.immersive_4].filter(Boolean),r=e.content.split(` 653 654`).filter(d=>d.trim());return s.jsxs("div",{className:"min-h-screen",children:[s.jsxs("div",{className:"relative h-screen",children:[s.jsx("img",{src:e.main_image_url,alt:e.title,className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/40 via-black/50 to-black/80"}),s.jsx("div",{className:"absolute inset-0 flex items-end",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-6 pb-20 text-white",children:[s.jsx(rt,{className:"mb-4 bg-white/20 text-white border-white/30 backdrop-blur-sm",children:e.category}),s.jsx("h1",{className:"text-5xl md:text-6xl font-black mb-4 leading-tight",children:e.title}),s.jsx("p",{className:"text-xl text-white/90 mb-4",children:e.excerpt}),s.jsxs("div",{className:"text-sm text-white/70",children:[e.author," ⢠",t]})]})})]}),s.jsx("div",{className:"bg-white",children:r.map((d,h)=>{const g=h+1,f=g<n.length;return s.jsxs(Ce.Fragment,{children:[s.jsx("div",{className:"max-w-3xl mx-auto px-6 py-16",children:s.jsx("div",{className:"prose prose-lg max-w-none",dangerouslySetInnerHTML:{__html:d}})}),f&&s.jsxs("div",{className:"relative h-[70vh] my-8",children:[s.jsx("img",{src:n[g],alt:"",className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-black/20"})]})]},h)})})]})}function hae({article:e,formattedDate:t}){var i,a,o,c,d;const n=[(i=e.template_images)==null?void 0:i.grid_1,(a=e.template_images)==null?void 0:a.grid_2,(o=e.template_images)==null?void 0:o.grid_3,(c=e.template_images)==null?void 0:c.grid_4,(d=e.template_images)==null?void 0:d.grid_5].filter(Boolean),r=e.content.split(` 655 656`).filter(h=>h.trim());return s.jsxs("div",{className:"bg-gray-50 min-h-screen",children:[s.jsx("div",{className:"bg-white border-b",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-12",children:[s.jsx(rt,{className:"mb-4",children:e.category}),s.jsx("h1",{className:"text-5xl font-black text-gray-900 mb-4 leading-tight",children:e.title}),s.jsx("p",{className:"text-xl text-gray-600 mb-4",children:e.excerpt}),s.jsxs("div",{className:"text-sm text-gray-500",children:[e.author," ⢠",t]})]})}),s.jsx("div",{className:"max-w-7xl mx-auto px-6 py-8",children:s.jsx("img",{src:e.main_image_url,alt:e.title,className:"w-full h-[500px] object-cover rounded-2xl shadow-xl"})}),s.jsx("div",{className:"max-w-7xl mx-auto px-6 pb-16",children:s.jsxs("div",{className:"grid md:grid-cols-12 gap-8",children:[s.jsx("div",{className:"md:col-span-7 space-y-12",children:r.map((h,g)=>s.jsx("div",{className:"bg-white rounded-xl p-8 shadow-sm",children:s.jsx("div",{className:"prose prose-lg max-w-none",dangerouslySetInnerHTML:{__html:h}})},g))}),s.jsx("div",{className:"md:col-span-5 space-y-6",children:n.map((h,g)=>s.jsx("div",{className:"bg-white rounded-xl overflow-hidden shadow-sm",children:s.jsx("img",{src:h,alt:"",className:"w-full h-64 object-cover"})},g))})]})})]})}function mae({article:e,formattedDate:t}){const n=e.business_entries||[];return s.jsxs("div",{className:"bg-gradient-to-br from-purple-50 via-white to-blue-50 min-h-screen",children:[s.jsxs("div",{className:"relative h-[400px] overflow-hidden",children:[s.jsx("img",{src:e.main_image_url,alt:e.title,className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-purple-900/70 to-blue-900/70"}),s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-6 text-white text-center w-full",children:[s.jsx(rt,{className:"mb-4 bg-white/20 text-white border-white/30 backdrop-blur-sm text-base px-4 py-1",children:"Weekly Business Spotlight"}),s.jsx("h1",{className:"text-5xl md:text-6xl font-black mb-4",children:e.title}),s.jsx("p",{className:"text-xl text-white/90 max-w-3xl mx-auto",children:e.excerpt}),s.jsxs("div",{className:"text-sm text-white/70 mt-4",children:[e.author," ⢠",t]})]})})]}),s.jsx("div",{className:"max-w-4xl mx-auto px-6 py-16",children:s.jsx("div",{className:"bg-white rounded-2xl p-8 shadow-lg",children:s.jsx("div",{className:"prose prose-lg max-w-none",dangerouslySetInnerHTML:{__html:e.content}})})}),s.jsxs("div",{className:"max-w-6xl mx-auto px-6 pb-20",children:[s.jsx("h2",{className:"text-3xl font-black text-gray-900 mb-10 text-center",children:"This Week's Featured Businesses"}),s.jsx("div",{className:"space-y-12",children:n.map((r,i)=>s.jsx("div",{className:"bg-white rounded-3xl overflow-hidden shadow-xl hover:shadow-2xl transition-shadow duration-300",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-0",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-0",children:[r.image_1&&s.jsx("img",{src:r.image_1,alt:r.name,className:"w-full h-64 md:h-full object-cover"}),r.image_2&&s.jsx("img",{src:r.image_2,alt:r.name,className:"w-full h-64 md:h-full object-cover"})]}),s.jsxs("div",{className:"p-8 md:p-12 flex flex-col justify-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-purple-500 to-blue-500 flex items-center justify-center text-white font-black text-xl",children:i+1}),s.jsx(rt,{variant:"outline",className:"text-sm",children:"Featured Business"})]}),s.jsx("h3",{className:"text-3xl font-black text-gray-900 mb-4",children:r.name}),s.jsx("p",{className:"text-gray-600 text-lg leading-relaxed mb-6",children:r.description}),r.website&&s.jsx("div",{className:"mt-auto",children:s.jsx("a",{href:r.website,target:"_blank",rel:"noopener noreferrer",children:s.jsxs(ge,{className:"bg-gradient-to-r from-purple-600 to-blue-600 hover:from-purple-700 hover:to-blue-700 text-white",children:["Visit Website",s.jsx(eT,{className:"w-4 h-4 ml-2"})]})})})]})]})},i))})]}),s.jsx("div",{className:"bg-gradient-to-r from-purple-600 to-blue-600 text-white py-16",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",children:[s.jsx("h3",{className:"text-3xl font-black mb-4",children:"Want Your Business Featured?"}),s.jsx("p",{className:"text-xl text-white/90 mb-8",children:"Get your local business in front of thousands of Randburg residents every week."}),s.jsx(ge,{size:"lg",className:"bg-white text-purple-600 hover:bg-gray-100 font-bold text-lg px-8",children:"Apply Now"})]})})]})}const pae=e=>e?e.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim():"";function gae(){const e=wt(),{slug:t}=xi(),[n,r]=Ce.useState(0),[i,a]=Ce.useState(!1),[o,c]=Ce.useState(""),[d,h]=Ce.useState(""),[g,f]=Ce.useState(""),[m,p]=Ce.useState(null);Mt(o,d,{image:g,jsonLd:m,canonicalPath:t?`/news/${t}`:"",type:"article"});const{data:w,isLoading:x}=De({queryKey:["news",t],queryFn:async()=>(await ie.entities.NewsArticle.list()).find(j=>pae(j.title)===t&&j.status==="published"),enabled:!!t});if(Ce.useEffect(()=>{if(!w)return;c(`${w.title} | Randburg News | This is Randburg`);const y=w.excerpt?w.excerpt.slice(0,155).replace(/\s+\S*$/,"")+"â¦":`Read "${w.title}" â Randburg news and community updates on This is Randburg.`;h(y),f(w.main_image_url||""),p(WG(w,`/news/${t}`))},[w]),Ce.useEffect(()=>{!x&&!w&&t&&e(xt("News"))},[x,w,t,e]),x)return s.jsx("div",{className:"min-h-screen bg-gray-50 py-6 md:py-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsx(Ot,{className:"h-52 md:h-96 w-full mb-6 rounded-2xl"}),s.jsx(Ot,{className:"h-8 w-3/4 mb-4"}),s.jsx(Ot,{className:"h-5 w-full mb-2"})]})});if(!w)return s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:s.jsxs(Ge,{className:"p-8 text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Article Not Found"}),s.jsx(ge,{onClick:()=>e(xt("News")),children:"Back to News"})]})});if(w.template){const y=Yt(new Date(w.published_date),"MMMM d, yyyy");return s.jsx("div",{className:"min-h-screen",children:["immersive","grid_story","business_showcase"].includes(w.template)?s.jsxs(s.Fragment,{children:[w.template==="immersive"&&s.jsx(fae,{article:w,formattedDate:y}),w.template==="grid_story"&&s.jsx(hae,{article:w,formattedDate:y}),w.template==="business_showcase"&&s.jsx(mae,{article:w,formattedDate:y})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6",children:s.jsxs(ge,{variant:"outline",onClick:()=>e(xt("News")),className:"mb-6",children:[s.jsx(fr,{className:"w-4 h-4 mr-2"}),"Back to News"]})}),s.jsx(PO,{article:w})]})})}const v=[w.main_image_url,...w.additional_image_urls||[]].filter(
656Boolean);return s.jsxs("div",{className:"min-h-screen bg-gray-50 py-6 md:py-12",children:[s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs(ge,{variant:"ghost",onClick:()=>e(xt("News")),className:"mb-4 -ml-2 text-gray-500 hover:text-gray-900",children:[s.jsx(fr,{className:"w-4 h-4 mr-1"}),"Back to News"]}),v.length>0?s.jsxs("div",{className:"mb-6",children:[s.jsx("img",{src:v[n],alt:w.title,className:"w-full h-52 sm:h-72 md:h-96 object-cover rounded-2xl mb-3 cursor-pointer",onClick:()=>a(!0)}),v.length>1&&s.jsx("div",{className:"grid grid-cols-4 gap-2",children:v.map((y,j)=>s.jsx("img",{src:y,alt:`${w.title} ${j+1}`,className:`h-16 sm:h-20 object-cover rounded-lg cursor-pointer ${j===n?"ring-2 ring-orange-600":""}`,onClick:()=>r(j)},j))})]}):s.jsx("div",{className:"w-full h-52 sm:h-72 md:h-96 bg-gradient-to-br from-orange-100 to-orange-200 flex items-center justify-center rounded-2xl mb-6",children:s.jsx(fi,{className:"w-16 h-16 md:w-24 md:h-24 text-orange-400"})}),s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(rt,{className:"bg-orange-100 text-orange-800 font-bold text-xs rounded-full px-3",children:w.category}),w.featured&&s.jsx(rt,{className:"bg-blue-100 text-blue-800 font-bold text-xs rounded-full px-3",children:"Featured"})]}),s.jsx("h1",{className:"text-2xl sm:text-3xl md:text-5xl font-black text-gray-900 mb-4 leading-tight",children:w.title}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3 md:gap-6 mb-6 text-sm text-gray-500",children:[w.author&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Is,{className:"w-4 h-4"}),s.jsx("span",{className:"font-medium",children:w.author})]}),w.published_date&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(an,{className:"w-4 h-4"}),s.jsx("span",{children:Yt(new Date(w.published_date),"MMMM d, yyyy")})]})]}),s.jsx("div",{className:"bg-white rounded-2xl p-5 md:p-8 mb-8 shadow-sm",children:s.jsx("div",{className:"prose prose-sm md:prose-lg max-w-none",children:s.jsx("div",{dangerouslySetInnerHTML:{__html:w.content}})})})]}),s.jsx(Tn,{open:i,onOpenChange:a,children:s.jsx(wn,{className:"max-w-5xl p-0 bg-transparent border-0",children:s.jsxs("div",{className:"relative",children:[s.jsx("button",{className:"absolute top-4 right-4 z-10 bg-black/60 text-white rounded-full p-2",onClick:()=>a(!1),children:s.jsx(kt,{className:"w-5 h-5"})}),s.jsx("img",{src:v[n],alt:`${w.title} full`,className:"w-full max-h-[80vh] object-contain bg-black"}),v.length>1&&s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"absolute left-2 top-1/2 -translate-y-1/2 bg-black/60 text-white rounded-full p-2",onClick:()=>r((n-1+v.length)%v.length),children:s.jsx(Fh,{className:"w-6 h-6"})}),s.jsx("button",{className:"absolute right-2 top-1/2 -translate-y-1/2 bg-black/60 text-white rounded-full p-2",onClick:()=>r((n+1)%v.length),children:s.jsx($u,{className:"w-6 h-6"})})]})]})})})]})}function zf({kind:e,paramKey:t}){const n=wt(),r=hr();return E.useEffect(()=>
656{const a=new URLSearchParams(r.search).get(t);a?n(`/${e}/${a}`,{replace:!0}):n("/",{replace:!0})},[e,t,r.search,n]),null}function yae(){Mt("Randburg Suburbs Guide | Explore Every Neighbourhood","Explore Randburg suburb by suburb. Discover local businesses, events, news and rentals in Ferndale, Cresta, Linden, Fontainebleau, Northriding and more.",{jsonLd:[va("Randburg Suburbs Guide","Explore Randburg suburb by suburb.","/suburbs"),wi([{name:"Home",path:"/"},{name:"Suburbs",path:"/suburbs"}])]});const e=wt(),[t,n]=E.useState(""),{data:r,isLoading:i}=De({queryKey:["suburbs"],queryFn:()=>ie.entities.Suburb.list("name"),initialData:[]}),a=r.filter(o=>o.name.toLowerCase().includes(t.toLowerCase())||o.area&&o.area.toLowerCase().includes(t.toLowerCase()));return s.jsx("div",{className:"min-h-screen bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 md:py-14",children:[s.jsxs("div",{className:"mb-6 md:mb-10",children:[s.jsx("p",{className:"text-xs font-bold uppercase tracking-widest mb-1.5",style:{color:"#0171d3"},children:"Local Guide"}),s.jsx("h1",{className:"text-2xl md:text-5xl font-black text-gray-900 mb-1",children:"Randburg Suburbs"}),s.jsx("p",{className:"text-gray-500 text-sm md:text-lg",children:"Explore every neighbourhood â businesses, events, news and rentals in one place"})]}),s.jsxs("div",{className:"relative max-w-md mb-8",children:[s.jsx(us,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx(de,{placeholder:"Search suburbs...",value:t,onChange:o=>n(o.target.value),className:"pl-11 h-10 md:h-11 bg-gray-50 border-gray-200 rounded-xl text-sm"})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6",children:i?Array(6).fill(0).map((o,c)=>s.jsx("div",{className:"rounded-2xl overflow-hidden bg-gray-100 animate-pulse h-64"},c)):a.length>0?a.map(o=>s.jsxs("div",{onClick:()=>e(`/suburbs/${o.slug}`),className:"group rounded-2xl overflow-hidden border border-gray-100 shadow-sm hover:shadow-xl transition-all duration-300 cursor-pointer bg-white",children:[s.jsxs("div",{className:"relative h-36 sm:h-44 overflow-hidden",children:[s.jsx("img",{src:o.hero_image_url,alt:o.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/50 to-transparent"}),o.area&&s.jsx("span",{className:"absolute top-2.5 left-2.5 bg-white/95 text-gray-800 text-xs font-semibold rounded-full px-2.5 py-0.5",children:o.area}),s.jsxs("h3",{className:"absolute bottom-2.5 left-3 text-white font-black text-lg sm:text-xl flex items-center gap-1",children:[s.jsx(pn,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),o.name]})]}),s.jsx("div",{className:"p-3.5 sm:p-5",children:s.jsx("p",{className:"text-gray-500 text-sm leading-relaxed line-clamp-3 sm:line-clamp-4",children:o.description})})]},o.id)):s.jsxs("div",{className:"col-span-full text-center py-20",children:[s.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(us,{className:"w-7 h-7 text-gray-300"})}),s.jsx("p",{className:"text-gray-500 font-medium",children:"No suburbs found"})]})})]})})}function xae({suburb:e,counts:t}){return s.jsx("section",{className:"bg-[#f5f3eb] pt-4 pb-6 md:pt-8 md:pb-10",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("nav",{className:"flex items-center gap-1.5 text-xs text-gray-500 mb-4","aria-label":"Breadcrumb",children:[s.jsxs(Jt,{to:"/suburbs",className:"inline-flex items-center gap-1 hover:text-[#153f34]",children:[s.jsx(fr,{className:"w-3 h-3"})," Suburbs"]}),s.jsx("span",{children:"/"}),s.jsx("span",{children:e.area||"Randburg"}),s.jsx("span",{children:"/"}),s.jsx("strong",{className:"text-[#153f34]",children:e.name})]}),s.jsxs("div",{className:"grid lg:grid-cols-2 min-h-[340px] sm:min-h-[390px] overflow-hidden rounded-[20px] sm:rounded-[28px] shadow-[0_22px_60px_rgba(24,55,45,.14)]",children:[s.jsxs("div",{className:"bg-[#153f34] text-white p-6 sm:p-10 lg:p-12 flex flex-col justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-black uppercase tracking-[.18em] text-[#dff45f] mb-4",children:"Neighbourhood guide · This is Randburg"}),s.jsx("h1",{className:"font-serif text-4xl sm:text-6xl lg:text-7xl leading-[.9] tracking-[-.04em] mb-5",children:e.name}),s.jsx("p",{className:"text-white/75 text-sm sm:text-base leading-relaxed max-w-xl",children:e.description})]}),s.jsxs("a",{href:"#places",className:"mt-6 inline-flex items-center gap-2 rounded-full bg-[#dff45f] text-[#153f34] font-bold text-xs px-4 py-2.5 w-fit",children:["Explore the neighbourhood ",s.jsx(Wr,{className:"w-3.5 h-3.5"})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3 sm:gap-4 mt-6 sm:mt-8 pt-4 sm:pt-5 border-t border-white/20 text-xs",children:[s.jsxs("div",{children:[s.jsx("span",{className:"block text-white/45 mb-1",children:"Area"}),e.area||"Randburg"]}),s.jsxs("div",{children:[s.jsx("span",{className:"block text-white/45 mb-1",children:"Local businesses"}),t.businesses]}),s.jsxs("div",{children:[s.jsx("span",{className:"block text-white/45 mb-1",children:"Local updates"}),t.news]})]})]}),s.jsxs("div",{className:"relative min-h-[300px] lg:min-h-full",children:[s.jsx("img",{src:e.hero_image_url,alt:`A view of ${e.name}, Randburg`,className:"absolute inset-0 w-full h-full object-cover"}),s.jsxs("span",{className:"absolute bottom-4 right-4 inline-flex items-center gap-1.5 rounded-full bg-white/90 px-3 py-2 text-[10px] font-bold text-[#153f34]",children:[s.jsx(pn,{className:"w-3 h-3"}),e.name,", Randburg"]})]})]})]})})}function vae({hasHighlights:e,hasBusinesses:t,hasCentres:n,hasNews:r,hasDiscovered:i}){const a=[{href:"#places",label:"Area highlights",icon:bv,show:e}
656,{href:"#businesses",label:"Businesses",icon:Zn,show:t},{href:"#centres",label:"Malls & centres",icon:Zn,show:n},{href:"#news",label:"Area news",icon:fi,show:r},{href:"#discovered",label:"New discoveries",icon:ln,show:i}].filter(o=>o.show);return s.jsx("div",{className:"sticky top-20 z-30 bg-[#f5f3eb]/95 backdrop-blur-md border-y border-[#153f34]/10 py-3",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8 flex items-center gap-2 overflow-x-auto scrollbar-hide",children:[s.jsx("span",{className:"text-[10px] font-black uppercase tracking-[.15em] text-[#153f34] mr-auto pr-4 whitespace-nowrap",children:"Explore this suburb"}),a.map(({href:o,label:c,icon:d})=>s.jsxs("a",{href:o,className:"inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border border-[#153f34]/15 bg-white px-3.5 py-2 text-xs font-bold text-[#153f34] hover:bg-[#dff45f]",children:[s.jsx(d,{className:"w-3.5 h-3.5"}),c]},o))]})})}const bae={business:Zn,event:an,property:El,news_article:fi};function wae({suburbName:e,places:t}){return t.length?s.jsx("section",{id:"places",className:"scroll-mt-32 bg-[#f5f3eb] py-10 md:py-20",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"mb-6 md:mb-9",children:[s.jsx("p",{className:"text-[10px] font-black uppercase tracking-[.16em] text-[#f47645] mb-3",children:"Curated locally"}),s.jsx("h2",{className:"font-serif text-3xl md:text-6xl leading-[.95] tracking-[-.035em] text-[#17201d]",children:"Area highlights"}),s.jsxs("p",{className:"text-sm text-gray-500 mt-4 max-w-xl",children:["Editor-selected places and stories worth knowing in ",e,"."]})]}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 auto-rows-[200px] sm:auto-rows-[255px] gap-4",children:t.map((n,r)=>{const i=bae[n.type]||Zn,a=r===0;return s.jsxs("button",{onClick:n.onClick,className:`group relative overflow-hidden rounded-[24px] bg-[#153f34] text-left shadow-sm hover:shadow-xl transition-all ${a?"md:col-span-2 md:row-span-2":""}`,children:[n.image?s.jsx("img",{src:n.image,alt:n.title,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-[1.03] transition-transform duration-500"}):s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-[#245847] to-[#103c31]"}),s.jsx("span",{className:`absolute inset-x-0 bottom-0 ${a?"h-[45%] bg-[#153f34] md:h-[55%] md:bg-gradient-to-t md:from-black/90 md:via-black/55 md:to-transparent":"h-[45%] bg-[#153f34]"}`}),s.jsxs("div",{className:`absolute inset-x-0 bottom-0 text-white ${a?"p-3 md:p-7":"p-3"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2 text-[8px] font-black uppercase tracking-[.14em] text-white/75",children:[s.jsx("span",{className:"w-6 h-6 rounded-full bg-[#dff45f] text-[#153f34] grid place-items-center",children:s.jsx(i,{className:"w-3 h-3"})}),n.label]}),s.jsx("h3",{className:`font-serif leading-[1.02] line-clamp-2 ${a?"text-xl md:text-4xl":"text-xl"}`,children:n.title}),a&&s.jsx("p",{className:"hidden md:block text-xs text-white/70 line-clamp-2 mt-2 max-w-lg",children:n.description}),s.jsxs("div",{className:"flex items-center justify-between mt-2 pt-2 border-t border-white/20",children:[s.jsx("span",{className:"text-[8px] text-white/60 capitalize truncate",children:(n.tags||[]).slice(0,2).map(o=>o.replaceAll("-"," ")).join(" · ")}),s.jsx(BD,{className:"w-3.5 h-3.5 group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-transform"})]})]})]},n.key)})})]})}):null}const jae=[{key:"all",label:"All"},{key:"food-drink",label:"Eat & drink"},{key:"shopping",label:"Shop"},{key:"professional-services",label:"Services"},{key:"health",label:"Health"}];function _ae({suburbName:e,businesses:t}){const[n,r]=E.useState("all"),i=jae.filter(o=>o.key==="all"||t.some(c=>(c.parent_categories||[]).includes(o.key))),a=E.useMemo(()=>t.filter(o=>n==="all"||(o.parent_categories||[]).includes(n)).slice(0,8),[t,n]);return t.length?s.jsx("section",{id:"businesses",className:"scroll-mt-32 bg-white py-10 md:py-20",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"grid md:grid-cols-[1fr_300px] gap-4 items-end mb-5 md:mb-7",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-black uppercase tracking-[.16em] text-[#f47645] mb-3",children:"Support local"}),s.jsxs("h2",{className:"font-serif text-3xl md:text-6xl leading-[.95] tracking-[-.035em] text-[#17201d]",children:["Made better by the",s.jsx("br",{className:"hidden md:block"}),"businesses here"]})]}),s.jsxs("p",{className:"text-sm leading-relaxed text-gray-500",children:["Browse independent and neighbourhood businesses mapped in ",e,"."]})]}),s.jsx("div",{className:"flex gap-2 overflow-x-auto scrollbar-hide mb-5",children:i.map(o=>s.jsx("button",{onClick:()=>r(o.key),className:`rounded-full px-3.5 py-2 text-xs font-bold border ${n===o.key?"bg-[#153f34] text-white border-[#153f34]":"bg-white text-[#153f34] border-gray-200"}`,children:o.label},o.key))}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-3",children:a.map(o=>{var c;return s.jsxs(Jt,{to:`/business/${o.slug||o.id}`,className:"group min-h-[220px] rounded-[18px] border border-gray-200 p-5 flex flex-col hover:border-[#153f34]/40 hover:shadow-lg transition-all",children:[s.jsx("span",{className:"w-9 h-9 rounded-xl bg-[#edf4e9] grid place-items-center text-[#153f34] mb-8",children:s.jsx(Zn,{className:"w-4 h-4"})}),s.jsx("p",{className:"text-[9px] font-black uppercase tracking-wider text-[#f47645] mb-2",children:(((c=o.parent_categories)==null?void 0:c[0])||o.category||"Local business").replaceAll("-"," ")}),s.jsx("h3",{className:"font-serif text-xl text-[#17201d] leading-tight mb-2",children:o.name}),s.jsx("p",{className:"text-xs text-gray-500 line-clamp-2 mb-4",children:o.tagline||o.description}),s.jsxs("span",{className:"mt-auto flex items-center justify-between text-[10px] text-gray-500",children:[s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx(pn,{className:"w-3 h-3"}),o.suburb]}),s.jsx(Wr,{className:"w-3.5 h-3.5 group-hover:translate-x-1 transition-transform"})]})]},o.id)})}),s.jsxs(Jt,{to:`/businesses?suburb=${encodeURIComponent(e)}`,className:"mt-6 inline-flex items-center gap-2 rounded-full border border-gray-200 px-4 py-2.5 text-xs font-bold text-[#153f34]",children:["View all local businesses ",s.jsx(Wr,{className:"w-3.5 h-3.5"})]})]})}):null}function g3({centre:e}){const t=e.category==="malls"?"Mall":"Shopping centre";return s.jsxs(Jt,{to:`/malls-centres/${e.slug}`,className:"group flex h-full flex-col rounded-2xl border border-border bg-card p-5 text-left shadow-sm transition-shadow hover:shadow-lg",children:[s.jsxs("div",{className:"mb-5 flex items-start justify-between gap-3",children:[s.jsx("div",{className:"grid h-11 w-11 place-items-center rounded-xl bg-secondary",children:s.jsx(Zn,{className:"h-5 w-5 text-primary"})}),s.jsx(rt,{variant:"secondary",children:t})]}),s.jsx("h3",{className:"text-lg font-bold text-card-foreground group-hover:text-primary",children:e.name}),s.jsx("p",{className:"mt-2 line-clamp-3 text-sm leading-relaxed text-muted-foreground",children:e.description}),s.jsxs("div",{className:"mt-auto flex items-start gap-2 pt-5 text-xs text-muted-foreground",children:[s.jsx(pn,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),s.jsx("span",{children:e.address||e.suburb})]})]})}function Nae({suburbName:e,centres:t}){return t.length?s.jsx("section",{id:"centres",className:"scroll-mt-32 bg-secondary/40 py-10 md:py-20",children:s.jsxs("div",{className:"mx-auto max-w-[1220px] px-4 sm:px-6 lg:px-8",children:[s.jsx("p",{className:"mb-2 text-xs font-black uppercase tracking-widest text-primary",children:"Shop the area"}),s.jsxs("h2",{className:"mb-3 text-2xl font-black tracking-tight text-foreground md:text-5xl",children:["Malls & centres in ",e]}),s.jsx("p",{className:"mb-6 md:mb-8 max-w-2xl text-sm md:text-base text-muted-foreground",children:"From major retail destinations to convenient neighbourhood centres."}),s.jsx("div",{className:"grid gap-4 sm:gap-5 md:grid-cols-2 lg:grid-cols-3",children:t.map(n=>s.jsx(g3,{centre:n},n.id))})]})}):null}const TE=e=>e.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"");function Sae({suburbName:e,articles:t}){if(!t.length)return null;const[n,...r]=t.slice(0,3);return s.jsx("section",{id:"news",className:"scroll-mt-32 bg-[#f5f3eb] py-10 md:py-20",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("div",{className:"flex items-end justify-between gap-4 mb-6 md:mb-8",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-black uppercase tracking-[.16em] text-[#f47645] mb-3",children:"Around the neighbourhood"}),s.jsxs("h2",{className:"font-serif text-3xl md:text-6xl leading-none tracking-[-.035em] text-[#17201d]",children:[e," news"]})]}),s.jsxs(Jt,{to:"/news",className:"hidden sm:inline-flex items-center gap-2 text-xs font-bold text-[#153f34]",children:["View all local news ",s.jsx(Wr,{className:"w-3.5 h-3.5"})]})]}),s.jsxs("div",{className:"grid lg:grid-cols-[420px_1fr] gap-5 lg:gap-8",children:[s.jsxs(Jt,{to:`/news/${TE(n.title)}`,className:"group relative rounded-[22px] overflow-hidden min-h-[260px] sm:min-h-[380px] bg-[#153f34]",children:[n.main_image_url&&s.jsx("img",{src:n.main_image_url,alt:n.title,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),s.jsx("span",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-trans
656parent to-transparent"}),s.jsxs("div",{className:"absolute bottom-0 p-5 sm:p-6 text-white",children:[s.jsx("p",{className:"text-[9px] font-black uppercase tracking-wider text-[#dff45f] mb-2",children:"Latest local update"}),s.jsx("h3",{className:"font-serif text-2xl sm:text-3xl leading-none",children:n.title})]})]}),s.jsx("div",{className:"border-t border-[#153f34]/20",children:r.map(i=>s.jsxs(Jt,{to:`/news/${TE(i.title)}`,className:"group block py-5 sm:py-6 border-b border-[#153f34]/20",children:[s.jsxs("div",{className:"flex justify-between gap-4 mb-2",children:[s.jsx("span",{className:"text-[9px] font-black uppercase tracking-wider text-[#f47645]",children:i.category||"Neighbourhood"}),s.jsx("span",{className:"text-[10px] text-gray-500",children:i.published_date?new Date(i.published_date).toLocaleDateString("en-ZA",{day:"numeric",month:"short",year:"numeric"}):""})]}),s.jsx("h3",{className:"font-serif text-xl md:text-3xl leading-[1.05] text-[#17201d] group-hover:text-[#f47645]",children:i.title}),s.jsx("p",{className:"text-xs text-gray-500 mt-3 line-clamp-2",children:i.excerpt}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold text-[#153f34] mt-4",children:["Read story ",s.jsx(Wr,{className:"w-3 h-3"})]})]},i.id))})]})]})})}function kae({suburbs:e}){return e.length?s.jsx("section",{className:"bg-[#dff45f] py-6",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8 flex flex-col sm:flex-row sm:items-center gap-4",children:[s.jsx("h2",{className:"font-serif text-2xl text-[#153f34] mr-auto",children:"Explore nearby"}),s.jsx("div",{className:"flex gap-2 overflow-x-auto scrollbar-hide",children:e.map(t=>s.jsxs(Jt,{to:`/suburbs/${t.slug}`,className:"inline-flex items-center gap-2 rounded-full border border-[#153f34]/20 px-4 py-2 text-xs font-bold text-[#153f34] whitespace-nowrap",children:[t.name,s.jsx(Wr,{className:"w-3 h-3"})]},t.id))})]})}):null}function Cae({name:e,subtitle:t,onClick:n,tag:r}){return s.jsxs("button",{onClick:n,className:"group text-left w-full bg-white/[0.04] hover:bg-white/[0.08] border border-white/10 rounded-xl p-4 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[s.jsx(ln,{className:"w-3 h-3 text-lime-300"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-lime-300",children:"Discovered"}),r&&s.jsx("span",{className:"ml-auto text-[10px] font-semibold text-gray-500 uppercase tracking-wider",children:r})]}),s.jsx("h4",{className:"font-bold text-white text-sm leading-snug mb-1 line-clamp-1",children:e}),t&&s.jsx("p",{className:"text-gray-400 text-xs leading-relaxed line-clamp-2",children:t}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] font-semibold text-gray-300 mt-2 group-hover:text-white",children:["View ",s.jsx(Wr,{className:"w-3 h-3"})]})]})}const Eae=e=>e.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"");function Tae(){const e=wt(),{slug:t}=xi(),[n,r]=Ce.useState({title:"",description:"",image:"",jsonLd:null});Mt(n.title,n.description,{image:n.image,jsonLd:n.jsonLd,canonicalPath:t?`/suburbs/${t}`:""});const{data:i=[],isLoading:a}=De({queryKey:["suburbs"],queryFn:()=>ie.entities.Suburb.list("name")}),o=i.find(S=>S.slug===t),c=Ce.useCallback(S=>{if(!S||!o)return!1;const P=String(S).toLowerCase(),R=o.name.toLowerCase();return P.includes(R)||R.includes(P)},[o]),{data:d=[]}=De({queryKey:["suburb-businesses",o==null?void 0:o.id],enabled:!!o,queryFn:async()=>(await ie.entities.Business.list("-featured")).filter(S=>S.status==="active"&&c(S.suburb))}),{data:h=[]}=De({queryKey:["suburb-centres",o==null?void 0:o.id],enabled:!!o,queryFn:async()=>(await ie.entities.ShoppingCentre.list("name")).filter(S=>c(S.suburb))}),{data:g=[]}=De({queryKey:["suburb-events",o==null?void 0:o.id],enabled:!!o,queryFn:async()=>{const S=new Date;return S.setHours(0,0,0,0),(await ie.entities.Event.list("start_date")).filter(P=>P.status==="published"&&c(P.suburb)&&new Date(P.start_date)>=S)}}),{data:f=[]}=De({queryKey:["suburb-properties",o==null?void 0:o.id],enabled:!!o,queryFn:async()=>(await ie.entities.Property.list("-featured")).filter(S=>S.status==="available"&&c(S.suburb))}),{data:m=[]}=De({queryKey:["suburb-groups",o==null?void 0:o.id],enabled:!!o,queryFn:async()=>(await ie.entities.CommunityGroup.list("-featured")).filter(S=>S.status==="active"&&c(S.suburb))}),{data:p=[]}=De({queryKey:["suburb-news",o==null?void 0:o.id],enabled:!!o,queryFn:async()=>(await ie.entities.NewsArticle.list("-published_date")).filter(S=>{if(S.status!=="published")return!1;const P=[S.title,S.excerpt,...S.tags||[]].join(" ");return c(P)})}),{data:w=[]}=De({queryKey:["area-highlights",t],enabled:!!o,queryFn:()=>ie.entities.AreaHighlight.filter({suburb_slug:t},"display_order",5)});if(Ce.useEffect(()=>{if(!o)return;const S=o.description?`${o.description.slice(0,152).replace(/\s+\S*$/,"")}â¦`:`Discover local places, businesses and news in ${o.name}, Randburg.`;
656r({title:`${o.name}, Randburg Local Guide | This is Randburg`,description:S,image:o.hero_image_url||"",jsonLd:[GG(o,`/suburbs/${o.slug}`),wi([{name:"Home",path:"/"},{name:"Suburbs",path:"/suburbs"},{name:o.name}])]})},[o]),a)return s.jsx("div",{className:"min-h-screen bg-[#f5f3eb] py-12",children:s.jsx("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:s.jsx(Ot,{className:"h-[520px] w-full rounded-[28px]"})})});if(!o)return s.jsx("div",{className:"min-h-screen bg-[#f5f3eb] flex items-center justify-center p-4",children:s.jsxs(Ge,{className:"p-8 text-center",children:[s.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Suburb not found"}),s.jsx(ge,{onClick:()=>e("/suburbs"),children:"Back to suburbs"})]})});const x=S=>!!S.discovery_source&&!S.owner_email,v=d.filter(S=>!x(S)),y=[...d.filter(x).map(S=>({key:`b-${S.id}`,tag:"Business",name:S.name,subtitle:S.description,onClick:()=>e(`/business/${S.slug||S.id}`)})),...g.filter(x).map(S=>({key:`e-${S.id}`,tag:"Event",name:S.title,subtitle:S.venue_name||S.suburb,onClick:()=>e(`/event/${S.id}`)})),...f.filter(x).map(S=>({key:`p-${S.id}`,tag:"Rental",name:S.title,subtitle:S.description,onClick:()=>e(`/property/${S.id}`)}))],j={business:v,event:g.filter(S=>!x(S)),property:f.filter(S=>!x(S)),news_article:p},_=w.map(S=>{var R,L,D;const P=(R=j[S.entity_type])==null?void 0:R.find(T=>T.id===S.entity_id);return P?S.entity_type==="business"?{key:S.id,type:"business",label:((D=(L=P.parent_categories)==null?void 0:L[0])==null?void 0:D.replaceAll("-"," "))||P.category,title:P.name,description:P.tagline||P.description,image:P.main_image_url,tags:P.tags,onClick:()=>e(`/business/${P.slug||P.id}`)}:S.entity_type==="event"?{key:S.id,type:"event",label:"Event",title:P.title,description:P.description,image:P.main_image_url,tags:P.tags,onClick:()=>e(`/event/${P.id}`)}:S.entity_type==="property"?{key:S.id,type:"property",label:"Property",title:P.title,description:P.description,image:P.main_image_url,tags:P.tags,onClick:()=>e(`/property/${P.id}`)}:{key:S.id,type:"news_article",label:P.category||"Local story",title:P.title,description:P.excerpt,image:P.main_image_url,tags:P.tags,onClick:()=>e(`/news/${Eae(P.title)}`)}:null}).filter(Boolean).slice(0,5),N={businesses:d.length,events:g.length,news:p.length,highlights:_.length},C=[...i.filter(S=>S.id!==o.id&&S.area===o.area),...i.filter(S=>S.id!==o.id&&S.area!==o.area)].slice(0,5);return s.jsxs("main",{className:"min-h-screen bg-white",children:[s.jsx(xae,{suburb:o,counts:N}),s.jsx(vae,{hasHighlights:_.length>0,hasBusinesses:v.length>0,hasCentres:h.length>0,hasNews:p.length>0,hasDiscovered:y.length>0}),s.jsx(wae,{suburbName:o.name,places:_}),s.jsx(_ae,{suburbName:o.name,businesses:v}),s.jsx(Nae,{suburbName:o.name,centres:h}),s.jsx(Sae,{suburbName:o.name,articles:p}),y.length>0&&s.jsx("section",{id:"discovered",className:"scroll-mt-32 bg-[#f5f3eb] py-12",children:s.jsx("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"rounded-[24px] bg-[#0e1a16] p-5 md:p-7",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(ln,{className:"w-4 h-4 text-[#dff45f]"}),s.jsx("span",{className:"text-[10px] font-black uppercase tracking-[.16em] text-[#dff45f]",children:"Discovered"})]}),s.jsxs("h2",{className:"font-serif text-3xl text-white mb-1",children:["New finds in ",o.name]}),s.jsx("p",{className:"text-gray-400 text-sm mb-5",children:"Recently discovered listings awaiting fuller local detail."}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3",children:y.map(S=>s.jsx(Cae,{...S},S.key))})]})})}),!_.length&&!v.length&&!y.length&&s.jsxs("section",{className:"bg-[#f5f3eb] py-16 text-center text-sm text-gray-500",children:["More local places are being mapped for ",o.name,"."]}),s.jsx(kae,{suburbs:C})]})}const Pae=[{key:"all",label:"All"},{key:"sport",label:"Sport & Active"},{key:"social",label:"Social"},{key:"hobby",label:"Hobby & Interest"},{key:"professional",label:"Professional"},{key:"volunteer",label:"Volunteer"},{key:"other",label:"Community"}];function Aae(){Mt("Community Groups & Clubs in Randburg | This is Randburg","Discover local clubs, groups and communities in Randburg â from tennis clubs and book clubs to running groups and professional networks. Find your people.",{noindex:!1,canonicalPath:"/community"});const e=wt(),[t,n]=E.useState("all"),{data:r,isLoading:i}=De({queryKey:["community-groups-all"],queryFn:async()=>(await ie.entities.CommunityGroup.list()).filter(c=>c.status==="active"),initialData:[]}),a=E.useMemo(()=>t==="all"?r:r.filter(o=>o.category===t),[r,t]);return s.jsxs("div",{className:"bg-white min-h-screen",children:[s.jsx("section",{className:"bg-gray-950 text-white py-14 md:py-20",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("p",{className:"text-xs font-bold uppercase tracking-widest mb-2 flex items-center gap-1.5",style:{color:"#cafc05"},children:[s.jsx(ll,{className:"w-3.5 h-3.5"})," Local Memberships"]}),s.jsx("h1",{className:"text-3xl md:text-5xl font-black mb-3",children:"Find your people in Randburg"}),s.jsx("p",{className:"text-white/60 text-base md:text-lg max-w-xl",children:"Tennis clubs, book clubs, running groups, professional networks and more â the communities that make a city feel like home."})]})}),s.jsxs("section",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10 md:py-14",children:[s.jsx("div",{className:"flex gap-2 mb-8 overflow-x-auto pb-1",children:Pae.map(o=>s.jsx("button",{onClick:()=>n(o.key),className:`px-4 py-2 rounded-full text-sm font-semibold whitespace-nowrap transition-all ${t===o.key?"bg-gray-900 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:o.label},o.key))}),i?s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:Array(6).fill(0).map((o,c)=>
656s.jsx(Ot,{className:"h-64 rounded-2xl"},c))}):a.length===0?s.jsxs("div",{className:"text-center py-16",children:[s.jsx(ll,{className:"w-10 h-10 text-gray-300 mx-auto mb-3"}),s.jsx("p",{className:"text-gray-400 text-sm",children:"No groups in this category yet."})]}):s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:a.map(o=>s.jsxs("div",{onClick:()=>e(`/community/${o.slug}`),className:"group rounded-2xl overflow-hidden border border-gray-100 hover:shadow-xl transition-all duration-300 cursor-pointer bg-white",children:[s.jsx("div",{className:"relative h-40 overflow-hidden",children:o.main_image_url?s.jsx("img",{src:o.main_image_url,alt:o.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):o.discovery_source?s.jsxs("div",{className:"w-full h-full bg-gray-50 flex flex-col justify-center gap-2 px-5",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"bg-gray-100 text-gray-700 font-semibold text-xs rounded-full px-3 py-1 capitalize",children:o.category}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-purple-600 bg-purple-50 rounded-full px-2 py-0.5",children:[s.jsx(ln,{className:"w-3 h-3"})," Discovered"]})]}),o.suburb&&s.jsx("p",{className:"text-sm font-semibold text-gray-700",children:o.suburb}),o.meeting_schedule&&s.jsx("p",{className:"text-xs text-gray-500 line-clamp-1",children:o.meeting_schedule})]}):s.jsx("div",{className:"w-full h-full bg-gradient-to-br from-gray-100 to-gray-200 flex items-center justify-center",children:s.jsx(ll,{className:"w-14 h-14 text-gray-300"})})}),s.jsxs("div",{className:"p-5",children:[s.jsx("h3",{className:"font-bold text-gray-900 text-lg mb-1.5",children:o.name}),s.jsx("p",{className:"text-gray-500 text-sm line-clamp-2 mb-3",children:o.description}),s.jsxs("div",{className:"space-y-1.5 text-xs text-gray-400",children:[o.meeting_schedule&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(an,{className:"w-3.5 h-3.5"}),o.meeting_schedule]}),o.suburb&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(pn,{className:"w-3.5 h-3.5"}),o.suburb]})]}),s.jsxs("div",{className:"mt-3 flex items-center gap-1 text-sm font-semibold text-gray-700 group-hover:text-gray-900",children:["Learn more ",s.jsx(Wr,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]})]},o.id))})]})]})}const Rae={sport:"Sport & Active",social:"Social",hobby:"Hobby & Interest",professional:"Professional",volunteer:"Volunteer",other:"Community"};function Oae(){const{slug:e}=xi(),t=wt(),{data:n,isLoading:r}=De({queryKey:["community-group",e],queryFn:async()=>{const i=await ie.entities.CommunityGroup.filter({slug:e});return i&&i.length?i[0]:null},enabled:!!e});return Mt(n?`${n.name} | Randburg Community Groups | This is Randburg`:"Community Group | This is Randburg",n?n.description:"Discover a local community group in Randburg.",{noindex:!1,canonicalPath:`/community/${e}`}),r?s.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-10",children:[s.jsx(Ot,{className:"h-80 rounded-2xl mb-6"}),s.jsx(Ot,{className:"h-8 w-2/3 rounded mb-3"}),s.jsx(Ot,{className:"h-4 w-full rounded mb-2"}),s.jsx(Ot,{className:"h-4 w-3/4 rounded"})]}):n?s.jsxs("div",{className:"bg-white min-h-screen",children:[s.jsxs("div",{className:"relative h-64 md:h-80 overflow-hidden bg-gray-900",children:[n.main_image_url?s.jsx("img",{src:n.main_image_url,alt:n.name,className:"w-full h-full object-cover"}):s.jsx("div",{className:"w-full h-full bg-gradient-to-br from-gray-800 to-gray-900"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 to-transparent"}),s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 pb-6",children:[s.jsxs("button",{onClick:()=>t("/community"),className:"inline-flex items-center gap-1.5 text-white/80 hover:text-white text-sm mb-3 transition-colors",children:[s.jsx(fr,{className:"w-4 h-4"})," All groups"]}),s.jsx("div",{className:"inline-block px-3 py-1 rounded-full bg-white/20 backdrop-blur-sm text-white text-xs font-bold mb-3",children:Rae[n.category]||n.category}),s.jsx("h1",{className:"text-3xl md:text-4xl font-black text-white",children:n.name})]})]}),s.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-10 md:py-14",children:s.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("h2",{className:"text-xs font-bold uppercase tracking-widest text-gray-400 mb-2",children:"About this group"}),s.jsx("p",{className:"text-gray-700 text-base leading-relaxed whitespace-pre-line",children:n.description}),n.tags&&n.tags.length>0&&s.jsxs("div",{className:"mt-6",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-widest text-gray-400 mb-2 flex items-center gap-1",children:[s.jsx(m6,{className:"w-3.5 h-3.5"})," Tags"]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:n.tags.map(i=>s.jsx("span",{className:"px-3 py-1 rounded-full bg-gray-100 text-gray-600 text-xs font-semibold",children:i},i))})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"rounded-2xl border border-gray-100 p-5 bg-gray-50",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-widest text-gray-400 mb-3",children:"Details"}),s.jsxs("div",{className:"space-y-3 text-sm",children:[n.meeting_schedule&&s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(an,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-gray-900",children:"When"}),s.jsx("div",{className:"text-gray-500",children:n.meeting_schedule})]})]}),n.venue_name&&s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(pn,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-gray-900",children:"Where"}),s.jsxs("div",{className:"text-gray-500",children:[n.venue_name,n.suburb?`, ${n.suburb}`:""]})]})]}),n.membership_info&&s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(ll,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-gray-900",children:"Membership"}),s.jsx("div",{className:"text-gray-500",children:n.membership_info})]})]})]})]}),(n.contact_email||n.contact_phone||n.website)&&s.jsxs("div",{className:"rounded-2xl border border-gray-100 p-5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-widest text-gray-400 mb-3",children:"Get in touch"}),s.jsxs("div",{className:"space-y-2 text-sm",children:[n.contact_email&&s.jsxs("a",{href:`mailto:${n.contact_email}`,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[s.jsx(Hu,{className:"w-4 h-4"})," ",n.contact_email]}),n.contact_phone&&s.jsxs("a",{href:`tel:${n.contact_phone}`,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[s.jsx(ro,{className:"w-4 h-4"})," ",n.contact_phone]}),n.website&&s.jsxs("a",{href:n.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[s.jsx(Vu,{className:"w-4 h-4"})," Visit website"]})]})]})]})]})})]}):s.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-20 text-center",children:[s.jsx("p",{className:"text-gray-400 mb-4",children:"This group could not be found."}),s.jsx(Jt,{to:"/community",children:s.jsx(ge,{variant:"outline",children:"Back to all groups"})})]})}const xv={restaurant:{entities:["business"],categories:["restaurant"]},restaurants:{entities:["business"],categories:["restaurant"]},eat:{entities:["business"],categories:["restaurant","cafe","bar_lounge"]},eating:{entities:["business"],categories:["restaurant","cafe","bar_lounge"]}
656,food:{entities:["business","event"],categories:["restaurant","cafe","bar_lounge","food"]},dining:{entities:["business"],categories:["restaurant"]},coffee:{entities:["business"],categories:["cafe"]},"coffee shop":{entities:["business"],categories:["cafe"]},cafe:{entities:["business"],categories:["cafe"]},cafes:{entities:["business"],categories:["cafe"]},bar:{entities:["business"],categories:["bar_lounge"]},bars:{entities:["business"],categories:["bar_lounge"]},pub:{entities:["business"],categories:["bar_lounge"]},pubs:{entities:["business"],categories:["bar_lounge"]},drinks:{entities:["business"],categories:["bar_lounge"]},cocktails:{entities:["business"],categories:["bar_lounge"]},breakfast:{entities:["business"],categories:["restaurant","cafe"],tags:["breakfast"]},brunch:{entities:["business"],categories:["restaurant","cafe"],tags:["brunch","breakfast"]},lunch:{entities:["business"],categories:["restaurant","cafe"],tags:["lunch"]},dinner:{entities:["business"],categories:["restaurant","bar_lounge"],tags:["dinner"]},takeaway:{entities:["business"],categories:["restaurant"],tags:["takeaway"]},takeout:{entities:["business"],categories:["restaurant"],tags:["takeaway"]},pizza:{entities:["business"],categories:["restaurant"],keywords:["pizza"]},burger:{entities:["business"],categories:["restaurant"],keywords:["burger"]},sushi:{entities:["business"],categories:["restaurant"],keywords:["sushi"]},steak:{entities:["business"],categories:["restaurant"],keywords:["steak"]},shopping:{entities:["business"],categories:["retail"]},shop:{entities:["business"],categories:["retail"]},shops:{entities:["business"],categories:["retail"]},store:{entities:["business"],categories:["retail"]},stores:{entities:["business"],categories:["retail"]},retail:{entities:["business"],categories:["retail"]},boutique:{entities:["business"],categories:["retail"],keywords:["boutique"]},mall:{entities:["business"],categories:["retail"],keywords:["mall"]},health:{entities:["business"],categories:["healthcare"]},doctor:{entities:["business"],categories:["healthcare"],keywords:["doctor"]},doctors:{entities:["business"],categories:["healthcare"],keywords:["doctor"]},medical:{entities:["business"],categories:["healthcare"]},pharmacy:{entities:["business"],categories:["healthcare"],keywords:["pharmacy"]},dentist:{entities:["business"],categories:["healthcare"],keywords:["dentist"]},gym:{entities:["business"],categories:["fitness"]},gyms:{entities:["business"],categories:["fitness"]},fitness:{entities:["business"],categories:["fitness"]},workout:{entities:["business"],categories:["fitness"]},salon:{entities:["business"],categories:["beauty"],keywords:["salon"]},salons:{entities:["business"],categories:["beauty"],keywords:["salon"]},beauty:{entities:["business"],categories:["beauty"]},hairdresser:{entities:["business"],categories:["beauty"],keywords:["hair"]},barber:{entities:["business"],categories:["beauty"],keywords:["barber"]},spa:{entities:["business"],categories:["spa_wellness"]},wellness:{entities:["business"],categories:["spa_wellness","fitness"]},massage:{entities:["business"],categories:["spa_wellness"],keywords:["massage"]},nails:{entities:["business"],categories:["beauty"],keywords:["nails"]},services:{entities:["business"],categories:["services"]},service:{entities:["business"],categories:["services"]},mechanic:{entities:["business"],categories:["automotive"],keywords:["mechanic"]},auto:{entities:["business"],categories:["automotive"]},automotive:{entities:["business"],categories:["automotive"]},car:{entities:["business"],categories:["automotive"]},plumber:{entities:["business"],categories:["home_services"],keywords:["plumber"]},electrician:{entities:["business"],categories:["home_services"],keywords:["electrician"]},"home services":{entities:["business"],categories:["home_services"]},repair:{entities:["business"],categories:["home_services","services"]},lawyer:{entities:["business"],categories:["professional"],keywords:["lawyer"]},attorney:{entities:["business"],categories:["professional"],keywords:["attorney"]},accountant:{entities:["business"],categories:["professional","financial_services"],keywords:["accountant"]},insurance:{entities:["business"],categories:["financial_services"],keywords:["insurance"]},bank:{entities:["business"],categories:["financial_services"],keywords:["bank"]}
656,entertainment:{entities:["business","event"],categories:["entertainment"]},fun:{entities:["business","event"],categories:["entertainment","family"]},events:{entities:["event"]},event:{entities:["event"]},"things to do":{entities:["event","business"],categories:["entertainment","family"]},"what's on":{entities:["event"]},"whats on":{entities:["event"]},"what to do":{entities:["event","business"],categories:["entertainment","family"]},"this weekend":{entities:["event"]},weekend:{entities:["event"]},market:{entities:["event"],categories:["market"]},markets:{entities:["event"],categories:["market"]},festival:{entities:["event"],categories:["festival"]},festivals:{entities:["event"],categories:["festival"]},music:{entities:["event"],categories:["music"]},"live music":{entities:["event"],categories:["music"],tags:["live music"]},concert:{entities:["event"],categories:["music"],keywords:["concert"]},party:{entities:["event"],categories:["entertainment","music"],keywords:["party"]},family:{entities:["event","business"],categories:["family"],tags:["family-friendly"]},kids:{entities:["event","business"],categories:["family"],tags:["family-friendly","kids"]},children:{entities:["event","business"],categories:["family"],tags:["family-friendly","kids"]},sport:{entities:["event"],categories:["sports"]},sports:{entities:["event"],categories:["sports"]},arts:{entities:["event"],categories:["arts"]},art:{entities:["event"],categories:["arts"]},culture:{entities:["event"],categories:["culture"]},community:{entities:["event"],categories:["community"]},education:{entities:["event","business"],categories:["education"]},rentals:{entities:["property"]},rental:{entities:["property"]},rent:{entities:["property"]},"to rent":{entities:["property"]},"to let":{entities:["property"]},property:{entities:["property"]},properties:{entities:["property"]},house:{entities:["property"]},houses:{entities:["property"]},apartment:{entities:["property"]},apartments:{entities:["property"]},flat:{entities:["property"]},flats:{entities:["property"]},townhouse:{entities:["property"]},studio:{entities:["property"]},cottage:{entities:["property"]},penthouse:{entities:["property"]},news:{entities:["news"]},article:{entities:["news"]},articles:{entities:["news"]},suburbs:{entities:["suburb"]},suburb:{entities:["suburb"]},areas:{entities:["suburb"]},area:{entities:["suburb"]}};function Mae(e){const t=e.trim().toLowerCase();if(!t)return null;if(xv[t])return xv[t];for(const[n,r]of Object.entries(xv))if(t.startsWith(n+" ")){const a=t.slice(n.length).trim().match(/^(?:in|near|around|at)\s+(.+)$/),o=a?a[1].trim():"";return{...r,suburb:o||void 0}}return null}const Lae=e=>(e||"").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim(),Dae=[{key:"all",label:"All"},{key:"businesses",label:"Businesses"},{key:"events",label:"Events"},{key:"properties",label:"Rentals"},{key:"news",label:"News"},{key:"suburbs",label:"Suburbs"}];function Iae(){var N,C;Mt("Search This is Randburg | Businesses, Events, Rentals, News & Suburbs","",{noindex:!0});const e=wt(),t=new URLSearchParams(window.location.search),[n,r]=E.useState(t.get("q")||""),[i,a]=E.useState("all"),[o,c]=E.useState(null),[d,h]=E.useState(!1),g=E.useRef(new Map),{data:f}=De({queryKey:["search-businesses"],queryFn:async()=>(await ie.entities.Business.list()).filter(S=>S.status==="active"),initialData:[]}),{data:m}=De({queryKey:["search-events"],queryFn:async()=>(await ie.entities.Event.list()).filter(S=>S.status==="published"),initialData:[]}),{data:p}=De({queryKey:["search-properties"],queryFn:async()=>(await ie.entities.Property.list()).filter(S=>S.status==="available"),initialData:[]}),{data:w}=De({queryKey:["search-news"],queryFn:async()=>(await ie.entities.NewsArticle.list()).filter(S=>S.status==="published"),initialData:[]}),{data:x}=De({queryKey:["search-suburbs"],queryFn:()=>ie.entities.Suburb.list(),initialData:[]});E.useEffect(()=>{const S=n.trim();if(!S){c(null),h(!1);return}const P=Mae(S);if(P){c(P),h(!1);return}const R=S.toLowerCase();if(g.current.has(R)){c(g.current.get(R)),h(!1);return}h(!0);const L=setTimeout(async()=>{try{const D=await ie.integrations.Core.InvokeLLM({prompt:`Parse this search query for a Randburg local discovery platform: "${S}" 657 658Available entity types: business, event, property, news, suburb 659Business categories: restaurant, cafe, bar_lounge, retail, services, healthcare, education, entertainment, fitness, beauty, spa_wellness, professional, automotive, home_services, real_estate, hospital
659ity, pet_services, technology, financial_services, other 660Event categories: entertainment, sports, food, family, arts, culture, education, business, community, music, festival, market, other 661 662Return structured filters. If the query mentions a suburb (e.g. Ferndale, Blairgowrie, Randpark Ridge, Linden), include it. If it mentions tags or attributes (like "family-friendly", "outdoor", "breakfast", "pet-friendly"), include those in tags. If it contains free-text keywords that don't map to categories, put them in keywords.`,response_json_schema:{type:"object",properties:{entities:{type:"array",items:{type:"string"},description:"Entity types to search: business, event, property, news, suburb"},categories:{type:"array",items:{type:"string"}},suburb:{type:"string"},tags:{type:"array",items:{type:"string"}},keywords:{type:"array",items:{type:"string"}}}}});g.current.set(R,D),c(D)}catch{c({keywords:[S.toLowerCase()]})}finally{h(!1)}},400);return()=>clearTimeout(L)},[n]);const v=E.useMemo(()=>{var H,Y,G;const S=n.trim().toLowerCase();if(!o)return{businesses:[],events:[],properties:[],news:[],suburbs:[]};const P=o,R=P.entities||[],L=$=>R.length===0||R.includes($),D=((H=P.categories)==null?void 0:H.length)>0||((Y=P.tags)==null?void 0:Y.length)>0||((G=P.keywords)==null?void 0:G.length)>0||P.suburb,T=$=>!P.categories||P.categories.length===0?!0:P.categories.some(I=>$===I),O=$=>P.suburb?$&&$.toLowerCase().includes(P.suburb.toLowerCase()):!0,M=$=>!P.tags||P.tags.length===0?!0:!$||$.length===0?!1:P.tags.some(I=>$.some(B=>B.toLowerCase().includes(I.toLowerCase())||I.toLowerCase().includes(B.toLowerCase()))),U=(...$)=>!P.keywords||P.keywords.length===0?!0:P.keywords.some(I=>$.some(B=>B&&B.toLowerCase().includes(I.toLowerCase()))),z=(...$)=>D||!S?!0:$.some(I=>I&&I.toLowerCase().includes(S));return{businesses:L("business")?f.filter($=>$.status!=="active"?!1:T($.category)&&O($.suburb)&&M($.tags)&&U($.name,$.description,$.tagline)&&z($.name,$.description,$.suburb,$.category,...$.tags||[])):[],events:L("event")?m.filter($=>$.status!=="published"?!1:T($.category)&&O($.suburb)&&M($.tags)&&U($.title,$.description,$.venue_name)&&z($.title,$.description,$.venue_name,$.suburb,...$.tags||[])):[],properties:L("property")?p.filter($=>$.status!=="available"?!1:O($.suburb)&&M($.tags)&&U($.title,$.description)&&z($.title,$.description,$.suburb,...$.tags||[])):[],news:L("news")?w.filter($=>U($.title,$.excerpt)&&z($.title,$.excerpt,$.category)):[],suburbs:L("suburb")?x.filter($=>U($.name,$.description,$.area)&&z($.name,$.description,$.area)):[]}},[o,n,f,m,p,w,x]),y=v.businesses.length+v.events.length+v.properties.length+v.news.length+v.suburbs.length,j=S=>i==="all"||i===S,_=S=>S.preventDefault();return s.jsx("div",{className:"min-h-screen bg-white",children:s.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-10 md:py-14",children:[s.jsx("h1",{className:"text-3xl md:text-5xl font-black text-gray-900 mb-2",children:"Search Randburg"}),s.jsxs("p",{className:"text-gray-500 text-sm mb-6 flex items-center gap-1.5",children:[s.jsx(ln,{className:"w-4 h-4 text-purple-500"}),'AI-powered â try "coffee in Ferndale" or "things to do with kids"']}),s.jsxs("form",{onSubmit:_,className:"relative mb-5",children:[s.jsx(us,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx(de,{autoFocus:!0,placeholder:"Search businesses, events, rentals, news, suburbs...",value:n,onChange:S=>r(S.target.value),className:"pl-11 h-12 bg-gray-50 border-gray-200 rounded-xl text-base"}),d&&s.jsxs("div",{className:"absolute right-4 top-1/2 -translate-y-1/2 flex items-center gap-2 text-xs text-purple-500 font-medium",children:[s.jsx(Ke,{className:"w-4 h-4 animate-spin"}),"AI searching..."]})]}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-8",children:Dae.map(S=>s.jsx("button",{onClick:()=>a(S.key),className:`px-4 py-2 rounded-full text-sm font-semibold transition-colors ${i===S.key?"bg-gray-900 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:S.label},S.key))}),n.trim()&&s.jsx("p",{className:"text-sm text-gray-400 mb-6",children:d?"Searching...":`${y} result${y===1?"":"s"} for "${n}"`}),s.jsxs("div",{className:"space-y-10",children:[j("businesses")&&v.businesses.length>0&&s.jsx(Kc,{icon:Zn,title:"Businesses",count:v.businesses.length,color:"text-purple-500",seeAllUrl:((N=o==null?void 0:o.categories)==null?void 0:N.length)===1?`/businesses?category=${o.categories[0]}`:"/businesses",children:v.businesses.slice(0,9).map(S=>s.jsx(Gc,{image:S.main_image_url,title:S.name,subtitle:S.suburb,tags:S.tags,onClick:()=>e(`/business/${S.slug||S.id}`)},S.id))}),j("events")&&v.events.length>0&&s.jsx(Kc,{icon:an,title:"Events",count:v.events.length,color:"text-pink-500",seeAllUrl:((C=o==null?void 0:o.categories)==null?void 0:C.length)===1?`/events?category=${o.categories[0]}`:"/events",children:v.events.slice(0,9).map(S=>s.jsx(Gc,{image:S.main_image_url,title:S.title,subtitle:S.venue_name,tags:S.tags,onClick:()=>e(`/event/${S.id}`)},S.id))}),j("properties")&&v.properties.length>0&&s.jsx(Kc,{icon:El,title:"Rentals",count:v.properties.length,color:"text-blue-500",seeAllUrl:"/rentals",children:v.properties.slice(0,9).map(S=>s.jsx(Gc,{image:S.main_image_url,title:S.title,subtitle:S.suburb,tags:S.tags,onClick:()=>e(`/property/${S.id}`)},S.id))}),j("news")&&v.news.length>0&&s.jsx(Kc,{icon:fi,title:"News",count:v.news.length,color:"text-gray-700",seeAllUrl:"/news",children:v.news.slice(0,9).map(S=>s.jsx(Gc,{image:S.main_image_url,title:S.title,subtitle:S.category,onClick:()=>e(`/news/${Lae(S.title)}`)},S.id))}),j("suburbs")&&v.suburbs.length>0&&s.jsx(Kc,{icon:pn,title:"Suburbs",count:v.suburbs.length,color:"text-lime-600",seeAllUrl:"/suburbs",children:v.suburbs.slice(0,9).map(S=>s.jsx(Gc,{image:S.hero_image_url,title:S.name,subtitle:S.area,onClick:()=>e(`/suburbs/${S.slug}`)},S.id))}),n.trim()&&!d&&y===0&&s.jsxs("div",{className:"text-center py-16",children:[s.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(us,{className:"w-7 h-7 text-gray-300"})}),s.jsxs("p",{className:"text-gray-500 font-medium",children:['No results for "',n,'"']}),s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Try a different search term or browse our categories"})]}),!n.trim()&&s.jsxs("div",{className:"text-center py-16",children:[s.jsx("div",{className:"w-16 h-16 bg-purple-50 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(ln,{className:"w-7 h-7 text-purple-400"})}),s.jsx("p",{className:"text-gray-500 font-medium",children:"Start searching to discover Randburg"}),s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:'Try "restaurants", "coffee in Ferndale", or "things to do this weekend"'})]})]})]})})}function Kc({icon:e,title:t,count:n,color:r,seeAllUrl:i,children:a}){const o=wt();return s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h2",{className:"text-lg font-black text-gray-900 flex items-center gap-2",children:[s.jsx(e,{className:`w-5 h-5 ${r}`}),t,s.jsxs("span",{className:"text-sm font-normal text-gray-400",children:["(",n,")"]})]}),i&&n>9&&s.jsxs("button",{onClick:()=>o(i),className:"text-sm font-semibold text-gray-500 hover:text-gray-900 flex items-center gap-1 transition-colors",children:["See all ",s.jsx(Wr,{className:"w-3.5 h-3.5"})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:a})]})}function Gc({image:e,title:t,subtitle:n,tags:r,onClick:i}){return s.jsxs("div",{onClick:i,className:"group flex gap-3 rounded-xl border border-gray-100 hover:shadow-md transition-all cursor-pointer p-3 bg-white",children:[s.jsx("div",{className:"w-16 h-16 flex-shrink-0 rounded-lg overflow-hidden bg-gray-100",children:e&&s.jsx("img",{src:e,alt:t,className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h3",{className:"font-bold text-gray-900 text-sm line-clamp-2",children:t}),n&&s.jsx("p",{className:"text-gray-400 text-xs mt-0.5 capitalize",children:n}),r&&r.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:r.slice(0,3).map((a,o)=>s.jsx("span",{className:"text-[10px] font-medium text-gray-500 bg-gray-100 px-1.5 py-0.5 rounded-full",children:a},o))})]})]})}const PE=e=>(e||"").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim();function Fae(){const{slug:e}=xi(),t=wt(),{data:n,isLoading:r}=De({queryKey:["intention-tiles-all"],queryFn:()=>ie.entities.IntentionTile.list()}),{data:i,isLoading:a}=De({queryKey:["mood-collections-all"],queryFn:()=>ie.entities.MoodCollection.list()}),o=E.useMemo(()=>{const L=(n||[]).find(T=>T.slug===e);if(L)return{...L,kind:"intention"};const D=(i||[]).find(T=>(T.slug||PE(T.name))===e);return D?{...D,kind:"mood"}:null},[e,n,i]),c=((o==null?void 0:o.match_tags)||[]).map(L=>L.toLowerCase()),d=((o==null?void 0:o.match_categories)||[]).map(L=>L.toLowerCase()),{data:h}=De({queryKey:["collection-businesses"],queryFn:async()=>(await ie.entities.Business.list()).filter(L=>L.status==="active"),initialData:[]}),{data:g}=De({queryKey:["collection-events"],queryFn:async()=>(await ie.entities.Event.list()).filter(L=>L.status==="published"),initialData:[]}),{data:f}
662=De({queryKey:["collection-properties"],queryFn:async()=>(await ie.entities.Property.list()).filter(L=>L.status==="available"),initialData:[]}),{data:m}=De({queryKey:["collection-groups"],queryFn:async()=>(await ie.entities.CommunityGroup.list()).filter(L=>L.status==="active"),initialData:[]}),{data:p}=De({queryKey:["collection-news"],queryFn:async()=>(await ie.entities.NewsArticle.list()).filter(L=>L.status==="published"),initialData:[]}),w=r||a,x=(L,D)=>{if(c.length===0&&d.length===0)return!1;const T=(L.tags||[]).map(z=>z.toLowerCase()),O=c.length>0&&T.some(z=>c.includes(z)),M=(L[D]||"").toLowerCase(),U=d.length>0&&d.includes(M);return c.length===0?U:d.length===0?O:O||U},v=E.useMemo(()=>o?{businesses:h.filter(L=>x(L,"category")),events:g.filter(L=>x(L,"category")),properties:f.filter(L=>x(L,"property_type")),groups:m.filter(L=>x(L,"category")),news:p.filter(L=>x(L,"category"))}:{businesses:[],events:[],properties:[],groups:[],news:[]},[o,h,g,f,m,p,c.join(","),d.join(",")]),y=v.businesses.length+v.events.length+v.properties.length+v.groups.length+v.news.length,j=o?`${o.name} â Randburg`:"Collection â Randburg",_=(o==null?void 0:o.subtitle)||`Discover ${(o==null?void 0:o.name)||"Randburg"} â businesses, events, rentals and more.`,N=`/collections/${e}`,C=o?{"@context":"https://schema.org","@type":"ItemList",name:o.name,description:_,itemListElement:[...v.businesses.map((L,D)=>({"@type":"ListItem",position:D+1,name:L.name,url:_b(`/business/${L.slug||L.id}`)}))].slice(0,20)}:null;if(Mt(j,_,{canonicalPath:N,jsonLd:C,type:"website"}),w)return s.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:s.jsx(Ke,{className:"w-8 h-8 animate-spin text-gray-300"})});if(!o)return s.jsxs("div",{className:"min-h-[60vh] flex flex-col items-center justify-center text-center px-4",children:[s.jsx(bv,{className:"w-12 h-12 text-gray-300 mb-4"}),s.jsx("h1",{className:"text-2xl font-black text-gray-900 mb-2",children:"Collection not found"}),s.jsx("p",{className:"text-gray-500 mb-6",children:"This collection doesn't exist or has been removed."}),s.jsxs("button",{onClick:()=>t("/"),className:"text-sm font-semibold text-gray-700 hover:text-gray-900 flex items-center gap-1",children:[s.jsx(fr,{className:"w-4 h-4"})," Back home"]})]});const S=v.businesses.filter(L=>!L.discovery_source||L.owner_email),P=v.businesses.filter(L=>L.discovery_source&&!L.owner_email),R=[{key:"businesses",label:"Local Businesses",icon:Zn,color:"text-purple-500",items:S,link:L=>`/business/${L.slug||L.id}`,title:L=>L.name,sub:L=>L.suburb,img:L=>L.main_image_url},{key:"events",label:"Events",icon:an,color:"text-pink-500",items:v.events,link:L=>`/event/${L.id}`,title:L=>L.title,sub:L=>L.venue_name,img:L=>L.main_image_url},{key:"properties",label:"Rentals",icon:El,color:"text-blue-500",items:v.properties,link:L=>`/property/${L.id}`,title:L=>L.title,sub:L=>L.suburb,img:L=>L.main_image_url},{key:"groups",label:"Community",icon:ll,color:"text-emerald-500",items:v.groups,link:L=>`/community/${L.slug}`,title:L=>L.name,sub:L=>L.suburb,img:L=>L.main_image_url},{key:"news",label:"Stories",icon:fi,color:"text-gray-700",items:v.news,link:L=>`/news/${PE(L.title)}`,title:L=>L.title,sub:L=>L.category,img:L=>L.main_image_url},{key:"discovered-businesses",label:"Discovered Businesses",icon:Zn,color:"text-gray-500",items:P,link:L=>`/business/${L.slug||L.id}`,title:L=>L.name,sub:L=>L.suburb,img:L=>L.main_image_url}];return s.jsx("div",{className:"min-h-screen bg-white",children:s.jsxs("div",{className:"max-w-[1220px] mx-auto px-4 sm:px-6 lg:px-8 py-10 md:py-16",children:[s.jsxs("button",{onClick:()=>t("/"),className:"text-xs font-semibold text-gray-400 hover:text-gray-700 flex items-center gap-1 mb-6",children:[s.jsx(fr,{className:"w-3.5 h-3.5"})," Home"]}),s.jsxs("div",{className:"mb-10 md:mb-14",children:[s.jsx("p",{className:"text-[11px] font-black uppercase tracking-[.8px] mb-2",style:{color:"#f47645"},children:o.kind==="mood"?"Mood collection":"Intention"}),s.jsx("h1",{className:"text-3xl md:text-6xl font-black text-[#17201d] leading-[1.02] tracking-[-2.5px] mb-3",children:o.name}),o.subtitle&&s.jsx("p",{className:"text-lg md:text-xl text-gray-500 max-w-2xl",children:o.subtitle}),s.jsxs("p",{className:"text-sm text-gray-400 mt-4",children:[y," ",y===1?"result":"results"]})]}),y===0?s.jsxs("div",{className:"text-center py-20",children:[s.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(bv,{className:"w-7 h-7 text-gray-300"})}),s.jsx("p",{className:"text-gray-500 font-medium",children:"No matches for this collection yet"}),s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"As more places get tagged, they'll appear here."})]}):s.jsx("div",{className:"space-y-14",children:R.filter(L=>L.items.length>0).map(L=>s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[s.jsx(L.icon,{className:`w-5 h-5 ${L.color}`}),s.jsx("h2",{className:"text-xl font-black text-gray-900",children:L.label}),s.jsxs("span",{className:"text-sm font-normal text-gray-400",children:["(",L.items.length,")"]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:L.items.map(D=>s.jsxs("button",{onClick:()=>t(L.link(D)),className:"group flex gap-3 rounded-2xl border border-gray-100 hover:shadow-md transition-all text-left p-3 bg-white",children:[s.jsx("div",{className:"w-20 h-20 flex-shrink-0 rounded-xl overflow-hidden bg-gray-100",children:L.img(D)&&s.jsx("img",{src:L.img(D),alt:L.title(D),className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"min-w-0 flex-1 py-0.5",children:[s.jsx("h3",{className:"font-bold text-gray-900 text-sm line-clamp-2",children:L.title(D)}),L.sub(D)&&s.jsx("p",{className:"text-gray-400 text-xs mt-1 capitalize",children:L.sub(D)}),D.tags&&D.tags.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:D.tags.slice(0,3).map((T,O)=>s.jsx("span",{className:"text-[10px] font-medium text-gray-500 bg-gray-100 px-1.5 py-0.5 rounded-full",children:T},O))})]})]},D.id))})]},L.key))})]})})}function Bae({suburb:e,suburbs:t,onChange:n,count:r}){return s.jsxs("div",{className:"mb-8 flex flex-col gap-3 rounded-2xl border border-border bg-muted/40 p-4 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:[r," ",r===1?"centre":"centres"," found"]}
662),s.jsxs(pt,{value:e,onValueChange:n,children:[s.jsx(dt,{className:"h-11 bg-background sm:w-64",children:s.jsx(gt,{placeholder:"All suburbs"})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"all",children:"All suburbs"}),t.map(i=>s.jsx(Ae,{value:i,children:i},i))]})]})]})}function qae(){const e=hr(),t=wt(),n=new URLSearchParams(e.search).get("suburb")||"all";Mt("Randburg Malls & Shopping Centres | This is Randburg","Explore malls, neighbourhood shopping centres and retail destinations across Randburg, filtered by suburb.",{canonicalPath:"/malls-centres"});const{data:r=[],isLoading:i}=De({queryKey:["shopping-centres"],queryFn:()=>ie.entities.ShoppingCentre.list("name")}),a=[...new Set(r.map(d=>d.suburb).filter(Boolean))].sort(),o=n==="all"?r:r.filter(d=>d.suburb===n),c=d=>t(d==="all"?"/malls-centres":`/malls-centres?suburb=${encodeURIComponent(d)}`);return s.jsx("main",{className:"min-h-screen bg-background",children:s.jsxs("div",{className:"mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8 lg:py-16",children:[s.jsxs("div",{className:"mb-9 max-w-3xl",children:[s.jsx("div",{className:"mb-4 grid h-12 w-12 place-items-center rounded-2xl bg-secondary",children:s.jsx(Zn,{className:"h-6 w-6 text-primary"})}),s.jsx("h1",{className:"text-4xl font-black tracking-tight text-foreground md:text-6xl",children:"Malls & Centres"}),s.jsx("p",{className:"mt-3 text-lg leading-relaxed text-muted-foreground",children:"Discover Randburgâs major malls, community centres and neighbourhood shopping destinations."})]}),s.jsx(Bae,{suburb:n,suburbs:a,onChange:c,count:o.length}),i?s.jsx("div",{className:"grid gap-5 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6}).map((d,h)=>s.jsx(Ot,{className:"h-64 rounded-2xl"},h))}):s.jsx("div",{className:"grid gap-5 md:grid-cols-2 lg:grid-cols-3",children:o.map(d=>s.jsx(g3,{centre:d},d.id))})]})})}const Vf=({icon:e,children:t})=>t?s.jsxs("div",{className:"flex items-start gap-3 text-sm",children:[s.jsx(e,{className:"mt-0.5 h-4 w-4 shrink-0 text-primary"}),s.jsx("span",{children:t})]}):null;function Uae({centre:e}){var t;return s.jsxs("div",{className:"grid gap-8 lg:grid-cols-[1fr_340px]",children:[s.jsxs("article",{children:[s.jsxs("div",{className:"mb-4 flex flex-wrap gap-2",children:[s.jsx(rt,{children:e.category==="malls"?"Mall":"Shopping centre"}),(t=e.tags)==null?void 0:t.slice(0,4).map(n=>s.jsx(rt,{variant:"secondary",children:n},n))]}),s.jsx("h1",{className:"text-4xl font-black tracking-tight text-foreground md:text-6xl",children:e.name}),s.jsx("p",{className:"mt-6 text-base leading-8 text-muted-foreground md:text-lg",children:e.description}),e.disclaimer_notice&&s.jsx("p",{className:"mt-8 border-t border-border pt-5 text-xs text-muted-foreground",children:e.disclaimer_notice})]}),s.jsxs("aside",{className:"h-fit space-y-5 rounded-2xl border border-border bg-card p-6 shadow-sm",children:[s.jsx("h2",{className:"text-lg font-bold text-card-foreground",children:"Centre details"}),s.jsx(Vf,{icon:pn,children:e.address}),s.jsx(Vf,{icon:ro,children:e.contact_phone}),s.jsx(Vf,{icon:Hu,children:e.contact_email}),s.jsx(Vf,{icon:Q0,children:e.operating_hours}),e.website&&s.jsxs("a",{href:e.website,target:"_blank",rel:"noreferrer",className:"flex items-center gap-3 text-sm font-semibold text-primary hover:underline",children:[s.jsx(Vu,{className:"h-4 w-4"}),"Visit website"]})]})]})}function $ae(){var a;const{slug:e}=xi(),{data:t=[],isLoading:n}=De({queryKey:["shopping-centre",e],queryFn:()=>ie.entities.ShoppingCentre.filter({slug:e},"name",1)}),r=t[0],i=`/malls-centres/${e}`;return Mt(r?`${r.name}, Randburg | This is Randburg`:"Shopping Centre | This is Randburg",((a=r==null?void 0:r.description)==null?void 0:a.slice(0,155))||"Explore shopping centres in Randburg.",{canonicalPath:i,image:r==null?void 0:r.main_image_url,jsonLd:r?[XO(r,i),wi([{name:"Home",path:"/"},{name:"Malls & Centres",path:"/malls-centres"},{name:r.name}])]:null}),n?s.jsx("main",{className:"mx-auto min-h-screen max-w-7xl px-4 py-12",children:s.jsx(Ot,{className:"h-96 rounded-2xl"})}):r?s.jsx("main",{className:"min-h-screen bg-background",children:s.jsxs("div",{className:"mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8 lg:py-16",children:[s.jsxs(Jt,{to:"/malls-centres",className:"mb-9 inline-flex items-center gap-2 text-sm font-semibold text-muted-foreground hover:text-foreground",children:[s.jsx(fr,{className:"h-4 w-4"}),"All malls & centres"]}),s.jsx(Uae,{centre:r})]})}):s.jsxs("main",{className:"min-h-[60vh] bg-background px-4 py-20 text-center",children:[s.jsx("h1",{className:"text-3xl font-black",children:"Centre not found"}),s.jsx(Jt,{to:"/malls-centres",className:"mt-5 inline-block font-semibold text-primary",children:"View all centres"})]})}const zae=["restaurant","cafe","bar_lounge","retail","services","healthcare","education","entertainment","fitness","beauty","spa_wellness","professional","automotive","home_services","real_estate","hospital
662ity","pet_services","technology","financial_services","other"],Vae=e=>e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");function Hae(){var U,z;Mt("Edit Your Listing | This is Randburg","",{noindex:!0});const{id:e}=xi(),t=wt(),n=dn(),[r,i]=E.useState(null),[a,o]=E.useState(!1),[c,d]=E.useState(!1),[h,g]=E.useState(""),[f,m]=E.useState(""),[p,w]=E.useState(""),[x,v]=E.useState(!1),{data:y,isLoading:j}=De({queryKey:["business-edit",e],queryFn:async()=>ie.entities.Business.get(e),enabled:!!e});E.useEffect(()=>{y&&i({name:y.name||"",slug:y.slug||"",tagline:y.tagline||"",description:y.description||"",category:y.category||"",parent_categories:Nb(y),suburb:y.suburb||"",address:y.address||"",contact_phone:y.contact_phone||"",contact_email:y.contact_email||"",website:y.website||"",social_links:y.social_links||[],main_image_url:y.main_image_url||"",additional_image_urls:y.additional_image_urls||[],operating_hours:y.operating_hours||"",features:y.features||[],status:y.status||"active",tags:y.tags||[]})},[y]);const _=(H,Y)=>i(G=>({...G,[H]:Y})),N=H=>{H.replace(/\s/g,"").length<=30&&_("tagline",H)},C=async H=>{var G;const Y=(G=H.target.files)==null?void 0:G[0];if(Y){if(!Y.type.match(/^image\/(jpeg|jpg|png)$/)){alert("Please upload a JPEG or PNG image.");return}if(Y.size>1024*1024){alert("Please upload an image smaller than 1MB.");return}o(!0);try{const{file_url:$}=await ie.integrations.Core.UploadFile({file:Y});_("main_image_url",$)}finally{o(!1)}}},S=async H=>{var I;const Y=Array.from(H.target.files||[]);if(Y.length===0)return;if(Y.filter(B=>!B.type.match(/^image\/(jpeg|jpg|png)$/)).length>0){alert("Please upload only JPEG or PNG images for the gallery.");return}if(Y.find(B=>B.size>500*1024)){alert("Gallery images must be smaller than 500KB each.");return}if((((I=r.additional_image_urls)==null?void 0:I.length)||0)+Y.length>5){alert("You can upload up to 5 additional images.");return}d(!0);try{const V=(await Promise.all(Y.map(q=>ie.integrations.Core.UploadFile({file:q})))).map(q=>q.file_url);_("additional_image_urls",[...r.additional_image_urls||[],...V].slice(0,5))}finally{d(!1)}},P=H=>{_("additional_image_urls",(r.additional_image_urls||[]).filter((Y,G)=>G!==H))},R=()=>{h.trim()&&(_("features",[...r.features||[],h.trim()]),g(""))},L=H=>{_("features",(r.features||[]).filter((Y,G)=>G!==H))},D=()=>{f.trim()&&p.trim()&&(_("social_links",[...r.social_links||[],{platform:f.trim(),url:p.trim()}]),m(""),w(""))},T=H=>{_("social_links",(r.social_links||[]).filter((Y,G)=>G!==H))},O=Ct({mutationFn:H=>ie.entities.Business.update(e,H),onSuccess:()=>{n.invalidateQueries({queryKey:["business"]}),n.invalidateQueries({queryKey:["businesses"]}),n.invalidateQueries({queryKey:["user-businesses"]}),n.invalidateQueries({queryKey:["business-edit",e]}),v(!0),setTimeout(()=>t(`/business/${y.slug||e}`),1500)}}),M=H=>{var Y;if(H.preventDefault(),!((Y=r.parent_categories)!=null&&Y.length)){alert("Please select at least one main category.");return}O.mutate(r)};return j||!r?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:s.jsx(Ke,{className:"w-8 h-8 animate-spin text-gray-400"})}):x?s.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:s.jsxs(Ge,{className:"max-w-md w-full p-8 text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(cs,{className:"w-10 h-10 text-green-600"})}),s.jsx("h2",{className:"text-2xl font-black text-gray-900 mb-2",children:"Listing Updated!"}),s.jsx("p",{className:"text-gray-600",children:"Your changes are live. Redirecting to your pageâ¦"})]})}):s.jsx("div",{className:"min-h-screen bg-gray-50 py-8 md:py-12",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:[s.jsxs("button",{onClick:()=>t(`/business/${y.slug||e}`),className:"text-xs font-semibold text-gray-400 hover:text-gray-700 flex items-center gap-1 mb-4",children:[s.jsx(fr,{className:"w-3.5 h-3.5"})," Back to listing"]}),s.jsxs("div",{className:"mb-6 md:mb-8",children:[s.jsx("p",{className:"text-xs font-bold uppercase tracking-widest mb-1.5",style:{color:"#f47645"},children:"You claimed this page"}),s.jsx("h1",{className:"text-3xl md:text-4xl font-black text-gray-900 mb-2",children:"Edit your listing"}),s.jsx("p",{className:"text-lg text-gray-600",children:y.name})]}),s.jsx(Ge,{className:"p-6 md:p-8",children:s.jsxs("form",{onSubmit:M,className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Business N
662ame"}),s.jsx(de,{value:r.name,onChange:H=>_("name",H.target.value),required:!0})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"URL Slug"}),s.jsx(de,{value:r.slug,onChange:H=>_("slug",H.target.value)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Tagline"}),s.jsx(de,{value:r.tagline,onChange:H=>N(H.target.value),placeholder:"A short catchy phrase about your business"}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Max 30 characters (excluding spaces). ",30-(r.tagline||"").replace(/\s/g,"").length," remaining"]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Description"}),s.jsx(un,{rows:4,value:r.description,onChange:H=>_("description",H.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Main Categories * (choose up to 3)"}),s.jsx(Ju,{value:r.parent_categories||[],onChange:H=>_("parent_categories",H)})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Specific Category"}),s.jsxs(pt,{value:r.category,onValueChange:H=>_("category",H),children:[s.jsx(dt,{children:s.jsx(gt,{placeholder:"Select category"})}),s.jsx(ft,{children:zae.map(H=>s.jsx(Ae,{value:H,children:Vae(H)},H))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Suburb"}),s.jsx(po,{value:r.suburb,onChange:H=>_("suburb",H)})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Address"}),s.jsx(de,{value:r.address,onChange:H=>_("address",H.target.value)})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Phone"}),s.jsx(de,{value:r.contact_phone,onChange:H=>_("contact_phone",H.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Email"}),s.jsx(de,{type:"email",value:r.contact_email,onChange:H=>_("contact_email",H.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Website"}),s.jsx(de,{value:r.website,onChange:H=>_("website",H.target.value),placeholder:"https://..."})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Social Media Links (up to 10)"}),s.jsxs("div",{className:"space-y-3 mt-2",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(de,{value:f,onChange:H=>m(H.target.value),placeholder:"Platform (e.g., Facebook, Instagram)",className:"flex-1"}),s.jsx(de,{value:p,onChange:H=>w(H.target.value),placeholder:"https://...",className:"flex-1"}),s.jsx(ge,{type:"button",onClick:D,variant:"outline",size:"sm",disabled:(r.social_links||[]).length>=10||!f.trim()||!p.trim(),children:s.jsx(Cr,{className:"w-4 h-4"})})]}),(r.social_links||[]).length>0&&s.jsx("div",{className:"space-y-2",children:r.social_links.map((H,Y)=>s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-gray-50 rounded",children:[s.jsxs("span",{className:"font-medium text-sm flex-shrink-0",children:[H.platform,":"]}),s.jsx("span",{className:"text-sm text-gray-600 truncate flex-1",children:H.url}),s.jsx("button",{type:"button",onClick:()=>T(Y),className:"text-red-600 hover:text-red-700 flex-shrink-0",children:s.jsx(kt,{className:"w-4 h-4"})})]},Y))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Operating Hours"}),s.jsx(un,{rows:3,value:r.operating_hours,onChange:H=>_("operating_hours",H.target.value),placeholder:"e.g. Mon-Fri: 9am-5pm, Sat: 10am-2pm"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Features & Amenities"}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsx(de,{value:h,onChange:H=>g(H.target.value),onKeyPress:H=>{H.key==="Enter"&&(H.preventDefault(),R())},placeholder:"Add a feature"}),s.jsx(ge,{type:"button",onClick:R,variant:"outline",size:"sm",disabled:!h.trim(),children:"Add"})]}),((U=r.features)==null?void 0:U.length)>0&&s.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:r.features.map((H,Y)=>s.jsxs(rt,{variant:"secondary",className:"flex items-center gap-1",children:[H,s.jsx("button",{type:"button",onClick:()=>L(Y),className:"ml-1 hover:text-red-600",children:s.jsx(kt,{className:"w-3 h-3"})})]},Y))})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Discoverability Tags"}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Add tags to help people find your business in search."}),s.jsx("div",{className:"mt-2",children:s.jsx(ma,{tags:r.tags||[],onChange:H=>_("tags",H),context:{name:r.name,description:r.description,category:r.category,parent_categories:r.parent_categories,suburb:r.suburb},entityType:"business",onParentCategoriesChange:H=>_("parent_categories",H)})})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Status"}),s.jsxs(pt,{value:r.status,onValueChange:H=>_("status",H),children:[s.jsx(dt,{children:s.jsx(gt,{})}),s.jsxs(ft,{children:[s.jsx(Ae,{value:"active",children:"Active"}),s.jsx(Ae,{value:"inactive",children:"Inactive"})]})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Main Image (max 1MB, JPEG/PNG)"}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"edit_main_image",accept:"image/jpeg,image/jpg,image/png",onCh
662ange:C,className:"hidden"}),s.jsx("label",{htmlFor:"edit_main_image",className:"block border-2 border-dashed rounded-lg p-4 text-center cursor-pointer",children:a?"Uploading...":r.main_image_url?s.jsx("img",{src:r.main_image_url,alt:"Main",className:"h-32 mx-auto object-cover rounded"}):"Click to upload main image"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Gallery Images (up to 5, max 500KB each, JPEG/PNG)"}),s.jsxs("div",{className:"mt-2",children:[s.jsx("input",{type:"file",id:"edit_gallery_images",accept:"image/jpeg,image/jpg,image/png",multiple:!0,onChange:S,className:"hidden"}),s.jsx("label",{htmlFor:"edit_gallery_images",className:"block border-2 border-dashed rounded-lg p-4 text-center cursor-pointer",children:c?"Uploading...":"Click to upload gallery images"}),((z=r.additional_image_urls)==null?void 0:z.length)>0&&s.jsx("div",{className:"grid grid-cols-3 gap-3 mt-3",children:r.additional_image_urls.map((H,Y)=>s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:H,alt:`img-${Y}`,className:"w-full h-24 object-cover rounded"}),s.jsx("button",{type:"button",onClick:()=>P(Y),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-1",children:s.jsx(kt,{className:"w-4 h-4"})})]},Y))})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-4 pt-2",children:[s.jsx(ge,{type:"button",variant:"outline",onClick:()=>t(`/business/${y.slug||e}`),children:"Cancel"}),s.jsx(ge,{type:"submit",disabled:O.isPending,className:"font-bold text-black",style:{backgroundColor:"#cafc05"},children:O.isPending?s.jsxs(s.Fragment,{children:[s.jsx(Ke,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):"Save changes"})]})]})})]})})}function Wae({children:e}){const t=wt(),[n,r]=E.useState(null);return E.useEffect(()=>{(async()=>{try{if(!await ie.auth.isAuthenticated()){t("/");return}if((await ie.auth.me()).role!=="admin"){t("/");return}r(!0)}catch{t("/")}})()},[t]),n===null?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})}):n?e:null}const{Pages:y3,Layout:AE,mainPage:Kae}=MM,W0=Kae,Gae=y3[W0],$n=({children:e,currentPageName:t})=>AE?s.jsx(AE,{currentPageName:t,children:e}):s.jsx(s.Fragment,{children:e}),Yae=()=>{const e=hr(),t=e.pathname;return t!==t.toLowerCase()?s.jsx(Wv,{to:`${t.toLowerCase()}${e.search}`,replace:!0}):s.jsx(Ate,{})},Qae=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,isAuthenticated:r,navigateToLogin:i}=QP();if(t||e)return s.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:s.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return s.jsx(Rte,{});if(n.type==="auth_required")return i(),null}return s.jsxs(BB,{children:[s.jsx(Vt,{path:"/",element:s.jsx($n,{currentPageName:W0,children:s.jsx(Gae,{})})}),s.jsx(Vt,{path:"dashboard",element:s.jsx(Wv,{to:"/",replace:!0})}),s.jsx(Vt,{path:"home",element:s.jsx(Wv,{to:"/",replace:!0})}),Object.entries(y3).filter(([a])=>a!==W0).map(([a,o])=>s.jsx(Vt,{path:`/${a.toLowerCase()}`,element:s.jsx($n,{currentPageName:a,children:s.jsx(o,{})})},a)),s.jsx(Vt,{path:"business/:slug",element:s.jsx($n,{currentPageName:"BusinessDetail",children:s.jsx(cae,{})})}),s.jsx(Vt,{path:"event/:id",element:s.jsx($n,{currentPageName:"EventDetail",children:s.jsx(uae,{})})}),s.jsx(Vt,{path:"property/:id",element:s.jsx($n,{currentPageName:"PropertyDetail",children:s.jsx(dae,{})})}),s.jsx(Vt,{path:"news/:slug",element:s.jsx($n,{currentPageName:"NewsDetail",children:s.jsx(gae,{})})}),s.jsx(Vt,{path:"suburbs",element:s.jsx($n,{currentPageName:"Suburbs",children:s.jsx(yae,{})})}),s.jsx(Vt,{path:"suburbs/:slug",element:s.jsx($n,{currentPageName:"SuburbDetail",children:s.jsx(Tae,{})})}),s.jsx(Vt,{path:"community",element:s.jsx($n,{currentPageName:"CommunityGroups",children:s.jsx(Aae,{})})}),s.jsx(Vt,{path:"community/:slug",element:s.jsx($n,{currentPageName:"CommunityGroupDetail",children:s.jsx(Oae,{})})}),s.jsx(Vt,{path:"collections/:slug",element:s.jsx($n,{currentPageName:"Collection",children:s.jsx(Fae,{})})}),s.jsx(Vt,{path:"malls-centres",element:s.jsx($n,{currentPageName:"ShoppingCentres",children:s.jsx(qae,{})})}),s.jsx(Vt,{path:"malls-centres/:slug",element:s.jsx($n,{currentPageName:"ShoppingCentreDetail",children:s.jsx($ae,{})})}),s.jsx(Vt,{path:"edit-business/:id",element:s.jsx($n,{currentPageName:"EditBusiness",children:s.jsx(Hae,{})})}),s.jsx(Vt,{path:"search",element:s.jsx($n,{currentPageName:"Search",children:s.jsx(Wae,{children:s.jsx(Iae,{})})})}),s.jsx(Vt,{path:"businessdetail",element:s.jsx(zf,{kind:"business",paramKey:"slug"})}),s.jsx(Vt,{path:"eventdetail",element:s.jsx(zf,{kind:"event",paramKey:"id"})}),s.jsx(Vt,{path:"propertydetail",element:s.jsx(zf,{kind:"property",paramKey:"id"})}),s.jsx(Vt,{path:"newsdetail",element:s.jsx(zf,{kind:"news",paramKey:"title"})}),s.jsx(Vt,{path:"RandburgExperiences",element:s.jsx($n,{currentPageName:"RandburgExperiences",children:s.jsx(rae,{})})}),s.jsx(Vt,{path:"*",element:s.jsx(Yae,{})})]})};function Xae(){return s.jsx(e$,{children:s.jsxs(UF,{client:WF,children:[s.jsxs(WB,{children:[s.jsx(Pte,{}),s.jsx(Qae,{})]}),s.jsx(gF,{}),s.jsx(KF,{})]})})}ND.createRoot(document.getElementById("root")).render(s.jsx(Xae,{}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.