vendor: 6,105 bytes, lines 1-9
1var Xv=e=>{throw TypeError(e)};var mh=(e,t,r)=>t.has(e)||Xv("Cannot "+r);var S=(e,t,r)=>(mh(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?Xv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),W=(e,t,r,n)=>(mh(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),me=(e,t,r)=>(mh(e,t,"access private method"),r);var Ql=(e,t,r,n)=>({set _(s){W(e,t,s,r)},get _(){return S(e,t,n)}});function rC(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function B0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q0={exports:{}},nu={},V0={exports:{}},pe={};/** 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 Al=Symbol.for("react.element"),nC=Symbol.for("react.portal"),sC=Symbol.for("react.fragment"),aC=Symbol.for("react.strict_mode"),oC=Symbol.for("react.profiler"),iC=Symbol.for("react.provider"),lC=Symbol.for("react.context"),cC=Symbol.for("react.forward_ref"),dC=Symbol.for("react.suspense"),uC=Symbol.for("react.memo"),hC=Symbol.for("react.lazy"),ex=Symbol.iterator;function fC(e){return e===null||typeof e!="object"?null:(e=ex&&e[ex]||e["@@iterator"],typeof e=="function"?e:null)}var H0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},W0=Object.assign,K0={};function qo(e,t,r){this.props=e,this.context=t,this.refs=K0,this.updater=r||H0}qo.prototype.isReactComponent={};qo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};qo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function G0(){}G0.prototype=qo.prototype;function hm(e,t,r){this.props=e,this.context=t,this.refs=K0,this.updater=r||H0}var fm=hm.prototype=new G0;fm.constructor=hm;W0(fm,qo.prototype);fm.isPureReactComponent=!0;var tx=Array.isArray,Z0=Object.prototype.hasOwnProperty,pm={current:null},J0={key:!0,ref:!0,__self:!0,__source:!0};function Q0(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Z0.call(t,n)&&!J0.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];s.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:Al,type:e,key:o,ref:i,props:s,_owner:pm.current}}function pC(e,t){return{$$typeof:Al,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function mm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Al}function mC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var rx=/\/+/g;function gh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?mC(""+e.key):t.toString(36)}function Uc(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Al:case nC:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+gh(i,0):n,tx(s)?(r="",e!=null&&(r=e.replace(rx,"$&/")+"/"),Uc(s,t,r,"",function(d){return d})):s!=null&&(mm(s)&&(s=pC(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(rx,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",tx(e))for(var l=0;l<e.length;l++){o=e[l];var c=n+gh(o,l);i+=Uc(o,t,r,c,s)}else if(c=fC(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=n+gh(o,l++),i+=Uc(o,t,r,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Yl(e,t,r){if(e==null)return e;var n=[],s=0;return Uc(e,n,"","",function(o){return t.call(r,o,s++)}),n}function gC(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Nt={current:null},Bc={transition:null},vC={ReactCurrentDispatcher:Nt,ReactCurrentBatchConfig:Bc,ReactCurrentOwner:pm};function Y0(){throw Error("act(...) is not supported in production builds of React.")}pe.Children={map:Yl,forEach:function(e,t,r){Yl(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Yl(e,function(){t++}),t},toArray:function(e){return Yl(e,function(t){return t})||[]},only:function(e){if(!mm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pe.Component=qo;pe.Fragment=sC;pe.Profiler=oC;pe.PureComponent=hm;pe.StrictMode=aC;
vendor: 3,288 bytes, lines 9-17
9pe.Suspense=dC;pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vC;pe.act=Y0;pe.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=W0({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=pm.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Z0.call(t,c)&&!J0.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];n.children=l}return{$$typeof:Al,type:e.type,key:s,ref:o,props:n,_owner:i}};pe.createContext=function(e){return e={$$typeof:lC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:iC,_context:e},e.Consumer=e};pe.createElement=Q0;pe.createFactory=function(e){var t=Q0.bind(null,e);return t.type=e,t};pe.createRef=function(){return{current:null}};pe.forwardRef=function(e){return{$$typeof:cC,render:e}};pe.isValidElement=mm;pe.lazy=function(e){return{$$typeof:hC,_payload:{_status:-1,_result:e},_init:gC}};pe.memo=function(e,t){return{$$typeof:uC,type:e,compare:t===void 0?null:t}};pe.startTransition=function(e){var t=Bc.transition;Bc.transition={};try{e()}finally{Bc.transition=t}};pe.unstable_act=Y0;pe.useCallback=function(e,t){return Nt.current.useCallback(e,t)};pe.useContext=function(e){return Nt.current.useContext(e)};pe.useDebugValue=function(){};pe.useDeferredValue=function(e){return Nt.current.useDeferredValue(e)};pe.useEffect=function(e,t){return Nt.current.useEffect(e,t)};pe.useId=function(){return Nt.current.useId()};pe.useImperativeHandle=function(e,t,r){return Nt.current.useImperativeHandle(e,t,r)};pe.useInsertionEffect=function(e,t){return Nt.current.useInsertionEffect(e,t)};pe.useLayoutEffect=function(e,t){return Nt.current.useLayoutEffect(e,t)};pe.useMemo=function(e,t){return Nt.current.useMemo(e,t)};pe.useReducer=function(e,t,r){return Nt.current.useReducer(e,t,r)};pe.useRef=function(e){return Nt.current.useRef(e)};pe.useState=function(e){return Nt.current.useState(e)};pe.useSyncExternalStore=function(e,t,r){return Nt.current.useSyncExternalStore(e,t,r)};pe.useTransition=function(){return Nt.current.useTransition()};pe.version="18.3.1";V0.exports=pe;var m=V0.exports;const B=B0(m),gm=rC({__proto__:null,default:B},[m]);/** 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 xC=m,yC=Symbol.for("react.element"),bC=Symbol.for("react.fragment"),wC=Object.prototype.hasOwnProperty,jC=xC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,kC={key:!0,ref:!0,__self:!0,__source:!0};function X0(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)wC.call(t,n)&&!kC.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:yC,type:e,key:o,ref:i,props:s,_owner:jC.current}}nu.Fragment=bC;nu.jsx=X0;nu.jsxs=X0;q0.exports=nu;
vendor: 10,957 bytes, lines 17-34
17var a=q0.exports,ew={exports:{}},Yt={},tw={exports:{}},rw={};/** 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 */(function(e){function t(E,P){var z=E.length;E.push(P);e:for(;0<z;){var ee=z-1>>>1,F=E[ee];if(0<s(F,P))E[ee]=P,E[z]=F,z=ee;else break e}}function r(E){return E.length===0?null:E[0]}function n(E){if(E.length===0)return null;var P=E[0],z=E.pop();if(z!==P){E[0]=z;e:for(var ee=0,F=E.length,Y=F>>>1;ee<Y;){var re=2*(ee+1)-1,Q=E[re],ve=re+1,M=E[ve];if(0>s(Q,z))ve<F&&0>s(M,Q)?(E[ee]=M,E[ve]=z,ee=ve):(E[ee]=Q,E[re]=z,ee=re);else if(ve<F&&0>s(M,z))E[ee]=M,E[ve]=z,ee=ve;else break e}}return P}function s(E,P){var z=E.sortIndex-P.sortIndex;return z!==0?z:E.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],d=[],u=1,h=null,p=3,f=!1,y=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(E){for(var P=r(d);P!==null;){if(P.callback===null)n(d);else if(P.startTime<=E)n(d),P.sortIndex=P.expirationTime,t(c,P);else break;P=r(d)}}function j(E){if(g=!1,b(E),!y)if(r(c)!==null)y=!0,U(k);else{var P=r(d);P!==null&&Z(j,P.startTime-E)}}function k(E,P){y=!1,g&&(g=!1,v(C),C=-1),f=!0;var z=p;try{for(b(P),h=r(c);h!==null&&(!(h.expirationTime>P)||E&&!O());){var ee=h.callback;if(typeof ee=="function"){h.callback=null,p=h.priorityLevel;var F=ee(h.expirationTime<=P);P=e.unstable_now(),typeof F=="function"?h.callback=F:h===r(c)&&n(c),b(P)}else n(c);h=r(c)}if(h!==null)var Y=!0;else{var re=r(d);re!==null&&Z(j,re.startTime-P),Y=!1}return Y}finally{h=null,p=z,f=!1}}var _=!1,N=null,C=-1,R=5,T=-1;function O(){return!(e.unstable_now()-T<R)}function I(){if(N!==null){var E=e.unstable_now();T=E;var P=!0;try{P=N(!0,E)}finally{P?K():(_=!1,N=null)}}else _=!1}var K;if(typeof x=="function")K=function(){x(I)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,H=$.port2;$.port1.onmessage=I,K=function(){H.postMessage(null)}}else K=function(){w(I,0)};function U(E){N=E,_||(_=!0,K())}function Z(E,P){C=w(function(){E(e.unstable_now())},P)}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(E){E.callback=null},e.unstable_continueExecution=function(){y||f||(y=!0,U(k))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(E){switch(p){case 1:case 2:case 3:var P=3;break;default:P=p}var z=p;p=P;try{return E()}finally{p=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,P){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var z=p;p=E;try{return P()}finally{p=z}},e.unstable_scheduleCallback=function(E,P,z){var ee=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?ee+z:ee):z=ee,E){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=z+F,E={id:u++,callback:P,priorityLevel:E,startTime:z,expirationTime:F,sortIndex:-1},z>ee?(E.sortIndex=z,t(d,E),r(c)===null&&E===r(d)&&(g?(v(C),C=-1):g=!0,Z(j,z-ee))):(E.sortIndex=F,t(c,E),y||f||(y=!0,U(k))),E},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(E){var P=p;return function(){var z=p;p=P;try{return E.apply(this,arguments)}finally{p=z}}}})(rw);tw.exports=rw;var _C=tw.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 NC=m,Jt=_C;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var nw=new Set,Ki={};function Na(e,t){Ao(e,t),Ao(e+"Capture",t)}function Ao(e,t){for(Ki[e]=t,e=0;e<t.length;e++)nw.add(t[e])}var Nn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bf=Object.prototype.hasOwnProperty,SC=/^[: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]*$/,nx={},sx={};function CC(e){return bf.call(sx,e)?!0:bf.call(nx,e)?!1:SC.test(e)?sx[e]=!0:(nx[e]=!0,!1)}function EC(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function RC(e,t,r,n){if(t===null||typeof t>"u"||EC(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function St(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ut[e]=new St(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ut[t]=new St(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ut[e]=new St(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ut[e]=new St(e,2,!1,e,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(e){ut[e]=new St(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ut[e]=new St(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ut[e]=new St(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ut[e]=new St(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ut[e]=new St(e,5,!1,e.toLowerCase(),null,!1,!1)});var vm=/[\-:]([a-z])/g;function xm(e){return e[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(e){var t=e.replace(vm,xm);ut[t]=new St(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(vm,xm);ut[t]=new St(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(vm,xm);ut[t]=new St(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ut[e]=new St(e,1,!1,e.toLowerCase(),null,!1,!1)});ut.xlinkHref=new St("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ut[e]=new St(e,1,!1,e.toLowerCase(),null,!0,!0)});function ym(e,t,r,n){var s=ut.hasOwnProperty(t)?ut[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(RC(t,r,s,n)&&(r=null),n||s===null?CC(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var On=NC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xl=Symbol.for("react.element"),Ha=Symbol.for("react.portal"),Wa=Symbol.for("react.fragment"),bm=Symbol.for("react.strict_mode"),wf=Symbol.for("react.profiler"),sw=Symbol.for("react.provider"),aw=Symbol.for("react.context"),wm=Symbol.for("react.forward_ref"),jf=Symbol.for("react.suspense"),kf=Symbol.for("react.suspense_list"),jm=Symbol.for("react.memo"),Gn=Symbol.for("react.lazy"),ow=Symbol.for("react.offscreen"),ax=Symbol.iterator;function ci(e){return e===null||typeof e!="object"?null:(e=ax&&e[ax]||e["@@iterator"],typeof e=="function"?e:null)}var Ue=Object.assign,vh;function _i(e){if(vh===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);vh=t&&t[1]||""}return` 34`+vh+e}var xh=!1;function yh(e,t){if(!e||xh)return"";xh=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var n=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){n=d}e.call(t.prototype)}else{try{throw Error()}catch(d){n=d}e()}}
vendor: 14,090 bytes, lines 34-37
34catch(d){if(d&&n&&typeof d.stack=="string"){for(var s=d.stack.split(` 35`),o=n.stack.split(` 36`),i=s.length-1,l=o.length-1;1<=i&&0<=l&&s[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(s[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||s[i]!==o[l]){var c=` 37`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{xh=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?_i(e):""}function PC(e){switch(e.tag){case 5:return _i(e.type);case 16:return _i("Lazy");case 13:return _i("Suspense");case 19:return _i("SuspenseList");case 0:case 2:case 15:return e=yh(e.type,!1),e;case 11:return e=yh(e.type.render,!1),e;case 1:return e=yh(e.type,!0),e;default:return""}}function _f(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wa:return"Fragment";case Ha:return"Portal";case wf:return"Profiler";case bm:return"StrictMode";case jf:return"Suspense";case kf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case aw:return(e.displayName||"Context")+".Consumer";case sw:return(e._context.displayName||"Context")+".Provider";case wm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jm:return t=e.displayName||null,t!==null?t:_f(e.type)||"Memo";case Gn:t=e._payload,e=e._init;try{return _f(e(t))}catch{}}return null}function TC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _f(t);case 8:return t===bm?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function bs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function iw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function AC(e){var t=iw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ec(e){e._valueTracker||(e._valueTracker=AC(e))}function lw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=iw(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function cd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Nf(e,t){var r=t.checked;return Ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function ox(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=bs(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cw(e,t){t=t.checked,t!=null&&ym(e,"checked",t,!1)}function Sf(e,t){cw(e,t);var r=bs(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cf(e,t.type,r):t.hasOwnProperty("defaultValue")&&Cf(e,t.type,bs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ix(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Cf(e,t,r){(t!=="number"||cd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ni=Array.isArray;function ao(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+bs(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ef(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return Ue({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function lx(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(D(92));if(Ni(r)){if(1<r.length)throw Error(D(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:bs(r)}}function dw(e,t){var r=bs(t.value),n=bs(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function cx(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function uw(e){switch(e){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 Rf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?uw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var tc,hw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(tc=tc||document.createElement("div"),tc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=tc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gi(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Li={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},OC=["Webkit","ms","Moz","O"];Object.keys(Li).forEach(function(e){OC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Li[t]=Li[e]})});function fw(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Li.hasOwnProperty(e)&&Li[e]?(""+t).trim():t+"px"}function pw(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=fw(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var LC=Ue({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 Pf(e,t){if(t){if(LC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Tf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Af=null;function km(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Of=null,oo=null,io=null;function dx(e){if(e=Il(e)){if(typeof Of!="function")throw Error(D(280));var t=e.stateNode;t&&(t=lu(t),Of(e.stateNode,e.type,t))}}function mw(e){oo?io?io.push(e):io=[e]:oo=e}function gw(){if(oo){var e=oo,t=io;if(io=oo=null,dx(e),t)for(e=0;e<t.length;e++)dx(t[e])}}function vw(e,t){return e(t)}function xw(){}var bh=!1;function yw(e,t,r){if(bh)return e(t,r);bh=!0;try{return vw(e,t,r)}finally{bh=!1,(oo!==null||io!==null)&&(xw(),gw())}}function Zi(e,t){var r=e.stateNode;if(r===null)return null;var n=lu(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(D(231,t,typeof r));return r}var Lf=!1;if(Nn)try{var di={};Object.defineProperty(di,"passive",{get:function(){Lf=!0}}),window.addEventListener("test",di,di),window.removeEventListener("test",di,di)}catch{Lf=!1}function IC(e,t,r,n,s,o,i,l,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(r,d)}catch(u){this.onError(u)}}var Ii=!1,dd=null,ud=!1,If=null,$C={onError:function(e){Ii=!0,dd=e}};function DC(e,t,r,n,s,o,i,l,c){Ii=!1,dd=null,IC.apply($C,arguments)}function MC(e,t,r,n,s,o,i,l,c){if(DC.apply(this,arguments),Ii){if(Ii){var d=dd;Ii=!1,dd=null}else throw Error(D(198));ud||(ud=!0,If=d)}}function Sa(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function bw(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ux(e){if(Sa(e)!==e)throw Error(D(188))}function zC(e){var t=e.alternate;if(!t){if(t=Sa(e),t===null)throw Error(D(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return ux(s),e;if(o===n)return ux(s),t;o=o.sibling}throw Error(D(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,l=s.child;l;){if(l===r){i=!0,r=s,n=o;break}if(l===n){i=!0,n=s,r=o;break}l=l.sibling}if(!i){for(l=o.child;l;){if(l===r){i=!0,r=o,n=s;break}if(l===n){i=!0,n=o,r=s;break}l=l.sibling}if(!i)throw Error(D(189))}}if(r.alternate!==n)throw Error(D(190))}if(r.tag!==3)throw Error(D(188));return r.stateNode.current===r?e:t}function ww(e){return e=zC(e),e!==null?jw(e):null}function jw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=jw(e);if(t!==null)return t;e=e.sibling}return null}var kw=Jt.unstable_scheduleCallback,hx=Jt.unstable_cancelCallback,FC=Jt.unstable_shouldYield,UC=Jt.unstable_requestPaint,Ke=Jt.unstable_now,BC=Jt.unstable_getCurrentPriorityLevel,_m=Jt.unstable_ImmediatePriority,_w=Jt.unstable_UserBlockingPriority,hd=Jt.unstable_NormalPriority,qC=Jt.unstable_LowPriority,Nw=Jt.unstable_IdlePriority,su=null,rn=null;function VC(e){if(rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(su,e,void 0,(e.current.flags&128)===128)}catch{}}var Or=Math.clz32?Math.clz32:KC,HC=Math.log,WC=Math.LN2;function KC(e){return e>>>=0,e===0?32:31-(HC(e)/WC|0)|0}var rc=64,nc=4194304;function Si(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fd(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var l=i&~s;l!==0?n=Si(l):(o&=i,o!==0&&(n=Si(o)))}else i=r&~s,i!==0?n=Si(i):o!==0&&(n=Si(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Or(t),s=1<<r,n|=e[r],t&=~s;return n}function GC(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 ZC(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Or(o),l=1<<i,c=s[i];c===-1?(!(l&r)||l&n)&&(s[i]=GC(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function $f(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Sw(){var e=rc;return rc<<=1,!(rc&4194240)&&(rc=64),e}function wh(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function Ol(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Or(t),e[t]=r}function JC(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Or(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function Nm(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Or(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var _e=0;function Cw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ew,Sm,Rw,Pw,Tw,Df=!1,sc=[],ds=null,us=null,hs=null,Ji=new Map,Qi=new Map,Jn=[],QC="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 fx(e,t){switch(e){case"focusin":case"focusout":ds=null;break;case"dragenter":case"dragleave":us=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":Ji.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qi.delete(t.pointerId)}}function ui(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Il(t),t!==null&&Sm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function YC(e,t,r,n,s){switch(t){case"focusin":return ds=ui(ds,e,t,r,n,s),!0;case"dragenter":return us=ui(us,e,t,r,n,s),!0;case"mouseover":return hs=ui(hs,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return Ji.set(o,ui(Ji.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Qi.set(o,ui(Qi.get(o)||null,e,t,r,n,s)),!0}return!1}function Aw(e){var t=Js(e.target);if(t!==null){var r=Sa(t);if(r!==null){if(t=r.tag,t===13){if(t=bw(r),t!==null){e.blockedOn=t,Tw(e.priority,function(){Rw(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Mf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Af=n,r.target.dispatchEvent(n),Af=null}else return t=Il(r),t!==null&&Sm(t),e.blockedOn=r,!1;t.shift()}return!0}function px(e,t,r){qc(e)&&r.delete(t)}function XC(){Df=!1,ds!==null&&qc(ds)&&(ds=null),us!==null&&qc(us)&&(us=null),hs!==null&&qc(hs)&&(hs=null),Ji.forEach(px),Qi.forEach(px)}function hi(e,t){e.blockedOn===t&&(e.blockedOn=null,Df||(Df=!0,Jt.unstable_scheduleCallback(Jt.unstable_NormalPriority,XC)))}function Yi(e){function t(s){return hi(s,e)}if(0<sc.length){hi(sc[0],e);for(var r=1;r<sc.length;r++){var n=sc[r];n.blockedOn===e&&(n.blockedOn=null)}}for(ds!==null&&hi(ds,e),us!==null&&hi(us,e),hs!==null&&hi(hs,e),Ji.forEach(t),Qi.forEach(t),r=0;r<Jn.length;r++)n=Jn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Jn.length&&(r=Jn[0],r.blockedOn===null);)Aw(r),r.blockedOn===null&&Jn.shift()}var lo=On.ReactCurrentBatchConfig,pd=!0;function eE(e,t,r,n){var s=_e,o=lo.transition;lo.transition=null;try{_e=1,Cm(e,t,r,n)}finally{_e=s,lo.transition=o}}function tE(e,t,r,n){var s=_e,o=lo.transition;lo.transition=null;try{_e=4,Cm(e,t,r,n)}finally{_e=s,lo.transition=o}}function Cm(e,t,r,n){if(pd){var s=Mf(e,t,r,n);if(s===null)Th(e,t,n,md,r),fx(e,n);else if(YC(s,e,t,r,n))n.stopPropagation();else if(fx(e,n),t&4&&-1<QC.indexOf(e)){for(;s!==null;){var o=Il(s);if(o!==null&&Ew(o),o=Mf(e,t,r,n),o===null&&Th(e,t,n,md,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else Th(e,t,n,null,r)}}var md=null;function Mf(e,t,r,n){if(md=null,e=km(n),e=Js(e),e!==null)if(t=Sa(e),t===null)e=null;else if(r=t.tag,r===13){if(e=bw(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return md=e,null}
vendor: 10,401 bytes, line 37
37function Ow(e){switch(e){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(BC()){case _m:return 1;case _w:return 4;case hd:case qC:return 16;case Nw:return 536870912;default:return 16}default:return 16}}var ls=null,Em=null,Vc=null;function Lw(){if(Vc)return Vc;var e,t=Em,r=t.length,n,s="value"in ls?ls.value:ls.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return Vc=s.slice(e,1<n?1-n:void 0)}function Hc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ac(){return!0}function mx(){return!1}function Xt(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ac:mx,this.isPropagationStopped=mx,this}return Ue(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ac)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ac)},persist:function(){},isPersistent:ac}),t}var Vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rm=Xt(Vo),Ll=Ue({},Vo,{view:0,detail:0}),rE=Xt(Ll),jh,kh,fi,au=Ue({},Ll,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fi&&(fi&&e.type==="mousemove"?(jh=e.screenX-fi.screenX,kh=e.screenY-fi.screenY):kh=jh=0,fi=e),jh)},movementY:function(e){return"movementY"in e?e.movementY:kh}}),gx=Xt(au),nE=Ue({},au,{dataTransfer:0}),sE=Xt(nE),aE=Ue({},Ll,{relatedTarget:0}),_h=Xt(aE),oE=Ue({},Vo,{animationName:0,elapsedTime:0,pseudoElement:0}),iE=Xt(oE),lE=Ue({},Vo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cE=Xt(lE),dE=Ue({},Vo,{data:0}),vx=Xt(dE),uE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hE={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"},fE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fE[e])?!!t[e]:!1}function Pm(){return pE}var mE=Ue({},Ll,{key:function(e){if(e.key){var t=uE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pm,charCode:function(e){return e.type==="keypress"?Hc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gE=Xt(mE),vE=Ue({},au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xx=Xt(vE),xE=Ue({},Ll,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pm}),yE=Xt(xE),bE=Ue({},Vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),wE=Xt(bE),jE=Ue({},au,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kE=Xt(jE),_E=[9,13,27,32],Tm=Nn&&"CompositionEvent"in window,$i=null;Nn&&"documentMode"in document&&($i=document.documentMode);var NE=Nn&&"TextEvent"in window&&!$i,Iw=Nn&&(!Tm||$i&&8<$i&&11>=$i),yx=" ",bx=!1;function $w(e,t){switch(e){case"keyup":return _E.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function SE(e,t){switch(e){case"compositionend":return Dw(t);case"keypress":return t.which!==32?null:(bx=!0,yx);case"textInput":return e=t.data,e===yx&&bx?null:e;default:return null}}function CE(e,t){if(Ka)return e==="compositionend"||!Tm&&$w(e,t)?(e=Lw(),Vc=Em=ls=null,Ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Iw&&t.locale!=="ko"?null:t.data;default:return null}}var EE={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 wx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!EE[e.type]:t==="textarea"}function Mw(e,t,r,n){mw(n),t=gd(t,"onChange"),0<t.length&&(r=new Rm("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Di=null,Xi=null;function RE(e){Zw(e,0)}function ou(e){var t=Ja(e);if(lw(t))return e}function PE(e,t){if(e==="change")return t}var zw=!1;if(Nn){var Nh;if(Nn){var Sh="oninput"in document;if(!Sh){var jx=document.createElement("div");jx.setAttribute("oninput","return;"),Sh=typeof jx.oninput=="function"}Nh=Sh}else Nh=!1;zw=Nh&&(!document.documentMode||9<document.documentMode)}function kx(){Di&&(Di.detachEvent("onpropertychange",Fw),Xi=Di=null)}function Fw(e){if(e.propertyName==="value"&&ou(Xi)){var t=[];Mw(t,Xi,e,km(e)),yw(RE,t)}}function TE(e,t,r){e==="focusin"?(kx(),Di=t,Xi=r,Di.attachEvent("onpropertychange",Fw)):e==="focusout"&&kx()}function AE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ou(Xi)}function OE(e,t){if(e==="click")return ou(t)}function LE(e,t){if(e==="input"||e==="change")return ou(t)}function IE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $r=typeof Object.is=="function"?Object.is:IE;function el(e,t){if($r(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!bf.call(t,s)||!$r(e[s],t[s]))return!1}return!0}function _x(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nx(e,t){var r=_x(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_x(r)}}function Uw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bw(){for(var e=window,t=cd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=cd(e.document)}return t}function Am(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $E(e){var t=Bw(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Uw(r.ownerDocument.documentElement,r)){if(n!==null&&Am(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=Nx(r,o);var i=Nx(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var DE=Nn&&"documentMode"in document&&11>=document.documentMode,Ga=null,zf=null,Mi=null,Ff=!1;function Sx(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ff||Ga==null||Ga!==cd(n)||(n=Ga,"selectionStart"in n&&Am(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Mi&&el(Mi,n)||(Mi=n,n=gd(zf,"onSelect"),0<n.length&&(t=new Rm("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ga)))}function oc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Za={animationend:oc("Animation","AnimationEnd"),animationiteration:oc("Animation","AnimationIteration"),animationstart:oc("Animation","AnimationStart"),transitionend:oc("Transition","TransitionEnd")},Ch={},qw={};Nn&&(qw=document.createElement("div").style,"AnimationEvent"in window||(delete Za.animationend.animation,delete Za.animationiteration.animation,delete Za.animationstart.animation),"TransitionEvent"in window||delete Za.transitionend.transition);function iu(e){if(Ch[e])return Ch[e];if(!Za[e])return e;var t=Za[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in qw)return Ch[e]=t[r];return e}var Vw=iu("animationend"),Hw=iu("animationiteration"),Ww=iu("animationstart"),Kw=iu("transitionend"),Gw=new Map,Cx="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 Ss(e,t){Gw.set(e,t),Na(t,[e])}for(var Eh=0;Eh<Cx.length;Eh++){var Rh=Cx[Eh],ME=Rh.toLowerCase(),zE=Rh[0].toUpperCase()+Rh.slice(1);Ss(ME,"on"+zE)}Ss(Vw,"onAnimationEnd");Ss(Hw,"onAnimationIteration");Ss(Ww,"onAnimationStart");Ss("dblclick","onDoubleClick");Ss("focusin","onFocus");Ss("focusout","onBlur");Ss(Kw,"onTransitionEnd");Ao("onMouseEnter",["mouseout","mouseover"]);Ao("onMouseLeave",["mouseout","mouseover"]);Ao("onPointerEnter",["pointerout","pointerover"]);Ao("onPointerLeave",["pointerout","pointerover"]);Na("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Na("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Na("onBeforeInput",["compositionend","keypress","textInput","paste"]);Na("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Na("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Na("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),FE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ci));function Ex(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,MC(n,t,void 0,e),e.currentTarget=null}function Zw(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var l=n[i],c=l.instance,d=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;Ex(s,l,d),o=c}else for(i=0;i<n.length;i++){if(l=n[i],c=l.instance,d=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;Ex(s,l,d),o=c}}}if(ud)throw e=If,ud=!1,If=null,e}function Ae(e,t){var r=t[Hf];r===void 0&&(r=t[Hf]=new Set);var n=e+"__bubble";r.has(n)||(Jw(t,e,2,!1),r.add(n))}function Ph(e,t,r){var n=0;t&&(n|=4),Jw(r,e,n,t)}var ic="_reactListening"+Math.random().toString(36).slice(2);function tl(e){if(!e[ic]){e[ic]=!0,nw.forEach(function(r){r!=="selectionchange"&&(FE.has(r)||Ph(r,!1,e),Ph(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ic]||(t[ic]=!0,Ph("selectionchange",!1,t))}}function Jw(e,t,r,n){switch(Ow(t)){case 1:var s=eE;break;case 4:s=tE;break;default:s=Cm}r=s.bind(null,t,r,e),s=void 0,!Lf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function Th(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var l=n.stateNode.containerInfo;
vendor: 2,527 bytes, line 37
37if(l===s||l.nodeType===8&&l.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;l!==null;){if(i=Js(l),i===null)return;if(c=i.tag,c===5||c===6){n=o=i;continue e}l=l.parentNode}}n=n.return}yw(function(){var d=o,u=km(r),h=[];e:{var p=Gw.get(e);if(p!==void 0){var f=Rm,y=e;switch(e){case"keypress":if(Hc(r)===0)break e;case"keydown":case"keyup":f=gE;break;case"focusin":y="focus",f=_h;break;case"focusout":y="blur",f=_h;break;case"beforeblur":case"afterblur":f=_h;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=gx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=sE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=yE;break;case Vw:case Hw:case Ww:f=iE;break;case Kw:f=wE;break;case"scroll":f=rE;break;case"wheel":f=kE;break;case"copy":case"cut":case"paste":f=cE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=xx}var g=(t&4)!==0,w=!g&&e==="scroll",v=g?p!==null?p+"Capture":null:p;g=[];for(var x=d,b;x!==null;){b=x;var j=b.stateNode;if(b.tag===5&&j!==null&&(b=j,v!==null&&(j=Zi(x,v),j!=null&&g.push(rl(x,j,b)))),w)break;x=x.return}0<g.length&&(p=new f(p,y,null,r,u),h.push({event:p,listeners:g}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==Af&&(y=r.relatedTarget||r.fromElement)&&(Js(y)||y[Sn]))break e;if((f||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,f?(y=r.relatedTarget||r.toElement,f=d,y=y?Js(y):null,y!==null&&(w=Sa(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(f=null,y=d),f!==y)){if(g=gx,j="onMouseLeave",v="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=xx,j="onPointerLeave",v="onPointerEnter",x="pointer"),w=f==null?p:Ja(f),b=y==null?p:Ja(y),p=new g(j,x+"leave",f,r,u),p.target=w,p.relatedTarget=b,j=null,Js(u)===d&&(g=new g(v,x+"enter",y,r,u),g.target=b,g.relatedTarget=w,j=g),w=j,f&&y)t:{for(g=f,v=y,x=0,b=g;b;b=La(b))x++;for(b=0,j=v;j;j=La(j))b++;for(;0<x-b;)g=La(g),x--;for(;0<b-x;)v=La(v),b--;for(;x--;){if(g===v||v!==null&&g===v.alternate)break t;g=La(g),v=La(v)}g=null}else g=null;f!==null&&Rx(h,p,f,g,!1),y!==null&&w!==null&&Rx(h,w,y,g,!0)}}
vendor: 4,113 bytes, lines 37-38
37e:{if(p=d?Ja(d):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var k=PE;else if(wx(p))if(zw)k=LE;else{k=AE;var _=TE}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=OE);if(k&&(k=k(e,d))){Mw(h,k,r,u);break e}_&&_(e,p,d),e==="focusout"&&(_=p._wrapperState)&&_.controlled&&p.type==="number"&&Cf(p,"number",p.value)}switch(_=d?Ja(d):window,e){case"focusin":(wx(_)||_.contentEditable==="true")&&(Ga=_,zf=d,Mi=null);break;case"focusout":Mi=zf=Ga=null;break;case"mousedown":Ff=!0;break;case"contextmenu":case"mouseup":case"dragend":Ff=!1,Sx(h,r,u);break;case"selectionchange":if(DE)break;case"keydown":case"keyup":Sx(h,r,u)}var N;if(Tm)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Ka?$w(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(Iw&&r.locale!=="ko"&&(Ka||C!=="onCompositionStart"?C==="onCompositionEnd"&&Ka&&(N=Lw()):(ls=u,Em="value"in ls?ls.value:ls.textContent,Ka=!0)),_=gd(d,C),0<_.length&&(C=new vx(C,e,null,r,u),h.push({event:C,listeners:_}),N?C.data=N:(N=Dw(r),N!==null&&(C.data=N)))),(N=NE?SE(e,r):CE(e,r))&&(d=gd(d,"onBeforeInput"),0<d.length&&(u=new vx("onBeforeInput","beforeinput",null,r,u),h.push({event:u,listeners:d}),u.data=N))}Zw(h,t)})}function rl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function gd(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Zi(e,r),o!=null&&n.unshift(rl(e,o,s)),o=Zi(e,t),o!=null&&n.push(rl(e,o,s))),e=e.return}return n}function La(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Rx(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var l=r,c=l.alternate,d=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&d!==null&&(l=d,s?(c=Zi(r,o),c!=null&&i.unshift(rl(r,c,l))):s||(c=Zi(r,o),c!=null&&i.push(rl(r,c,l)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var UE=/\r\n?/g,BE=/\u0000|\uFFFD/g;function Px(e){return(typeof e=="string"?e:""+e).replace(UE,` 38`).replace(BE,"")}function lc(e,t,r){if(t=Px(t),Px(e)!==t&&r)throw Error(D(425))}function vd(){}var Uf=null,Bf=null;function qf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vf=typeof setTimeout=="function"?setTimeout:void 0,qE=typeof clearTimeout=="function"?clearTimeout:void 0,Tx=typeof Promise=="function"?Promise:void 0,VE=typeof queueMicrotask=="function"?queueMicrotask:typeof Tx<"u"?function(e){return Tx.resolve(null).then(e).catch(HE)}:Vf;function HE(e){setTimeout(function(){throw e})}function Ah(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Yi(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Yi(t)}function fs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ax(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ho=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Ho,nl="__reactProps$"+Ho,Sn="__reactContainer$"+Ho,Hf="__reactEvents$"+Ho,WE="__reactListeners$"+Ho,KE="__reactHandles$"+Ho;function Js(e){var t=e[Yr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Sn]||r[Yr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ax(e);e!==null;){if(r=e[Yr])return r;e=Ax(e)}return t}e=r,r=e.parentNode}return null}function Il(e){return e=e[Yr]||e[Sn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ja(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function lu(e){return e[nl]||null}var Wf=[],Qa=-1;function Cs(e){return{current:e}}function Oe(e){0>
vendor: 14,052 bytes, line 38
38Qa||(e.current=Wf[Qa],Wf[Qa]=null,Qa--)}function Pe(e,t){Qa++,Wf[Qa]=e.current,e.current=t}var ws={},xt=Cs(ws),Ot=Cs(!1),fa=ws;function Oo(e,t){var r=e.type.contextTypes;if(!r)return ws;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Lt(e){return e=e.childContextTypes,e!=null}function xd(){Oe(Ot),Oe(xt)}function Ox(e,t,r){if(xt.current!==ws)throw Error(D(168));Pe(xt,t),Pe(Ot,r)}function Qw(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(D(108,TC(e)||"Unknown",s));return Ue({},r,n)}function yd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ws,fa=xt.current,Pe(xt,e),Pe(Ot,Ot.current),!0}function Lx(e,t,r){var n=e.stateNode;if(!n)throw Error(D(169));r?(e=Qw(e,t,fa),n.__reactInternalMemoizedMergedChildContext=e,Oe(Ot),Oe(xt),Pe(xt,e)):Oe(Ot),Pe(Ot,r)}var xn=null,cu=!1,Oh=!1;function Yw(e){xn===null?xn=[e]:xn.push(e)}function GE(e){cu=!0,Yw(e)}function Es(){if(!Oh&&xn!==null){Oh=!0;var e=0,t=_e;try{var r=xn;for(_e=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}xn=null,cu=!1}catch(s){throw xn!==null&&(xn=xn.slice(e+1)),kw(_m,Es),s}finally{_e=t,Oh=!1}}return null}var Ya=[],Xa=0,bd=null,wd=0,or=[],ir=0,pa=null,wn=1,jn="";function Ws(e,t){Ya[Xa++]=wd,Ya[Xa++]=bd,bd=e,wd=t}function Xw(e,t,r){or[ir++]=wn,or[ir++]=jn,or[ir++]=pa,pa=e;var n=wn;e=jn;var s=32-Or(n)-1;n&=~(1<<s),r+=1;var o=32-Or(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,wn=1<<32-Or(t)+s|r<<s|n,jn=o+e}else wn=1<<o|r<<s|n,jn=e}function Om(e){e.return!==null&&(Ws(e,1),Xw(e,1,0))}function Lm(e){for(;e===bd;)bd=Ya[--Xa],Ya[Xa]=null,wd=Ya[--Xa],Ya[Xa]=null;for(;e===pa;)pa=or[--ir],or[ir]=null,jn=or[--ir],or[ir]=null,wn=or[--ir],or[ir]=null}var Gt=null,Kt=null,$e=!1,Tr=null;function e1(e,t){var r=lr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Ix(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Gt=e,Kt=fs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Gt=e,Kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=pa!==null?{id:wn,overflow:jn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=lr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Gt=e,Kt=null,!0):!1;default:return!1}}function Kf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gf(e){if($e){var t=Kt;if(t){var r=t;if(!Ix(e,t)){if(Kf(e))throw Error(D(418));t=fs(r.nextSibling);var n=Gt;t&&Ix(e,t)?e1(n,r):(e.flags=e.flags&-4097|2,$e=!1,Gt=e)}}else{if(Kf(e))throw Error(D(418));e.flags=e.flags&-4097|2,$e=!1,Gt=e}}}function $x(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Gt=e}function cc(e){if(e!==Gt)return!1;if(!$e)return $x(e),$e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!qf(e.type,e.memoizedProps)),t&&(t=Kt)){if(Kf(e))throw t1(),Error(D(418));for(;t;)e1(e,t),t=fs(t.nextSibling)}if($x(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Kt=fs(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Kt=null}}else Kt=Gt?fs(e.stateNode.nextSibling):null;return!0}function t1(){for(var e=Kt;e;)e=fs(e.nextSibling)}function Lo(){Kt=Gt=null,$e=!1}function Im(e){Tr===null?Tr=[e]:Tr.push(e)}var ZE=On.ReactCurrentBatchConfig;function pi(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(D(309));var n=r.stateNode}if(!n)throw Error(D(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var l=s.refs;i===null?delete l[o]:l[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(D(284));if(!r._owner)throw Error(D(290,e))}return e}function dc(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Dx(e){var t=e._init;return t(e._payload)}function r1(e){function t(v,x){if(e){var b=v.deletions;b===null?(v.deletions=[x],v.flags|=16):b.push(x)}}function r(v,x){if(!e)return null;for(;x!==null;)t(v,x),x=x.sibling;return null}function n(v,x){for(v=new Map;x!==null;)x.key!==null?v.set(x.key,x):v.set(x.index,x),x=x.sibling;return v}function s(v,x){return v=vs(v,x),v.index=0,v.sibling=null,v}function o(v,x,b){return v.index=b,e?(b=v.alternate,b!==null?(b=b.index,b<x?(v.flags|=2,x):b):(v.flags|=2,x)):(v.flags|=1048576,x)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,x,b,j){return x===null||x.tag!==6?(x=Fh(b,v.mode,j),x.return=v,x):(x=s(x,b),x.return=v,x)}function c(v,x,b,j){var k=b.type;return k===Wa?u(v,x,b.props.children,j,b.key):x!==null&&(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Gn&&Dx(k)===x.type)?(j=s(x,b.props),j.ref=pi(v,x,b),j.return=v,j):(j=Yc(b.type,b.key,b.props,null,v.mode,j),j.ref=pi(v,x,b),j.return=v,j)}function d(v,x,b,j){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=Uh(b,v.mode,j),x.return=v,x):(x=s(x,b.children||[]),x.return=v,x)}function u(v,x,b,j,k){return x===null||x.tag!==7?(x=ua(b,v.mode,j,k),x.return=v,x):(x=s(x,b),x.return=v,x)}function h(v,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Fh(""+x,v.mode,b),x.return=v,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Xl:return b=Yc(x.type,x.key,x.props,null,v.mode,b),b.ref=pi(v,null,x),b.return=v,b;case Ha:return x=Uh(x,v.mode,b),x.return=v,x;case Gn:var j=x._init;return h(v,j(x._payload),b)}if(Ni(x)||ci(x))return x=ua(x,v.mode,b,null),x.return=v,x;dc(v,x)}return null}function p(v,x,b,j){var k=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return k!==null?null:l(v,x,""+b,j);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Xl:return b.key===k?c(v,x,b,j):null;case Ha:return b.key===k?d(v,x,b,j):null;case Gn:return k=b._init,p(v,x,k(b._payload),j)}if(Ni(b)||ci(b))return k!==null?null:u(v,x,b,j,null);dc(v,b)}return null}function f(v,x,b,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return v=v.get(b)||null,l(x,v,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Xl:return v=v.get(j.key===null?b:j.key)||null,c(x,v,j,k);case Ha:return v=v.get(j.key===null?b:j.key)||null,d(x,v,j,k);case Gn:var _=j._init;return f(v,x,b,_(j._payload),k)}if(Ni(j)||ci(j))return v=v.get(b)||null,u(x,v,j,k,null);dc(x,j)}return null}function y(v,x,b,j){for(var k=null,_=null,N=x,C=x=0,R=null;N!==null&&C<b.length;C++){N.index>C?(R=N,N=null):R=N.sibling;var T=p(v,N,b[C],j);if(T===null){N===null&&(N=R);break}e&&N&&T.alternate===null&&t(v,N),x=o(T,x,C),_===null?k=T:_.sibling=T,_=T,N=R}if(C===b.length)return r(v,N),$e&&Ws(v,C),k;if(N===null){for(;C<b.length;C++)N=h(v,b[C],j),N!==null&&(x=o(N,x,C),_===null?k=N:_.sibling=N,_=N);return $e&&Ws(v,C),k}for(N=n(v,N);C<b.length;C++)R=f(N,v,C,b[C],j),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?C:R.key),x=o(R,x,C),_===null?k=R:_.sibling=R,_=R);return e&&N.forEach(function(O){return t(v,O)}),$e&&Ws(v,C),k}function g(v,x,b,j){var k=ci(b);if(typeof k!="function")throw Error(D(150));if(b=k.call(b),b==null)throw Error(D(151));for(var _=k=null,N=x,C=x=0,R=null,T=b.next();N!==null&&!T.done;C++,T=b.next()){N.index>C?(R=N,N=null):R=N.sibling;var O=p(v,N,T.value,j);if(O===null){N===null&&(N=R);break}e&&N&&O.alternate===null&&t(v,N),x=o(O,x,C),_===null?k=O:_.sibling=O,_=O,N=R}if(T.done)return r(v,N),$e&&Ws(v,C),k;if(N===null){for(;!T.done;C++,T=b.next())T=h(v,T.value,j),T!==null&&(x=o(T,x,C),_===null?k=T:_.sibling=T,_=T);return $e&&Ws(v,C),k}for(N=n(v,N);!T.done;C++,T=b.next())T=f(N,v,C,T.value,j),T!==null&&(e&&T.alternate!==null&&N.delete(T.key===null?C:T.key),x=o(T,x,C),_===null?k=T:_.sibling=T,_=T);return e&&N.forEach(function(I){return t(v,I)}),$e&&Ws(v,C),k}function w(v,x,b,j){if(typeof b=="object"&&b!==null&&b.type===Wa&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Xl:e:{for(var k=b.key,_=x;_!==null;){if(_.key===k){if(k=b.type,k===Wa){if(_.tag===7){r(v,_.sibling),x=s(_,b.props.children),x.return=v,v=x;break e}}else if(_.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Gn&&Dx(k)===_.type){r(v,_.sibling),x=s(_,b.props),x.ref=pi(v,_,b),x.return=v,v=x;break e}r(v,_);break}else t(v,_);_=_.sibling}b.type===Wa?(x=ua(b.props.children,v.mode,j,b.key),x.return=v,v=x):(j=Yc(b.type,b.key,b.props,null,v.mode,j),j.ref=pi(v,x,b),j.return=v,v=j)}return i(v);case Ha:e:{for(_=b.key;x!==null;){if(x.key===_)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){r(v,x.sibling),x=s(x,b.children||[]),x.return=v,v=x;break e}else{r(v,x);break}else t(v,x);x=x.sibling}x=Uh(b,v.mode,j),x.return=v,v=x}return i(v);case Gn:return _=b._init,w(v,x,_(b._payload),j)}if(Ni(b))return y(v,x,b,j);if(ci(b))return g(v,x,b,j);dc(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(r(v,x.sibling),x=s(x,b),x.return=v,v=x):(r(v,x),x=Fh(b,v.mode,j),x.return=v,v=x),i(v)):r(v,x)}return w}var Io=r1(!0),n1=r1(!1),jd=Cs(null),kd=null,eo=null,$m=null;function Dm(){$m=eo=kd=null}function Mm(e){var t=jd.current;Oe(jd),e._currentValue=t}function Zf(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function co(e,t){kd=e,$m=eo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(At=!0),e.firstContext=null)}function dr(e){var t=e._currentValue;if($m!==e)if(e={context:e,memoizedValue:t,next:null},eo===null){if(kd===null)throw Error(D(308));eo=e,kd.dependencies={lanes:0,firstContext:e}}else eo=eo.next=e;return t}var Qs=null;function zm(e){Qs===null?Qs=[e]:Qs.push(e)}function s1(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,zm(t)):(r.next=s.next,s.next=r),t.interleaved=r,Cn(e,n)}function Cn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Zn=!1;function Fm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function a1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function kn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ps(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,xe&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Cn(e,r)}return s=n.interleaved,s===null?(t.next=t,zm(n)):(t.next=s.next,s.next=t),n.interleaved=t,Cn(e,r)}function Wc(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Nm(e,r)}}function Mx(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function _d(e,t,r,n){var s=e.updateQueue;Zn=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,d=c.next;c.next=null,i===null?o=d:i.next=d,i=c;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==i&&(l===null?u.firstBaseUpdate=d:l.next=d,u.lastBaseUpdate=c))}if(o!==null){var h=s.baseState;i=0,u=d=c=null,l=o;do{var p=l.lane,f=l.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,g=l;switch(p=t,f=r,g.tag){case 1:if(y=g.payload,typeof y=="function"){h=y.call(f,h,p);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,p=typeof y=="function"?y.call(f,h,p):y,p==null)break e;h=Ue({},h,p);break e;case 2:Zn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[l]:p.push(l))}else f={eventTime:f,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(d=u=f,c=h):u=u.next=f,i|=p;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;p=l,l=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(u===null&&(c=h),s.baseState=c,s.firstBaseUpdate=d,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);ga|=i,e.lanes=i,e.memoizedState=h}}function zx(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(D(191,s));s.call(n)}}}var $l={},nn=Cs($l),sl=Cs($l),al=Cs($l);function Ys(e){if(e===$l)throw Error(D(174));return e}function Um(e,t){switch(Pe(al,t),Pe(sl,e),Pe(nn,$l),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Rf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Rf(t,e)}Oe(nn),Pe(nn,t)}function $o(){Oe(nn),Oe(sl),Oe(al)}function o1(e){Ys(al.current);var t=Ys(nn.current),r=Rf(t,e.type);t!==r&&(Pe(sl,e),Pe(nn,r))}
vendor: 7,613 bytes, line 38
38function Bm(e){sl.current===e&&(Oe(nn),Oe(sl))}var ze=Cs(0);function Nd(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lh=[];function qm(){for(var e=0;e<Lh.length;e++)Lh[e]._workInProgressVersionPrimary=null;Lh.length=0}var Kc=On.ReactCurrentDispatcher,Ih=On.ReactCurrentBatchConfig,ma=0,Fe=null,Qe=null,at=null,Sd=!1,zi=!1,ol=0,JE=0;function ft(){throw Error(D(321))}function Vm(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!$r(e[r],t[r]))return!1;return!0}function Hm(e,t,r,n,s,o){if(ma=o,Fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Kc.current=e===null||e.memoizedState===null?eR:tR,e=r(n,s),zi){o=0;do{if(zi=!1,ol=0,25<=o)throw Error(D(301));o+=1,at=Qe=null,t.updateQueue=null,Kc.current=rR,e=r(n,s)}while(zi)}if(Kc.current=Cd,t=Qe!==null&&Qe.next!==null,ma=0,at=Qe=Fe=null,Sd=!1,t)throw Error(D(300));return e}function Wm(){var e=ol!==0;return ol=0,e}function Hr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?Fe.memoizedState=at=e:at=at.next=e,at}function ur(){if(Qe===null){var e=Fe.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=at===null?Fe.memoizedState:at.next;if(t!==null)at=t,Qe=e;else{if(e===null)throw Error(D(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},at===null?Fe.memoizedState=at=e:at=at.next=e}return at}function il(e,t){return typeof t=="function"?t(e):t}function $h(e){var t=ur(),r=t.queue;if(r===null)throw Error(D(311));r.lastRenderedReducer=e;var n=Qe,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var l=i=null,c=null,d=o;do{var u=d.lane;if((ma&u)===u)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var h={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(l=c=h,i=n):c=c.next=h,Fe.lanes|=u,ga|=u}d=d.next}while(d!==null&&d!==o);c===null?i=n:c.next=l,$r(n,t.memoizedState)||(At=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,Fe.lanes|=o,ga|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Dh(e){var t=ur(),r=t.queue;if(r===null)throw Error(D(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);$r(o,t.memoizedState)||(At=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function i1(){}function l1(e,t){var r=Fe,n=ur(),s=t(),o=!$r(n.memoizedState,s);if(o&&(n.memoizedState=s,At=!0),n=n.queue,Km(u1.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||at!==null&&at.memoizedState.tag&1){if(r.flags|=2048,ll(9,d1.bind(null,r,n,s,t),void 0,null),it===null)throw Error(D(349));ma&30||c1(r,t,s)}return s}function c1(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Fe.updateQueue,t===null?(t={lastEffect:null,stores:null},Fe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function d1(e,t,r,n){t.value=r,t.getSnapshot=n,h1(t)&&f1(e)}function u1(e,t,r){return r(function(){h1(t)&&f1(e)})}function h1(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!$r(e,r)}catch{return!0}}function f1(e){var t=Cn(e,1);t!==null&&Lr(t,e,1,-1)}function Fx(e){var t=Hr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:e},t.queue=e,e=e.dispatch=XE.bind(null,Fe,e),[t.memoizedState,e]}function ll(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Fe.updateQueue,t===null?(t={lastEffect:null,stores:null},Fe.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function p1(){return ur().memoizedState}function Gc(e,t,r,n){var s=Hr();Fe.flags|=e,s.memoizedState=ll(1|t,r,void 0,n===void 0?null:n)}function du(e,t,r,n){var s=ur();n=n===void 0?null:n;var o=void 0;if(Qe!==null){var i=Qe.memoizedState;if(o=i.destroy,n!==null&&Vm(n,i.deps)){s.memoizedState=ll(t,r,o,n);return}}Fe.flags|=e,s.memoizedState=ll(1|t,r,o,n)}function Ux(e,t){return Gc(8390656,8,e,t)}function Km(e,t){return du(2048,8,e,t)}function m1(e,t){return du(4,2,e,t)}function g1(e,t){return du(4,4,e,t)}function v1(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function x1(e,t,r){return r=r!=null?r.concat([e]):null,du(4,4,v1.bind(null,t,e),r)}function Gm(){}function y1(e,t){var r=ur();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Vm(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function b1(e,t){var r=ur();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Vm(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function w1(e,t,r){return ma&21?($r(r,t)||(r=Sw(),Fe.lanes|=r,ga|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,At=!0),e.memoizedState=r)}function QE(e,t){var r=_e;_e=r!==0&&4>r?r:4,e(!0);var n=Ih.transition;Ih.transition={};try{e(!1),t()}finally{_e=r,Ih.transition=n}}function j1(){return ur().memoizedState}function YE(e,t,r){var n=gs(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},k1(e))_1(t,r);else if(r=s1(e,t,r,n),r!==null){var s=kt();Lr(r,e,n,s),N1(r,t,n)}}function XE(e,t,r){var n=gs(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(k1(e))_1(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,l=o(i,r);if(s.hasEagerState=!0,s.eagerState=l,$r(l,i)){var c=t.interleaved;c===null?(s.next=s,zm(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}r=s1(e,t,s,n),r!==null&&(s=kt(),Lr(r,e,n,s),N1(r,t,n))}}function k1(e){var t=e.alternate;return e===Fe||t!==null&&t===Fe}function _1(e,t){zi=Sd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function N1(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Nm(e,r)}}var Cd={readContext:dr,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useInsertionEffect:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useSyncExternalStore:ft,useId:ft,unstable_isNewReconciler:!1},eR={readContext:dr,useCallback:function(e,t){return Hr().memoizedState=[e,t===void 0?null:t],e},useContext:dr,useEffect:Ux,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Gc(4194308,4,v1.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Gc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gc(4,2,e,t)},useMemo:function(e,t){var r=Hr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Hr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=YE.bind(null,Fe,e),[n.memoizedState,e]}
vendor: 5,922 bytes, lines 38-40
38,useRef:function(e){var t=Hr();return e={current:e},t.memoizedState=e},useState:Fx,useDebugValue:Gm,useDeferredValue:function(e){return Hr().memoizedState=e},useTransition:function(){var e=Fx(!1),t=e[0];return e=QE.bind(null,e[1]),Hr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Fe,s=Hr();if($e){if(r===void 0)throw Error(D(407));r=r()}else{if(r=t(),it===null)throw Error(D(349));ma&30||c1(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,Ux(u1.bind(null,n,o,e),[e]),n.flags|=2048,ll(9,d1.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Hr(),t=it.identifierPrefix;if($e){var r=jn,n=wn;r=(n&~(1<<32-Or(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ol++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=JE++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},tR={readContext:dr,useCallback:y1,useContext:dr,useEffect:Km,useImperativeHandle:x1,useInsertionEffect:m1,useLayoutEffect:g1,useMemo:b1,useReducer:$h,useRef:p1,useState:function(){return $h(il)},useDebugValue:Gm,useDeferredValue:function(e){var t=ur();return w1(t,Qe.memoizedState,e)},useTransition:function(){var e=$h(il)[0],t=ur().memoizedState;return[e,t]},useMutableSource:i1,useSyncExternalStore:l1,useId:j1,unstable_isNewReconciler:!1},rR={readContext:dr,useCallback:y1,useContext:dr,useEffect:Km,useImperativeHandle:x1,useInsertionEffect:m1,useLayoutEffect:g1,useMemo:b1,useReducer:Dh,useRef:p1,useState:function(){return Dh(il)},useDebugValue:Gm,useDeferredValue:function(e){var t=ur();return Qe===null?t.memoizedState=e:w1(t,Qe.memoizedState,e)},useTransition:function(){var e=Dh(il)[0],t=ur().memoizedState;return[e,t]},useMutableSource:i1,useSyncExternalStore:l1,useId:j1,unstable_isNewReconciler:!1};function _r(e,t){if(e&&e.defaultProps){t=Ue({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Jf(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Ue({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var uu={isMounted:function(e){return(e=e._reactInternals)?Sa(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=kt(),s=gs(e),o=kn(n,s);o.payload=t,r!=null&&(o.callback=r),t=ps(e,o,s),t!==null&&(Lr(t,e,s,n),Wc(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=kt(),s=gs(e),o=kn(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=ps(e,o,s),t!==null&&(Lr(t,e,s,n),Wc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=kt(),n=gs(e),s=kn(r,n);s.tag=2,t!=null&&(s.callback=t),t=ps(e,s,n),t!==null&&(Lr(t,e,n,r),Wc(t,e,n))}};function Bx(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!el(r,n)||!el(s,o):!0}function S1(e,t,r){var n=!1,s=ws,o=t.contextType;return typeof o=="object"&&o!==null?o=dr(o):(s=Lt(t)?fa:xt.current,n=t.contextTypes,o=(n=n!=null)?Oo(e,s):ws),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uu,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function qx(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&uu.enqueueReplaceState(t,t.state,null)}function Qf(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Fm(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=dr(o):(o=Lt(t)?fa:xt.current,s.context=Oo(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Jf(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&uu.enqueueReplaceState(s,s.state,null),_d(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Do(e,t){try{var r="",n=t;do r+=PC(n),n=n.return;while(n);var s=r}catch(o){s=` 39Error generating stack: `+o.message+` 40`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Mh(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Yf(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var nR=typeof WeakMap=="function"?WeakMap:Map;function C1(e,t,r){r=kn(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Rd||(Rd=!0,lp=n),Yf(e,t)},r}function E1(e,t,r){r=kn(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Yf(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){Yf(e,t),typeof n!="function"&&(ms===null?ms=new Set([this]):ms.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Vx(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new nR;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=vR.bind(null,e,t,r),t.then(e,e))}function Hx(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Wx(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=kn(-1,1),t.tag=2,ps(r,t,1))),r.lanes|=1),e)}var sR=On.ReactCurrentOwner,At=!1;function jt(e,t,r,n){t.child=e===null?n1(t,null,r,n):Io(t,e.child,r,n)}function Kx(e,t,r,n,s){r=r.render;var o=t.ref;
vendor: 6,220 bytes, line 40
40return co(t,s),n=Hm(e,t,r,n,o,s),r=Wm(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,En(e,t,s)):($e&&r&&Om(t),t.flags|=1,jt(e,t,n,s),t.child)}function Gx(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!rg(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,R1(e,t,o,n,s)):(e=Yc(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:el,r(i,n)&&e.ref===t.ref)return En(e,t,s)}return t.flags|=1,e=vs(o,n),e.ref=t.ref,e.return=t,t.child=e}function R1(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(el(o,n)&&e.ref===t.ref)if(At=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(At=!0);else return t.lanes=e.lanes,En(e,t,s)}return Xf(e,t,r,n,s)}function P1(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pe(ro,Bt),Bt|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Pe(ro,Bt),Bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,Pe(ro,Bt),Bt|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,Pe(ro,Bt),Bt|=n;return jt(e,t,s,r),t.child}function T1(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Xf(e,t,r,n,s){var o=Lt(r)?fa:xt.current;return o=Oo(t,o),co(t,s),r=Hm(e,t,r,n,o,s),n=Wm(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,En(e,t,s)):($e&&n&&Om(t),t.flags|=1,jt(e,t,r,s),t.child)}function Zx(e,t,r,n,s){if(Lt(r)){var o=!0;yd(t)}else o=!1;if(co(t,s),t.stateNode===null)Zc(e,t),S1(t,r,n),Qf(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,d=r.contextType;typeof d=="object"&&d!==null?d=dr(d):(d=Lt(r)?fa:xt.current,d=Oo(t,d));var u=r.getDerivedStateFromProps,h=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==n||c!==d)&&qx(t,i,n,d),Zn=!1;var p=t.memoizedState;i.state=p,_d(t,n,i,s),c=t.memoizedState,l!==n||p!==c||Ot.current||Zn?(typeof u=="function"&&(Jf(t,r,u,n),c=t.memoizedState),(l=Zn||Bx(t,r,l,n,p,c,d))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),i.props=n,i.state=c,i.context=d,n=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,a1(e,t),l=t.memoizedProps,d=t.type===t.elementType?l:_r(t.type,l),i.props=d,h=t.pendingProps,p=i.context,c=r.contextType,typeof c=="object"&&c!==null?c=dr(c):(c=Lt(r)?fa:xt.current,c=Oo(t,c));var f=r.getDerivedStateFromProps;(u=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==h||p!==c)&&qx(t,i,n,c),Zn=!1,p=t.memoizedState,i.state=p,_d(t,n,i,s);var y=t.memoizedState;l!==h||p!==y||Ot.current||Zn?(typeof f=="function"&&(Jf(t,r,f,n),y=t.memoizedState),(d=Zn||Bx(t,r,d,n,p,y,c)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,y,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,y,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),i.props=n,i.state=y,i.context=c,n=d):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return ep(e,t,r,n,o,s)}function ep(e,t,r,n,s,o){T1(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&Lx(t,r,!1),En(e,t,o);n=t.stateNode,sR.current=t;var l=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=Io(t,e.child,null,o),t.child=Io(t,null,l,o)):jt(e,t,l,o),t.memoizedState=n.state,s&&Lx(t,r,!0),t.child}function A1(e){var t=e.stateNode;t.pendingContext?Ox(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ox(e,t.context,!1),Um(e,t.containerInfo)}function Jx(e,t,r,n,s){return Lo(),Im(s),t.flags|=256,jt(e,t,r,n),t.child}var tp={dehydrated:null,treeContext:null,retryLane:0};function rp(e){return{baseLanes:e,cachePool:null,transitions:null}}function O1(e,t,r){var n=t.pendingProps,s=ze.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Pe(ze,s&1),e===null)return Gf(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=pu(i,n,0,null),e=ua(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=rp(r),t.memoizedState=tp,e):Zm(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return aR(e,t,i,n,l,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=vs(s,c),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=vs(l,o):(o=ua(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?rp(r):{base
vendor: 7,075 bytes, line 40
40Lanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=tp,n}return o=e.child,e=o.sibling,n=vs(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Zm(e,t){return t=pu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function uc(e,t,r,n){return n!==null&&Im(n),Io(t,e.child,null,r),e=Zm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function aR(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=Mh(Error(D(422))),uc(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=pu({mode:"visible",children:n.children},s,0,null),o=ua(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&Io(t,e.child,null,i),t.child.memoizedState=rp(i),t.memoizedState=tp,o);if(!(t.mode&1))return uc(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,o=Error(D(419)),n=Mh(o,n,void 0),uc(e,t,i,n)}if(l=(i&e.childLanes)!==0,At||l){if(n=it,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Cn(e,s),Lr(n,e,s,-1))}return tg(),n=Mh(Error(D(421))),uc(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=xR.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Kt=fs(s.nextSibling),Gt=t,$e=!0,Tr=null,e!==null&&(or[ir++]=wn,or[ir++]=jn,or[ir++]=pa,wn=e.id,jn=e.overflow,pa=t),t=Zm(t,n.children),t.flags|=4096,t)}function Qx(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Zf(e.return,t,r)}function zh(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function L1(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(jt(e,t,n.children,r),n=ze.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qx(e,r,t);else if(e.tag===19)Qx(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Pe(ze,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Nd(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),zh(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Nd(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}zh(t,!0,r,null,o);break;case"together":zh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Zc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function En(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ga|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,r=vs(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=vs(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function oR(e,t,r){switch(t.tag){case 3:A1(t),Lo();break;case 5:o1(t);break;case 1:Lt(t.type)&&yd(t);break;case 4:Um(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;Pe(jd,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Pe(ze,ze.current&1),t.flags|=128,null):r&t.child.childLanes?O1(e,t,r):(Pe(ze,ze.current&1),e=En(e,t,r),e!==null?e.sibling:null);Pe(ze,ze.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return L1(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Pe(ze,ze.current),n)break;return null;case 22:case 23:return t.lanes=0,P1(e,t,r)}return En(e,t,r)}var I1,np,$1,D1;I1=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};np=function(){};$1=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Ys(nn.current);var o=null;switch(r){case"input":s=Nf(e,s),n=Nf(e,n),o=[];break;case"select":s=Ue({},s,{value:void 0}),n=Ue({},n,{value:void 0}),o=[];break;case"textarea":s=Ef(e,s),n=Ef(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=vd)}Pf(r,n);var i;r=null;for(d in s)if(!n.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var l=s[d];for(i in l)l.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Ki.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in n){var c=n[d];if(l=s!=null?s[d]:void 0,n.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(r||(r={}),r[i]=c[i])}else r||(o||(o=[]),o.push(d,r)),r=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Ki.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&Ae("scroll",e),o||l===c||(o=[])):(o=o||[]).push(d,c))}r&&(o=o||[]).push("style",r);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};D1=function(e,t,r,n){r!==n&&(t.flags|=4)};function mi(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function iR(e,t,r){var n=t.pendingProps;switch(Lm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return Lt(t.type)&&xd(),pt(t),null;
vendor: 33,768 bytes, line 40
40case 3:return n=t.stateNode,$o(),Oe(Ot),Oe(xt),qm(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(cc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Tr!==null&&(up(Tr),Tr=null))),np(e,t),pt(t),null;case 5:Bm(t);var s=Ys(al.current);if(r=t.type,e!==null&&t.stateNode!=null)$1(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(D(166));return pt(t),null}if(e=Ys(nn.current),cc(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Yr]=t,n[nl]=o,e=(t.mode&1)!==0,r){case"dialog":Ae("cancel",n),Ae("close",n);break;case"iframe":case"object":case"embed":Ae("load",n);break;case"video":case"audio":for(s=0;s<Ci.length;s++)Ae(Ci[s],n);break;case"source":Ae("error",n);break;case"img":case"image":case"link":Ae("error",n),Ae("load",n);break;case"details":Ae("toggle",n);break;case"input":ox(n,o),Ae("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},Ae("invalid",n);break;case"textarea":lx(n,o),Ae("invalid",n)}Pf(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="children"?typeof l=="string"?n.textContent!==l&&(o.suppressHydrationWarning!==!0&&lc(n.textContent,l,e),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&lc(n.textContent,l,e),s=["children",""+l]):Ki.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&Ae("scroll",n)}switch(r){case"input":ec(n),ix(n,o,!0);break;case"textarea":ec(n),cx(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=vd)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=uw(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Yr]=t,e[nl]=n,I1(e,t,!1,!1),t.stateNode=e;e:{switch(i=Tf(r,n),r){case"dialog":Ae("cancel",e),Ae("close",e),s=n;break;case"iframe":case"object":case"embed":Ae("load",e),s=n;break;case"video":case"audio":for(s=0;s<Ci.length;s++)Ae(Ci[s],e);s=n;break;case"source":Ae("error",e),s=n;break;case"img":case"image":case"link":Ae("error",e),Ae("load",e),s=n;break;case"details":Ae("toggle",e),s=n;break;case"input":ox(e,n),s=Nf(e,n),Ae("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Ue({},n,{value:void 0}),Ae("invalid",e);break;case"textarea":lx(e,n),s=Ef(e,n),Ae("invalid",e);break;default:s=n}Pf(r,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?pw(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&hw(e,c)):o==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Gi(e,c):typeof c=="number"&&Gi(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ki.hasOwnProperty(o)?c!=null&&o==="onScroll"&&Ae("scroll",e):c!=null&&ym(e,o,c,i))}switch(r){case"input":ec(e),ix(e,n,!1);break;case"textarea":ec(e),cx(e);break;case"option":n.value!=null&&e.setAttribute("value",""+bs(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?ao(e,!!n.multiple,o,!1):n.defaultValue!=null&&ao(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=vd)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pt(t),null;case 6:if(e&&t.stateNode!=null)D1(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(D(166));if(r=Ys(al.current),Ys(nn.current),cc(t)){if(n=t.stateNode,r=t.memoizedProps,n[Yr]=t,(o=n.nodeValue!==r)&&(e=Gt,e!==null))switch(e.tag){case 3:lc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&lc(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Yr]=t,t.stateNode=n}return pt(t),null;case 13:if(Oe(ze),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($e&&Kt!==null&&t.mode&1&&!(t.flags&128))t1(),Lo(),t.flags|=98560,o=!1;else if(o=cc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(D(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(D(317));o[Yr]=t}else Lo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pt(t),o=!1}else Tr!==null&&(up(Tr),Tr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||ze.current&1?Xe===0&&(Xe=3):tg())),t.updateQueue!==null&&(t.flags|=4),pt(t),null);case 4:return $o(),np(e,t),e===null&&tl(t.stateNode.containerInfo),pt(t),null;case 10:return Mm(t.type._context),pt(t),null;case 17:return Lt(t.type)&&xd(),pt(t),null;case 19:if(Oe(ze),o=t.memoizedState,o===null)return pt(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)mi(o,!1);else{if(Xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Nd(e),i!==null){for(t.flags|=128,mi(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Pe(ze,ze.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ke()>Mo&&(t.flags|=128,n=!0,mi(o,!1),t.lanes=4194304)}else{if(!n)if(e=Nd(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),mi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!$e)return pt(t),null}else 2*Ke()-o.renderingStartTime>Mo&&r!==1073741824&&(t.flags|=128,n=!0,mi(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ke(),t.sibling=null,r=ze.current,Pe(ze,n?r&1|2:r&1),t):(pt(t),null);case 22:case 23:return eg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Bt&1073741824&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function lR(e,t){switch(Lm(t),t.tag){case 1:return Lt(t.type)&&xd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $o(),Oe(Ot),Oe(xt),qm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Bm(t),null;case 13:if(Oe(ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Lo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(ze),null;case 4:return $o(),null;case 10:return Mm(t.type._context),null;case 22:case 23:return eg(),null;case 24:return null;default:return null}}var hc=!1,vt=!1,cR=typeof WeakSet=="function"?WeakSet:Set,G=null;function to(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){He(e,t,n)}else r.current=null}function sp(e,t,r){try{r()}catch(n){He(e,t,n)}}var Yx=!1;function dR(e,t){if(Uf=pd,e=Bw(),Am(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,l=-1,c=-1,d=0,u=0,h=e,p=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(l=i+s),h!==o||n!==0&&h.nodeType!==3||(c=i+n),h.nodeType===3&&(i+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===e)break t;if(p===r&&++d===s&&(l=i),p===o&&++u===n&&(c=i),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Bf={focusedElem:e,selectionRange:r},pd=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,w=y.memoizedState,v=t.stateNode,x=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:_r(t.type,g),w);v.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(j){He(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return y=Yx,Yx=!1,y}function Fi(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&sp(t,r,o)}s=s.next}while(s!==n)}}function hu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ap(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function M1(e){var t=e.alternate;t!==null&&(e.alternate=null,M1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Yr],delete t[nl],delete t[Hf],delete t[WE],delete t[KE])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function z1(e){return e.tag===5||e.tag===3||e.tag===4}function Xx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||z1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function op(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=vd));else if(n!==4&&(e=e.child,e!==null))for(op(e,t,r),e=e.sibling;e!==null;)op(e,t,r),e=e.sibling}function ip(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ip(e,t,r),e=e.sibling;e!==null;)ip(e,t,r),e=e.sibling}var lt=null,Er=!1;function Bn(e,t,r){for(r=r.child;r!==null;)F1(e,t,r),r=r.sibling}function F1(e,t,r){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(su,r)}catch{}switch(r.tag){case 5:vt||to(r,t);case 6:var n=lt,s=Er;lt=null,Bn(e,t,r),lt=n,Er=s,lt!==null&&(Er?(e=lt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):lt.removeChild(r.stateNode));break;case 18:lt!==null&&(Er?(e=lt,r=r.stateNode,e.nodeType===8?Ah(e.parentNode,r):e.nodeType===1&&Ah(e,r),Yi(e)):Ah(lt,r.stateNode));break;case 4:n=lt,s=Er,lt=r.stateNode.containerInfo,Er=!0,Bn(e,t,r),lt=n,Er=s;break;case 0:case 11:case 14:case 15:if(!vt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&sp(r,t,i),s=s.next}while(s!==n)}Bn(e,t,r);break;case 1:if(!vt&&(to(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){He(r,t,l)}Bn(e,t,r);break;case 21:Bn(e,t,r);break;case 22:r.mode&1?(vt=(n=vt)||r.memoizedState!==null,Bn(e,t,r),vt=n):Bn(e,t,r);break;default:Bn(e,t,r)}}function ey(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new cR),t.forEach(function(n){var s=yR.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function yr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:lt=l.stateNode,Er=!1;break e;case 3:lt=l.stateNode.containerInfo,Er=!0;break e;case 4:lt=l.stateNode.containerInfo,Er=!0;break e}l=l.return}if(lt===null)throw Error(D(160));F1(o,i,s),lt=null,Er=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(d){He(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)U1(t,e),t=t.sibling}function U1(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yr(t,e),qr(e),n&4){try{Fi(3,e,e.return),hu(3,e)}catch(g){He(e,e.return,g)}try{Fi(5,e,e.return)}catch(g){He(e,e.return,g)}}break;case 1:yr(t,e),qr(e),n&512&&r!==null&&to(r,r.return);break;case 5:if(yr(t,e),qr(e),n&512&&r!==null&&to(r,r.return),e.flags&32){var s=e.stateNode;try{Gi(s,"")}catch(g){He(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&cw(s,o),Tf(l,i);var d=Tf(l,o);for(i=0;i<c.length;i+=2){var u=c[i],h=c[i+1];u==="style"?pw(s,h):u==="dangerouslySetInnerHTML"?hw(s,h):u==="children"?Gi(s,h):ym(s,u,h,d)}switch(l){case"input":Sf(s,o);break;case"textarea":dw(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var f=o.value;f!=null?ao(s,!!o.multiple,f,!1):p!==!!o.multiple&&(o.defaultValue!=null?ao(s,!!o.multiple,o.defaultValue,!0):ao(s,!!o.multiple,o.multiple?[]:"",!1))}s[nl]=o}catch(g){He(e,e.return,g)}}break;case 6:if(yr(t,e),qr(e),n&4){if(e.stateNode===null)throw Error(D(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(g){He(e,e.return,g)}}break;case 3:if(yr(t,e),qr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Yi(t.containerInfo)}catch(g){He(e,e.return,g)}break;case 4:yr(t,e),qr(e);break;case 13:yr(t,e),qr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Ym=Ke())),n&4&&ey(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(vt=(d=vt)||u,yr(t,e),vt=d):yr(t,e),qr(e),n&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!u&&e.mode&1)for(G=e,u=e.child;u!==null;){for(h=G=u;G!==null;){switch(p=G,f=p.child,p.tag){case 0:case 11:case 14:case 15:Fi(4,p,p.return);break;case 1:to(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(g){He(n,r,g)}}break;case 5:to(p,p.return);break;case 22:if(p.memoizedState!==null){ry(h);continue}}f!==null?(f.return=p,G=f):ry(h)}u=u.sibling}e:for(u=null,h=e;;){if(h.tag===5){if(u===null){u=h;try{s=h.stateNode,d?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=h.stateNode,c=h.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=fw("display",i))}catch(g){He(e,e.return,g)}}}else if(h.tag===6){if(u===null)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(g){He(e,e.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:yr(t,e),qr(e),n&4&&ey(e);break;case 21:break;default:yr(t,e),qr(e)}}function qr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(z1(r)){var n=r;break e}r=r.return}throw Error(D(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Gi(s,""),n.flags&=-33);var o=Xx(e);ip(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,l=Xx(e);op(e,l,i);break;default:throw Error(D(161))}}catch(c){He(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function uR(e,t,r){G=e,B1(e)}function B1(e,t,r){for(var n=(e.mode&1)!==0;G!==null;){var s=G,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||hc;if(!i){var l=s.alternate,c=l!==null&&l.memoizedState!==null||vt;l=hc;var d=vt;if(hc=i,(vt=c)&&!d)for(G=s;G!==null;)i=G,c=i.child,i.tag===22&&i.memoizedState!==null?ny(s):c!==null?(c.return=i,G=c):ny(s);for(;o!==null;)G=o,B1(o),o=o.sibling;G=s,hc=l,vt=d}ty(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,G=o):ty(e)}}function ty(e){for(;G!==null;){var t=G;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vt||hu(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!vt)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:_r(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&zx(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}zx(t,i,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var u=d.memoizedState;if(u!==null){var h=u.dehydrated;h!==null&&Yi(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}vt||t.flags&512&&ap(t)}catch(p){He(t,t.return,p)}}if(t===e){G=null;break}if(r=t.sibling,r!==null){r.return=t.return,G=r;break}G=t.return}}function ry(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var r=t.sibling;if(r!==null){r.return=t.return,G=r;break}G=t.return}}function ny(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{hu(4,t)}catch(c){He(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(c){He(t,s,c)}}var o=t.return;try{ap(t)}catch(c){He(t,o,c)}break;case 5:var i=t.return;try{ap(t)}catch(c){He(t,i,c)}}}catch(c){He(t,t.return,c)}if(t===e){G=null;break}var l=t.sibling;if(l!==null){l.return=t.return,G=l;break}G=t.return}}var hR=Math.ceil,Ed=On.ReactCurrentDispatcher,Jm=On.ReactCurrentOwner,cr=On.ReactCurrentBatchConfig,xe=0,it=null,Je=null,dt=0,Bt=0,ro=Cs(0),Xe=0,cl=null,ga=0,fu=0,Qm=0,Ui=null,Tt=null,Ym=0,Mo=1/0,pn=null,Rd=!1,lp=null,ms=null,fc=!1,cs=null,Pd=0,Bi=0,cp=null,Jc=-1,Qc=0;function kt(){return xe&6?Ke():Jc!==-1?Jc:Jc=Ke()}function gs(e){return e.mode&1?xe&2&&dt!==0?dt&-dt:ZE.transition!==null?(Qc===0&&(Qc=Sw()),Qc):(e=_e,e!==0||(e=window.event,e=e===void 0?16:Ow(e.type)),e):1}function Lr(e,t,r,n){if(50<Bi)throw Bi=0,cp=null,Error(D(185));Ol(e,r,n),(!(xe&2)||e!==it)&&(e===it&&(!(xe&2)&&(fu|=r),Xe===4&&Qn(e,dt)),It(e,n),r===1&&xe===0&&!(t.mode&1)&&(Mo=Ke()+500,cu&&Es()))}function It(e,t){var r=e.callbackNode;ZC(e,t);var n=fd(e,e===it?dt:0);if(n===0)r!==null&&hx(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&hx(r),t===1)e.tag===0?GE(sy.bind(null,e)):Yw(sy.bind(null,e)),VE(function(){!(xe&6)&&Es()}),r=null;else{switch(Cw(n)){case 1:r=_m;break;case 4:r=_w;break;case 16:r=hd;break;case 536870912:r=Nw;break;default:r=hd}r=J1(r,q1.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function q1(e,t){if(Jc=-1,Qc=0,xe&6)throw Error(D(327));var r=e.callbackNode;if(uo()&&e.callbackNode!==r)return null;var n=fd(e,e===it?dt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Td(e,n);else{t=n;var s=xe;xe|=2;var o=H1();(it!==e||dt!==t)&&(pn=null,Mo=Ke()+500,da(e,t));do try{mR();break}catch(l){V1(e,l)}while(!0);Dm(),Ed.current=o,xe=s,Je!==null?t=0:(it=null,dt=0,t=Xe)}if(t!==0){if(t===2&&(s=$f(e),s!==0&&(n=s,t=dp(e,s))),t===1)throw r=cl,da(e,0),Qn(e,n),It(e,Ke()),r;if(t===6)Qn(e,n);else{if(s=e.current.alternate,!(n&30)&&!fR(s)&&(t=Td(e,n),t===2&&(o=$f(e),o!==0&&(n=o,t=dp(e,o))),t===1))throw r=cl,da(e,0),Qn(e,n),It(e,Ke()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(D(345));case 2:Ks(e,Tt,pn);break;case 3:if(Qn(e,n),(n&130023424)===n&&(t=Ym+500-Ke(),10<t)){if(fd(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){kt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Vf(Ks.bind(null,e,Tt,pn),t);break}Ks(e,Tt,pn);break;case 4:if(Qn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-Or(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=Ke()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*hR(n/1960))-n,10<n){e.timeoutHandle=Vf(Ks.bind(null,e,Tt,pn),n);break}Ks(e,Tt,pn);break;case 5:Ks(e,Tt,pn);break;default:throw Error(D(329))}}}return It(e,Ke()),e.callbackNode===r?q1.bind(null,e):null}function dp(e,t){var r=Ui;return e.current.memoizedState.isDehydrated&&(da(e,t).flags|=256),e=Td(e,t),e!==2&&(t=Tt,Tt=r,t!==null&&up(t)),e}function up(e){Tt===null?Tt=e:Tt.push.apply(Tt,e)}function fR(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!$r(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qn(e,t){for(t&=~Qm,t&=~fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Or(t),n=1<<r;e[r]=-1,t&=~n}}function sy(e){if(xe&6)throw Error(D(327));uo();var t=fd(e,0);if(!(t&1))return It(e,Ke()),null;var r=Td(e,t);if(e.tag!==0&&r===2){var n=$f(e);n!==0&&(t=n,r=dp(e,n))}if(r===1)throw r=cl,da(e,0),Qn(e,t),It(e,Ke()),r;if(r===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ks(e,Tt,pn),It(e,Ke()),null}function Xm(e,t){var r=xe;xe|=1;try{return e(t)}finally{xe=r,xe===0&&(Mo=Ke()+500,cu&&Es())}}function va(e){cs!==null&&cs.tag===0&&!(xe&6)&&uo();var t=xe;xe|=1;var r=cr.transition,n=_e;try{if(cr.transition=null,_e=1,e)return e()}finally{_e=n,cr.transition=r,xe=t,!(xe&6)&&Es()}}function eg(){Bt=ro.current,Oe(ro)}function da(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,qE(r)),Je!==null)for(r=Je.return;r!==null;){var n=r;switch(Lm(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&xd();break;case 3:$o(),Oe(Ot),Oe(xt),qm();break;case 5:Bm(n);break;case 4:$o();break;case 13:Oe(ze);break;case 19:Oe(ze);break;case 10:Mm(n.type._context);break;case 22:case 23:eg()}r=r.return}if(it=e,Je=e=vs(e.current,null),dt=Bt=t,Xe=0,cl=null,Qm=fu=ga=0,Tt=Ui=null,Qs!==null){for(t=0;t<Qs.length;t++)if(r=Qs[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}Qs=null}return e}function V1(e,t){do{var r=Je;try{if(Dm(),Kc.current=Cd,Sd){for(var n=Fe.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Sd=!1}if(ma=0,at=Qe=Fe=null,zi=!1,ol=0,Jm.current=null,r===null||r.return===null){Xe=1,cl=t,Je=null;break}e:{var o=e,i=r.return,l=r,c=t;if(t=dt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,u=l,h=u.tag;if(!(u.mode&1)&&(h===0||h===11||h===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=Hx(i);if(f!==null){f.flags&=-257,Wx(f,i,l,o,t),f.mode&1&&Vx(o,d,t),t=f,c=d;var y=t.updateQueue;if(y===null){var g=new Set;g.add(c),t.updateQueue=g}else y.add(c);break e}else{if(!(t&1)){Vx(o,d,t),tg();break e}c=Error(D(426))}}else if($e&&l.mode&1){var w=Hx(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Wx(w,i,l,o,t),Im(Do(c,l));break e}}o=c=Do(c,l),Xe!==4&&(Xe=2),Ui===null?Ui=[o]:Ui.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=C1(o,c,t);Mx(o,v);break e;case 1:l=c;var x=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ms===null||!ms.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var j=E1(o,l,t);Mx(o,j);break e}}o=o.return}while(o!==null)}K1(r)}catch(k){t=k,Je===r&&r!==null&&(Je=r=r.return);continue}break}while(!0)}function H1(){var e=Ed.current;return Ed.current=Cd,e===null?Cd:e}function tg(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),it===null||!(ga&268435455)&&!(fu&268435455)||Qn(it,dt)}function Td(e,t){var r=xe;xe|=2;var n=H1();(it!==e||dt!==t)&&(pn=null,da(e,t));do try{pR();break}catch(s){V1(e,s)}while(!0);if(Dm(),xe=r,Ed.current=n,Je!==null)throw Error(D(261));return it=null,dt=0,Xe}function pR(){for(;Je!==null;)W1(Je)}function mR(){for(;Je!==null&&!FC();)W1(Je)}function W1(e){var t=Z1(e.alternate,e,Bt);e.memoizedProps=e.pendingProps,t===null?K1(e):Je=t,Jm.current=null}function K1(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=lR(r,t),r!==null){r.flags&=32767,Je=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Je=null;return}}else if(r=iR(r,t,Bt),r!==null){Je=r;return}if(t=t.sibling,t!==null){Je=t;return}Je=t=e}while(t!==null);Xe===0&&(Xe=5)}function Ks(e,t,r){var n=_e,s=cr.transition;try{cr.transition=null,_e=1,gR(e,t,r,n)}finally{cr.transition=s,_e=n}return null}function gR(e,t,r,n){do uo();while(cs!==null);if(xe&6)throw Error(D(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(JC(e,o),e===it&&(Je=it=null,dt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||fc||(fc=!0,J1(hd,function(){return uo(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=cr.transition,cr.transition=null;var i=_e;_e=1;var l=xe;xe|=4,Jm.current=null,dR(e,r),U1(r,e),$E(Bf),pd=!!Uf,Bf=Uf=null,e.current=r,uR(r),UC(),xe=l,_e=i,cr.transition=o}else e.current=r;if(fc&&(fc=!1,cs=e,Pd=s),o=e.pendingLanes,o===0&&(ms=null),VC(r.stateNode),It(e,Ke()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Rd)throw Rd=!1,e=lp,lp=null,e;return Pd&1&&e.tag!==0&&uo(),o=e.pendingLanes,o&1?e===cp?Bi++:(Bi=0,cp=e):Bi=0,Es(),null}function uo(){if(cs!==null){var e=Cw(Pd),t=cr.transition,r=_e;try{if(cr.transition=null,_e=16>e?16:e,cs===null)var n=!1;else{if(e=cs,cs=null,Pd=0,xe&6)throw Error(D(331));var s=xe;for(xe|=4,G=e.current;G!==null;){var o=G,i=o.child;if(G.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var d=l[c];for(G=d;G!==null;){var u=G;switch(u.tag){case 0:case 11:case 15:Fi(8,u,o)}var h=u.child;if(h!==null)h.return=u,G=h;else for(;G!==null;){u=G;var p=u.sibling,f=u.return;if(M1(u),u===d){G=null;break}if(p!==null){p.return=f,G=p;break}G=f}}}var y=o.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}G=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,G=i;else e:for(;G!==null;){if(o=G,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Fi(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,G=v;break e}G=o.return}}var x=e.current;for(G=x;G!==null;){i=G;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,G=b;else e:for(i=x;G!==null;){if(l=G,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:hu(9,l)}}catch(k){He(l,l.return,k)}if(l===i){G=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,G=j;break e}G=l.return}}if(xe=s,Es(),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(su,e)}catch{}n=!0}return n}finally{_e=r,cr.transition=t}}return!1}function ay(e,t,r){t=Do(r,t),t=C1(e,t,1),e=ps(e,t,1),t=kt(),e!==null&&(Ol(e,1,t),It(e,t))}function He(e,t,r){if(e.tag===3)ay(e,e,r);else for(;t!==null;){if(t.tag===3){ay(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ms===null||!ms.has(n))){e=Do(r,e),e=E1(t,e,1),t=ps(t,e,1),e=kt(),t!==null&&(Ol(t,1,e),It(t,e));break}}t=t.return}}function vR(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=kt(),e.pingedLanes|=e.suspendedLanes&r,it===e&&(dt&r)===r&&(Xe===4||Xe===3&&(dt&130023424)===dt&&500>Ke()-Ym?da(e,0):Qm|=r),It(e,t)}function G1(e,t){t===0&&(e.mode&1?(t=nc,nc<<=1,!(nc&130023424)&&(nc=4194304)):t=1);var r=kt();e=Cn(e,t),e!==null&&(Ol(e,t,r),It(e,r))}function xR(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),G1(e,r)}function yR(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(D(314))}n!==null&&n.delete(t),G1(e,r)}var Z1;Z1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ot.current)At=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return At=!1,oR(e,t,r);At=!!(e.flags&131072)}else At=!1,$e&&t.flags&1048576&&Xw(t,wd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Zc(e,t),e=t.pendingProps;var s=Oo(t,xt.current);co(t,r),s=Hm(null,t,n,e,s,r);var o=Wm();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lt(n)?(o=!0,yd(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Fm(t),s.updater=uu,t.stateNode=s,s._reactInternals=t,Qf(t,n,e,r),t=ep(null,t,n,!0,o,r)):(t.tag=0,$e&&o&&Om(t),jt(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Zc(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=wR(n),e=_r(n,e),s){case 0:t=Xf(null,t,n,e,r);break e;case 1:t=Zx(null,t,n,e,r);break e;case 11:t=Kx(null,t,n,e,r);break e;case 14:t=Gx(null,t,n,_r(n.type,e),r);break e}throw Error(D(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:_r(n,s),Xf(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:_r(n,s),Zx(e,t,n,s,r);case 3:e:{if(A1(t),e===null)throw Error(D(387));n=t.pendingProps,o=t.memoizedState,s=o.element,a1(e,t),_d(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Do(Error(D(423)),t),t=Jx(e,t,n,r,s);break e}else if(n!==s){s=Do(Error(D(424)),t),t=Jx(e,t,n,r,s);break e}else for(Kt=fs(t.stateNode.containerInfo.firstChild),Gt=t,$e=!0,Tr=null,r=n1(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Lo(),n===s){t=En(e,t,r);break e}jt(e,t,n,r)}t=t.child}return t;case 5:return o1(t),e===null&&Gf(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,qf(n,s)?i=null:o!==null&&qf(n,o)&&(t.flags|=32),T1(e,t),jt(e,t,i,r),t.child;case 6:return e===null&&Gf(t),null;case 13:return O1(e,t,r);case 4:return Um(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Io(t,null,n,r):jt(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:_r(n,s),Kx(e,t,n,s,r);case 7:return jt(e,t,t.pendingProps,r),t.child;case 8:return jt(e,t,t.pendingProps.children,r),t.child;case 12:return jt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,Pe(jd,n._currentValue),n._currentValue=i,o!==null)if($r(o.value,i)){if(o.children===s.children&&!Ot.current){t=En(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(o.tag===1){c=kn(-1,r&-r),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var u=d.pending;u===null?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}o.lanes|=r,c=o.alternate,c!==null&&(c.lanes|=r),Zf(o.return,r,t),l.lanes|=r;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(D(341));i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Zf(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}jt(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,co(t,r),s=dr(s),n=n(s),t.flags|=1,jt(e,t,n,r),t.child;case 14:return n=t.type,s=_r(n,t.pendingProps),s=_r(n.type,s),Gx(e,t,n,s,r);case 15:return R1(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:_r(n,s),Zc(e,t),t.tag=1,Lt(n)?(e=!0,yd(t)):e=!1,co(t,r),S1(t,n,s),Qf(t,n,s,r),ep(null,t,n,!0,e,r);case 19:return L1(e,t,r);case 22:return P1(e,t,r)}throw Error(D(156,t.tag))};function J1(e,t){return kw(e,t)}function bR(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lr(e,t,r,n){return new bR(e,t,r,n)}function rg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wR(e){if(typeof e=="function")return rg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wm)return 11;if(e===jm)return 14}return 2}function vs(e,t){var r=e.alternate;return r===null?(r=lr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 6,631 bytes, line 40
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Yc(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")rg(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Wa:return ua(r.children,s,o,t);case bm:i=8,s|=8;break;case wf:return e=lr(12,r,t,s|2),e.elementType=wf,e.lanes=o,e;case jf:return e=lr(13,r,t,s),e.elementType=jf,e.lanes=o,e;case kf:return e=lr(19,r,t,s),e.elementType=kf,e.lanes=o,e;case ow:return pu(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sw:i=10;break e;case aw:i=9;break e;case wm:i=11;break e;case jm:i=14;break e;case Gn:i=16,n=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=lr(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function ua(e,t,r,n){return e=lr(7,e,n,t),e.lanes=r,e}function pu(e,t,r,n){return e=lr(22,e,n,t),e.elementType=ow,e.lanes=r,e.stateNode={isHidden:!1},e}function Fh(e,t,r){return e=lr(6,e,null,t),e.lanes=r,e}function Uh(e,t,r){return t=lr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jR(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wh(0),this.expirationTimes=wh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wh(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ng(e,t,r,n,s,o,i,l,c){return e=new jR(e,t,r,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=lr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fm(o),e}function kR(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ha,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Q1(e){if(!e)return ws;e=e._reactInternals;e:{if(Sa(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var r=e.type;if(Lt(r))return Qw(e,r,t)}return t}function Y1(e,t,r,n,s,o,i,l,c){return e=ng(r,n,!0,e,s,o,i,l,c),e.context=Q1(null),r=e.current,n=kt(),s=gs(r),o=kn(n,s),o.callback=t??null,ps(r,o,s),e.current.lanes=s,Ol(e,s,n),It(e,n),e}function mu(e,t,r,n){var s=t.current,o=kt(),i=gs(s);return r=Q1(r),t.context===null?t.context=r:t.pendingContext=r,t=kn(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ps(s,t,i),e!==null&&(Lr(e,s,i,o),Wc(e,s,i)),i}function Ad(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function oy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function sg(e,t){oy(e,t),(e=e.alternate)&&oy(e,t)}function _R(){return null}var X1=typeof reportError=="function"?reportError:function(e){console.error(e)};function ag(e){this._internalRoot=e}gu.prototype.render=ag.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));mu(e,t,null,null)};gu.prototype.unmount=ag.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;va(function(){mu(null,e,null,null)}),t[Sn]=null}};function gu(e){this._internalRoot=e}gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pw();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Jn.length&&t!==0&&t<Jn[r].priority;r++);Jn.splice(r,0,e),r===0&&Aw(e)}};function og(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function iy(){}function NR(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var d=Ad(i);o.call(d)}}var i=Y1(t,n,e,0,null,!1,!1,"",iy);return e._reactRootContainer=i,e[Sn]=i.current,tl(e.nodeType===8?e.parentNode:e),va(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var d=Ad(c);l.call(d)}}var c=ng(e,0,!1,null,null,!1,!1,"",iy);return e._reactRootContainer=c,e[Sn]=c.current,tl(e.nodeType===8?e.parentNode:e),va(function(){mu(t,c,r,n)}),c}function xu(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var l=s;s=function(){var c=Ad(i);l.call(c)}}mu(t,i,e,s)}else i=NR(r,t,e,s,n);return Ad(i)}Ew=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Si(t.pendingLanes);r!==0&&(Nm(t,r|1),It(t,Ke()),!(xe&6)&&(Mo=Ke()+500,Es()))}break;case 13:va(function(){var n=Cn(e,1);if(n!==null){var s=kt();Lr(n,e,1,s)}}),sg(e,1)}};Sm=function(e){if(e.tag===13){var t=Cn(e,134217728);if(t!==null){var r=kt();Lr(t,e,134217728,r)}sg(e,134217728)}};Rw=function(e){if(e.tag===13){var t=gs(e),r=Cn(e,t);if(r!==null){var n=kt();Lr(r,e,t,n)}sg(e,t)}};Pw=function(){return _e};Tw=function(e,t){var r=_e;try{return _e=e,t()}finally{_e=r}};Of=function(e,t,r){switch(t){case"input":if(Sf(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=lu(n);if(!s)throw Error(D(90));lw(n),Sf(n,s)}}}break;case"textarea":dw(e,r);break;case"select":t=r.value,t!=null&&ao(e,!!r.multiple,t,!1)}};vw=Xm;xw=va;var SR={usingClientEntryPoint:!1,Events:[Il,Ja,lu,mw,gw,Xm]},gi={findFiberByHostInstance:Js,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},CR={bundleType:gi.bundleType,version:gi.version,rendererPackageName:gi.rendererPackageName,rendererConfig:gi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:On.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ww(e),e===null?null:e.stateNode},findFiberByHostInstance:gi.findFiberByHostInstance||_R,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pc.isDisabled&&pc.supportsFiber)try{su=pc.inject(CR),rn=pc}catch{}}Yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SR;Yt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!og(t))throw Error(D(200));return kR(e,t,null,r)};Yt.createRoot=function(e,t){if(!og(e))throw Error(D(299));var r=!1,n="",s=X1;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ng(e,1,!1,null,null,r,!1,n,s),e[Sn]=t.current,tl(e.nodeType===8?e.parentNode:e),new ag(t)};Yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=ww(t),e=e===null?null:e.stateNode,e};Yt.flushSync=function(e){return va(e)};Yt.hydrate=function(e,t,r){if(!vu(t))throw Error(D(200));return xu(null,e,t,!0,r)};Yt.hydrateRoot=function(e,t,r){if(!og(e))throw Error(D(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=X1;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=Y1(t,null,e,1,r??null,s,!1,o,i),e[Sn]=t.current,tl(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new gu(t)};Yt.render=function(e,t,r){if(!vu(t))throw Error(D(200));return xu(null,e,t,!1,r)};Yt.unmountComponentAtNode=function(e){if(!vu(e))throw Error(D(40));return e._reactRootContainer?(va(function(){xu(null,null,e,!1,function(){e._reactRootContainer=null,e[Sn]=null})}),!0):!1};Yt.unstable_batchedUpdates=Xm;Yt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!vu(r))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return xu(e,t,r,!1,n)};Yt.version="18.3.1-next-f1338f8080-20240426";function ej(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ej)}catch(e){console.error(e)}}ej(),ew.exports=Yt;var Rs=ew.exports;const ER=B0(Rs);var tj,ly=Rs;tj=ly.createRoot,ly.hydrateRoot;var Dl=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(){}},ta,es,yo,A0,RR=(A0=class extends Dl{constructor(){super();ne(this,ta);ne(this,es);ne(this,yo);W(this,yo,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){S(this,es)||this.setEventListener(S(this,yo))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,es))==null||t.call(this),W(this,es,void 0))}setEventListener(t){var r;W(this,yo,t),(r=S(this,es))==null||r.call(this),W(this,es,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){S(this,ta)!==t&&(W(this,ta,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof S(this,ta)=="boolean"?S(this,ta):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ta=new WeakMap,es=new WeakMap,yo=new WeakMap,A0),ig=new RR,PR={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ts,um,O0,TR=(O0=class{constructor(){ne(this,ts,PR);ne(this,um,!1)}setTimeoutProvider(e){W(this,ts,e)}setTimeout(e,t){return S(this,ts).setTimeout(e,t)}clearTimeout(e){S(this,ts).clearTimeout(e)}setInterval(e,t){return S(this,ts).setInterval(e,t)}clearInterval(e){S(this,ts).clearInterval(e)}},ts=new WeakMap,um=new WeakMap,O0),Xs=new TR;function AR(e){setTimeout(e,0)}var OR=typeof window>"u"||"Deno"in globalThis;function Pt(){}function LR(e,t){return typeof e=="function"?e(t):e}function hp(e){return typeof e=="number"&&e>=0&&e!==1/0}function rj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xs(e,t){return typeof e=="function"?e(t):e}function Vt(e,t){return typeof e=="function"?e(t):e}function cy(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:l}=e;if(i){if(n){if(t.queryHash!==lg(i,t.options))return!1}else if(!ul(t.queryKey,i))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||o&&!o(t))}function dy(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(dl(t.options.mutationKey)!==dl(o))return!1}else if(!ul(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function lg(e,t){return((t==null?void 0:t.queryKeyHashFn)||dl)(e)}function dl(e){return JSON.stringify(e,(t,r)=>pp(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function ul(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ul(e[r],t[r])):!1}var IR=Object.prototype.hasOwnProperty;function nj(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=uy(e)&&uy(t);if(!n&&!(pp(e)&&pp(t)))return t;const o=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),l=i.length,c=n?new Array(l):{};let d=0;for(let u=0;u<l;u++){const h=n?u:i[u],p=e[h],f=t[h];if(p===f){c[h]=p,(n?u<o:IR.call(e,h))&&d++;continue}if(p===null||f===null||typeof p!="object"||typeof f!="object"){c[h]=f;continue}const y=nj(p,f,r+1);c[h]=y,y===p&&d++}return o===l&&d===o?e:c}function fp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function uy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pp(e){if(!hy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!hy(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hy(e){return Object.prototype.toString.call(e)==="[object Object]"}function $R(e){return new Promise(t=>{Xs.setTimeout(t,e)})}function mp(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?nj(e,t):t}function DR(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function MR(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var cg=Symbol();function sj(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===cg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function aj(e,t){return typeof e=="function"?e(...t):!!e}function zR(e,t,r){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),n||(n=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}var hl=(()=>{let e=()=>OR;return{isServer(){return e()},setIsServer(t){e=t}}})();function gp(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var FR=AR;function UR(){let e=[],t=0,r=l=>{l()},n=l=>{l()},s=FR;const o=l=>{t?e.push(l):s(()=>{r(l)})},i=()=>{const l=e;e=[],l.length&&s(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||i()}return c},batchCalls:l=>(...c)=>{o(()=>
40{l(...c)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var ct=UR(),bo,rs,wo,L0,BR=(L0=class extends Dl{constructor(){super();ne(this,bo,!0);ne(this,rs);ne(this,wo);W(this,wo,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){S(this,rs)||this.setEventListener(S(this,wo))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,rs))==null||t.call(this),W(this,rs,void 0))}setEventListener(t){var r;W(this,wo,t),(r=S(this,rs))==null||r.call(this),W(this,rs,t(this.setOnline.bind(this)))}setOnline(t){S(this,bo)!==t&&(W(this,bo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return S(this,bo)}},bo=new WeakMap,rs=new WeakMap,wo=new WeakMap,L0),Od=new BR;function qR(e){return Math.min(1e3*2**e,3e4)}function oj(e){return(e??"online")==="online"?Od.isOnline():!0}var vp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ij(e){let t=!1,r=0,n;const s=gp(),o=()=>s.status!=="pending",i=g=>{var w;if(!o()){const v=new vp(g);p(v),(w=e.onCancel)==null||w.call(e,v)}},l=()=>{t=!0},c=()=>{t=!1},d=()=>ig.isFocused()&&(e.networkMode==="always"||Od.isOnline())&&e.canRun(),u=()=>oj(e.networkMode)&&e.canRun(),h=g=>{o()||(n==null||n(),s.resolve(g))},p=g=>{o()||(n==null||n(),s.reject(g))},f=()=>new Promise(g=>{var w;n=v=>{(o()||d())&&g(v)},(w=e.onPause)==null||w.call(e)}).then(()=>{var g;n=void 0,o()||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(o())return;let g;const w=r===0?e.initialPromise:void 0;try{g=w??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(h).catch(v=>{var _;if(o())return;const x=e.retry??(hl.isServer()?0:3),b=e.retryDelay??qR,j=typeof b=="function"?b(r,v):b,k=x===!0||typeof x=="number"&&r<x||typeof x=="function"&&x(r,v);if(t||!k){p(v);return}r++,(_=e.onFail)==null||_.call(e,r,v),$R(j).then(()=>d()?void 0:f()).then(()=>{t?p(v):y()})})};return{promise:s,status:()=>s.status,cancel:i,continue:()=>(n==null||n(),s),cancelRetry:l,continueRetry:c,canStart:u,start:()=>(u()?y():f().then(y),s)}}var ra,I0,lj=(I0=class{constructor(){ne(this,ra)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hp(this.gcTime)&&W(this,ra,Xs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hl.isServer()?1/0:5*60*1e3))}clearGcTimeout(){S(this,ra)!==void 0&&(Xs.clearTimeout(S(this,ra)),W(this,ra,void 0))}},ra=new WeakMap,I0);function VR(e){return{onFetch:(t,r)=>{var u,h,p,f,y;const n=t.options,s=(p=(h=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,o=((f=t.state.data)==null?void 0:f.pages)||[],i=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let g=!1;const w=b=>{zR(b,()=>t.signal,()=>g=!0)},v=sj(t.options,t.fetchOptions),x=async(b,j,k)=>{if(g)return Promise.reject(t.signal.reason);if(j==null&&b.pages.length)return Promise.resolve(b);const N=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:j,direction:k?"backward":"forward",meta:t.options.meta};return w(O),O})(),C=await v(N),{maxPages:R}=t.options,T=k?MR:DR;return{pages:T(b.pages,C,R),pageParams:T(b.pageParams,j,R)}};if(s&&o.length){const b=s==="backward",j=b?HR:fy,k={pages:o,pageParams:i}
40,_=j(n,k);l=await x(k,_,b)}else{const b=e??o.length;do{const j=c===0?i[0]??n.initialPageParam:fy(n,l);if(c>0&&j==null)break;l=await x(l,j),c++}while(c<b)}return l};t.options.persister?t.fetchFn=()=>{var g,w;return(w=(g=t.options).persister)==null?void 0:w.call(g,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function fy(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function HR(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var jo,na,ko,nr,sa,st,Cl,aa,qt,cj,fn,$0,WR=($0=class extends lj{constructor(t){super();ne(this,qt);ne(this,jo);ne(this,na);ne(this,ko);ne(this,nr);ne(this,sa);ne(this,st);ne(this,Cl);ne(this,aa);W(this,aa,!1),W(this,Cl,t.defaultOptions),this.setOptions(t.options),this.observers=[],W(this,sa,t.client),W(this,nr,S(this,sa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,W(this,na,my(this.options)),this.state=t.state??S(this,na),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return S(this,jo)}get promise(){var t;return(t=S(this,st))==null?void 0:t.promise}setOptions(t){if(this.options={...S(this,Cl),...t},t!=null&&t._type&&W(this,jo,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=my(this.options);r.data!==void 0&&(this.setState(py(r.data,r.dataUpdatedAt)),W(this,na,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,nr).remove(this)}setData(t,r){const n=mp(this.state.data,t,this.options);return me(this,qt,fn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){me(this,qt,fn).call(this,{type:"setState",state:t})}cancel(t){var n,s;const r=(n=S(this,st))==null?void 0:n.promise;return(s=S(this,st))==null||s.cancel(t),r?r.then(Pt).catch(Pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return S(this,na)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Vt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===cg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>xs(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:!rj(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=S(this,st))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=S(this,st))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,nr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(S(this,st)&&(S(this,aa)||me(this,qt,cj).call(this)?S(this,st).cancel({revert:!0}):S(this,st).cancelRetry()),this.scheduleGc()),S(this,nr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,qt,fn).call(this,{type:"invalidate"})}async fetch(t,r){var d,u,h,p,f,y,g,w,v,x,b;if(this.state.fetchStatus!=="idle"&&((d=S(this,st))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(S(this,st))return S(this,st).continueRetry(),S(this,st).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(k=>k.options.queryFn);j&&this.setOptions(j.options)}const n=new AbortController,s=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(W(this,aa,!0),n.signal)}
40)},o=()=>{const j=sj(this.options,r),_=(()=>{const N={client:S(this,sa),queryKey:this.queryKey,meta:this.meta};return s(N),N})();return W(this,aa,!1),this.options.persister?this.options.persister(j,_,this):j(_)},l=(()=>{const j={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:S(this,sa),state:this.state,fetchFn:o};return s(j),j})(),c=S(this,jo)==="infinite"?VR(this.options.pages):this.options.behavior;c==null||c.onFetch(l,this),W(this,ko,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=l.fetchOptions)==null?void 0:u.meta))&&me(this,qt,fn).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),W(this,st,ij({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:j=>{j instanceof vp&&j.revert&&this.setState({...S(this,ko),fetchStatus:"idle"}),n.abort()},onFail:(j,k)=>{me(this,qt,fn).call(this,{type:"failed",failureCount:j,error:k})},onPause:()=>{me(this,qt,fn).call(this,{type:"pause"})},onContinue:()=>{me(this,qt,fn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const j=await S(this,st).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(f=(p=S(this,nr).config).onSuccess)==null||f.call(p,j,this),(g=(y=S(this,nr).config).onSettled)==null||g.call(y,j,this.state.error,this),j}catch(j){if(j instanceof vp){if(j.silent)return S(this,st).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw me(this,qt,fn).call(this,{type:"error",error:j}),(v=(w=S(this,nr).config).onError)==null||v.call(w,j,this),(b=(x=S(this,nr).config).onSettled)==null||b.call(x,this.state.data,j,this),j}finally{this.scheduleGc()}}},jo=new WeakMap,na=new WeakMap,ko=new WeakMap,nr=new WeakMap,sa=new WeakMap,st=new WeakMap,Cl=new WeakMap,aa=new WeakMap,qt=new WeakSet,cj=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},fn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...dj(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...py(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return W(this,ko,t.manual?s:void 0),s;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),ct.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),S(this,nr).notify({query:this,type:"updated",action:t})})},$0);function dj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:oj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function py(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function my(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Et,ge,El,wt,oa,_o,yn,ns,Rl,No,So,ia,la,ss,Co,ke,Ei,xp,yp,bp,wp,jp,kp,_p,uj,D0,KR=(D0=class extends Dl{constructor(t,r){super();ne(this,ke);ne(this,Et);ne(this,ge);ne(this,El);ne(this,wt);ne(this,oa);ne(this,_o);ne(this,yn);ne(this,ns);ne(this,Rl);ne(this,No);ne(this,So);ne(this,ia);ne(this,la);ne(this,ss);ne(this,Co,new Set);this.options=r,W(this,Et,t),W(this,ns,null),W(this,yn,gp()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,ge).addObserver(this),gy(S(this,ge),this.options)?me(this,ke,Ei).call(this):this.updateResult(),me(this,ke,wp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Np(S(this,ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Np(S(this,ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,ke,jp).call(this),me(this,ke,kp).call(this),S(this,ge).removeObserver(this)}setOptions(t){const r=this.options,n=S(this,ge);if(this.options=S(this,Et).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vt(this.options.enabled,S(this,ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,ke,_p).call(this),S(this,ge).setOptions(this.options),r._defaulted&&!fp(this.options,r)&&S(this,Et).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,ge),observer:this});const s=this.hasListeners();s&&vy(S(this,ge),n,this.options,r)&&me(this,ke,Ei).call(this),this.updateResult(),s&&(S(this,ge)!==n||Vt(this.options.enabled,S(this,ge))!==Vt(r.enabled,S(this,ge))||xs(this.options.staleTime,S(this,ge))!==xs(r.staleTime,S(this,ge)))&&me(this,ke,xp).call(this);const o=me(this,ke,yp).call(this);s&&(S(this,ge)!==n||Vt(this.options.enabled,S(this,ge))!==Vt(r.enabled,S(this,ge))||o!==S(this,ss))&&me(this,ke,bp).call(this,o)}getOptimisticResult(t){const r=S(this,Et).getQueryCache().build(S(this,Et),t),n=this.createResult(r,t);return ZR(this,n)&&(W(this,wt,n),W(this,_o,this.options),W(this,oa,S(this,ge).state)),n}getCurrentResult(){return S(this,wt)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&S(this,yn).status==="pending"&&S(this,yn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}
vendor: 2,749 bytes, line 40
40trackProp(t){S(this,Co).add(t)}getCurrentQuery(){return S(this,ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=S(this,Et).defaultQueryOptions(t),n=S(this,Et).getQueryCache().build(S(this,Et),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return me(this,ke,Ei).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,wt)))}createResult(t,r){var R;const n=S(this,ge),s=this.options,o=S(this,wt),i=S(this,oa),l=S(this,_o),d=t!==n?t.state:S(this,El),{state:u}=t;let h={...u},p=!1,f;if(r._optimisticResults){const T=this.hasListeners(),O=!T&&gy(t,r),I=T&&vy(t,n,r,s);(O||I)&&(h={...h,...dj(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:w}=h;f=h.data;let v=!1;if(r.placeholderData!==void 0&&f===void 0&&w==="pending"){let T;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(T=o.data,v=!0):T=typeof r.placeholderData=="function"?r.placeholderData((R=S(this,So))==null?void 0:R.state.data,S(this,So)):r.placeholderData,T!==void 0&&(w="success",f=mp(o==null?void 0:o.data,T,r),p=!0)}if(r.select&&f!==void 0&&!v)if(o&&f===(i==null?void 0:i.data)&&r.select===S(this,Rl))f=S(this,No);else try{W(this,Rl,r.select),f=r.select(f),f=mp(o==null?void 0:o.data,f,r),W(this,No,f),W(this,ns,null)}catch(T){W(this,ns,T)}S(this,ns)&&(y=S(this,ns),f=S(this,No),g=Date.now(),w="error");const x=h.fetchStatus==="fetching",b=w==="pending",j=w==="error",k=b&&x,_=f!==void 0,C={status:w,fetchStatus:h.fetchStatus,isPending:b,isSuccess:w==="success",isError:j,isInitialLoading:k,isLoading:k,data:f,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:j&&!_,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:j&&_,isStale:dg(t,r),refetch:this.refetch,promise:S(this,yn),isEnabled:Vt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=C.data!==void 0,O=C.status==="error"&&!T,I=H=>{O?H.reject(C.error):T&&H.resolve(C.data)},K=()=>{const H=W(this,yn,C.promise=gp());I(H)},$=S(this,yn);switch($.status){case"pending":t.queryHash===n.queryHash&&I($);break;case"fulfilled":(O||C.data!==$.value)&&K();break;case"rejected":(!O||C.error!==$.reason)&&K();break}}return C}updateResult(){const t=S(this,wt),r=this.createResult(S(this,ge),this.options);if(W(this,oa,S(this,ge).state),W(this,_o,this.options),S(this,oa).data!==void 0&&W(this,So,S(this,ge)),fp(r,t))return;W(this,wt,r);const n=()=>
vendor: 4,466 bytes, line 40
40{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!S(this,Co).size)return!0;const i=new Set(o??S(this,Co));return this.options.throwOnError&&i.add("error"),Object.keys(S(this,wt)).some(l=>{const c=l;return S(this,wt)[c]!==t[c]&&i.has(c)})};me(this,ke,uj).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,ke,wp).call(this)}},Et=new WeakMap,ge=new WeakMap,El=new WeakMap,wt=new WeakMap,oa=new WeakMap,_o=new WeakMap,yn=new WeakMap,ns=new WeakMap,Rl=new WeakMap,No=new WeakMap,So=new WeakMap,ia=new WeakMap,la=new WeakMap,ss=new WeakMap,Co=new WeakMap,ke=new WeakSet,Ei=function(t){me(this,ke,_p).call(this);let r=S(this,ge).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Pt)),r},xp=function(){me(this,ke,jp).call(this);const t=xs(this.options.staleTime,S(this,ge));if(hl.isServer()||S(this,wt).isStale||!hp(t))return;const n=rj(S(this,wt).dataUpdatedAt,t)+1;W(this,ia,Xs.setTimeout(()=>{S(this,wt).isStale||this.updateResult()},n))},yp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,ge)):this.options.refetchInterval)??!1},bp=function(t){me(this,ke,kp).call(this),W(this,ss,t),!(hl.isServer()||Vt(this.options.enabled,S(this,ge))===!1||!hp(S(this,ss))||S(this,ss)===0)&&W(this,la,Xs.setInterval(()=>{(this.options.refetchIntervalInBackground||ig.isFocused())&&me(this,ke,Ei).call(this)},S(this,ss)))},wp=function(){me(this,ke,xp).call(this),me(this,ke,bp).call(this,me(this,ke,yp).call(this))},jp=function(){S(this,ia)!==void 0&&(Xs.clearTimeout(S(this,ia)),W(this,ia,void 0))},kp=function(){S(this,la)!==void 0&&(Xs.clearInterval(S(this,la)),W(this,la,void 0))},_p=function(){const t=S(this,Et).getQueryCache().build(S(this,Et),this.options);if(t===S(this,ge))return;const r=S(this,ge);W(this,ge,t),W(this,El,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},uj=function(t){ct.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(S(this,wt))}),S(this,Et).getQueryCache().notify({query:S(this,ge),type:"observerResultsUpdated"})})},D0);function GR(e,t){return Vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Vt(t.retryOnMount,e)===!1)}function gy(e,t){return GR(e,t)||e.state.data!==void 0&&Np(e,t,t.refetchOnMount)}function Np(e,t,r){if(Vt(t.enabled,e)!==!1&&xs(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&dg(e,t)}return!1}function vy(e,t,r,n){return(e!==t||Vt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&dg(e,r)}function dg(e,t){return Vt(t.enabled,e)!==!1&&e.isStaleByTime(xs(t.staleTime,e))}function ZR(e,t){return!fp(e.getCurrentResult(),t)}var Pl,Gr,gt,ca,Zr,Wn,M0,JR=(M0=class extends lj{constructor(t){super();ne(this,Zr);ne(this,Pl);ne(this,Gr);ne(this,gt);ne(this,ca);W(this,Pl,t.client),this.mutationId=t.mutationId,W(this,gt,t.mutationCache),W(this,Gr,[]),this.state=t.state||QR(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Gr).includes(t)||(S(this,Gr).push(t),this.clearGcTimeout(),S(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){W(this,Gr,S(this,Gr).filter(r=>r!==t)),this.scheduleGc(),S(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Gr).length||(this.state.status==="pending"?this.scheduleGc():S(this,gt).remove(this))}continue(){var t;return((t=S(this,ca))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,l,c,d,u,h,p,f,y,g,w,v,x,b,j,k,_,N;const r=()=>{me(this,Zr,Wn).call(this,{type:"continue"})},n={client:S(this,Pl),meta:this.options.meta,mutationKey:this.options.mutationKey};W(this,ca,ij({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(C,R)=>{me(this,Zr,Wn).call(this,{type:"failed",failureCount:C,error:R})},onPause:()=>{me(this,Zr,Wn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,gt).canRun(this)}));const s=this.state.status==="pending",o=!S(this,ca).canStart();try{if(s)r();else{me(this,Zr,Wn).call(this,{type:"pending",variables:t,isPaused:o}),S(this,gt).config.onMutate&&await S(this,gt).config.onMutate(t,this,n);
40const R=await((l=(i=this.options).onMutate)==null?void 0:l.call(i,t,n));R!==this.state.context&&me(this,Zr,Wn).call(this,{type:"pending",context:R,variables:t,isPaused:o})}const C=await S(this,ca).start();return await((d=(c=S(this,gt).config).onSuccess)==null?void 0:d.call(c,C,t,this.state.context,this,n)),await((h=(u=this.options).onSuccess)==null?void 0:h.call(u,C,t,this.state.context,n)),await((f=(p=S(this,gt).config).onSettled)==null?void 0:f.call(p,C,null,this.state.variables,this.state.context,this,n)),await((g=(y=this.options).onSettled)==null?void 0:g.call(y,C,null,t,this.state.context,n)),me(this,Zr,Wn).call(this,{type:"success",data:C}),C}catch(C){try{await((v=(w=S(this,gt).config).onError)==null?void 0:v.call(w,C,t,this.state.context,this,n))}catch(R){Promise.reject(R)}try{await((b=(x=this.options).onError)==null?void 0:b.call(x,C,t,this.state.context,n))}catch(R){Promise.reject(R)}try{await((k=(j=S(this,gt).config).onSettled)==null?void 0:k.call(j,void 0,C,this.state.variables,this.state.context,this,n))}catch(R){Promise.reject(R)}try{await((N=(_=this.options).onSettled)==null?void 0:N.call(_,void 0,C,t,this.state.context,n))}catch(R){Promise.reject(R)}throw me(this,Zr,Wn).call(this,{type:"error",error:C}),C}finally{S(this,gt).runNext(this)}}},Pl=new WeakMap,Gr=new WeakMap,gt=new WeakMap,ca=new WeakMap,Zr=new WeakSet,Wn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ct.batch(()=>{S(this,Gr).forEach(n=>{n.onMutationUpdate(t)}),S(this,gt).notify({mutation:this,type:"updated",action:t})})},M0);function QR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bn,Cr,Tl,z0,YR=(z0=class extends Dl{constructor(t={}){super();ne(this,bn);ne(this,Cr);ne(this,Tl);this.config=t,W(this,bn,new Set),W(this,Cr,new Map),W(this,Tl,0)}build(t,r,n){const s=new JR({client:t,mutationCache:this,mutationId:++Ql(this,Tl)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){S(this,bn).add(t);const r=mc(t);if(typeof r=="string"){const n=S(this,Cr).get(r);n?n.push(t):S(this,Cr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(S(this,bn).delete(t)){const r=mc(t);if(typeof r=="string"){const n=S(this,Cr).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&S(this,Cr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=mc(t);if(typeof r=="string"){const n=S(this,Cr).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=mc(t);if(typeof r=="string"){const s=(n=S(this,Cr).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ct.batch(()=>{S(this,bn).forEach(t=>{this.notify({type:"removed",mutation:t})}),S(this,bn).clear(),S(this,Cr).clear()})}getAll(){return Array.from(S(this,bn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>dy(r,n))}findAll(t={}){return this.getAll().filter(r=>dy(t,r))}notify(t){ct.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,263 bytes, line 40
40r.state.isPaused);return ct.batch(()=>Promise.all(t.map(r=>r.continue().catch(Pt))))}},bn=new WeakMap,Cr=new WeakMap,Tl=new WeakMap,z0);function mc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Jr,F0,XR=(F0=class extends Dl{constructor(t={}){super();ne(this,Jr);this.config=t,W(this,Jr,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??lg(s,r);let i=this.get(o);return i||(i=new WR({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){S(this,Jr).has(t.queryHash)||(S(this,Jr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=S(this,Jr).get(t.queryHash);r&&(t.destroy(),r===t&&S(this,Jr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Jr).get(t)}getAll(){return[...S(this,Jr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>cy(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>cy(t,n)):r}notify(t){ct.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Jr=new WeakMap,F0),qe,as,os,Eo,Ro,is,Po,To,U0,eP=(U0=class{constructor(e={}){ne(this,qe);ne(this,as);ne(this,os);ne(this,Eo);ne(this,Ro);ne(this,is);ne(this,Po);ne(this,To);W(this,qe,e.queryCache||new XR),W(this,as,e.mutationCache||new YR),W(this,os,e.defaultOptions||{}),W(this,Eo,new Map),W(this,Ro,new Map),W(this,is,0)}mount(){Ql(this,is)._++,S(this,is)===1&&(W(this,Po,ig.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,qe).onFocus())})),W(this,To,Od.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,qe).onOnline())})))}unmount(){var e,t;Ql(this,is)._--,S(this,is)===0&&((e=S(this,Po))==null||e.call(this),W(this,Po,void 0),(t=S(this,To))==null||t.call(this),W(this,To,void 0))}isFetching(e){return S(this,qe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,as).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=S(this,qe).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=S(this,qe).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(xs(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return S(this,qe).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=S(this,qe).get(n.queryHash),o=s==null?void 0:s.state.data,i=LR(t,o);if(i!==void 0)return S(this,qe).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return ct.batch(()=>S(this,qe).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=S(this,qe).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=S(this,qe);ct.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=S(this,qe);return ct.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=ct.batch(()=>S(this,qe).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Pt).catch(Pt)}invalidateQueries(e,t={}){return ct.batch(()=>(S(this,qe).findAll(e).forEach(r=>{r.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 r={...t,cancelRefetch:t.cancelRefetch??!0},n=ct.batch(()=>S(this,qe).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(Pt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Pt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=S(this,qe).build(this,t);return r.isStaleByTime(xs(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pt).catch(Pt)}
40fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pt).catch(Pt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Od.isOnline()?S(this,as).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,qe)}getMutationCache(){return S(this,as)}getDefaultOptions(){return S(this,os)}setDefaultOptions(e){W(this,os,e)}setQueryDefaults(e,t){S(this,Eo).set(dl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Eo).values()],r={};return t.forEach(n=>{ul(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){S(this,Ro).set(dl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ro).values()],r={};return t.forEach(n=>{ul(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,os).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=lg(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===cg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,os).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,qe).clear(),S(this,as).clear()}},qe=new WeakMap,as=new WeakMap,os=new WeakMap,Eo=new WeakMap,Ro=new WeakMap,is=new WeakMap,Po=new WeakMap,To=new WeakMap,U0),hj=m.createContext(void 0),ug=e=>{const t=m.useContext(hj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tP=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(hj.Provider,{value:e,children:t})),fj=m.createContext(!1),rP=()=>m.useContext(fj);fj.Provider;function nP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sP=m.createContext(nP()),aP=()=>m.useContext(sP),oP=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?aj(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},iP=e=>{m.useEffect(()=>{e.clearReset()},[e])},lP=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||aj(r,[e.error,n])),cP=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},dP=(e,t)=>
40e.isLoading&&e.isFetching&&!t,uP=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xy=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function hP(e,t,r){var f,y,g,w;const n=rP(),s=aP(),o=ug(),i=o.defaultQueryOptions(e);(y=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||y.call(f,i);const l=o.getQueryCache().get(i.queryHash),c=e.subscribed!==!1;i._optimisticResults=n?"isRestoring":c?"optimistic":void 0,cP(i),oP(i,s,l),iP(s);const d=!o.getQueryCache().get(i.queryHash),[u]=m.useState(()=>new t(o,i)),h=u.getOptimisticResult(i),p=!n&&c;if(m.useSyncExternalStore(m.useCallback(v=>{const x=p?u.subscribe(ct.batchCalls(v)):Pt;return u.updateResult(),x},[u,p]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),m.useEffect(()=>{u.setOptions(i)},[i,u]),uP(i,h))throw xy(i,u,s);if(lP({result:h,errorResetBoundary:s,throwOnError:i.throwOnError,query:l,suspense:i.suspense}))throw h.error;if((w=(g=o.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||w.call(g,i,h),i.experimental_prefetchInRender&&!hl.isServer()&&dP(h,n)){const v=d?xy(i,u,s):l==null?void 0:l.promise;v==null||v.catch(Pt).finally(()=>{u.updateResult()})}return i.notifyOnChangeProps?h:u.trackResult(h)}function Ps(e,t){return hP(e,KR)}/** 41 * react-router v7.18.1 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */var hg=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,pj=/^[\\/]{2}/;function fP(e,t){return t+e.replace(/\\/g,"/")}var yy="popstate";function by(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function pP(e={}){function t(n,s){var d;let o=(d=s.state)==null?void 0:d.masked,{pathname:i,search:l,hash:c}=o||n.location;return Sp("",{pathname:i,search:l,hash:c},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,s){return typeof s=="string"?s:fl(s)}return gP(t,r,null,e)}function De(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function mP(){return Math.random().toString(36).substring(2,10)}function wy(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Sp(e,t,r=null,n,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wo(t):t,state:r,key:t&&t.key||n||mP(),mask:s}}function fl({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Wo(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function gP(e,t,r,n={}){let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,l="POP",c=null,d=u();d==null&&(d=0,i.replaceState({...i.state,idx:d},""));function u(){return(i.state||{idx:null}).idx}function h(){l="POP";let w=u(),v=w==null?null:w-d;d=w,c&&c({action:l,location:g.location,delta:v})}function p(w,v){l="PUSH";let x=by(w)?w:Sp(g.location,w,v);d=u()+1;let b=wy(x,d),j=g.createHref(x.mask||x);try{i.pushState(b,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(j)}o&&c&&c({action:l,location:g.location,delta:1})}function f(w,v){l="REPLACE";let x=by(w)?w:Sp(g.location,w,v);d=u();let b=wy(x,d),j=g.createHref(x.mask||x);i.replaceState(b,"",j),o&&c&&c({action:l,location:g.location,delta:0})}function y(w){return vP(s,w)}let g={get action(){return l},get location(){return e(s,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(yy,h),c=w,()=>{s.removeEventListener(yy,h),c=null}},createHref(w){return t(s,w)},createURL:y,encodeLocation(w){let v=y(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:f,go(w){return i.go(w)}};return g}function vP(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),De(n,"No window.location.(origin|href) available to create URL");let s=typeof t=="string"?t:fl(t);return s=s.replace(/ $/,"%20"),!r&&pj.test(s)&&(s=n+s),new URL(s,n)}function mj(e,t,r="/"){return xP(e,t,r,!1)}function xP(e,t,r,n,s){let o=typeof t=="string"?Wo(t):t,i=Rn(o.pathname||"/",r);if(i==null)return null;let l=yP(e),c=null,d=PP(i);for(let u=0;c==null&&u<l.length;++u)c=RP(l[u],d,n);return c}function yP(e){let t=gj(e);return bP(t),t}function gj(e,t=[],r=[],n="",s=!1){let o=(i,l,c=s,d)=>{let u={relativePath:d===void 0?i.path||"":d,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(n)&&c)return;De(u.relativePath.startsWith(n),`Absolute route path "${u.relativePath}" nested under path "${n}
49" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(n.length)}let h=Ir([n,u.relativePath]),p=r.concat(u);i.children&&i.children.length>0&&(De(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),gj(i.children,t,p,h,c)),!(i.path==null&&!i.index)&&t.push({path:h,score:CP(h,i.index),routesMeta:p.map((f,y)=>{let[g,w]=yj(f.relativePath,f.caseSensitive,y===p.length-1);return{...f,matcher:g,compiledParams:w}})})};return e.forEach((i,l)=>{var c;if(i.path===""||!((c=i.path)!=null&&c.includes("?")))o(i,l);else for(let d of vj(i.path))o(i,l,!0,d)}),t}function vj(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=vj(n.join("/")),l=[];return l.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function bP(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:EP(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var wP=/^:[\w-]+$/,jP=3,kP=2,_P=1,NP=10,SP=-2,jy=e=>e==="*";function CP(e,t){let r=e.split("/"),n=r.length;return r.some(jy)&&(n+=SP),t&&(n+=kP),r.filter(s=>!jy(s)).reduce((s,o)=>s+(wP.test(o)?jP:o===""?_P:NP),n)}function EP(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function RP(e,t,r=!1){let{routesMeta:n}=e,s={},o="/",i=[];for(let l=0;l<n.length;++l){let c=n[l],d=l===n.length-1,u=o==="/"?t:t.slice(o.length)||"/",h={path:c.relativePath,caseSensitive:c.caseSensitive,end:d},p=c.matcher&&c.compiledParams?xj(h,u,c.matcher,c.compiledParams):Ld(h,u),f=c.route;if(!p&&d&&r&&!n[n.length-1].route.index&&(p=Ld({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},u)),!p)return null;
49Object.assign(s,p.params),i.push({params:s,pathname:Ir([o,p.pathname]),pathnameBase:OP(Ir([o,p.pathnameBase])),route:f}),p.pathnameBase!=="/"&&(o=Ir([o,p.pathnameBase]))}return i}function Ld(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=yj(e.path,e.caseSensitive,e.end);return xj(e,t,r,n)}function xj(e,t,r,n){let s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((d,{paramName:u,isOptional:h},p)=>{if(u==="*"){let y=l[p]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const f=l[p];return h&&!f?d[u]=void 0:d[u]=(f||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:i,pattern:e}}function yj(e,t=!1,r=!0){hr(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 n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c,d,u)=>{if(n.push({paramName:l,isOptional:c!=null}),c){let h=u.charAt(d+i.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function PP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Rn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function TP(e,t="/"){let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Wo(e):e,o;return r?(r=bj(r),r.startsWith("/")?o=ky(r.substring(1),"/"):o=ky(r,t)):o=t,{pathname:o,search:LP(n),hash:IP(s)}}function ky(e,t){let r=Id(t).split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Bh(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function AP(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function fg(e){let t=AP(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function yu(e,t,r,n=!1){let s;typeof e=="string"?s=Wo(e):(s={...e},De(!s.pathname||!s.pathname.includes("?"),Bh("?","pathname","search",s)),De(!s.pathname||!s.pathname.includes("#"),Bh("#","pathname","hash",s)),De(!s.search||!s.search.includes("#"),Bh("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,l;if(i==null)l=r;else{let h=t.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}l=h>=0?t[h]:"/"}let c=TP(s,l),d=i&&i!=="/"&&i.endsWith("/"),u=(o||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||u)&&(c.pathname+="/"),c}var bj=e=>e.replace(/[\\/]{2,}/g,"/"),Ir=e=>bj(e.join("/")),Id=e=>e.replace(/\/+$/,""),OP=e=>Id(e).replace(/^\/*/,"/"),LP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,IP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,$P=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function DP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function MP(e){let t=e.map(r=>r.route.path).filter(Boolean);return Ir(t)||"/"}var wj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function jj(e,t){let r=e;if(typeof r!="string"||!hg.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,s=!1;if(wj)try{let o=new URL(window.location.href),i=pj.test(r)?new URL(fP(r,o.protocol)):new URL(r),l=Rn(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:s=!0}catch{hr(!1,`<Link to="${r}">
49 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var kj=["POST","PUT","PATCH","DELETE"];new Set(kj);var zP=["GET",...kj];new Set(zP);var FP=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function UP(e){try{return FP.includes(new URL(e).protocol)}catch{return!1}}var Ko=m.createContext(null);Ko.displayName="DataRouter";var bu=m.createContext(null);bu.displayName="DataRouterState";var _j=m.createContext(!1);function BP(){return m.useContext(_j)}var Nj=m.createContext({isTransitioning:!1});Nj.displayName="ViewTransition";var qP=m.createContext(new Map);qP.displayName="Fetchers";var VP=m.createContext(null);VP.displayName="Await";var er=m.createContext(null);er.displayName="Navigation";var Ml=m.createContext(null);Ml.displayName="Location";var Fr=m.createContext({outlet:null,matches:[],isDataRoute:!1});Fr.displayName="Route";var pg=m.createContext(null);pg.displayName="RouteError";var Sj="REACT_ROUTER_ERROR",HP="REDIRECT",WP="ROUTE_ERROR_RESPONSE";function KP(e){if(e.startsWith(`${Sj}:${HP}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function GP(e){if(e.startsWith(`${Sj}:${WP}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new $P(t.status,t.statusText,t.data)}catch{}}function ZP(e,{relative:t}={}){De(Go(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=m.useContext(er),{hash:s,pathname:o,search:i}=zl(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:Ir([r,o])),n.createHref({pathname:l,search:i,hash:s})}function Go(){return m.useContext(Ml)!=null}function yt(){return De(Go(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Ml).location}var Cj="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ej(e){m.useContext(er).static||m.useLayoutEffect(e)}function Ts(){let{isDataRoute:e}=m.useContext(Fr);return e?lT():JP()}function JP(){De(Go(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(Ko),{basename:t,navigator:r}=m.useContext(er),{matches:n}=m.useContext(Fr),{pathname:s}=yt(),o=JSON.stringify(fg(n)),i=m.useRef(!1);return Ej(()=>{i.current=!0}),m.useCallback((c,d={})=>{if(hr(i.current,Cj),!i.current)return;if(typeof c=="number"){r.go(c);return}let u=yu(c,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Ir([t,u.pathname])),(d.replace?r.replace:r.push)(u,d.state,d)},[t,r,o,s,e])}m.createContext(null);function mg(){let{matches:e}=m.useContext(Fr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function zl(e,{relative:t}={}){let{matches:r}=m.useContext(Fr),{pathname:n}=yt(),s=JSON.stringify(fg(r));return m.useMemo(()=>yu(e,JSON.parse(s),n,t==="path"),[e,s,n,t])}function QP(e,t){return Rj(e,t)}function Rj(e,t,r){var w;De(Go(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=m.useContext(er),{matches:s}=m.useContext(Fr),o=s[s.length-1],i=o?o.params:{},l=o?o.pathname:"/",c=o?o.pathnameBase:"/",d=o&&o.route;{let v=d&&d.path||"";Tj(l,!d||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${v}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 50 51Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let u=yt(),h;if(t){let v=typeof t=="string"?Wo(t):t;De(c==="/"||((w=v.pathname)==null?void 0:w.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${v.pathname}" was given in the \`location\` prop.`),h=v}else h=u;let p=h.pathname||"/",f=p;if(c!=="/"){let v=c.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(v.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(v=>Object.assign(v,{route:r.manifest[v.route.id]||v.route})):mj(e,{pathname:f});hr(d||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),hr(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=rT(y&&y.map(v=>Object.assign({},v,{params:Object.assign({},i,v.params),pathname:Ir([c,n.encodeLocation?n.encodeLocation(v.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:Ir([c,n.encodeLocation?n.encodeLocation(v.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),s,r);return t&&g?m.createElement(Ml.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},g):g}function YP(){let e=iT(),t=DP(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=m.createElement(m.Fragment,null,m.createElement("p",null,"ð¿ Hey developer ð"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:o},"ErrorBoundary")," or"," ",m.createElement("code",{style:o},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application
51Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),r?m.createElement("pre",{style:s},r):null,i)}var XP=m.createElement(YP,null),Pj=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=GP(e.digest);r&&(e=r)}let t=e!==void 0?m.createElement(Fr.Provider,{value:this.props.routeContext},m.createElement(pg.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?m.createElement(eT,{error:e},t):t}};Pj.contextType=_j;var qh=new WeakMap;function eT({children:e,error:t}){let{basename:r}=m.useContext(er);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=KP(t.digest);if(n){let s=qh.get(t);if(s)throw s;let o=jj(n.location,r),i=o.absoluteURL||o.to;if(UP(i))throw new Error("Invalid redirect location");if(wj&&!qh.get(t))if(o.isExternal||n.reloadDocument)window.location.href=i;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw qh.set(t,l),l}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}function tT({routeContext:e,match:t,children:r}){let n=m.useContext(Ko);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(Fr.Provider,{value:e},r)}function rT(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,o=n==null?void 0:n.errors;if(o!=null){let u=s.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);De(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,u+1))}let i=!1,l=-1;if(r&&n){i=n.renderFallback;for(let u=0;u<s.length;u++){let h=s[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(l=u),h.route.id){let{loaderData:p,errors:f}=n,y=h.route.loader&&!p.hasOwnProperty(h.route.id)&&(!f||f[h.route.id]===void 0);if(h.route.lazy||y){r.isStatic&&(i=!0),l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}}let c=r==null?void 0:r.onError,d=n&&c?(u,h)=>{var p,f;c(u,{location:n.location,params:((f=(p=n.matches)==null?void 0:p[0])==null?void 0:f.params)??{},pattern:MP(n.matches),errorInfo:h})}:void 0;return s.reduceRight((u,h,p)=>{let f,y=!1,g=null,w=null;n&&(f=o&&h.route.id?o[h.route.id]:void 0,g=h.route.errorElement||XP,i&&(l<0&&p===0?(Tj("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,w=null):l===p&&(y=!0,w=h.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,p+1)),x=()=>{let b;return f?b=g:y?b=w:h.route.Component?b=m.createElement(h.route.Component,null):h.route.element?b=h.route.element:b=u,m.createElement(tT,{match:h,routeContext:{outlet:u,matches:v,isDataRoute:n!=null},children:b})};return n&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?m.createElement(Pj,{location:n.location,revalidation:n.revalidation,component:g,error:f,children:x(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:d}):x()},null)}function gg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nT(e){let t=m.useContext(Ko);return De(t,gg(e)),t}function sT(e){let t=m.useContext(bu);return De(t,gg(e)),t}function aT(e){let t=m.useContext(Fr);return De(t,gg(e)),t}function vg(e){let t=aT(e),r=t.matches[t.matches.length-1];return De(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function oT(){return vg("useRouteId")}function iT(){var n;let e=m.useContext(pg),t=sT("useRouteError"),r=vg("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function lT(){let{router:e}=nT("useNavigate"),t=vg("useNavigate"),r=m.useRef(!1);return Ej(()=>{r.current=!0}),m.useCallback(async(s,o={})=>{hr(r.current,Cj),r.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var _y={};function Tj(e,t,r){!t&&!_y[e]&&(_y[e]=!0,hr(!1,r))}m.memo(cT);function cT({routes:e,manifest:t,future:r,state:n,isStatic:s,onError:o}){return Rj(e,void 0,{manifest:t,state:n,isStatic:s,onError:o})}function dT({to:e,replace:t,state:r,relative:n}){De(Go(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=m.useContext(er);hr(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=m.useContext(Fr),{pathname:i}=yt(),l=Ts(),c=yu(e,fg(o),i,n==="path"),d=JSON.stringify(c);return m.useEffect(()=>{l(JSON.parse(d),{replace:t,state:r,relative:n})},[l,d,n,t,r]),null}function Ce(e){De(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function uT({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:s,static:o=!1,useTransitions:i}){De(!Go(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=m.useMemo(()=>({basename:l,navigator:s,static:o,useTransitions:i,future:{}}),[l,s,o,i]);typeof r=="string"&&(r=Wo(r));let{pathname:d="/",search:u="",hash:h="",state:p=null,key:f="default",mask:y}=r,g=m.useMemo(()=>{let w=Rn(d,l);return w==null?null:{location:{pathname:w,search:u,hash:h,state:p,key:f,mask:y},navigationType:n}},[l,d,u,h,p,f,n,y]);
51return hr(g!=null,`<Router basename="${l}"> is not able to match the URL "${d}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:m.createElement(er.Provider,{value:c},m.createElement(Ml.Provider,{children:t,value:g}))}function hT({children:e,location:t}){return QP(Cp(e),t)}function Cp(e,t=[]){let r=[];return m.Children.forEach(e,(n,s)=>{if(!m.isValidElement(n))return;let o=[...t,s];if(n.type===m.Fragment){r.push.apply(r,Cp(n.props.children,o));return}De(n.type===Ce,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),De(!n.props.index||!n.props.children,"An index route cannot have child routes.");let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Cp(n.props.children,o)),r.push(i)}),r}var Xc="get",ed="application/x-www-form-urlencoded";function wu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function fT(e){return wu(e)&&e.tagName.toLowerCase()==="button"}function pT(e){return wu(e)&&e.tagName.toLowerCase()==="form"}function mT(e){return wu(e)&&e.tagName.toLowerCase()==="input"}function gT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vT(e,t){return e.button===0&&(!t||t==="_self")&&!gT(e)}function Ep(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function xT(e,t){let r=Ep(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}var gc=null;function yT(){if(gc===null)try{new FormData(document.createElement("form"),0),gc=!1}catch{gc=!0}return gc}var bT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vh(e){return e!=null&&!bT.has(e)?(hr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ed}"`),null):e}function wT(e,t){let r,n,s,o,i;if(pT(e)){let l=e.getAttribute("action");n=l?Rn(l,t):null,r=e.getAttribute("method")||Xc,s=Vh(e.getAttribute("enctype"))||ed,o=new FormData(e)}else if(fT(e)||mT(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(n=c?Rn(c,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Xc,s=Vh(e.getAttribute("formenctype"))||Vh(l.getAttribute("enctype"))||ed,o=new FormData(l,e),!yT()){let{name:d,type:u,value:h}=e;if(u==="image"){let p=d?`${d}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else d&&o.append(d,h)}}else{if(wu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Xc,n=null,s=ed,i=e}return o&&s==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:s,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function xg(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Aj(e,t,r,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:t&&Rn(s.pathname,t)==="/"?s.pathname=`${Id(t)}/_root.${n}`:s.pathname=`${Id(s.pathname)}.${n}`,s}async function jT(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.
51isSpaMode,window.location.reload(),new Promise(()=>{})}}function kT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function _T(e,t,r){let n=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let i=await jT(o,r);return i.links?i.links():[]}return[]}));return ET(n.flat(1).filter(kT).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Ny(e,t,r,n,s,o){let i=(c,d)=>r[d]?c.route.id!==r[d].route.id:!0,l=(c,d)=>{var u;return r[d].pathname!==c.pathname||((u=r[d].route.path)==null?void 0:u.endsWith("*"))&&r[d].params["*"]!==c.params["*"]};return o==="assets"?t.filter((c,d)=>i(c,d)||l(c,d)):o==="data"?t.filter((c,d)=>{var h;let u=n.routes[c.route.id];if(!u||!u.hasLoader)return!1;if(i(c,d)||l(c,d))return!0;if(c.route.shouldRevalidate){let p=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function NT(e,t,{includeHydrateFallback:r}={}){return ST(e.map(n=>{let s=t.routes[n.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function ST(e){return[...new Set(e)]}function CT(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function ET(e,t){let r=new Set;return new Set(t),e.reduce((n,s)=>{let o=JSON.stringify(CT(s));return r.has(o)||(r.add(o),n.push({key:o,link:s})),n},[])}function yg(){let e=m.useContext(Ko);return xg(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function RT(){let e=m.useContext(bu);return xg(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bg=m.createContext(void 0);bg.displayName="FrameworkContext";function ju(){let e=m.useContext(bg);return xg(e,"You must render this element inside a <HydratedRouter> element"),e}function PT(e,t){let r=m.useContext(bg),[n,s]=m.useState(!1),[o,i]=m.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:u,onTouchStart:h}=t,p=m.useRef(null);m.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let g=v=>{v.forEach(x=>{i(x.isIntersecting)})},w=new IntersectionObserver(g,{threshold:.5});return p.current&&w.observe(p.current),()=>{w.disconnect()}}},[e]),m.useEffect(()=>{if(n){let g=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(g)}}},[n]);let f=()=>{s(!0)},y=()=>{s(!1),i(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:vi(l,f),onBlur:vi(c,y),onMouseEnter:vi(d,f),onMouseLeave:vi(u,y),onTouchStart:vi(h,f)}]:[!1,p,{}]}function vi(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function TT({page:e,...t}){let r=BP(),{nonce:n}=ju(),{router:s}=yg(),o=m.useMemo(()=>mj(s.routes,e,s.basename),[s.routes,e,s.basename]);return o?(t.nonce==null&&n&&(t={...t,nonce:n}),r?m.createElement(OT,{page:e,matches:o,...t}):m.createElement(LT,{page:e,matches:o,...t})):null}function AT(e){let{manifest:t,routeModules:r}=ju(),[n,s]=m.useState([]);return m.useEffect(()=>{let o=!1;return _T(e,t,r).then(i=>{o||s(i)}),()=>{o=!0}},[e,t,r]),n}function OT({page:e,matches:t,...r}){let n=yt(),{future:s}=ju(),{basename:o}=yg(),i=m.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let l=Aj(e,o,s.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,d=[];for(let u of t)typeof u.route.shouldRevalidate=="function"?c=!0:d.push(u.route.id);return c&&d.length>0&&l.searchParams.set("_routes",d.join(",")),[l.pathname+l.search]},[o,s.v8_trailingSlashAwareDataRequests,e,n,t]);return m.createElement(m.Fragment,null,i.map(l=>m.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function LT({page:e,matches:t,...r}){let n=yt(),{future:s,manifest:o,routeModules:i}=ju(),{basename:l}=yg(),{loaderData:c,matches:d}=RT(),u=m.useMemo(()=>Ny(e,t,d,o,n,"data"),[e,t,d,o,n]),h=m.useMemo(()=>Ny(e,t,d,o,n,"assets"),[e,t,d,o,n]),p=m.useMemo(()=>
51{if(e===n.pathname+n.search+n.hash)return[];let g=new Set,w=!1;if(t.forEach(x=>{var j;let b=o.routes[x.route.id];!b||!b.hasLoader||(!u.some(k=>k.route.id===x.route.id)&&x.route.id in c&&((j=i[x.route.id])!=null&&j.shouldRevalidate)||b.hasClientLoader?w=!0:g.add(x.route.id))}),g.size===0)return[];let v=Aj(e,l,s.v8_trailingSlashAwareDataRequests,"data");return w&&g.size>0&&v.searchParams.set("_routes",t.filter(x=>g.has(x.route.id)).map(x=>x.route.id).join(",")),[v.pathname+v.search]},[l,s.v8_trailingSlashAwareDataRequests,c,n,o,u,t,e,i]),f=m.useMemo(()=>NT(h,o),[h,o]),y=AT(h);return m.createElement(m.Fragment,null,p.map(g=>m.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),f.map(g=>m.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),y.map(({key:g,link:w})=>m.createElement("link",{key:g,nonce:r.nonce,...w,crossOrigin:w.crossOrigin??r.crossOrigin})))}function IT(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var $T=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$T&&(window.__reactRouterVersion="7.18.1")}catch{}function DT({basename:e,children:t,useTransitions:r,window:n}){let s=m.useRef();s.current==null&&(s.current=pP({window:n,v5Compat:!0}));let o=s.current,[i,l]=m.useState({action:o.action,location:o.location}),c=m.useCallback(d=>{r===!1?l(d):m.startTransition(()=>l(d))},[r]);return m.useLayoutEffect(()=>o.listen(c),[o,c]),m.createElement(uT,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,useTransitions:r})}var we=m.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:s,reloadDocument:o,replace:i,mask:l,state:c,target:d,to:u,preventScrollReset:h,viewTransition:p,defaultShouldRevalidate:f,...y},g){let{basename:w,navigator:v,useTransitions:x}=m.useContext(er),b=typeof u=="string"&&hg.test(u),j=jj(u,w);u=j.to;let k=ZP(u,{relative:s}),_=yt(),N=null;if(l){let H=yu(l,[],_.mask?_.mask.pathname:"/",!0);w!=="/"&&(H.pathname=H.pathname==="/"?w:Ir([w,H.pathname])),N=v.createHref(H)}let[C,R,T]=PT(n,y),O=UT(u,{replace:i,mask:l,state:c,target:d,preventScrollReset:h,relative:s,viewTransition:p,defaultShouldRevalidate:f,useTransitions:x});function I(H){t&&t(H),H.defaultPrevented||O(H)}let K=!(j.isExternal||o),$=m.createElement("a",{...y,...T,href:(K?N:void 0)||j.absoluteURL||k,onClick:K?I:t,ref:IT(g,R),target:d,"data-discover":!b&&r==="render"?"true":void 0});return C&&!b?m.createElement(m.Fragment,null,$,m.createElement(TT,{page:k})):$});we.displayName="Link";var MT=m.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:s=!1,style:o,to:i,viewTransition:l,children:c,...d},u){let h=zl(i,{relative:d.relative}),p=yt(),f=m.useContext(bu),{navigator:y,basename:g}=m.useContext(er),w=f!=null&&WT(h)&&l===!0,v=y.encodeLocation?y.encodeLocation(h).pathname:h.pathname,x=p.pathname,b=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(x=x.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&g&&(b=Rn(b,g)||b);const j=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let k=x===v||!s&&x.startsWith(v)&&x.charAt(j)==="/",_=b!=null&&(b===v||!s&&b.startsWith(v)&&b.charAt(v.length)==="/"),N={isActive:k,isPending:_,isTransitioning:w},C=k?t:void 0,R;typeof n=="function"?R=n(N):R=[n,k?"active":null,_?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let T=typeof o=="function"?o(N):o;return m.createElement(we,{...d,"aria-current":C,className:R,ref:u,style:T,to:i,viewTransition:l},typeof c=="function"?c(N):c)});MT.displayName="NavLink";var zT=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:s,state:o,method:i=Xc,action:l,onSubmit:c,relative:d,preventScrollReset:u,viewTransition:h,defaultShouldRevalidate:p,...f},y)=>{let{useTransitions:g}=m.useContext(er),w=VT(),v=HT(l,{relative:d}),x=i.toLowerCase()==="get"?"get":"post",b=typeof l=="string"&&hg.test(l),j=k=>{if(c&&c(k),k.defaultPrevented)return;k.preventDefault();let _=k.nativeEvent.submitter,N=(_==null?void 0:_.getAttribute("formmethod"))||i,C=()=>w(_||k.currentTarget,{fetcherKey:t,method:N,navigate:r,replace:s,state:o,relative:d,preventScrollReset:u,viewTransition:h,defaultShouldRevalidate:p});g&&r!==!1?m.startTransition(()=>C()):C()};return m.createElement("form",{ref:y,method:x,action:v,onSubmit:n?c:j,...f,"data-discover":!b&&e==="render"?"true":void 0})});zT.displayName="Form";function FT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Oj(e){let t=m.useContext(Ko);return De(t,FT(e)),t}function UT(e,{target:t,replace:r,mask:n,state:s,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:c,useTransitions:d}={}){let u=Ts(),h=yt(),p=zl(e,{relative:i});return m.useCallback(f=>{if(vT(f,t)){f.preventDefault();let y=r!==void 0?r:fl(h)===fl(p),g=()=>u(e,{replace:y,mask:n,state:s,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:c});d?m.startTransition(()=>g()):g()}},[h,u,p,r,n,s,t,e,o,i,l,c,d])}function wg(e){hr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=m.useRef(Ep(e)),r=m.useRef(!1),n=yt(),s=m.useMemo(()=>xT(n.search,r.current?null:t.current),[n.search]),o=Ts(),i=m.useCallback((l,c)=>{const d=Ep(typeof l=="function"?l(new URLSearchParams(s)):l);r.current=!0,o("?"+d,c)},[o,s]);return[s,i]}var BT=0,qT=()=>`__${String(++BT)}__`;function VT(){let{router:e}=Oj("useSubmit"),{basename:t}=m.useContext(er),r=oT(),n=e.fetch,s=e.navigate;return m.useCallback(async(o,i={})=>{let{action:l,method:c,encType:d,formData:u,body:h}=wT(o,t);if(i.navigate===!1){let p=i.fetcherKey||qT();await n(p,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:h,formMethod:i.method||c,formEncType:i.encType||d,flushSync:i.flushSync})}else await s(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:h,formMethod:i.method||c,formEncType:i.encType||d,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,s,t,r])}function HT(e,{relative:t}={}){let{basename:r}=m.useContext(er),n=m.useContext(Fr);De(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),o={...zl(e||".",{relative:t})},i=yt();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),c=l.getAll("index");if(c.some(u=>u==="")){l.delete("index"),c.filter(h=>
51h).forEach(h=>l.append("index",h));let u=l.toString();o.search=u?`?${u}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Ir([r,o.pathname])),fl(o)}function WT(e,{relative:t}={}){let r=m.useContext(Nj);De(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Oj("useViewTransitionState"),s=zl(e,{relative:t});if(!r.isTransitioning)return!1;let o=Rn(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Rn(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Ld(s.pathname,i)!=null||Ld(s.pathname,o)!=null}var Sy=["light","dark"],KT="(prefers-color-scheme: dark)",GT=m.createContext(void 0),ZT={setTheme:e=>{},themes:[]},JT=()=>{var e;return(e=m.useContext(GT))!=null?e:ZT};m.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:i,attrs:l,nonce:c})=>{let d=o==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?Sy.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(y,g=!1,w=!0)=>{let v=i?i[y]:y,x=g?y+"|| ''":`'${v}'`,b="";return s&&w&&!g&&Sy.includes(y)&&(b+=`d.style.colorScheme = '${y}';`),r==="class"?g||v?b+=`c.add(${x})`:b+="null":v&&(b+=`d[s](n,${x})`),b},f=e?`!function(){${u}${p(e)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${KT}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${d?"":"else{"+p(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${h}}catch(t){}}();`;return m.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:f}})});var QT=e=>{switch(e){case"success":return e4;case"info":return r4;case"warning":return t4;case"error":return n4;default:return null}},YT=Array(12).fill(0),XT=({visible:e,className:t})=>B.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},B.createElement("div",{className:"sonner-spinner"},YT.map((r,n)=>B.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),e4=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},B.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),t4=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},B.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),r4=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},B.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),n4=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},B.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),s4=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},B.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),B.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),a4=()=>
51{let[e,t]=B.useState(document.hidden);return B.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Rp=1,o4=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Rp++,o=this.toasts.find(l=>l.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:r}),{...l,...e,id:s,dismissible:i,title:r}):l):this.addToast({title:r,...n,dismissible:i,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
51this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,o,i=n.then(async c=>{if(o=["resolve",c],B.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(l4(c)&&!c.ok){s=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:d,description:u})}else if(t.success!==void 0){s=!1;let d=typeof t.success=="function"?await t.success(c):t.success,u=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:d,description:u})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){s=!1;let d=typeof t.error=="function"?await t.error(c):t.error,u=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:d,description:u})}}).finally(()=>{var c;s&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,d)=>i.then(()=>o[0]==="reject"?d(o[1]):c(o[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Rp++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Rt=new o4,i4=(e,t)=>{let r=(t==null?void 0:t.id)||Rp++;return Rt.addToast({title:e,...t,id:r}),r},l4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",c4=i4,d4=()=>Rt.toasts,u4=()=>Rt.getActiveToasts(),Ye=Object.assign(c4,{success:Rt.success,info:Rt.info,warning:Rt.warning,error:Rt.error,custom:Rt.custom,message:Rt.message,promise:Rt.promise,dismiss:Rt.dismiss,loading:Rt.loading},{getHistory:d4,getToasts:u4});function h4(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}h4(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
51left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
51:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
51--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 52`);function vc(e){return e.label!==void 0}var f4=3,p4="32px",m4="16px",Cy=4e3,g4=356,v4=14,x4=20,y4=200;function br(...e){return e.filter(Boolean).join(" ")}function b4(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var w4=e=>{var t,r,n,s,o,i,l,c,d,u,h;let{invert:p,toast:f,unstyled:y,interacting:g,setHeights:w,visibleToasts:v,heights:x,index:b,toasts:j,expanded:k,removeToast:_,defaultRichColors:N,closeButton:C,style:R,cancelButtonStyle:T,actionButtonStyle:O,className:I="",descriptionClassName:K="",duration:$,position:H,gap:U,loadingIcon:Z,expandByDefault:E,classNames:P,icons:z,closeButtonAriaLabel:ee="Close toast",pauseWhenPageIsHidden:F}
vendor: 8,111 bytes, line 52
52=e,[Y,re]=B.useState(null),[Q,ve]=B.useState(null),[M,he]=B.useState(!1),[Ee,be]=B.useState(!1),[fe,ye]=B.useState(!1),[zt,Ft]=B.useState(!1),[Dn,Mn]=B.useState(!1),[Ms,ii]=B.useState(0),[hh,zs]=B.useState(0),li=B.useRef(f.duration||$||Cy),Gv=B.useRef(null),Fs=B.useRef(null),KS=b===0,GS=b+1<=v,tr=f.type,Ta=f.dismissible!==!1,ZS=f.className||"",JS=f.descriptionClassName||"",Jl=B.useMemo(()=>x.findIndex(le=>le.toastId===f.id)||0,[x,f.id]),QS=B.useMemo(()=>{var le;return(le=f.closeButton)!=null?le:C},[f.closeButton,C]),Zv=B.useMemo(()=>f.duration||$||Cy,[f.duration,$]),fh=B.useRef(0),Aa=B.useRef(0),Jv=B.useRef(0),Oa=B.useRef(null),[YS,XS]=H.split("-"),Qv=B.useMemo(()=>x.reduce((le,Ne,Ie)=>Ie>=Jl?le:le+Ne.height,0),[x,Jl]),Yv=a4(),eC=f.invert||p,ph=tr==="loading";Aa.current=B.useMemo(()=>Jl*U+Qv,[Jl,Qv]),B.useEffect(()=>{li.current=Zv},[Zv]),B.useEffect(()=>{he(!0)},[]),B.useEffect(()=>{let le=Fs.current;if(le){let Ne=le.getBoundingClientRect().height;return zs(Ne),w(Ie=>[{toastId:f.id,height:Ne,position:f.position},...Ie]),()=>w(Ie=>Ie.filter(gr=>gr.toastId!==f.id))}},[w,f.id]),B.useLayoutEffect(()=>{if(!M)return;let le=Fs.current,Ne=le.style.height;le.style.height="auto";let Ie=le.getBoundingClientRect().height;le.style.height=Ne,zs(Ie),w(gr=>gr.find(vr=>vr.toastId===f.id)?gr.map(vr=>vr.toastId===f.id?{...vr,height:Ie}:vr):[{toastId:f.id,height:Ie,position:f.position},...gr])},[M,f.title,f.description,w,f.id]);let zn=B.useCallback(()=>{be(!0),ii(Aa.current),w(le=>le.filter(Ne=>Ne.toastId!==f.id)),setTimeout(()=>{_(f)},y4)},[f,_,w,Aa]);B.useEffect(()=>{if(f.promise&&tr==="loading"||f.duration===1/0||f.type==="loading")return;let le;return k||g||F&&Yv?(()=>{if(Jv.current<fh.current){let Ne=new Date().getTime()-fh.current;li.current=li.current-Ne}Jv.current=new Date().getTime()})():li.current!==1/0&&(fh.current=new Date().getTime(),le=setTimeout(()=>{var Ne;(Ne=f.onAutoClose)==null||Ne.call(f,f),zn()},li.current)),()=>clearTimeout(le)},[k,g,f,tr,F,Yv,zn]),B.useEffect(()=>{f.delete&&zn()},[zn,f.delete]);function tC(){var le,Ne,Ie;return z!=null&&z.loading?B.createElement("div",{className:br(P==null?void 0:P.loader,(le=f==null?void 0:f.classNames)==null?void 0:le.loader,"sonner-loader"),"data-visible":tr==="loading"},z.loading):Z?B.createElement("div",{className:br(P==null?void 0:P.loader,(Ne=f==null?void 0:f.classNames)==null?void 0:Ne.loader,"sonner-loader"),"data-visible":tr==="loading"},Z):B.createElement(XT,{className:br(P==null?void 0:P.loader,(Ie=f==null?void 0:f.classNames)==null?void 0:Ie.loader),visible:tr==="loading"})}return B.createElement("li",{tabIndex:0,ref:Fs,className:br(I,ZS,P==null?void 0:P.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,P==null?void 0:P.default,P==null?void 0:P[tr],(r=f==null?void 0:f.classNames)==null?void 0:r[tr]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:N,"data-styled":!(f.jsx||f.unstyled||y),"data-mounted":M,"data-promise":!!f.promise,"data-swiped":Dn,"data-removed":Ee,"data-visible":GS,"data-y-position":YS,"data-x-position":XS,"data-index":b,"data-front":KS,"data-swiping":fe,"data-dismissible":Ta,"data-type":tr,"data-invert":eC,"data-swipe-out":zt,"data-swipe-direction":Q,"data-expanded":!!(k||E&&M),style:{"--index":b,"--toasts-before":b,"--z-index":j.length-b,"--offset":`${Ee?Ms:Aa.current}px`,"--initial-height":E?"auto":`${hh}px`,...R,...f.style},onDragEnd:()=>{ye(!1),re(null),Oa.current=null},onPointerDown:le=>{ph||!Ta||(Gv.current=new Date,ii(Aa.current),le.target.setPointerCapture(le.pointerId),le.target.tagName!=="BUTTON"&&(ye(!0),Oa.current={x:le.clientX,y:le.clientY}))},onPointerUp:()=>{var le,Ne,Ie,gr;if(zt||!Ta)return;Oa.current=null;let vr=Number(((le=Fs.current)==null?void 0:le.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fn=Number(((Ne=Fs.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Us=new Date().getTime()-((Ie=Gv.current)==null?void 0:Ie.getTime()),xr=Y==="x"?vr:Fn,Un=Math.abs(xr)/Us;if(Math.abs(xr)>=x4||Un>.11){ii(Aa.current),(gr=f.onDismiss)==null||gr.call(f,f),ve(Y==="x"?vr>0?"right":"left":Fn>0?"down":"up"),zn(),Ft(!0),Mn(!1);return}ye(!1),re(null)},onPointerMove:le=>{var Ne,Ie,gr,vr;if(!Oa.current||!Ta||((Ne=window.getSelection())==null?void 0:Ne.toString().length)>0)return;let Fn=le.clientY-Oa.current.y,Us=le.clientX-Oa.current.x,xr=(Ie=e.swipeDirections)!=null?Ie:b4(H);!Y&&(Math.abs(Us)>1||Math.abs(Fn)>1)&&re(Math.abs(Us)>Math.abs(Fn)?"x":"y");let Un={x:0,y:0};Y==="y"?(xr.includes("top")||xr.includes("bottom"))&&(xr.includes("top")&&Fn<0||xr.includes("bottom")&&Fn>0)&&(Un.y=Fn):Y==="x"&&(xr.includes("left")||xr.includes("right"))&&(xr.includes("left")&&Us<0||xr.includes("right")&&Us>0)&&(Un.x=Us),(Math.abs(Un.x)>0||Math.abs(Un.y)>0)&&Mn(!0),(gr=Fs.current)==null||gr.style.setProperty("--swipe-amount-x",`${Un.x}px`),(vr=Fs.current)==null||vr.style.setProperty("--swipe-amount-y",`${Un.y}px`)}},QS&&!f.jsx?B.createElement("button",{"aria-label":ee,"data-disabled":ph,"data-close-button":!0,onClick:ph||!Ta?()=>{}:()=>{var le;zn(),(le=f.onDismiss)==null||le.call(f,f)},className:br(P==null?void 0:P.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(o=z==null?void 0:z.close)!=null?o:s4):null,f.jsx||m.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:B.createElement(B.Fragment,null,tr||f.icon||f.promise?B.createElement("div",{"data-icon":"",className:br(P==null?void 0:P.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||tC():null,f.type!=="loading"?f.icon||(z==null?void 0:z[tr])||QT(tr):null):null,B.createElement("div",{"data-content":"",className:br(P==null?void 0:P.content,(l=f==null?void 0:f.classNames)==null?void 0:l.content)},B.createElement("div",{"data-title":"",className:br(P==null?void 0:P.title,(c=f==null?void 0:f.classNames)==null?void 0:c.title)},typeof f.title=="function"?f.title():f.title),f.description?B.createElement("div",{"data-description":"",className:br(K,JS,P==null?void 0:P.description,(d=f==null?void 0:f.classNames)==null?void 0:d.description)},typeof f.description=="function"?f.description():f.description):null),m.isValidElement(f.cancel)?f.cancel:f.cancel&&vc(f.cancel)?B.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:le=>{var Ne,Ie;vc(f.cancel)&&Ta&&((Ie=(Ne=f.cancel).onClick)==null||Ie.call(Ne,le),zn())},className:br(P==null?void 0:P.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,m.isValidElement(f.action)?f.action:f.action&&vc(f.action)?B.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||O,onClick:le=>{var Ne,Ie;vc(f.action)&&((Ie=(Ne=f.action).onClick)==null||Ie.call(Ne,le),!le.defaultPrevented&&zn())},className:br(P==null?void 0:P.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function Ey(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function j4(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",l=o?m4:p4;function c(d){["top","right","bottom","left"].forEach(u=>{r[`${i}-${u}`]=typeof d=="number"?`${d}px`:d})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(d=>{n[d]===void 0?r[`${i}-${d}`]=l:r[`${i}-${d}`]=typeof n[d]=="number"?`${n[d]}px`:n[d]}):c(l)}),r}var k4=m.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:h,duration:p,style:f,visibleToasts:y=f4,toastOptions:g,dir:w=Ey(),gap:v=v4,loadingIcon:x,icons:b,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:k}=e,[_,N]=B.useState([]),C=B.useMemo(()=>Array.from(new Set([n].concat(_.filter(F=>F.position).map(F=>F.position)))),[_,n]),[R,T]=B.useState([]),[O,I]=B.useState(!1),[K,$]=B.use
52State(!1),[H,U]=B.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=B.useRef(null),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=B.useRef(null),z=B.useRef(!1),ee=B.useCallback(F=>{N(Y=>{var re;return(re=Y.find(Q=>Q.id===F.id))!=null&&re.delete||Rt.dismiss(F.id),Y.filter(({id:Q})=>Q!==F.id)})},[]);return B.useEffect(()=>Rt.subscribe(F=>{if(F.dismiss){N(Y=>Y.map(re=>re.id===F.id?{...re,delete:!0}:re));return}setTimeout(()=>{ER.flushSync(()=>{N(Y=>{let re=Y.findIndex(Q=>Q.id===F.id);return re!==-1?[...Y.slice(0,re),{...Y[re],...F},...Y.slice(re+1)]:[F,...Y]})})})}),[]),B.useEffect(()=>{if(u!=="system"){U(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:Y})=>{U(Y?"dark":"light")})}catch{F.addListener(({matches:re})=>{try{U(re?"dark":"light")}catch(Q){console.error(Q)}})}},[u]),B.useEffect(()=>{_.length<=1&&I(!1)},[_]),B.useEffect(()=>{let F=Y=>{var re,Q;s.every(ve=>Y[ve]||Y.code===ve)&&(I(!0),(re=Z.current)==null||re.focus()),Y.code==="Escape"&&(document.activeElement===Z.current||(Q=Z.current)!=null&&Q.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[s]),B.useEffect(()=>{if(Z.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,z.current=!1)}},[Z.current]),B.createElement("section",{ref:t,"aria-label":`${j} ${E}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((F,Y)=>{var re;let[Q,ve]=F.split("-");return _.length?B.createElement("ol",{key:F,dir:w==="auto"?Ey():w,tabIndex:-1,ref:Z,className:l,"data-sonner-toaster":!0,"data-theme":H,"data-y-position":Q,"data-lifted":O&&_.length>1&&!o,"data-x-position":ve,style:{"--front-toast-height":`${((re=R[0])==null?void 0:re.height)||0}px`,"--width":`${g4}px`,"--gap":`${v}px`,...f,...j4(c,d)},onBlur:M=>{z.current&&!M.currentTarget.contains(M.relatedTarget)&&(z.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:M=>{M.target instanceof HTMLElement&&M.target.dataset.dismissible==="false"||z.current||(z.current=!0,P.current=M.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{K||I(!1)},onDragEnd:()=>I(!1),onPointerDown:M=>{M.target instanceof HTMLElement&&M.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},_.filter(M=>!M.position&&Y===0||M.position===F).map((M,he)=>{var Ee,be;return B.createElement(w4,{key:M.id,icons:b,index:he,toast:M,defaultRichColors:h,duration:(Ee=g==null?void 0:g.duration)!=null?Ee:p,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:y,closeButton:(be=g==null?void 0:g.closeButton)!=null?be:i,interacting:K,position:F,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:ee,toasts:_.filter(fe=>fe.position==M.position),heights:R.filter(fe=>fe.position==M.position),setHeights:T,expandByDefault:o,gap:v,loadingIcon:x,expanded:O,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const _4=({...e})=>{const{theme:t="system"}=JT();return a.jsx(k4,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},N4=1,S4=1e6;let Hh=0;function C4(){return Hh=(Hh+1)%Number.MAX_SAFE_INTEGER,Hh.toString()}const Wh=new Map,Ry=e=>{if(Wh.has(e))return;const t=setTimeout(()=>{Wh.delete(e),qi({type:"REMOVE_TOAST",toastId:e})},S4);Wh.set(e,t)},E4=(e,t)=>
52{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,N4)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Ry(r):e.toasts.forEach(n=>{Ry(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},td=[];let rd={toasts:[]};function qi(e){rd=E4(rd,e),td.forEach(t=>{t(rd)})}function R4({...e}){const t=C4(),r=s=>qi({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>qi({type:"DISMISS_TOAST",toastId:t});return qi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function jg(){const[e,t]=m.useState(rd);return m.useEffect(()=>(td.push(t),()=>{const r=td.indexOf(t);r>-1&&td.splice(r,1)}),[e]),{...e,toast:R4,dismiss:r=>qi({type:"DISMISS_TOAST",toastId:r})}}function te(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s||!s.defaultPrevented)return t==null?void 0:t(s)}}function Py(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function P4(...e){return t=>{let r=!1;const n=e.map(s=>{const o=Py(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():Py(e[s],null)}}}}function de(...e){return m.useCallback(P4(...e),e)}function fr(e,t=[]){let r=[];function n(o,i){const l=m.createContext(i);l.displayName=o+"Context";const c=r.length;r=[...r,i];const d=h=>{var v;const{scope:p,children:f,...y}=h,g=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,w=m.useMemo(()=>y,Object.values(y));return a.jsx(g.Provider,{value:w,children:f})};d.displayName=o+"Provider";function u(h,p,f={}){var v;const{optional:y=!1}=f,g=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,w=m.useContext(g);if(w)return w;if(i!==void 0)return i;if(!y)throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,u]}const s=()=>{const o=r.map(i=>m.createContext(i));return function(l){const c=(l==null?void 0:l[e])||o;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[n,T4(s,...t)]}function T4(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((l,{useScope:c,scopeName:d})=>{const h=c(o)[`__scope${d}`];return{...l,...h}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function xa(e){const t=m.forwardRef((r,n)=>{let{children:s,...o}=r,i=null,l=!1;const c=[];Ty(s)&&typeof xc=="function"&&(s=xc(s._payload)),m.Children.forEach(s,p=>{var f;if(D4(p)){l=!0;const y=p;let g="child"in y.props?y.props.child:y.props.children;Ty(g)&&typeof xc=="function"&&(g=xc(g._payload)),i=L4(y,g),c.push((f=i==null?void 0:i.props)==null?void 0:f.children)}else c.push(p)}),i?i=m.cloneElement(i,void 0,c):!l&&m.Children.count(s)===1&&m.isValidElement(s)&&(i=s);const d=i?$4(i):void 0,u=de(n,d);if(!i){if(s||s===0)throw new Error(l?U4(e):F4(e));return s}const h=I4(o,i.props??{});return i.type!==m.Fragment&&(h.ref=n?u:d),m.cloneElement(i,h)});return t.displayName=`${e}.Slot`,t}var A4=xa("Slot"),Lj=Symbol.for("radix.slottable");function O4(e){const t=r=>"child"in r?r.children(r.child):r.children;return t.displayName=`${e}.Slottable`,t.__radixId=Lj,t}var L4=(e,t)=>{if("child"in e.props){const r=e.props.child;return m.isValidElement(r)?m.cloneElement(r,void 0,e.props.children(r.props.children)):null}return m.isValidElement(t)?t:null};function I4(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...l)=>{const c=o(...l);return s(...l),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function $4(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function D4(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Lj}var M4=Symbol.for("react.lazy");function Ty(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===M4&&"_payload"in e&&z4(e._payload)}function z4(e){return typeof e=="object"&&e!==null&&"then"in e}var F4=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,U4=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,xc=gm[" use ".trim().toString()];function ku(e){const t=e+"CollectionProvider",[r,n]=fr(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:w,children:v}=g,x=m.useRef(null),b=m.useRef(new Map).current;return a.jsx(s,{scope:w,itemMap:b,collectionRef:x,children:v})};i.displayName=t;const l=e+"CollectionSlot",c=xa(l),d=m.forwardRef((g,w)=>{const{scope:v,children:x}=g,b=o(l,v),j=de(w,b.collectionRef);return a.jsx(c,{ref:j,children:x})});d.displayName=l;const u=e+"CollectionItemSlot",h="data-radix-collection-item",p=xa(u),f=m.forwardRef((g,w)=>{const{scope:v,children:x,...b}=g,j=m.useRef(null),k=de(w,j),_=o(u,v);return m.useEffect(()=>(_.itemMap.set(j,{ref:j,...b}),()=>void _.itemMap.delete(j))),a.jsx(p,{[h]:"",ref:k,children:x})});f.displayName=u;function y(g){const w=o(e+"CollectionConsumer",g);return m.useCallback(()=>{const x=w.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${h}]`));
52return Array.from(w.itemMap.values()).sort((_,N)=>b.indexOf(_.ref.current)-b.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:d,ItemSlot:f},y,n]}var B4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oe=B4.reduce((e,t)=>{const r=xa(`Primitive.${t}`),n=m.forwardRef((s,o)=>{const{asChild:i,...l}=s,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ij(e,t){e&&Rs.flushSync(()=>e.dispatchEvent(t))}function Qt(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var q4="DismissableLayer",Pp="dismissableLayer.update",V4="dismissableLayer.pointerDownOutside",H4="dismissableLayer.focusOutside",Ay,kg=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Zo=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,onDismiss:c,...d}=e,u=m.useContext(kg),[h,p]=m.useState(null),f=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=m.useState({}),g=de(t,p),w=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=v?w.indexOf(v):-1,b=h?w.indexOf(h):-1,j=u.layersWithOutsidePointerEventsDisabled.size>0,k=b>=x,_=m.useRef(!1),N=Z4(O=>{o==null||o(O),l==null||l(O),O.defaultPrevented||c==null||c()},{ownerDocument:f,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:_,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(O=>{if(!(O instanceof Node))return!1;const I=[...u.branches].some(K=>K.contains(O));return k&&!I},[u.branches,k])}),C=J4(O=>{if(n&&_.current)return;const I=O.target;[...u.branches].some($=>$.contains(I))||(i==null||i(O),l==null||l(O),O.defaultPrevented||c==null||c())},f),R=h?b===w.length-1:!1,T=Qt(O=>{O.key==="Escape"&&(s==null||s(O),!O.defaultPrevented&&c&&(O.preventDefault(),c()))});return m.useEffect(()=>{if(R)return f.addEventListener("keydown",T,{capture:!0}),()=>f.removeEventListener("keydown",T,{capture:!0})},[f,R,T]),m.useEffect(()=>{if(h)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ay=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),Oy(),()=>{r&&(u.layersWithOutsidePointerEventsDisabled.delete(h),u.layersWithOutsidePointerEventsDisabled.size===0&&(f.body.style.pointerEvents=Ay))}},[h,f,r,u]),m.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),Oy())},[h,u]),m.useEffect(()=>{const O=()=>y({});return document.addEventListener(Pp,O),()=>document.removeEventListener(Pp,O)},[]),a.jsx(oe.div,{...d,ref:g,style:{pointerEvents:j?k?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,C.onFocusCapture),onBlurCapture:te(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,N.onPointerDownCapture)})});Zo.displayName=q4;var W4="DismissableLayerBranch",$j=m.forwardRef((e,t)=>{const r=m.useContext(kg),n=m.useRef(null),s=de(t,n);return m.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),a.jsx(oe.div,{...e,ref:s})});$j.displayName=W4;function K4(){const e=m.useContext(kg),[t,r]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}var G4=()=>!0;function Z4(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:o,shouldHandlePointerDownOutside:i=G4}=t,l=Qt(e),c=m.useRef(!1),d=m.useRef(!1),u=m.useRef(new Map),h=m.useRef(()=>{});return m.useEffect(()=>{function p(){d.current=!1,s.current=!1,u.current.clear()}function f(){return Array.from(u.current.values()).some(Boolean)}function y(b){if(!d.current)return;const j=b.target;j instanceof Node&&[...o].some(_=>_.contains(j))||u.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{d.current&&h.current()},0)}function g(b){d.current&&u.current.set(b.type,!1)}const w=b=>{if(b.target&&!c.current){let j=function(){r.removeEventListener("click",h.current);const _=f();p(),_||Dj(V4,l,k,{discrete:!0})};if(!i(b.target)){r.removeEventListener("click",h.current),p(),c.current=!1;return}const k={originalEvent:b};d.current=!0,s.current=n&&b.button===0,u.current.clear(),!n||b.button!==0?j():(r.removeEventListener("click",h.current),h.current=j,r.addEventListener("click",h.current,{once:!0}))}else r.removeEventListener("click",h.current),p();c.current=!1},v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of v)r.addEventListener(b,y,!0),r.addEventListener(b,g);const x=window.setTimeout(()=>{r.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(x),r.removeEventListener("pointerdown",w),r.removeEventListener("click",h.current);for(const b of v)r.removeEventListener(b,y,!0),r.removeEventListener(b,g)}},[r,l,n,s,o,i]),{onPointerDownCapture:()=>c.current=!0}}function J4(e,t=globalThis==null?void 0:globalThis.document){const r=Qt
vendor: 4,565 bytes, line 52
52(e),n=m.useRef(!1);return m.useEffect(()=>{const s=o=>{o.target&&!n.current&&Dj(H4,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Oy(){const e=new CustomEvent(Pp);document.dispatchEvent(e)}function Dj(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Ij(s,o):s.dispatchEvent(o)}var Q4=Zo,Y4=$j,et=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},X4="Portal",Fl=m.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[s,o]=m.useState(!1);et(()=>o(!0),[]);const i=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?Rs.createPortal(a.jsx(oe.div,{...n,ref:t}),i):null});Fl.displayName=X4;function eA(e,t){return m.useReducer((r,n)=>t[r][n]??r,e)}var on=e=>{const{present:t,children:r}=e,n=tA(t),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),o=rA(n.ref,nA(s));return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:o}):null};on.displayName="Presence";function tA(e){const[t,r]=m.useState(),n=m.useRef(null),s=m.useRef(e),o=m.useRef("none"),i=m.useRef(void 0),l=e?"mounted":"unmounted",[c,d]=eA(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{c==="mounted"?(o.current=i.current??xi(n.current),i.current=void 0):o.current="none"},[c]),et(()=>{const u=n.current,h=s.current;if(h!==e){const f=o.current,y=xi(u);e?(i.current=y,d("MOUNT")):y==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(h&&f!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),et(()=>{if(t){let u;const h=t.ownerDocument.defaultView??window,p=y=>{const w=xi(n.current).includes(CSS.escape(y.animationName));if(y.target===t&&w&&(d("ANIMATION_END"),!s.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=y=>{y.target===t&&(o.current=xi(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:m.useCallback(u=>{if(u){const h=getComputedStyle(u);n.current=h,i.current=xi(h)}else n.current=null;r(u)},[])}}function Ly(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rA(...e){const t=m.useRef(e);return t.current=e,m.useCallback(r=>{const n=t.current;let s=!1;const o=n.map(i=>{const l=Ly(i,r);return!s&&typeof l=="function"&&(s=!0),l});if(s)return()=>{for(let i=0;i<o.length;i++){const l=o[i];typeof l=="function"?l():Ly(n[i],null)}}},[])}function xi(e){return(e==null?void 0:e.animationName)||"none"}function nA(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var sA=gm[" useInsertionEffect ".trim().toString()]||et;function an({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,i]=aA({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:s;{const u=m.useRef(e!==void 0);m.useEffect(()=>{const h=u.current;h!==l&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${l?"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.`),u.current=l},[l,n])}const d=m.useCallback(u=>{var h;if(l){const p=oA(u)?u(e):u;p!==e&&((h=i.current)==null||h.call(i,p))}else o(u)},[l,e,o,i]);return[c,d]}function aA({defaultProp:e,onChange:t}){const[r,n]=m.useState(e),s=m.useRef(r),o=m.useRef(t);return sA(()=>{o.current=t},[t]),m.useEffect(()=>{var i;s.current!==r&&((i=o.current)==null||i.call(o,r),s.current=r)},[r,s]),[r,n,o]}function oA(e){return typeof e=="function"}var Mj=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"}),iA="VisuallyHidden",_u=m.forwardRef((e,t)=>
52a.jsx(oe.span,{...e,ref:t,style:{...Mj,...e.style}}));_u.displayName=iA;var lA=_u,_g="ToastProvider",[Ng,cA,dA]=ku("Toast"),[zj]=fr("Toast",[dA]),[uA,Nu]=zj(_g),Fj=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,announcerContainer:i,children:l}=e,[c,d]=m.useState(null),[u,h]=m.useState(0),p=m.useRef(!1),f=m.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${_g}\`. Expected non-empty \`string\`.`),a.jsx(Ng.Provider,{scope:t,children:a.jsx(uA,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:c,onViewportChange:d,onToastAdd:m.useCallback(()=>h(y=>y+1),[]),onToastRemove:m.useCallback(()=>h(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:f,announcerContainer:i,children:l})})};Fj.displayName=_g;var Uj="ToastViewport",hA=["F8"],Tp="toast.viewportPause",Ap="toast.viewportResume",Bj=m.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=hA,label:s="Notifications ({hotkey})",...o}=e,i=Nu(Uj,r),l=cA(r),c=m.useRef(null),d=m.useRef(null),u=m.useRef(null),h=m.useRef(null),p=de(t,h,i.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;m.useEffect(()=>{const w=v=>{var b;n.length!==0&&n.every(j=>v[j]||v.code===j)&&((b=h.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),m.useEffect(()=>{const w=c.current,v=h.current;if(y&&w&&v){const x=()=>{if(!i.isClosePausedRef.current){const _=new CustomEvent(Tp);v.dispatchEvent(_),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const _=new CustomEvent(Ap);v.dispatchEvent(_),i.isClosePausedRef.current=!1}},j=_=>{!w.contains(_.relatedTarget)&&b()},k=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",x),w.addEventListener("focusout",j),w.addEventListener("pointermove",x),w.addEventListener("pointerleave",k),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",x),w.removeEventListener("focusout",j),w.removeEventListener("pointermove",x),w.removeEventListener("pointerleave",k),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[y,i.isClosePausedRef]);const g=m.useCallback(({tabbingDirection:w})=>{const x=l().map(b=>{const j=b.ref.current,k=[j,...NA(j)];return w==="forwards"?k:k.reverse()});return(w==="forwards"?x.reverse():x).flat()},[l]);return m.useEffect(()=>{const w=h.current;if(w){const v=x=>{var k,_,N;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const C=document.activeElement,R=x.shiftKey;if(x.target===w&&R){(k=d.current)==null||k.focus();return}const I=g({tabbingDirection:R?"backwards":"forwards"}),K=I.findIndex($=>$===C);Kh(I.slice(K+1))?x.preventDefault():R?(_=d.current)==null||_.focus():(N=u.current)==null||N.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[l,g]),a.jsxs(Y4,{ref:c,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&a.jsx(Op,{ref:d,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});Kh(w)}}),a.jsx(Ng.Slot,{scope:r,children:a.jsx(oe.ol,{tabIndex:-1,...o,ref:p})}),y&&a.jsx(Op,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});Kh(w)}})]})});Bj.displayName=Uj;var qj="ToastFocusProxy",Op=m.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Nu(qj,r);return a.jsx(_u,{tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var d;const l=i.relatedTarget;!((d=o.viewport)!=null&&d.contains(l))&&n()}})});Op.displayName=qj;var Ul="Toast",fA="toast.swipeStart",pA="toast.swipeMove",mA="toast.swipeCancel",gA="toast.swipeEnd",Vj=m.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[l,c]=an({prop:n,defaultProp:s??!0,onChange:o,caller:Ul});return a.jsx(on,{present:r||l,children:a.jsx(yA,{open:l,...i,ref:t,onClose:()=>c(!1),onPause:Qt(e.onPause),onResume:Qt(e.onResume),onSwipeStart:te(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:te(e.onSwipeMove,d=>{const{x:u,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:te(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:te(e.onSwipeEnd,d=>{const{x:u,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});Vj.displayName=Ul;var[vA,xA]=zj(Ul,{onClose(){}}),yA=m.forwardRef((e,t)=>
52{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:l,onPause:c,onResume:d,onSwipeStart:u,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...y}=e,g=Nu(Ul,r),[w,v]=m.useState(null),x=de(t,v),b=m.useRef(null),j=m.useRef(null),k=s||g.duration,_=m.useRef(0),N=m.useRef(k),C=m.useRef(0),{onToastAdd:R,onToastRemove:T}=g,O=Qt(()=>{var H;(w==null?void 0:w.contains(document.activeElement))&&((H=g.viewport)==null||H.focus()),i()}),I=m.useCallback($=>{!$||$===1/0||(window.clearTimeout(C.current),_.current=new Date().getTime(),C.current=window.setTimeout(O,$))},[O]);m.useEffect(()=>{const $=g.viewport;if($){const H=()=>{I(N.current),d==null||d()},U=()=>{const Z=new Date().getTime()-_.current;N.current=N.current-Z,window.clearTimeout(C.current),c==null||c()};return $.addEventListener(Tp,U),$.addEventListener(Ap,H),()=>{$.removeEventListener(Tp,U),$.removeEventListener(Ap,H)}}},[g.viewport,k,c,d,I]),m.useEffect(()=>{o&&!g.isClosePausedRef.current&&I(k)},[o,k,g.isClosePausedRef,I]),m.useEffect(()=>()=>{window.clearTimeout(C.current)},[]),m.useEffect(()=>(R(),()=>T()),[R,T]);const K=m.useMemo(()=>w?Qj(w):null,[w]);return g.viewport?a.jsxs(a.Fragment,{children:[K&&a.jsx(bA,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:K}),a.jsx(vA,{scope:r,onClose:O,children:Rs.createPortal(a.jsx(Ng.ItemSlot,{scope:r,children:a.jsx(Q4,{asChild:!0,onEscapeKeyDown:te(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(oe.li,{tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:te(e.onKeyDown,$=>{$.key==="Escape"&&(l==null||l($.nativeEvent),$.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:te(e.onPointerDown,$=>{$.button===0&&(b.current={x:$.clientX,y:$.clientY})}),onPointerMove:te(e.onPointerMove,$=>{if(!b.current)return;const H=$.clientX-b.current.x,U=$.clientY-b.current.y,Z=!!j.current,E=["left","right"].includes(g.swipeDirection),P=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,z=E?P(0,H):0,ee=E?0:P(0,U),F=$.pointerType==="touch"?10:2,Y={x:z,y:ee},re={originalEvent:$,delta:Y};Z?(j.current=Y,yc(pA,h,re,{discrete:!1})):Iy(Y,g.swipeDirection,F)?(j.current=Y,yc(fA,u,re,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(H)>F||Math.abs(U)>F)&&(b.current=null)}),onPointerUp:te(e.onPointerUp,$=>{const H=j.current,U=$.target;if(U.hasPointerCapture($.pointerId)&&U.releasePointerCapture($.pointerId),j.current=null,b.current=null,H){const Z=$.currentTarget,E={originalEvent:$,delta:H};Iy(H,g.swipeDirection,g.swipeThreshold)?yc(gA,f,E,{discrete:!0}):yc(mA,p,E,{discrete:!0}),Z.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),bA=e=>{const{__scopeToast:t,children:r,...n}=e,s=Nu(Ul,t),[o,i]=m.useState(!1),[l,c]=m.useState(!1);return kA(()=>i(!0)),m.useEffect(()=>{const d=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:a.jsx(Fl,{asChild:!0,container:s.announcerContainer||void 0,children:a.jsx(_u,{...n,children:o&&a.jsxs(a.Fragment,{children:[s.label," ",r]})})})},wA="ToastTitle",Hj=m.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return a.jsx(oe.div,{...n,ref:t})});Hj.displayName=wA;var jA="ToastDescription",Wj=m.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return a.jsx(oe.div,{...n,ref:t})});Wj.displayName=jA;var Kj="ToastAction",Gj=m.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?a.jsx(Jj,{altText:r,asChild:!0,children:a.jsx(Sg,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Kj}\`. Expected non-empty \`string\`.`),null)});Gj.displayName=Kj;var Zj="ToastClose",Sg=m.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=xA(Zj,r);return a.jsx(Jj,{asChild:!0,children:a.jsx(oe.button,{type:"button",...n,ref:t,onClick:te(e.onClick,s.onClose)})})});Sg.displayName=Zj;var Jj=m.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return a.jsx(oe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function Qj(e){const t=[];
vendor: 4,277 bytes, lines 52-77
52return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),_A(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Qj(n))}}),t}function yc(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Ij(s,o):s.dispatchEvent(o)}var Iy=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function kA(e=()=>{}){const t=Qt(e);et(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function _A(e){return e.nodeType===e.ELEMENT_NODE}function NA(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Kh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var SA=Fj,Yj=Bj,Xj=Vj,ek=Hj,tk=Wj,rk=Gj,nk=Sg;function sk(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=sk(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ak(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=sk(e))&&(n&&(n+=" "),n+=t);return n}const $y=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dy=ak,Cg=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Dy(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(d=>{const u=r==null?void 0:r[d],h=o==null?void 0:o[d];if(u===null)return null;const p=$y(u)||$y(h);return s[d][p]}),l=r&&Object.entries(r).reduce((d,u)=>{let[h,p]=u;return p===void 0||(d[h]=p),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,u)=>{let{class:h,className:p,...f}=u;return Object.entries(f).every(y=>{let[g,w]=y;return Array.isArray(w)?w.includes({...o,...l}[g]):{...o,...l}[g]===w})?[...d,h,p]:d},[]);return Dy(e,i,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** 53 * @license lucide-react v0.462.0 - ISC 54 * 55 * This source code is licensed under the ISC license. 56 * See the LICENSE file in the root directory of this source tree. 57 */const CA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ok=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 58 * @license lucide-react v0.462.0 - ISC 59 * 60 * This source code is licensed under the ISC license. 61 * See the LICENSE file in the root directory of this source tree. 62 */var EA={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"};/** 63 * @license lucide-react v0.462.0 - ISC 64 * 65 * This source code is licensed under the ISC license. 66 * See the LICENSE file in the root directory of this source tree. 67 */const RA=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...l},c)=>m.createElement("svg",{ref:c,...EA,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ok("lucide",s),...l},[...i.map(([d,u])=>m.createElement(d,u)),...Array.isArray(o)?o:[o]]));/** 68 * @license lucide-react v0.462.0 - ISC 69 * 70 * This source code is licensed under the ISC license. 71 * See the LICENSE file in the root directory of this source tree. 72 */const L=(e,t)=>{const r=m.forwardRef(({className:n,...s},o)=>m.createElement(RA,{ref:o,iconNode:t,className:ok(`lucide-${CA(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 73 * @license lucide-react v0.462.0 - ISC 74 * 75 * This source code is licensed under the ISC license. 76 * See the LICENSE file in the root directory of this source tree. 77 */const PA=L("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
77-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** 78 * @license lucide-react v0.462.0 - ISC 79 * 80 * This source code is licensed under the ISC license. 81 * See the LICENSE file in the root directory of this source tree. 82 */const Eg=L("Anchor",[["path",{d:"M12 22V8",key:"qkxhtm"}],["path",{d:"M5 12H2a10 10 0 0 0 20 0h-3",key:"1hv3nh"}],["circle",{cx:"12",cy:"5",r:"3",key:"rqqgnr"}]]);/** 83 * @license lucide-react v0.462.0 - ISC 84 * 85 * This source code is licensed under the ISC license. 86 * See the LICENSE file in the root directory of this source tree. 87 */const TA=L("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** 88 * @license lucide-react v0.462.0 - ISC 89 * 90 * This source code is licensed under the ISC license. 91 * See the LICENSE file in the root directory of this source tree. 92 */const Ln=L("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 93 * @license lucide-react v0.462.0 - ISC 94 * 95 * This source code is licensed under the ISC license. 96 * See the LICENSE file in the root directory of this source tree. 97 */const ot=L("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 98 * @license lucide-react v0.462.0 - ISC 99 * 100 * This source code is licensed under the ISC license. 101 * See the LICENSE file in the root directory of this source tree. 102 */const Lp=L("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 103 * @license lucide-react v0.462.0 - ISC 104 * 105 * This source code is licensed under the ISC license. 106 * See the LICENSE file in the root directory of this source tree. 107 */const AA=L("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 108 * @license lucide-react v0.462.0 - ISC 109 * 110 * This source code is licensed under the ISC license. 111 * See the LICENSE file in the root directory of this source tree. 112 */const OA=L("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 113 * @license lucide-react v0.462.0 - ISC 114 * 115 * This source code is licensed under the ISC license. 116 * See the LICENSE file in the root directory of this source tree. 117 */const LA=L("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 118 * @license lucide-react v0.462.0 - ISC 119 * 120 * This source code is licensed under the ISC license. 121 * See the LICENSE file in the root directory of this source tree. 122 */const ik=L("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 123 * @license lucide-react v0.462.0 - ISC 124 * 125 * This source code is licensed under the ISC license. 126 * See the LICENSE file in the root directory of this source tree. 127 */const IA=L("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/** 128 * @license lucide-react v0.462.0 - ISC 129 * 130 * This source code is licensed under the ISC license. 131 * See the LICENSE file in the root directory of this source tree. 132 */const Rg=L("Building2",[["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"}]]);/** 133 * @license lucide-react v0.462.0 - ISC 134 * 135 * This source code is licensed under the ISC license. 136 * See the LICENSE file in the root directory of this source tree. 137 */const $A=L("CalendarCheck2",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 14V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"bce9hv"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m16 20 2 2 4-4",key:"13tcca"}]]);/** 138 * @license lucide-react v0.462.0 - ISC 139 * 140 * This source code is licensed under the ISC license. 141 * See the LICENSE file in the root directory of this source tree. 142 */const DA=L("CalendarCheck",[["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:"m9 16 2 2 4-4",key:"19s6y9"}]]);/** 143 * @license lucide-react v0.462.0 - ISC 144 * 145 * This source code is licensed under the ISC license. 146 * See the LICENSE file in the root directory of this source tree. 147 */const lk=L("CalendarClock",[["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"}
147],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** 148 * @license lucide-react v0.462.0 - ISC 149 * 150 * This source code is licensed under the ISC license. 151 * See the LICENSE file in the root directory of this source tree. 152 */const MA=L("CalendarDays",[["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"}]]);/** 153 * @license lucide-react v0.462.0 - ISC 154 * 155 * This source code is licensed under the ISC license. 156 * See the LICENSE file in the root directory of this source tree. 157 */const zA=L("CalendarX",[["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:"m14 14-4 4",key:"rymu2i"}],["path",{d:"m10 14 4 4",key:"3sz06r"}]]);/** 158 * @license lucide-react v0.462.0 - ISC 159 * 160 * This source code is licensed under the ISC license. 161 * See the LICENSE file in the root directory of this source tree. 162 */const FA=L("Calendar",[["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"}]]);/** 163 * @license lucide-react v0.462.0 - ISC 164 * 165 * This source code is licensed under the ISC license. 166 * See the LICENSE file in the root directory of this source tree. 167 */const ck=L("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 168 * @license lucide-react v0.462.0 - ISC 169 * 170 * This source code is licensed under the ISC license. 171 * See the LICENSE file in the root directory of this source tree. 172 */const UA=L("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 173 * @license lucide-react v0.462.0 - ISC 174 * 175 * This source code is licensed under the ISC license. 176 * See the LICENSE file in the root directory of this source tree. 177 */const dk=L("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/** 178 * @license lucide-react v0.462.0 - ISC 179 * 180 * This source code is licensed under the ISC license. 181 * See the LICENSE file in the root directory of this source tree. 182 */const pl=L("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 183 * @license lucide-react v0.462.0 - ISC 184 * 185 * This source code is licensed under the ISC license. 186 * See the LICENSE file in the root directory of this source tree. 187 */const Bl=L("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 188 * @license lucide-react v0.462.0 - ISC 189 * 190 * This source code is licensed under the ISC license. 191 * See the LICENSE file in the root directory of this source tree. 192 */const bc=L("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 193 * @license lucide-react v0.462.0 - ISC 194 * 195 * This source code is licensed under the ISC license. 196 * See the LICENSE file in the root directory of this source tree. 197 */const BA=L("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 198 * @license lucide-react v0.462.0 - ISC 199 * 200 * This source code is licensed under the ISC license. 201 * See the LICENSE file in the root directory of this source tree. 202 */const qA=L("CircleAlert",[["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"}]]);/** 203 * @license lucide-react v0.462.0 - ISC 204 * 205 * This source code is licensed under the ISC license. 206 * See the LICENSE file in the root directory of this source tree. 207 */const Ze=L("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 208 * @license lucide-react v0.462.0 - ISC 209 * 210 * This source code is licensed under the ISC license. 211 * See the LICENSE file in the root directory of this source tree. 212 */const VA=L("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 213 * @license lucide-react v0.462.0 - ISC 214 * 215 * This source code is licensed under the ISC license. 216 * See the LICENSE file in the root directory of this source tree.
217 */const Pg=L("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/** 218 * @license lucide-react v0.462.0 - ISC 219 * 220 * This source code is licensed under the ISC license. 221 * See the LICENSE file in the root directory of this source tree. 222 */const uk=L("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** 223 * @license lucide-react v0.462.0 - ISC 224 * 225 * This source code is licensed under the ISC license. 226 * See the LICENSE file in the root directory of this source tree. 227 */const Tg=L("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 228 * @license lucide-react v0.462.0 - ISC 229 * 230 * This source code is licensed under the ISC license. 231 * See the LICENSE file in the root directory of this source tree. 232 */const HA=L("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/** 233 * @license lucide-react v0.462.0 - ISC 234 * 235 * This source code is licensed under the ISC license. 236 * See the LICENSE file in the root directory of this source tree. 237 */const WA=L("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/** 238 * @license lucide-react v0.462.0 - ISC 239 * 240 * This source code is licensed under the ISC license. 241 * See the LICENSE file in the root directory of this source tree. 242 */const hk=L("Compass",[["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",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 243 * @license lucide-react v0.462.0 - ISC 244 * 245 * This source code is licensed under the ISC license. 246 * See the LICENSE file in the root directory of this source tree. 247 */const My=L("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 248 * @license lucide-react v0.462.0 - ISC 249 * 250 * This source code is licensed under the ISC license. 251 * See the LICENSE file in the root directory of this source tree. 252 */const Ag=L("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}
252],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** 253 * @license lucide-react v0.462.0 - ISC 254 * 255 * This source code is licensed under the ISC license. 256 * See the LICENSE file in the root directory of this source tree. 257 */const Pn=L("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 258 * @license lucide-react v0.462.0 - ISC 259 * 260 * This source code is licensed under the ISC license. 261 * See the LICENSE file in the root directory of this source tree. 262 */const KA=L("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 263 * @license lucide-react v0.462.0 - ISC 264 * 265 * This source code is licensed under the ISC license. 266 * See the LICENSE file in the root directory of this source tree. 267 */const Ip=L("ExternalLink",[["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"}]]);/** 268 * @license lucide-react v0.462.0 - ISC 269 * 270 * This source code is licensed under the ISC license. 271 * See the LICENSE file in the root directory of this source tree. 272 */const GA=L("EyeOff",[["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"}]]);/** 273 * @license lucide-react v0.462.0 - ISC 274 * 275 * This source code is licensed under the ISC license. 276 * See the LICENSE file in the root directory of this source tree. 277 */const fk=L("Eye",[["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"}]]);/** 278 * @license lucide-react v0.462.0 - ISC 279 * 280 * This source code is licensed under the ISC license. 281 * See the LICENSE file in the root directory of this source tree. 282 */const pk=L("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 283 * @license lucide-react v0.462.0 - ISC 284 * 285 * This source code is licensed under the ISC license. 286 * See the LICENSE file in the root directory of this source tree. 287 */const ZA=L("FileCheck2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m3 15 2 2 4-4",key:"1lhrkk"}]]);/** 288 * @license lucide-react v0.462.0 - ISC 289 * 290 * This source code is licensed under the ISC license. 291 * See the LICENSE file in the root directory of this source tree. 292 */const ya=L("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 293 * @license lucide-react v0.462.0 - ISC 294 * 295 * This source code is licensed under the ISC license. 296 * See the LICENSE file in the root directory of this source tree. 297 */const JA=L("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 298 * @license lucide-react v0.462.0 - ISC 299 * 300 * This source code is licensed under the ISC license. 301 * See the LICENSE file in the root directory of this source tree. 302 */const QA=L("FileX",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]]);/** 303 * @license lucide-react v0.462.0 - ISC 304 * 305 * This source code is licensed under the ISC license. 306 * See the LICENSE file in the root directory of this source tree. 307 */const YA=L("GitCompareArrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]);/** 308 * @license lucide-react v0.462.0 - ISC 309 * 310 * This source code is licensed under the ISC license. 311 * See the LICENSE file in the root directory of this source tree. 312 */const XA=L("Globe",[["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"}]]);/** 313 * @license lucide-react v0.462.0 - ISC 314 * 315 * This source code is licensed under the ISC license. 316 * See the LICENSE file in the root directory of this source tree. 317 */const e5=L("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}
317]]);/** 318 * @license lucide-react v0.462.0 - ISC 319 * 320 * This source code is licensed under the ISC license. 321 * See the LICENSE file in the root directory of this source tree. 322 */const t5=L("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/** 323 * @license lucide-react v0.462.0 - ISC 324 * 325 * This source code is licensed under the ISC license. 326 * See the LICENSE file in the root directory of this source tree. 327 */const mk=L("History",[["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"}]]);/** 328 * @license lucide-react v0.462.0 - ISC 329 * 330 * This source code is licensed under the ISC license. 331 * See the LICENSE file in the root directory of this source tree. 332 */const r5=L("Image",[["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"}]]);/** 333 * @license lucide-react v0.462.0 - ISC 334 * 335 * This source code is licensed under the ISC license. 336 * See the LICENSE file in the root directory of this source tree. 337 */const gk=L("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 338 * @license lucide-react v0.462.0 - ISC 339 * 340 * This source code is licensed under the ISC license. 341 * See the LICENSE file in the root directory of this source tree. 342 */const vk=L("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 343 * @license lucide-react v0.462.0 - ISC 344 * 345 * This source code is licensed under the ISC license. 346 * See the LICENSE file in the root directory of this source tree. 347 */const n5=L("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/** 348 * @license lucide-react v0.462.0 - ISC 349 * 350 * This source code is licensed under the ISC license. 351 * See the LICENSE file in the root directory of this source tree. 352 */const xk=L("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 353 * @license lucide-react v0.462.0 - ISC 354 * 355 * This source code is licensed under the ISC license. 356 * See the LICENSE file in the root directory of this source tree. 357 */const yk=L("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 358 * @license lucide-react v0.462.0 - ISC 359 * 360 * This source code is licensed under the ISC license. 361 * See the LICENSE file in the root directory of this source tree. 362 */const s5=L("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 363 * @license lucide-react v0.462.0 - ISC 364 * 365 * This source code is licensed under the ISC license. 366 * See the LICENSE file in the root directory of this source tree. 367 */const bk=L("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 368 * @license lucide-react v0.462.0 - ISC 369 * 370 * This source code is licensed under the ISC license. 371 * See the LICENSE file in the root directory of this source tree. 372 */const Og=L("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** 373 * @license lucide-react v0.462.0 - ISC 374 * 375 * This source code is licensed under the ISC license. 376 * See the LICENSE file in the root directory of this source tree. 377 */const a5=L("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/** 378 * @license lucide-react v0.462.0 - ISC 379 * 380 * This source code is licensed under the ISC license. 381 * See the LICENSE file in the root directory of this source tree. 382 */const wk=L("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 383 * @license lucide-react v0.462.0 - ISC 384 * 385 * This source code is licensed under the ISC license. 386 * See the LICENSE file in the root directory of this source tree. 387 */const _t=L("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 388 * @license lucide-react v0.462.0 - ISC 389 * 390 * This source code is licensed under the ISC license. 391 * See the LICENSE file in the root directory of this source tree.
392 */const zy=L("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 393 * @license lucide-react v0.462.0 - ISC 394 * 395 * This source code is licensed under the ISC license. 396 * See the LICENSE file in the root directory of this source tree. 397 */const Fy=L("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 398 * @license lucide-react v0.462.0 - ISC 399 * 400 * This source code is licensed under the ISC license. 401 * See the LICENSE file in the root directory of this source tree. 402 */const o5=L("LogOut",[["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"}]]);/** 403 * @license lucide-react v0.462.0 - ISC 404 * 405 * This source code is licensed under the ISC license. 406 * See the LICENSE file in the root directory of this source tree. 407 */const Lg=L("Mail",[["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"}]]);/** 408 * @license lucide-react v0.462.0 - ISC 409 * 410 * This source code is licensed under the ISC license. 411 * See the LICENSE file in the root directory of this source tree. 412 */const Jo=L("MapPin",[["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"}]]);/** 413 * @license lucide-react v0.462.0 - ISC 414 * 415 * This source code is licensed under the ISC license. 416 * See the LICENSE file in the root directory of this source tree. 417 */const i5=L("Megaphone",[["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"}]]);/** 418 * @license lucide-react v0.462.0 - ISC 419 * 420 * This source code is licensed under the ISC license. 421 * See the LICENSE file in the root directory of this source tree. 422 */const jk=L("Menu",[["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"}]]);/** 423 * @license lucide-react v0.462.0 - ISC 424 * 425 * This source code is licensed under the ISC license. 426 * See the LICENSE file in the root directory of this source tree. 427 */const Dr=L("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 428 * @license lucide-react v0.462.0 - ISC 429 * 430 * This source code is licensed under the ISC license. 431 * See the LICENSE file in the root directory of this source tree. 432 */const Uy=L("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 433 * @license lucide-react v0.462.0 - ISC 434 * 435 * This source code is licensed under the ISC license. 436 * See the LICENSE file in the root directory of this source tree. 437 */const l5=L("MoveRight",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);/** 438 * @license lucide-react v0.462.0 - ISC 439 * 440 * This source code is licensed under the ISC license. 441 * See the LICENSE file in the root directory of this source tree. 442 */const c5=L("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** 443 * @license lucide-react v0.462.0 - ISC 444 * 445 * This source code is licensed under the ISC license. 446 * See the LICENSE file in the root directory of this source tree. 447 */const d5=L("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** 448 * @license lucide-react v0.462.0 - ISC 449 * 450 * This source code is licensed under the ISC license. 451 * See the LICENSE file in the root directory of this source tree. 452 */const kk=L("PenLine",[["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"}]]);/** 453 * @license lucide-react v0.462.0 - ISC 454 * 455 * This source code is licensed under the ISC license. 456 * See the LICENSE file in the root directory of this source tree. 457 */const u5=L("PiggyBank",[["path",{d:"M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2V5z",key:"1ivx2i"}],["path",{d:"M2 9v1c0 1.1.9 2 2 2h1",key:"nm575m"}],["path",{d:"M16 11h.01",key:"xkw8gn"}]]);/** 458 * @license lucide-react v0.462.0 - ISC 459 * 460 * This source code is licensed under the ISC license. 461 * See the LICENSE file in the root directory of this source tree. 462 */const h5=L("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 463 * @license lucide-react v0.462.0 - ISC 464 * 465 * This source code is licensed under the ISC license. 466 * See the LICENSE file in the root directory of this source tree. 467 */const Nr=L("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 468 * @license lucide-react v0.462.0 - ISC 469 * 470 * This source code is licensed under the ISC license. 471 * See the LICENSE file in the root directory of this source tree. 472 */const f5=L("RefreshCw",[["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"}]]);/** 473 * @license lucide-react v0.462.0 - ISC 474 * 475 * This source code is licensed under the ISC license. 476 * See the LICENSE file in the root directory of this source tree. 477 */const _k=L("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 478 * @license lucide-react v0.462.0 - ISC 479 * 480 * This source code is licensed under the ISC license. 481 * See the LICENSE file in the root directory of this source tree. 482 */const Gh=L("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 483 * @license lucide-react v0.462.0 - ISC 484 * 485 * This source code is licensed under the ISC license. 486 * See the LICENSE file in the root directory of this source tree. 487 */const ml=L("ShieldAlert",[["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
487y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** 488 * @license lucide-react v0.462.0 - ISC 489 * 490 * This source code is licensed under the ISC license. 491 * See the LICENSE file in the root directory of this source tree. 492 */const $t=L("ShieldCheck",[["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"}]]);/** 493 * @license lucide-react v0.462.0 - ISC 494 * 495 * This source code is licensed under the ISC license. 496 * See the LICENSE file in the root directory of this source tree. 497 */const p5=L("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/** 498 * @license lucide-react v0.462.0 - ISC 499 * 500 * This source code is licensed under the ISC license. 501 * See the LICENSE file in the root directory of this source tree.
502 */const Ca=L("Ship",[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]]);/** 503 * @license lucide-react v0.462.0 - ISC 504 * 505 * This source code is licensed under the ISC license. 506 * See the LICENSE file in the root directory of this source tree. 507 */const $p=L("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 508 * @license lucide-react v0.462.0 - ISC 509 * 510 * This source code is licensed under the ISC license. 511 * See the LICENSE file in the root directory of this source tree. 512 */const Su=L("Sparkles",[["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"}]]);/** 513 * @license lucide-react v0.462.0 - ISC 514 * 515 * This source code is licensed under the ISC license. 516 * See the LICENSE file in the root directory of this source tree. 517 */const m5=L("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 518 * @license lucide-react v0.462.0 - ISC 519 * 520 * This source code is licensed under the ISC license. 521 * See the LICENSE file in the root directory of this source tree. 522 */const g5=L("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/** 523 * @license lucide-react v0.462.0 - ISC 524 * 525 * This source code is licensed under the ISC license. 526 * See the LICENSE file in the root directory of this source tree. 527 */const Wr=L("Trash2",[["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"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 528 * @license lucide-react v0.462.0 - ISC 529 * 530 * This source code is licensed under the ISC license. 531 * See the LICENSE file in the root directory of this source tree. 532 */const yi=L("TrendingUp",[["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"}]]);/** 533 * @license lucide-react v0.462.0 - ISC 534 * 535 * This source code is licensed under the ISC license. 536 * See the LICENSE file in the root directory of this source tree. 537 */const Ig=L("TriangleAlert",[["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"}]]);/** 538 * @license lucide-react v0.462.0 - ISC 539 * 540 * This source code is licensed under the ISC license. 541 * See the LICENSE file in the root directory of this source tree. 542 */const v5=L("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/** 543 * @license lucide-react v0.462.0 - ISC 544 * 545 * This source code is licensed under the ISC license. 546 * See the LICENSE file in the root directory of this source tree. 547 */const x5=L("Upload",[["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"}]]);/** 548 * @license lucide-react v0.462.0 - ISC 549 * 550 * This source code is licensed under the ISC license. 551 * See the LICENSE file in the root directory of this source tree. 552 */const y5=L("User",[["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"}]]);/** 553 * @license lucide-react v0.462.0 - ISC 554 * 555 * This source code is licensed under the ISC license. 556 * See the LICENSE file in the root directory of this source tree. 557 */const Cu=L("Users",[["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"}]]);/** 558 * @license lucide-react v0.462.0 - ISC 559 * 560 * This source code is licensed under the ISC license. 561 * See the LICENSE file in the root directory of this source tree. 562 */const b5=L("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/** 563 * @license lucide-react v0.462.0 - ISC 564 * 565 * This source code is licensed under the ISC license. 566 * See the LICENSE file in the root directory of this source tree. 567 */const w5=L("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/** 568 * @license lucide-react v0.462.0 - ISC 569 * 570 * This source code is licensed under the ISC license. 571 * See the LICENSE file in the root directory of this source tree. 572 */const $g=L("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** 573 * @license lucide-react v0.462.0 - ISC 574 * 575 * This source code is licensed under the ISC license. 576 * See the LICENSE file in the root directory of this source tree. 577 */const Qo=L("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 9,557 bytes, lines 577-582
577],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 578 * @license lucide-react v0.462.0 - ISC 579 * 580 * This source code is licensed under the ISC license. 581 * See the LICENSE file in the root directory of this source tree. 582 */const Nk=L("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),Dg="-",j5=e=>{const t=_5(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(Dg);return l[0]===""&&l.length!==1&&l.shift(),Sk(l,t)||k5(i)},getConflictingClassGroupIds:(i,l)=>{const c=r[i]||[];return l&&n[i]?[...c,...n[i]]:c}}},Sk=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?Sk(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Dg);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId},By=/^\[(.+)\]$/,k5=e=>{if(By.test(e)){const t=By.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_5=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return S5(Object.entries(e.classGroups),r).forEach(([o,i])=>{Dp(i,n,o,t)}),n},Dp=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:qy(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(N5(s)){Dp(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{Dp(i,qy(t,o),r,n)})})},qy=(e,t)=>{let r=e;return t.split(Dg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},N5=e=>e.isThemeGetter,S5=(e,t)=>t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,l])=>[t+i,l])):o);return[r,s]}):e,C5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}},Ck="!",E5=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length,i=l=>{const c=[];let d=0,u=0,h;for(let w=0;w<l.length;w++){let v=l[w];if(d===0){if(v===s&&(n||l.slice(w,w+o)===t)){c.push(l.slice(u,w)),u=w+o;continue}if(v==="/"){h=w;continue}}v==="["?d++:v==="]"&&d--}const p=c.length===0?l:l.substring(u),f=p.startsWith(Ck),y=f?p.substring(1):p,g=h&&h>u?h-u:void 0;return{modifiers:c,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:g}};return r?l=>r({className:l,parseClassName:i}):i},R5=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},P5=e=>({cache:C5(e.cacheSize),parseClassName:E5(e),...j5(e)}),T5=/\s+/,A5=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(T5);let l="";for(let c=i.length-1;c>=0;c-=1){const d=i[c],{modifiers:u,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=r(d);let y=!!f,g=n(y?p.substring(0,f):p);if(!g){if(!y){l=d+(l.length>0?" "+l:l);continue}if(g=n(p),!g){l=d+(l.length>0?" "+l:l);continue}y=!1}const w=R5(u).join(":"),v=h?w+Ck:w,x=v+g;if(o.includes(x))continue;o.push(x);const b=s(g,y);for(let j=0;j<b.length;++j){const k=b[j];o.push(v+k)}l=d+(l.length>0?" "+l:l)}return l};function O5(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ek(t))&&(n&&(n+=" "),n+=r);return n}const Ek=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ek(e[n]))&&(r&&(r+=" "),r+=t);return r};function L5(e,...t){let r,n,s,o=i;function i(c){const d=t.reduce((u,h)=>h(u),e());return r=P5(d),n=r.cache.get,s=r.cache.set,o=l,l(c)}function l(c){const d=n(c);if(d)return d;const u=A5(c,r);return s(c,u),u}return function(){return o(O5.apply(null,arguments))}}const Te=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Rk=/^\[(?:([a-z-]+):)?(.+)\]$/i,I5=/^\d+\/\d+$/,$5=new Set(["px","full","screen"]),D5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,M5=/\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$/,z5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,F5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,un=e=>ho(e)||$5.has(e)||I5.test(e),qn=e=>Yo(e,"length",Z5),ho=e=>!!e&&!Number.isNaN(Number(e)),Zh=e=>Yo(e,"number",ho),bi=e=>!!e&&Number.isInteger(Number(e)),B5=e=>e.endsWith("%")&&ho(e.slice(0,-1)),ce=e=>Rk.test(e),Vn=e=>D5.test(e),q5=new Set(["length","size","percentage"]),V5=e=>Yo(e,q5,Pk),H5=e=>Yo(e,"position",Pk),W5=new Set(["image","url"]),K5=e=>Yo(e,W5,Q5),G5=e=>Yo(e,"",J5),wi=()=>!0,Yo=(e,t,r)=>{const n=Rk.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Z5=e=>M5.test(e)&&!z5.test(e),Pk=()=>!1,J5=e=>F5.test(e),Q5=e=>U5.test(e),Y5=()=>{const e=Te("colors"),t=Te("spacing"),r=Te("blur"),n=Te("brightness"),s=Te("borderColor"),o=Te("borderRadius"),i=Te("borderSpacing"),l=Te("borderWidth"),c=Te("contrast"),d=Te("grayscale"),u=Te("hueRotate"),h=Te("invert"),p=Te("gap"),f=Te("gradientColorStops"),y=Te("gradientColorStopPositions"),g=Te("inset"),w=Te("margin"),v=Te("opacity"),x=Te("padding"),b=Te("saturate"),j=Te("scale"),k=Te("sepia"),_=Te("skew"),N=Te("space"),C=Te("translate"),R=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",ce,t],I=()=>[ce,t],K=()=>["",un,qn],$=()=>["auto",ho,ce],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",ce],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ee=()=>[ho,ce];return{cacheSize:500,separator:":",theme:{colors:[wi],spacing:[un,qn],blur:["none","",Vn,ce],brightness:ee(),borderColor:[e],borderRadius:["none","","full",Vn,ce],borderSpacing:I(),borderWidth:K(),contrast:ee(),grayscale:P(),hueRotate:ee(),invert:P(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[B5,qn],inset:O(),margin:O(),opacity:ee(),padding:I(),saturate:ee(),scale:ee(),sepia:P(),skew:ee(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ce]}],container:["container"],columns:[{columns:[Vn]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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"],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:[...H(),ce]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bi,ce]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ce]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",bi,ce]}],"grid-cols":[{"grid-cols":[wi]}],"col-start-end":[{col:["auto",{span:["full",bi,ce]},ce]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[wi]}],"row-start-end":[{row:["auto",{span:[bi,ce]},ce]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ce]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}
vendor: 8,341 bytes, line 582
582],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ce,t]}],"min-w":[{"min-w":[ce,t,"min","max","fit"]}],"max-w":[{"max-w":[ce,t,"none","full","min","max","fit","prose",{screen:[Vn]},Vn]}],h:[{h:[ce,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ce,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ce,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ce,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Vn,qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Zh]}],"font-family":[{font:[wi]}],"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:["tighter","tight","normal","wide","wider","widest",ce]}],"line-clamp":[{"line-clamp":["none",ho,Zh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",un,ce]}],"list-image":[{"list-image":["none",ce]}],"list-style-type":[{list:["none","disc","decimal",ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",un,qn]}],"underline-offset":[{"underline-offset":["auto",un,ce]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),H5]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",V5]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},K5]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:U()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[un,ce]}],"outline-w":[{outline:[un,qn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[un,qn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Vn,G5]}],"shadow-color":[{shadow:[wi]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Vn,ce]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[b]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ce]}],duration:[{duration:ee()}],ease:[{ease:["linear","in","out","in-out",ce]}],delay:[{delay:ee()}],animate:[{animate:["none","spin","ping","pulse","bounce",ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[bi,ce]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ce]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ce]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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"]}
vendor: 4,647 bytes, line 582
582],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",ce]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[un,qn,Zh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},X5=L5(Y5);function ue(...e){return X5(ak(e))}const e3=SA,Tk=m.forwardRef(({className:e,...t},r)=>a.jsx(Yj,{ref:r,className:ue("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),...t}));Tk.displayName=Yj.displayName;const t3=Cg("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"}}),Ak=m.forwardRef(({className:e,variant:t,...r},n)=>a.jsx(Xj,{ref:n,className:ue(t3({variant:t}),e),...r}));Ak.displayName=Xj.displayName;const r3=m.forwardRef(({className:e,...t},r)=>a.jsx(rk,{ref:r,className:ue("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 group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));r3.displayName=rk.displayName;const Ok=m.forwardRef(({className:e,...t},r)=>a.jsx(nk,{ref:r,className:ue("absolute right-2 top-2 rounded-md p-1 text-foreground
582/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(Qo,{className:"h-4 w-4"})}));Ok.displayName=nk.displayName;const Lk=m.forwardRef(({className:e,...t},r)=>a.jsx(ek,{ref:r,className:ue("text-sm font-semibold",e),...t}));Lk.displayName=ek.displayName;const Ik=m.forwardRef(({className:e,...t},r)=>a.jsx(tk,{ref:r,className:ue("text-sm opacity-90",e),...t}));Ik.displayName=tk.displayName;function n3(){const{toasts:e}=jg();return a.jsxs(e3,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return a.jsxs(Ak,{...o,children:[a.jsxs("div",{className:"grid gap-1",children:[r&&a.jsx(Lk,{children:r}),n&&a.jsx(Ik,{children:n})]}),s,a.jsx(Ok,{})]},t)}),a.jsx(Tk,{})]})}var s3=gm[" useId ".trim().toString()]||(()=>{}),a3=0;function _n(e){const[t,r]=m.useState(s3());return et(()=>{r(n=>n??String(a3++))},[e]),t?`radix-${t}`:""}const o3=["top","right","bottom","left"],js=Math.min,Ht=Math.max,$d=Math.round,wc=Math.floor,sn=e=>({x:e,y:e}
vendor: 11,847 bytes, line 582
582),i3={left:"right",right:"left",bottom:"top",top:"bottom"};function Mp(e,t,r){return Ht(e,js(t,r))}function Tn(e,t){return typeof e=="function"?e(t):e}function An(e){return e.split("-")[0]}function Xo(e){return e.split("-")[1]}function Mg(e){return e==="x"?"y":"x"}function zg(e){return e==="y"?"height":"width"}function en(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Fg(e){return Mg(en(e))}function l3(e,t,r){r===void 0&&(r=!1);const n=Xo(e),s=Fg(e),o=zg(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Dd(i)),[i,Dd(i)]}function c3(e){const t=Dd(e);return[zp(e),t,zp(t)]}function zp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Vy=["left","right"],Hy=["right","left"],d3=["top","bottom"],u3=["bottom","top"];function h3(e,t,r){switch(e){case"top":case"bottom":return r?t?Hy:Vy:t?Vy:Hy;case"left":case"right":return t?d3:u3;default:return[]}}function f3(e,t,r,n){const s=Xo(e);let o=h3(An(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(zp)))),o}function Dd(e){const t=An(e);return i3[t]+e.slice(t.length)}function p3(e){return{top:0,right:0,bottom:0,left:0,...e}}function $k(e){return typeof e!="number"?p3(e):{top:e,right:e,bottom:e,left:e}}function Md(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Wy(e,t,r){let{reference:n,floating:s}=e;const o=en(t),i=Fg(t),l=zg(i),c=An(t),d=o==="y",u=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[l]/2-s[l]/2;let f;switch(c){case"top":f={x:u,y:n.y-s.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:h};break;case"left":f={x:n.x-s.width,y:h};break;default:f={x:n.x,y:n.y}}switch(Xo(t)){case"start":f[i]-=p*(r&&d?-1:1);break;case"end":f[i]+=p*(r&&d?-1:1);break}return f}async function m3(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=Tn(t,e),y=$k(f),w=l[p?h==="floating"?"reference":"floating":h],v=Md(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(w)))==null||r?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),x=h==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),j=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},k=Md(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:b,strategy:c}):x);return{top:(v.top-k.top+y.top)/j.y,bottom:(k.bottom-v.bottom+y.bottom)/j.y,left:(v.left-k.left+y.left)/j.x,right:(k.right-v.right+y.right)/j.x}}const g3=50,v3=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,l=i.detectOverflow?i:{...i,detectOverflow:m3},c=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:h}=Wy(d,n,c),p=n,f=0;const y={};for(let g=0;g<o.length;g++){const w=o[g];if(!w)continue;const{name:v,fn:x}=w,{x:b,y:j,data:k,reset:_}=await x({x:u,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:y,rects:d,platform:l,elements:{reference:e,floating:t}});u=b??u,h=j??h,y[v]={...y[v],...k},_&&f<g3&&(f++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(d=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:u,y:h}=Wy(d,p,c)),g=-1)}return{x:u,y:h,placement:p,strategy:s,middlewareData:y}},x3=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:l,middlewareData:c}=t,{element:d,padding:u=0}=Tn(e,t)||{};if(d==null)return{};const h=$k(u),p={x:r,y:n},f=Fg(s),y=zg(f),g=await i.getDimensions(d),w=f==="y",v=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",j=o.reference[y]+o.reference[f]-p[f]-o.floating[y],k=p[f]-o.reference[f],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let N=_?_[b]:0;(!N||!await(i.isElement==null?void 0:i.isElement(_)))&&(N=l.floating[b]||o.floating[y]);const C=j/2-k/2,R=N/2-g[y]/2-1,T=js(h[v],R),O=js(h[x],R),I=T,K=N-g[y]-O,$=N/2-g[y]/2+C,H=Mp(I,$,K),U=!c.arrow&&Xo(s)!=null&&$!==H&&o.reference[y]/2-($<I?T:O)-g[y]/2<0,Z=U?$<I?$-I:$-K:0;return{[f]:p[f]+Z,data:{[f]:H,centerOffset:$-H-Z,...U&&{alignmentOffset:Z}},reset:U}}}),y3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...w}=Tn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const v=An(s),x=en(l),b=An(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=p||(b||!g?[Dd(l)]:c3(l)),_=y!=="none";!p&&_&&k.push(...f3(l,g,y,j));const N=[l,...k],C=await c.detectOverflow(t,w),R=[];let T=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&R.push(C[v]),h){const $=l3(s,i,j);R.push(C[$[0]],C[$[1]])}if(T=[...T,{placement:s,overflows:R}],!R.every($=>$<=0)){var O,I;const $=(((O=o.flip)==null?void 0:O.index)||0)+1,H=N[$];if(H&&(!(h==="alignment"?x!==en(H):!1)||T.every(E=>en(E.placement)===x?E.overflows[0]>0:!0)))return{data:{index:$,overflows:T},reset:{placement:H}};let U=(I=T.filter(Z=>Z.overflows[0]<=0).sort((Z,E)=>Z.overflows[1]-E.overflows[1])[0])==null?void 0:I.placement;if(!U)switch(f){case"bestFit":{var K;const Z=(K=T.filter(E=>{if(_){const P=en(E.placement);return P===x||P==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(P=>P>0).reduce((P,z)=>P+z,0)]).sort((E,P)=>E[1]-P[1])[0])==null?void 0:K[0];Z&&(U=Z);break}case"initialPlacement":U=l;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function Ky(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gy(e){return o3.some(t=>e[t]>=0)}const b3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...o}=Tn(e,t);switch(s){case"referenceHidden":{const i=await n.detectOverflow(t,{...o,elementContext:"reference"}),l=Ky(i,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Gy(l)}}}case"escaped":{const i=await n.detectOverflow(t,{...o,altBoundary:!0}),l=Ky(i,r.floating);return{data:{escapedOffsets:l,escaped:Gy(l)}}}default:return{}}}}},Dk=new Set(["left","top"]);async function w3(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=An(r),l=Xo(r),c=en(r)==="y",d=Dk.has(i)?-1:1,u=o&&c?-1:1,h=Tn(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(f=l==="end"?y*-1:y),c?{x:f*u,y:p*d}:{x:p*d,y:f*u}}const j3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:l}=t,c=await w3(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},k3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s,platform:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:v=>{let{x,y:b}=v;return{x,y:b}}},...d}=Tn(e,t),u={x:r,y:n},h=await o.detectOverflow(t,d),p=en(An(s)),f=Mg(p);let y=u[f],g=u[p];if(i){const v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",b=y+h[v],j=y-h[x];y=Mp(b,y,j)}if(l){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",b=g+h[v],j=g-h[x];g=Mp(b,g,j)}const w=c.fn({...t,[f]:y,[p]:g});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[f]:i,[p]:l}}}}}},_3=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=Tn(e,t),u={x:r,y:n},h=en(s),p=Mg(h);let f=u[p],y=u[h];const g=Tn(l,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const b=p==="y"?"height":"width",j=o.reference[p]-o.floating[b]+w.mainAxis,k=o.reference[p]+o.reference[b]-w.mainAxis;f<j?f=j:f>k&&(f=k)}if(d){var v,x;const b=p==="y"?"width":"height",j=Dk.has(An(s)),k=o.reference[h]-o.floating[b]+(j&&((v=i.offset)==null?void 0:v[h])||0)+(j?0:w.crossAxis),_=o.reference[h]+o.reference[b]+(j?0:((x=i.offset)==null?void 0:x[h])||0)-(j?w.crossAxis:0);y<k?y=k:y>_&&(y=_)}return{[p]:f,[h]:y}}}},N3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:i,elements:l}=t,{apply:c=()=>{},...d}=Tn(e,t),u=await i.detectOverflow(t,d),h=An(s),p=Xo(s),f=en(s)==="y",{width:y,height:g}=o.floating;let w,v;h==="top"||h==="bottom"?(w=h,v=p===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=h,w=p==="end"?"top":"bottom");const x=g-u.top-u.bottom,b=y-u.left-u.right,j=js(g-u[w],x),k=js(y-u[v],b),_=!t.middlewareData.shift;let N=j,C=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(C=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=x),_&&!p){const T=Ht(u.left,0),O=Ht(u.right,0),I=Ht(u.top,0),K=Ht(u.bottom,0);f?C=y-2*(T!==0||O!==0?T+O:Ht(u.left,u.right)):N=g-2*(I!==0||K!==0?I+K:Ht(u.top,u.bottom))}await c({...t,availableWidth:C,availableHeight:N});const R=await i.getDimensions(l.floating);return y!==R.width||g!==R.height?{reset:{rects:!0}}:{}}}};function Eu(){return typeof window<"u"}function ei(e){return Mk(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ln(e){var t;return(t=(Mk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mk(e){return Eu()?e instanceof Node||e instanceof Zt(e).Node:!1}function Mr(e){return Eu()?e instanceof Element||e instanceof Zt(e).Element:!1}function In(e){return Eu()?e instanceof HTMLElement||e instanceof Zt(e).HTMLElement:!1}function Zy(e){return!Eu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}function ql(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function S3(e){return/^(table|td|th)$/.test(ei(e))}function Ru(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const C3=/transform|translate|scale|rotate|perspective|filter/,E3=/paint|layout|strict|content/,Bs=e=>!!e&&e!=="none";let Jh;function Ug(e){const t=Mr(e)?zr(e):e;return Bs(t.transform)||Bs(t.translate)||Bs(t.scale)||Bs(t.rotate)||Bs(t.perspective)||!Bg()&&(Bs(t.backdropFilter)||Bs(t.filter))||C3.test(t.willChange||"")||E3.test(t.contain||"")}function R3(e){let t=ks(e);for(;In(t)&&!zo(t);){if(Ug(t))return t;if(Ru(t))return null;t=ks(t)}return null}function Bg(){return Jh==null&&(Jh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jh}function zo(e){return/^(html|body|#document)$/.test(ei(e))}function zr(e){return Zt(e).getComputedStyle(e)}function Pu(e){return Mr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ks(e){if(ei(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zy(e)&&e.host||ln(e);return Zy(t)?t.host:t}function zk(e){const t=ks(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:In(t)&&ql(t)?t:zk(t)}function gl(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=zk(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=Zt(s);if(o){const l=Fp(i);
vendor: 13,532 bytes, line 582
582return t.concat(i,i.visualViewport||[],ql(s)?s:[],l&&r?gl(l):[])}else return t.concat(s,gl(s,[],r))}function Fp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fk(e){const t=zr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=In(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,l=$d(r)!==o||$d(n)!==i;return l&&(r=o,n=i),{width:r,height:n,$:l}}function qg(e){return Mr(e)?e:e.contextElement}function fo(e){const t=qg(e);if(!In(t))return sn(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Fk(t);let i=(o?$d(r.width):r.width)/n,l=(o?$d(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const P3=sn(0);function Uk(e){const t=Zt(e);return!Bg()||!t.visualViewport?P3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function T3(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Zt(e)?!1:t}function ba(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=qg(e);let i=sn(1);t&&(n?Mr(n)&&(i=fo(n)):i=fo(e));const l=T3(o,r,n)?Uk(o):sn(0);let c=(s.left+l.x)/i.x,d=(s.top+l.y)/i.y,u=s.width/i.x,h=s.height/i.y;if(o){const p=Zt(o),f=n&&Mr(n)?Zt(n):n;let y=p,g=Fp(y);for(;g&&n&&f!==y;){const w=fo(g),v=g.getBoundingClientRect(),x=zr(g),b=v.left+(g.clientLeft+parseFloat(x.paddingLeft))*w.x,j=v.top+(g.clientTop+parseFloat(x.paddingTop))*w.y;c*=w.x,d*=w.y,u*=w.x,h*=w.y,c+=b,d+=j,y=Zt(g),g=Fp(y)}}return Md({width:u,height:h,x:c,y:d})}function Tu(e,t){const r=Pu(e).scrollLeft;return t?t.left+r:ba(ln(e)).left+r}function Bk(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Tu(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function A3(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=ln(n),l=t?Ru(t.floating):!1;if(n===i||l&&o)return r;let c={scrollLeft:0,scrollTop:0},d=sn(1);const u=sn(0),h=In(n);if((h||!h&&!o)&&((ei(n)!=="body"||ql(i))&&(c=Pu(n)),h)){const f=ba(n);d=fo(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}const p=i&&!h&&!o?Bk(i,c):sn(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+u.x+p.x,y:r.y*d.y-c.scrollTop*d.y+u.y+p.y}}function O3(e){return Array.from(e.getClientRects())}function L3(e){const t=ln(e),r=Pu(e),n=e.ownerDocument.body,s=Ht(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Ht(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Tu(e);const l=-r.scrollTop;return zr(n).direction==="rtl"&&(i+=Ht(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:l}}const Jy=25;function I3(e,t){const r=Zt(e),n=ln(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,l=0,c=0;if(s){o=s.width,i=s.height;const u=Bg();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}const d=Tu(n);if(d<=0){const u=n.ownerDocument,h=u.body,p=getComputedStyle(h),f=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(n.clientWidth-h.clientWidth-f);y<=Jy&&(o-=y)}else d<=Jy&&(o+=d);return{width:o,height:i,x:l,y:c}}function $3(e,t){const r=ba(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=In(e)?fo(e):sn(1),i=e.clientWidth*o.x,l=e.clientHeight*o.y,c=s*o.x,d=n*o.y;return{width:i,height:l,x:c,y:d}}function Qy(e,t,r){let n;if(t==="viewport")n=I3(e,r);else if(t==="document")n=L3(ln(e));else if(Mr(t))n=$3(t,r);else{const s=Uk(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Md(n)}function qk(e,t){const r=ks(e);return r===t||!Mr(r)||zo(r)?!1:zr(r).position==="fixed"||qk(r,t)}function D3(e,t){const r=t.get(e);if(r)return r;let n=gl(e,[],!1).filter(l=>Mr(l)&&ei(l)!=="body"),s=null;const o=zr(e).position==="fixed";let i=o?ks(e):e;for(;Mr(i)&&!zo(i);){const l=zr(i),c=Ug(i);!c&&l.position==="fixed"&&(s=null),(o?!c&&!s:!c&&l.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||ql(i)&&!c&&qk(e,i))?n=n.filter(u=>u!==i):s=l,i=ks(i)}return t.set(e,n),n}function M3(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?Ru(t)?[]:D3(t,this._c):[].concat(r),n],l=Qy(t,i[0],s);let c=l.top,d=l.right,u=l.bottom,h=l.left;for(let p=1;p<i.length;p++){const f=Qy(t,i[p],s);c=Ht(f.top,c),d=js(f.right,d),u=js(f.bottom,u),h=Ht(f.left,h)}return{width:d-h,height:u-c,x:h,y:c}}function z3(e){const{width:t,height:r}=Fk(e);return{width:t,height:r}}function F3(e,t,r){const n=In(t),s=ln(t),o=r==="fixed",i=ba(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=sn(0);function d(){c.x=Tu(s)}if(n||!n&&!o)if((ei(t)!=="body"||ql(s))&&(l=Pu(t)),n){const f=ba(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&d();o&&!n&&s&&d();const u=s&&!n&&!o?Bk(s,l):sn(0),h=i.left+l.scrollLeft-c.x-u.x,p=i.top+l.scrollTop-c.y-u.y;return{x:h,y:p,width:i.width,height:i.height}}function Qh(e){return zr(e).position==="static"}function Yy(e,t){if(!In(e)||zr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ln(e)===r&&(r=r.ownerDocument.body),r}function Vk(e,t){const r=Zt(e);if(Ru(e))return r;if(!In(e)){let s=ks(e);for(;s&&!zo(s);){if(Mr(s)&&!Qh(s))return s;s=ks(s)}return r}let n=Yy(e,t);for(;n&&S3(n)&&Qh(n);)n=Yy(n,t);return n&&zo(n)&&Qh(n)&&!Ug(n)?r:n||R3(e)||r}const U3=async function(e){const t=this.getOffsetParent||Vk,r=this.getDimensions,n=await r(e.floating);return{reference:F3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function B3(e){return zr(e).direction==="rtl"}const q3={convertOffsetParentRelativeRectToViewportRelativeRect:A3,getDocumentElement:ln,getClippingRect:M3,getOffsetParent:Vk,getElementRects:U3,getClientRects:O3,getDimensions:z3,getScale:fo,isElement:Mr,isRTL:B3};function Hk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function V3(e,t){let r=null,n;const s=ln(e);function o(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const d=e.getBoundingClientRect(),{left:u,top:h,width:p,height:f}=d;if(l||t(),!p||!f)return;const y=wc(h),g=wc(s.clientWidth-(u+p)),w=wc(s.clientHeight-(h+f)),v=wc(u),b={rootMargin:-y+"px "+-g+"px "+-w+"px "+-v+"px",threshold:Ht(0,js(1,c))||1};let j=!0;function k(_){const N=_[0].intersectionRatio;if(N!==c){if(!j)return i();N?i(!1,N):n=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Hk(d,e.getBoundingClientRect())&&i(),j=!1}try{r=new IntersectionObserver(k,{...b,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,b)}r.observe(e)}return i(!0),o}function H3(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=qg(e),u=s||o?[...d?gl(d):[],...t?gl(t):[]]:[];u.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),o&&v.addEventListener("resize",r)});const h=d&&l?V3(d,r):null;let p=-1,f=null;i&&(f=new ResizeObserver(v=>{let[x]=v;x&&x.target===d&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),r()}),d&&!c&&f.observe(d),t&&f.observe(t));let y,g=c?ba(e):null;c&&w();function w(){const v=ba(e);g&&!Hk(g,v)&&r(),g=v,y=requestAnimationFrame(w)}return r(),()=>{var v;u.forEach(x=>{s&&x.removeEventListener("scroll",r),o&&x.removeEventListener("resize",r)}),h==null||h(),(v=f)==null||v.disconnect(),f=null,c&&cancelAnimationFrame(y)}}const W3=j3,K3=k3,G3=y3,Z3=N3,J3=b3,Xy=x3,Q3=_3,Y3=(e,t,r)=>{const n=new Map,s={platform:q3,...r},o={...s.platform,_c:n};return v3(e,t,{...s,platform:o})};var X3=typeof document<"u",eO=function(){},nd=X3?m.useLayoutEffect:eO;function zd(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 r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!zd(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!zd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Wk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eb(e,t){const r=Wk(e);return Math.round(t*r)/r}function Yh(e){const t=m.useRef(e);return nd(()=>{t.current=e}),t}function tO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,h]=m.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=m.useState(n);zd(p,n)||f(n);const[y,g]=m.useState(null),[w,v]=m.useState(null),x=m.useCallback(E=>{E!==_.current&&(_.current=E,g(E))},[]),b=m.useCallback(E=>{E!==N.current&&(N.current=E,v(E))},[]),j=o||y,k=i||w,_=m.useRef(null),N=m.useRef(null),C=m.useRef(u),R=c!=null,T=Yh(c),O=Yh(s),I=Yh(d),K=m.useCallback(()=>{if(!_.current||!N.current)return;const E={placement:t,strategy:r,middleware:p};O.current&&(E.platform=O.current),Y3(_.current,N.current,E).then(P=>{const z={...P,isPositioned:I.current!==!1};$.current&&!zd(C.current,z)&&(C.current=z,Rs.flushSync(()=>{h(z)}))})},[p,t,r,O,I]);nd(()=>{d===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,h(E=>({...E,isPositioned:!1})))},[d]);const $=m.useRef(!1);nd(()=>($.current=!0,()=>{$.current=!1}),[]),nd(()=>{if(j&&(_.current=j),k&&(N.current=k),j&&k){if(T.current)return T.current(j,k,K);K()}},[j,k,K,T,R]);const H=m.useMemo(()=>({reference:_,floating:N,setReference:x,setFloating:b}),[x,b]),U=m.useMemo(()=>({reference:j,floating:k}),[j,k]),Z=m.useMemo(()=>{const E={position:r,left:0,top:0};if(!U.floating)return E;const P=eb(U.floating,u.x),z=eb(U.floating,u.y);return l?{...E,transform:"translate("+P+"px, "+z+"px)",...Wk(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:z}},[r,l,U.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:K,refs:H,elements:U,floatingStyles:Z}),[u,K,H,U,Z])}const rO=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Xy({element:n.current,padding:s}).fn(r):{}:n?Xy({element:n,padding:s}).fn(r):{}}}},nO=(e,t)=>{const r=W3(e);return{name:r.name,fn:r.fn,options:[e,t]}},sO=(e,t)=>{const r=K3(e);return{name:r.name,fn:r.fn,options:[e,t]}},aO=(e,t)=>({fn:Q3(e).fn,options:[e,t]}),oO=(e,t)=>{const r=G3(e);return{name:r.name,fn:r.fn,options:[e,t]}},iO=(e,t)=>{const r=Z3(e);return{name:r.name,fn:r.fn,options:[e,t]}},lO=(e,t)=>{const r=J3(e);return{name:r.name,fn:r.fn,options:[e,t]}},cO=(e,t)=>{const r=rO(e);return{name:r.name,fn:r.fn,options:[e,t]}};var dO="Arrow",Kk=m.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return a.jsx(oe.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kk.displayName=dO;var uO=Kk;function Vg(e){const[t,r]=m.useState(void 0);return et(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,l;if("borderBoxSize"in o){const c=o.borderBoxSize,d=Array.isArray(c)?c[0]:c;i=d.inlineSize,l=d.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Hg="Popper",[Gk,ti]=fr(Hg),[hO,Zk]=Gk(Hg),Jk=e=>{const{__scopePopper:t,children:r}=e,[n,s]=m.useState(null),[o,i]=m.useState(void 0);return a.jsx(hO,{scope:t,anchor:n,onAnchorChange:s,placementState:o,setPlacementState:i,children:r})};Jk.displayName=Hg;var Qk="PopperAnchor",Yk=m.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Zk(Qk,r),i=m.useRef(null),l=o.onAnchorChange,c=m.useCallback(y=>{i.current=y,y&&l(y)},[l]),d=de(t,c),u=m.useRef(null);m.useEffect(()=>{if(!n)return;const y=u.current;u.current=n.current,y!==u.current&&l(u.current)});const h=o.placementState&&Kg(o.placementState),p=h==null?void 0:h[0],f=h==null?void 0:h[1];return n?null:a.jsx(oe.div,{"data-radix-popper-side":p,"data-radix-popper-align":f,...s,ref:d})});Yk.displayName=Qk;var Wg="PopperContent",[fO,pO]=Gk(Wg),Xk=m.forwardRef((e,t)=>{var he,Ee,be,fe,ye,zt;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:y,...g}=e,w=Zk(Wg,r),[v,x]=m.useState(null),b=de(t,x),[j,k]=m.useState(null),_=Vg(j),N=(_==null?void 0:_.width)??0,C=(_==null?void 0:_.height)??0,R=n+(o!=="center"?"-"+o:""),T=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(d)?d:[d],I=O.length>0,K={padding:T,boundary:O.filter(gO),altBoundary:I},{refs:$,floatingStyles:H,placement:U,isPositioned:Z,middlewareData:E}=tO({strategy:"fixed",placement:R,whileElementsMounted:(...Ft)=>H3(...Ft,{animationFrame:f==="always"}),elements:{reference:w.anchor},middleware:[nO({mainAxis:s+C,alignmentAxis:i}),c&&sO({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?aO():void 0,...K}),c&&oO({...K}),iO({...K,apply:({elements:Ft,rects:Dn,availableWidth:Mn,availableHeight:Ms})=>{const{width:ii,height:hh}=Dn.reference,zs=Ft.floating.style;zs.setProperty("--radix-popper-available-width",`${Mn}px`),zs.setProperty("--radix-popper-available-height",`${Ms}px`),zs.setProperty("--radix-popper-anchor-width",`${ii}px`),zs.setProperty("--radix-popper-anchor-height",`${hh}
582px`)}}),j&&cO({element:j,padding:l}),vO({arrowWidth:N,arrowHeight:C}),p&&lO({strategy:"referenceHidden",...K,boundary:I?K.boundary:void 0})]}),P=w.setPlacementState;et(()=>(P(U),()=>{P(void 0)}),[U,P]);const[z,ee]=Kg(U),F=Qt(y);et(()=>{Z&&(F==null||F())},[Z,F]);const Y=(he=E.arrow)==null?void 0:he.x,re=(Ee=E.arrow)==null?void 0:Ee.y,Q=((be=E.arrow)==null?void 0:be.centerOffset)!==0,[ve,M]=m.useState();return et(()=>{v&&M(window.getComputedStyle(v).zIndex)},[v]),a.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:Z?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(fe=E.transformOrigin)==null?void 0:fe.x,(ye=E.transformOrigin)==null?void 0:ye.y].join(" "),...((zt=E.hide)==null?void 0:zt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(fO,{scope:r,placedSide:z,placedAlign:ee,onArrowChange:k,arrowX:Y,arrowY:re,shouldHideArrow:Q,children:a.jsx(oe.div,{"data-side":z,"data-align":ee,...g,ref:b,style:{...g.style,animation:Z?void 0:"none"}})})})});Xk.displayName=Wg;var e_="PopperArrow",mO={top:"bottom",right:"left",bottom:"top",left:"right"},t_=m.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=pO(e_,n),i=mO[o.placedSide];return a.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:a.jsx(uO,{...s,ref:r,style:{...s.style,display:"block"}})})});t_.displayName=e_;function gO(e){return e!==null}var vO=e=>({name:"transformOrigin",options:e,fn(t){var w,v,x;const{placement:r,rects:n,middlewareData:s}=t,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[d,u]=Kg(r),h={start:"0%",center:"50%",end:"100%"}[u],p=(((v=s.arrow)==null?void 0:v.x)??0)+l/2,f=(((x=s.arrow)==null?void 0:x.y)??0)+c/2;let y="",g="";return d==="bottom"?(y=i?h:`${p}px`,g=`${-c}px`):d==="top"?(y=i?h:`${p}px`,g=`${n.floating.height+c}px`):d==="right"?(y=`${-c}px`,g=i?h:`${f}px`):d==="left"&&(y=`${n.floating.width+c}px`,g=i?h:`${f}px`),{data:{x:y,y:g}}}});function Kg(e){const[t,r="center"]=e.split("-");return[t,r]}var r_=Jk,Au=Yk,Gg=Xk,Zg=t_,[Ou]=fr("Tooltip",[ti]),Jg=ti(),n_="TooltipProvider",xO=700,tb="tooltip.open",[yO,s_]=Ou(n_),a_=e=>{const{__scopeTooltip:t,delayDuration:r=xO,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,i=m.useRef(!0),l=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),a.jsx(yO,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:m.useCallback(()=>{n<=0||(window.clearTimeout(c.current),i.current=!1)},[n]),onClose:m.useCallback(()=>{n<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,n))},[n]),isPointerInTransitRef:l,onPointerInTransitChange:m.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:o})};a_.displayName=n_;var o_="Tooltip",[sq,Lu]=Ou(o_),Up="TooltipTrigger",bO=m.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Lu(Up,r),o=s_(Up,r),i=Jg(r),l=m.useRef(null),c=de(t,l,s.onTriggerChange),d=m.useRef(!1),u=m.useRef(!1),h=m.useCallback(()=>d.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(Au,{asChild:!0,...i,children:a.jsx(oe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:te(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:te(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:te(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:te(e.onBlur,s.onClose),onClick:te(e.onClick,s.onClose)})})});
vendor: 4,385 bytes, line 582
582bO.displayName=Up;var wO="TooltipPortal",[aq,jO]=Ou(wO,{forceMount:void 0}),Fo="TooltipContent",i_=m.forwardRef((e,t)=>{const r=jO(Fo,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=Lu(Fo,e.__scopeTooltip);return a.jsx(on,{present:n||i.open,children:i.disableHoverableContent?a.jsx(l_,{side:s,...o,ref:t}):a.jsx(kO,{side:s,...o,ref:t})})}),kO=m.forwardRef((e,t)=>{const r=Lu(Fo,e.__scopeTooltip),n=s_(Fo,e.__scopeTooltip),s=m.useRef(null),o=de(t,s),[i,l]=m.useState(null),{trigger:c,onClose:d}=r,u=s.current,{onPointerInTransitChange:h}=n,p=m.useCallback(()=>{l(null),h(!1)},[h]),f=m.useCallback((y,g)=>{const w=y.currentTarget,v={x:y.clientX,y:y.clientY},x=EO(v,w.getBoundingClientRect()),b=RO(v,x),j=PO(g.getBoundingClientRect()),k=AO([...b,...j]);l(k),h(!0)},[h]);return m.useEffect(()=>()=>p(),[p]),m.useEffect(()=>{if(c&&u){const y=w=>f(w,u),g=w=>f(w,c);return c.addEventListener("pointerleave",y),u.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",g)}}},[c,u,f,p]),m.useEffect(()=>{if(i){const y=g=>{const w=g.target,v={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(w))||(u==null?void 0:u.contains(w)),b=!TO(v,i);x?p():b&&(p(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,u,i,d,p]),a.jsx(l_,{...e,ref:o})}),[_O,NO]=Ou(o_,{isInside:!1}),SO=O4("TooltipContent"),l_=m.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...l}=e,c=Lu(Fo,r),d=Jg(r),{onClose:u}=c;return m.useEffect(()=>(document.addEventListener(tb,u),()=>document.removeEventListener(tb,u)),[u]),m.useEffect(()=>{if(c.trigger){const h=p=>{p.target instanceof Node&&p.target.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),a.jsx(Zo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:a.jsxs(Gg,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(SO,{children:n}),a.jsx(_O,{scope:r,isInside:!0,children:a.jsx(lA,{id:c.contentId,role:"tooltip",children:s||n})})]})})});i_.displayName=Fo;var c_="TooltipArrow",CO=m.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Jg(r);return NO(c_,r).isInside?null:a.jsx(Zg,{...s,...n,ref:t})});CO.displayName=c_;function EO(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function RO(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function PO(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function TO(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const l=t[o],c=t[i],d=l.x,u=l.y,h=c.x,p=c.y;u>n!=p>n&&r<(h-d)*(n-u)/(p-u)+d&&(s=!s)}return s}function AO(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),OO(t)}function OO(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var LO=a_,d_=i_;const IO=LO,$O=m.forwardRef(({className:e,sideOffset:t=4,...r},n)=>
582a.jsx(d_,{ref:n,sideOffset:t,className:ue("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...r}));$O.displayName=d_.displayName;var Xr=function(){return Xr=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Xr.apply(this,arguments)};function ri(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function DO(e,t,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function l(u){try{d(n.next(u))}catch(h){i(h)}}function c(u){try{d(n.throw(u))}catch(h){i(h)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})}function MO(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}const zO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Qg extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class FO extends Qg{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class rb extends Qg{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class nb extends Qg{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Bp;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Bp||(Bp={}));class UO{constructor(t,{headers:r={},customFetch:n,region:s=Bp.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=zO(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return DO(this,arguments,void 0,function*(r,n={}){var s;let o,i;try{const{headers:l,method:c,body:d,signal:u,timeout:h}=n;let p={},{region:f}=n;f||(f=this.region);const y=new URL(`${this.url}/${r}`);f&&f!=="any"&&(p["x-region"]=f,y.searchParams.set("forceFunctionRegion",f));let g;const w=!!l&&Object.keys(l).some(_=>_.toLowerCase()==="content-type");d&&!w?typeof Blob<"u"&&d instanceof Blob||d instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",g=d):typeof d=="string"?(p["Content-Type"]="text/plain",g=d):typeof FormData<"u"&&d instanceof FormData?g=d:(p["Content-Type"]="application/json",g=JSON.stringify(d)):d&&typeof d!="string"&&!(typeof Blob<"u"&&d instanceof Blob)&&!(d instanceof ArrayBuffer)&&!(typeof FormData<"u"&&d instanceof FormData)?g=JSON.stringify(d):g=d;let v=u;h&&(i=new AbortController,o=setTimeout(()=>i.abort(),h),u?(v=i.signal,u.addEventListener("abort",()=>i.abort())):v=i.signal);const x=yield this.fetch(y.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),l),body:g,signal:v}).catch(_=>{throw new FO(_)}),b=x.headers.get("x-relay-error");if(b&&b==="true")throw new rb(x);if(!x.ok)throw new nb(x);let j=((s=x.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),k;return j==="application/json"?k=yield x.json():j==="application/octet-stream"||j==="application/pdf"?k=yield x.blob():j==="text/event-stream"?k=x:j==="multipart/form-data"?k=yield x.formData():k=yield x.text(),{data:k,error:null,response:x}}catch(l){return{data:null,error:l,response:l instanceof nb||l instanceof rb?l.context:void 0}}finally{o&&clearTimeout(o)}})}}const u_=3,sb=e=>Math.min(1e3*2**e,3e4),BO=[520,503],h_=["GET","HEAD","OPTIONS"];
582var ab=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function ob(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),r()},e);function s(){clearTimeout(n),r()}t==null||t.addEventListener("abort",s)})}function qO(e,t,r,n){return!(!n||r>=u_||!h_.includes(e)||!BO.includes(t))}var VO=class{constructor(e){var t,r,n,s,o;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(o=e.retry)!==null&&o!==void 0?o:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const i=this.headers.get("Accept");i==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!i||i==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let o=(async()=>{let i=0;for(;;){const d={};r.headers.forEach((h,p)=>{d[p]=h}),i>0&&(d["X-Retry-Count"]=String(i));let u;try{u=await n(r.url.toString(),{method:r.method,headers:d,body:JSON.stringify(r.body,(h,p)=>typeof p=="bigint"?p.toString():p),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!h_.includes(r.method))throw h;if(r.retryEnabled&&i<u_){const p=sb(i);i++,await ob(p,r.signal);continue}throw h}if(qO(r.method,u.status,i,r.retryEnabled)){var l,c;const h=(l=(c=u.headers)===null||c===void 0?void 0:c.get("Retry-After"))!==null&&l!==void 0?l:null,p=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:sb(i);await u.text(),i++,await ob(p,r.signal);continue}return await r.processResponse(u)}})();return this.shouldThrowOnError||(o=o.catch(i=>{var l;let c="",d="",u="";const h=i==null?void 0:i.cause;if(h){var p,f,y,g;const x=(p=h==null?void 0:h.message)!==null&&p!==void 0?p:"",b=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";c=`${(y=i==null?void 0:i.name)!==null&&y!==void 0?y:"FetchError"}: ${i==null?void 0:i.message}`,c+=` 583 584Caused by: ${(g=h==null?void 0:h.name)!==null&&g!==void 0?g:"Error"}: ${x}`,b&&(c+=` (${b})`),h!=null&&h.stack&&(c+=` 585${h.stack}`)}else{var w;c=(w=i==null?void 0:i.stack)!==null&&w!==void 0?w:""}const v=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(u="",d="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(d+=`. Note: Your request URL is ${v} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",d="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(d+=`. Your request URL is ${v} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(l=i==null?void 0:i.name)!==null&&l!==void 0?l:"FetchError"}: ${i==null?void 0:i.message}`,details:c,hint:d,code:u},data:null,count:null,status:0,statusText:""}}
585)),o.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,s=null,o=e.status,i=e.statusText;if(e.ok){var l,c;if(t.method!=="HEAD"){var d;const p=await e.text();if(p!=="")if(t.headers.get("Accept")==="text/csv")n=p;else if(t.headers.get("Accept")&&(!((d=t.headers.get("Accept"))===null||d===void 0)&&d.includes("application/vnd.pgrst.plan+text")))n=p;else try{n=JSON.parse(p)}catch{if(r={message:p},n=null,t.shouldThrowOnError)throw new ab({message:p,details:"",hint:"",code:""})}}const u=(l=t.headers.get("Prefer"))===null||l===void 0?void 0:l.match(/count=(exact|planned|estimated)/),h=(c=e.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");u&&h&&h.length>1&&(s=parseInt(h[1])),t.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,o=406,i="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const u=await e.text();try{r=JSON.parse(u),Array.isArray(r)&&e.status===404&&(n=[],r=null,o=200,i="OK")}catch{e.status===404&&u===""?(o=204,i="No Content"):r={message:u}}if(r&&t.shouldThrowOnError)throw new ab(r)}return{success:r===null,error:r,data:n,count:s,status:o,statusText:i}}returns(){return this}overrideTypes(){return this}},HO=class extends VO{throwOnError(){return super.throwOnError()}select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const o=s?`${s}.order`:"order",i=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${i?`${i},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,o=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:o="text"}={}){var i;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(i=this.headers.get("Accept"))!==null&&i!==void 0?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${c}"; options=${l};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const ib=new RegExp("[,()]");var Ba=class extends HO{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&ib.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&ib.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>
585r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},WO=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:o}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=o}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let o=!1;const i=(e??"*").split("").map(d=>/\s/.test(d)&&!o?"":(d==='"'&&(o=!o),d)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",i),n&&c.append("Prefer",`count=${n}`),new Ba({method:s,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:o,headers:i}=this.cloneRequestState();if(t&&i.append("Prefer",`count=${t}`),r||i.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(l.length>0){const c=[...new Set(l)].map(d=>`"${d}"`);o.searchParams.set("columns",c.join(","))}}return new Ba({method:s,url:o,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var o;const i="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),n&&c.append("Prefer",`count=${n}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const d=e.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(d.length>0){const u=[...new Set(d)].map(h=>`"${h}"`);l.searchParams.set("columns",u.join(","))}}return new Ba({method:i,url:l,headers:c,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new Ba({method:n,url:s,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Ba({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function vl(e){"@babel/helpers - typeof";return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(e)}function KO(e,t){if(vl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GO(e){var t=KO(e,"string");return vl(t)=="symbol"?t:t+""}function ZO(e,t,r){return(t=GO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function jc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lb(Object(r),!0).forEach(function(n){ZO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var JO=class f_{constructor(t,{headers:r={},schema:n,fetch:s,timeout:o,urlLengthLimit:i=8e3,retry:l}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=i;const c=s??globalThis.fetch;o!==void 0&&o>0?this.fetch=(d,u)=>{const h=new AbortController,p=setTimeout(()=>h.abort(),o),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(p),c(d,u);const y=()=>{clearTimeout(p),h.abort()};return f.addEventListener("abort",y,{once:!0}),c(d,jc(jc({},u),{},{signal:h.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",y)})}return c(d,jc(jc({},u),{},{signal:h.signal})).finally(()=>clearTimeout(p))}:this.fetch=c,this.retry=l}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new WO(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new f_(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:s=!1,count:o}={}){var i;let l;const c=new URL(`${this.url}/rpc/${t}`);let d;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),h=n&&Object.values(r).some(u);h?(l="POST",d=r):n||s?(l=n?"HEAD":"GET",Object.entries(r).filter(([f,y])=>y!==void 0).map(([f,y])=>[f,Array.isArray(y)?`{${y.join(",")}}`:`${y}
585`]).forEach(([f,y])=>{c.searchParams.append(f,y)})):(l="POST",d=r);const p=new Headers(this.headers);return h?p.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&p.set("Prefer",`count=${o}`),new Ba({method:l,url:c,headers:p,schema:this.schemaName,body:d,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class QO{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const o=s.versions;if(o&&o.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 586 587Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const YO="2.110.1",XO=`realtime-js/${YO}`,eL="1.0.0",p_="2.0.0",tL=p_,rL=1e4,nL=100,Yn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},m_={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},qp={connecting:"connecting",closing:"closing",closed:"closed"};class sL{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},i=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,r,n){var s,o;const i=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(o=t.join_ref)!==null&&o!==void 0?o:"",d=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(u).length===0?"":JSON.stringify(u);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`userEvent length ${d.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+i.length+d.length+h.length,f=new ArrayBuffer(this.HEADER_LENGTH+p);let y=new DataView(f),g=0;y.setUint8(g++,this.KINDS.userBroadcastPush),y.setUint8(g++,c.length),y.setUint8(g++,l.length),y.setUint8(g++,i.length),y.setUint8(g++,d.length),y.setUint8(g++,h.length),y.setUint8(g++,r),Array.from(c,v=>y.setUint8(g++,v.charCodeAt(0))),Array.from(l,v=>y.setUint8(g++,v.charCodeAt(0))),Array.from(i,v=>y.setUint8(g++,v.charCodeAt(0))),Array.from(d,v=>y.setUint8(g++,v.charCodeAt(0))),Array.from(h,v=>y.setUint8(g++,v.charCodeAt(0)));var w=new Uint8Array(f.byteLength+n.byteLength);return w.set(new Uint8Array(f),0),w.set(new Uint8Array(n),f.byteLength),w.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,o,i,l,c]=n;return r({join_ref:s,ref:o,topic:i,event:l,payload:c})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=r.getUint8(3),l=r.getUint8(4);let c=this.HEADER_LENGTH+4;const d=n.decode(t.slice(c,c+s));c=c+s;
587const u=n.decode(t.slice(c,c+o));c=c+o;const h=n.decode(t.slice(c,c+i));c=c+i;const p=t.slice(c,t.byteLength),f=l===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,y={type:this.BROADCAST_EVENT,event:u,payload:f};return i>0&&(y.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:d,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var Re;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Re||(Re={}));const cb=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,i)=>(o[i]=aL(i,e,t,s),o),{}):{}},aL=(e,t,r,n)=>{const s=t.find(l=>
vendor: 5,523 bytes, line 587
587l.name===e),o=s==null?void 0:s.type,i=r[e];return o&&!n.includes(o)?g_(o,i):Vp(i)},g_=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return cL(t,r)}switch(e){case Re.bool:return oL(t);case Re.float4:case Re.float8:case Re.int2:case Re.int4:case Re.int8:case Re.numeric:case Re.oid:return iL(t);case Re.json:case Re.jsonb:return lL(t);case Re.timestamp:return dL(t);case Re.abstime:case Re.date:case Re.daterange:case Re.int4range:case Re.int8range:case Re.money:case Re.reltime:case Re.text:case Re.time:case Re.timestamptz:case Re.timetz:case Re.tsrange:case Re.tstzrange:return Vp(t);default:return Vp(t)}},Vp=e=>e,oL=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},iL=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},lL=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},cL=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const i=e.slice(1,r);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(l=>g_(t,l))}return e},dL=e=>typeof e=="string"?e.replace(" ","T"):e,v_=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Vi=e=>typeof e=="function"?e:function(){return e},uL=typeof self<"u"?self:null,qa=typeof window<"u"?window:null,Kr=uL||qa||globalThis,hL="2.0.0",fL=1e4,pL=1e3,Qr={connecting:0,open:1,closing:2,closed:3},Ct={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},mn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Hp={longpoll:"longpoll",websocket:"websocket"},mL={complete:4},Wp="base64url.bearer.phx.",kc=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},x_=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},gL=class{constructor(e,t,r){this.state=Ct.closed,this.topic=e,this.params=Vi(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new kc(this,mn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new x_(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Ct.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Ct.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Ct.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Ct.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new kc(this,mn.leave,Vi({}),this.timeout).send(),this.state=Ct.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(mn.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 5,263 bytes, line 587
587teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ct.closed,this.bindings=[]}onClose(e){this.on(mn.close,e)}onError(e){return this.on(mn.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new kc(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ct.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(mn.close,"leave")},r=new kc(this,mn.leave,Vi({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ct.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let s=this.onMessage(e,t,r,n);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(i=>i.event===e&&this.filterBindings(i,t,r));for(let i=0;i<o.length;i++)o[i].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Ct.closed}isErrored(){return this.state===Ct.errored}isJoined(){return this.state===Ct.joined}isJoining(){return this.state===Ct.joining}isLeaving(){return this.state===Ct.leaving}},Fd=class{static request(e,t,r,n,s,o,i){if(Kr.XDomainRequest){let l=new Kr.XDomainRequest;return this.xdomainRequest(l,e,t,n,s,o,i)}else if(Kr.XMLHttpRequest){let l=new Kr.XMLHttpRequest;return this.xhrRequest(l,e,t,r,n,s,o,i)}else{if(Kr.fetch&&Kr.AbortController)return this.fetchRequest(e,t,r,n,s,o,i);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,o,i){let l={method:e,headers:r,body:n},c=null;return s&&(c=new AbortController,setTimeout(()=>c.abort(),s),l.signal=c.signal),Kr.fetch(t,l).then(d=>d.text()).then(d=>this.parseJSON(d)).then(d=>i&&i(d)).catch(d=>{d.name==="AbortError"&&o?o():i&&i(null)}),c}static xdomainRequest(e,t,r,n,s,o,i){return e.timeout=s,e.open(t,r),e.onload=()=>{let l=this.parseJSON(e.responseText);i&&i(l)},o&&(e.ontimeout=o),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,o,i,l){e.open(t,r,!0),e.timeout=o;for(let[c,d]of Object.entries(n))e.setRequestHeader(c,d);return e.onerror=()=>l&&l(null),e.onreadystatechange=()=>{if(e.readyState===mL.complete&&l){let c=this.parseJSON(e.responseText);l(c)}},i&&(e.ontimeout=i),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let s=t?`${t}[${n}]`:n,o=e[n];typeof o=="object"?r.push(this.serialize(o,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(o))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},vL=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let s=0;s<n;s++)t+=String.fromCharCode(r[s]);return btoa(t)},Ia=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Wp)&&(this.authToken=atob(t[1].slice(Wp.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Qr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Hp.websocket),"$1/"+Hp.longpoll)}endpointURL(){return Fd.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Qr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Qr.open||this.readyState===Qr.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:s}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(o=>{setTimeout(()=>this.onmessage({data:o}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Qr.open,this.onopen({}),this.poll();break;
587case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=vL(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 588`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let s of this.reqs)s.abort();this.readyState=Qr.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,s){let o,i=()=>{this.reqs.delete(o),n()};o=Fd.request(e,this.endpointURL(),t,r,this.timeout,i,l=>{this.reqs.delete(o),this.isActive()&&s(l)}),this.reqs.add(o)}},xL=class Ri{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:o,onLeave:i,onSync:l}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ri.syncState(this.state,s,o,i),this.pendingDiffs.forEach(c=>{this.state=Ri.syncDiff(this.state,c,o,i)}),this.pendingDiffs=[],l()}),this.channel.on(n.diff,s=>{let{onJoin:o,onLeave:i,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ri.syncDiff(this.state,s,o,i),l())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Ri.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let o=this.clone(t),i={},l={};return this.map(o,(c,d)=>{r[c]||(l[c]=d)}),this.map(r,(c,d)=>{let u=o[c];if(u){let h=d.metas.map(g=>g.phx_ref),p=u.metas.map(g=>g.phx_ref),f=d.metas.filter(g=>p.indexOf(g.phx_ref)<0),y=u.metas.filter(g=>h.indexOf(g.phx_ref)<0);f.length>0&&(i[c]=d,i[c].metas=f),y.length>0&&(l[c]=this.clone(u),l[c].metas=y)}else i[c]=d}),this.syncDiff(o,{joins:i,leaves:l},n,s)}static syncDiff(t,r,n,s){let{joins:o,leaves:i}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(o,(l,c)=>{let d=t[l];if(t[l]=this.clone(c),d){let u=t[l].metas.map(p=>p.phx_ref),h=d.metas.filter(p=>u.indexOf(p.phx_ref)<0);t[l].metas.unshift(...h)}n(l,d,c)}),this.map(i,(l,c)=>{let d=t[l];if(!d)return;let u=c.metas.map(h=>h.phx_ref);d.metas=d.metas.filter(h=>u.indexOf(h.phx_ref)<0),s(l,d,c),d.metas.length===0&&delete t[l]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},_c={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,s,o,i]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:o,payload:i})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:o}=e,i=this.META_LENGTH+t.length+r.length+s.length+n.length,l=new ArrayBuffer(this.HEADER_LENGTH+i),c=new DataView(l),d=0;c.setUint8(d++,this.KINDS.push),c.setUint8(d++,t.length),c.setUint8(d++,r.length),c.setUint8(d++,s.length),c.setUint8(d++,n.length),Array.from(t,h=>c.setUint8(d++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(d++,h.charCodeAt(0))),Array.from(s,h=>c.setUint8(d++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(d++,h.charCodeAt(0)));var u=new Uint8Array(l.byteLength+o.byteLength);return u.set(new Uint8Array(l),0),u.set(new Uint8Array(o),l.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,661 bytes, line 588
588switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),o=t.getUint8(3),i=this.HEADER_LENGTH+this.META_LENGTH-1,l=r.decode(e.slice(i,i+n));i=i+n;let c=r.decode(e.slice(i,i+s));i=i+s;let d=r.decode(e.slice(i,i+o));i=i+o;let u=e.slice(i,e.byteLength);return{join_ref:l,ref:null,topic:c,event:d,payload:u}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),o=t.getUint8(3),i=t.getUint8(4),l=this.HEADER_LENGTH+this.META_LENGTH,c=r.decode(e.slice(l,l+n));l=l+n;let d=r.decode(e.slice(l,l+s));l=l+s;let u=r.decode(e.slice(l,l+o));l=l+o;let h=r.decode(e.slice(l,l+i));l=l+i;let p=e.slice(l,e.byteLength),f={status:h,response:p};return{join_ref:c,ref:d,topic:u,event:mn.reply,payload:f}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),o=this.HEADER_LENGTH+2,i=r.decode(e.slice(o,o+n));o=o+n;let l=r.decode(e.slice(o,o+s));o=o+s;let c=e.slice(o,e.byteLength);return{join_ref:null,ref:null,topic:i,event:l,payload:c}}},yL=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||fL,this.transport=t.transport||Kr.WebSocket||Ia,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Kr&&Kr.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=_c.encode.bind(_c),this.defaultDecoder=_c.decode.bind(_c),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ia?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;qa&&qa.addEventListener&&(qa.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),qa.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),qa.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,o,i)=>{console.log(`${s}: ${o}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Vi(t.params||{}),this.endPoint=`${e}/${Hp.websocket}`,this.vsn=t.vsn||hL,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new x_(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Ia}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Fd.appendParams(Fd.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Vi(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ia?this.connectWithFallback(Ia,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(s=>{s.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case Ia:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Wp}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,o,i=this.transportName(e),l=c=>{this.log("transport",`falling back to ${i}...`,c),this.off([s,o]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${i}`))return l("memorized");this.fallbackTimer=setTimeout(l,t),o=this.onError(c=>{this.log("transport","error",c),n&&!r&&(clearTimeout(this.fallbackTimer),l(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let c=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(l,t),this.ping(c=>{this.log("transport","connected to primary after",c),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),pL,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===Qr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 588
588triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(mn.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Qr.connecting:return"connecting";case Qr.open:return"open";case Qr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new gL(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:s,join_ref:o}=e;this.log("push",`${t} ${r} (${o}, ${s})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:s,ref:o,join_ref:i}=t;if(o&&o===this.pendingHeartbeatRef){const l=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",l)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${o&&"("+o+")"||""}`.trim(),s);for(let l=0;l<this.channels.length;l++){const c=this.channels[l];c.isMember(r,n,s,i)&&c.trigger(n,s,o,i)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Hi{constructor(t,r){const n=wL(r);this.presence=new xL(t.getChannel(),n),this.presence.onJoin((s,o,i)=>{const l=Hi.onJoinPayload(s,o,i);t.getChannel().trigger("presence",l)}),this.presence.onLeave((s,o,i)=>{const l=Hi.onLeavePayload(s,o,i);t.getChannel().trigger("presence",l)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Hi.transformState(this.presence.state)}static transformState(t){return t=bL(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=sd(s),r},{})}static onJoinPayload(t,r,n){const s=db(r),o=sd(n);return{event:"join",key:t,currentPresences:s,newPresences:o}}static onLeavePayload(t,r,n){const s=db(r),o=sd(n);return{event:"leave",key:t,currentPresences:s,leftPresences:o}}}function sd(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function bL(e){return JSON.parse(JSON.stringify(e))}function wL(e){return(e==null?void 0:e.events)&&{events:e.events}}function db(e){return e!=null&&e.metas?sd(e):[]}var ub;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(ub||(ub={}));class jL{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new Hi(this.channel.channelAdapter,r)}}function kL(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
588if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class _L{constructor(t,r,n){const s=NL(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>nL){const o=this.channel.pushBuffer.shift();o.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${o.event}`,o.payload())}return s}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===Yn.joined}isJoined(){return this.state===Yn.joined}isJoining(){return this.state===Yn.joining}isClosed(){return this.state===Yn.closed}isLeaving(){return this.state===Yn.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function NL(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const SL=/[,()"\\]/,CL=e=>SL.test(e)||e!==e.trim(),EL=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,hb=e=>{const t=e===null?"null":String(e);return CL(t)?EL(t):t},RL=e=>e===null?"null":String(e),PL=(e,t)=>{if(e==="in"){const r=Array.isArray(t)?t:[t];if(r.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(r)).map(s=>hb(s)).join(",")})`}return e==="is"?`is.${RL(t)}`:`${e}.${hb(t)}`};class TL{constructor(){this.filters=[]}add(t,r,n,s=!1){const o=s?"not.":"";return this.filters.push(`${t}=${o}${PL(r,n)}`),this}eq(t,r){return this.add(t,"eq",r)}neq(t,r){return this.add(t,"neq",r)}gt(t,r){return this.add(t,"gt",r)}gte(t,r){return this.add(t,"gte",r)}lt(t,r){return this.add(t,"lt",r)}lte(t,r){return this.add(t,"lte",r)}in(t,r){return this.add(t,"in",r)}like(t,r){return this.add(t,"like",r)}ilike(t,r){return this.add(t,"ilike",r)}match(t,r){return this.add(t,"match",r)}imatch(t,r){return this.add(t,"imatch",r)}is(t,r){return this.add(t,"is",r)}isDistinct(t,r){return this.add(t,"isdistinct",r)}not(t,r,n){return this.add(t,r,n,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var fb;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(fb||(fb={}));var no;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(no||(no={}));var gn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(gn||(gn={}));class Wi{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var s,o;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new _L(this.socket.socketAdapter,t,this.params),this.presence=new jL(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=v_(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:i,presence:l,private:c}}=this.params,d=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[no.PRESENCE]&&this.bindings[no.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,h={},p={broadcast:i,presence:Object.assign(Object.assign({},l),{enabled:u}),postgres_changes:d,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>{t==null||t(gn.CHANNEL_ERROR,kL(f))}),this._onClose(()=>t==null?void 0:t(gn.CLOSED)),this.updateJoinPayload(Object.assign({config:p},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(gn.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=Yn.errored;const y=Object.values(f).join(", ")||"error";t==null||t(gn.CHANNEL_ERROR,new Error(y,{cause:f}))}).receive("timeout",()=>{t==null||t(gn.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,o=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,i=[];for(let l=0;l<o;l++){const c=s[l],{filter:{event:d,schema:u,table:h,filter:p}}=c,f=t&&t[l];if(f&&f.event===d&&Wi.isFilterValueEqual(f.schema,u)&&Wi.isFilterValueEqual(f.table,h)&&Wi.isFilterValueEqual(f.filter,p))i.push(Object.assign(Object.assign({},c),{id:f.id}));else{this.unsubscribe(),this.state=Yn.errored,r==null||r(gn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=i,this.state!=Yn.errored&&r&&r(gn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),o=t===no.PRESENCE||t===no.POSTGRES_CHANGES;if(s&&o)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const o=r instanceof ArrayBuffer||ArrayBuffer.isView(r),i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":o?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l=new URL(this.broadcastEndpointURL);l.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&l.searchParams.set("private","true");const c={method:"POST",headers:i,body:o?r:JSON.stringify(r)},d=await this._fetchWithTimeout(l.toString(),c,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(d.status===202)return{success:!0};if(d.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
588ime-js/migrations/httpsend-server-version.md"));let u=d.statusText;try{const h=await d.json();u=h.error||h.message||u}catch{}return Promise.reject(new Error(u))}async send(t,r={}){var n,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:i}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,private:this.private}]})};try{const d=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=d.body)===null||s===void 0?void 0:s.cancel()),d.ok?"ok":"error"}catch(d){return d instanceof Error&&d.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,l,c;const d=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(i=this.params)===null||i===void 0?void 0:i.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&o("ok"),d.receive("ok",()=>o("ok")),d.receive("error",()=>o("error")),d.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),i=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),i}_on(t,r,n){const s=t.toLocaleLowerCase(),o=r==null?void 0:r.filter;(o instanceof TL||typeof o=="object"&&o!==null&&typeof o.build=="function")&&(r=Object.assign(Object.assign({},r),{filter:o.build()}));const i=this.channelAdapter.on(t,n),l={type:s,filter:r,callback:n,ref:i};return this.bindings[s]?this.bindings[s].push(l):this.bindings[s]=[l],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,o,i,l,c,d,u;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,n))return!1;const p=(s=this.bindings[h])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!p)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in p){const f=p.id,y=(o=p.filter)===null||o===void 0?void 0:o.event;return f&&((i=r.ids)===null||i===void 0?void 0:i.includes(f))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((l=r.data)===null||l===void 0?void 0:l.type.toLocaleLowerCase()))}else{const f=(d=(c=p==null?void 0:p.filter)===null||c===void 0?void 0:c.event)===null||d===void 0?void 0:d.toLocaleLowerCase();return f==="*"||f===((u=r==null?void 0:r.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:o,join:i}=m_;return r&&[n,s,o,i].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:o,table:i,commit_timestamp:l,type:c,errors:d}=s;return Object.assign(Object.assign({},{schema:o,table:i,commit_timestamp:l,eventType:c,new:{},old:{},errors:d}),this._getPayloadRecords(s))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=cb(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=cb(t.columns,t.old_record)),r}}class AL{constructor(t,r){this.socket=new yL(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,s=1e4){return new Promise(o=>{setTimeout(()=>
588o("timeout"),s),this.socket.disconnect(()=>{t(),o("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==qp.connecting}isDisconnecting(){return this.socket.connectionState()==qp.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const pb={HEARTBEAT_INTERVAL:25e3},OL=[1e3,2e3,5e3,1e4],LL=1e4;function IL(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function $L(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return IL()}const DL=` 589 addEventListener("message", (e) => { 590 if (e.data.event === "start") { 591 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 592 } 593 });`;class ML{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new sL,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=o=>o?(...i)=>o(...i):(...i)=>fetch(...i),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new AL(t,s),this.httpEndpoint=v_(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||qp.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new Wi(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(o),o}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
593this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const o={access_token:r,version:XO};r&&s.updateJoinPayload(o),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(m_.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r!=="disconnected"&&(r=="sent"&&this._setAuthSafely(),t&&t(r,n))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([DL],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,o,i,l,c,d,u,h,p,f;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const y={};y.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:rL,y.heartbeatIntervalMs=(o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:pb.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(i=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&i!==void 0?i:2*((l=t==null?void 0:t.heartbeatIntervalMs)!==null&&l!==void 0?l:pb.HEARTBEAT_INTERVAL),y.transport=(c=t==null?void 0:t.transport)!==null&&c!==void 0?c:QO.getWebSocketConstructor(),y.params=t==null?void 0:t.params,y.logger=t==null?void 0:t.logger,y.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),y.sessionStorage=(d=t==null?void 0:t.sessionStorage)!==null&&d!==void 0?d:$L(),y.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:x=>OL[x-1]||LL;let g,w;const v=(h=t==null?void 0:t.vsn)!==null&&h!==void 0?h:tL;switch(v){case eL:g=(x,b)=>b(JSON.stringify(x)),w=(x,b)=>b(JSON.parse(x));break;case p_:g=this.serializer.encode.bind(this.serializer),w=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${y.vsn}`)}if(y.vsn=v,y.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:g,y.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:w,y.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,y.params=Object.assign(Object.assign({},y.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,y.autoSendHeartbeat=!this.worker}return y}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
593var xl=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function zL(e,t,r){const n=new URL(t,e);if(r)for(const[s,o]of Object.entries(r))o!==void 0&&n.searchParams.set(s,o);return n.toString()}async function FL(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function UL(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:i}){const l=zL(e.baseUrl,n,s),c=await FL(e.auth),d=await t(l,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...c,...i},body:o?JSON.stringify(o):void 0}),u=await d.text(),h=(d.headers.get("content-type")||"").includes("application/json"),p=h&&u?JSON.parse(u):u;if(!d.ok){const f=h?p:void 0,y=f==null?void 0:f.error;throw new xl((y==null?void 0:y.message)??`Request failed with status ${d.status}`,{status:d.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:f})}return{status:d.status,headers:d.headers,data:p}}}}function Nc(e){return e.join("�")}var BL=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Nc(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Nc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Nc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Nc(e.namespace)}`}),!0}catch(t){if(t instanceof xl&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof xl&&r.status===409)return;throw r}}};function $a(e){return e.join("�")}var qL=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${$a(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${$a(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${$a(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${$a(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${$a(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${$a(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof xl&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof xl&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},VL=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=UL({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new BL(this.client,t),this.tableOps=new qL(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
593async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function yl(e){"@babel/helpers - typeof";return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yl(e)}function HL(e,t){if(yl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WL(e){var t=HL(e,"string");return yl(t)=="symbol"?t:t+""}function KL(e,t,r){return(t=WL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mb(Object(r),!0).forEach(function(n){KL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Iu=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function $u(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Kp=class extends Iu{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return se({},super.toJSON())}},y_=class extends Iu{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Ud(e,t,r){const n=se({},e),s=t.toLowerCase();for(const o of Object.keys(n))o.toLowerCase()===s&&delete n[o];return n[s]=r,n}function GL(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const ZL=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),JL=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)},Gp=e=>{if(Array.isArray(e))return e.map(r=>Gp(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Gp(n)}),t},QL=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),gb=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},YL=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let o=parseInt(String(s.status),10);Number.isFinite(o)||(o=500),s.json().then(i=>{const l=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||o+"";t(new Kp(gb(i),o,l,n))}).catch(()=>{const i=o+"";t(new Kp(s.statusText||`HTTP ${o} error`,o,i,n))})}else t(new y_(gb(e),e,n))},XL=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return se(se({},s),r);if(JL(n)){var o;const i=(t==null?void 0:t.headers)||{};let l;for(const[c,d]of Object.entries(i))c.toLowerCase()==="content-type"&&(l=d);s.headers=Ud(i,"Content-Type",(o=l)!==null&&o!==void 0?o:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),se(se({},s),r)};async function ji(e,t,r,n,s,o,i){return new Promise((l,c)=>{e(r,XL(t,n,s,o)).then(d=>{if(!d.ok)throw d;if(n!=null&&n.noResolveJson)return d;if(i==="vectors"){const u=d.headers.get("content-type");if(d.headers.get("content-length")==="0"||d.status===204)return{};if(!u||!u.includes("application/json"))return{}}return d.json()}).then(d=>l(d)).catch(d=>YL(d,c,n,i))})}function b_(e="storage"){return{get:async(t,r,n,s)=>ji(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,o)=>ji(t,"POST",r,s,o,n,e),put:async(t,r,n,s,o)=>ji(t,"PUT",r,s,o,n,e),head:async(t,r,n,s)=>ji(t,"HEAD",r,se(se({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,o)=>ji(t,"DELETE",r,s,o,n,e)}}const eI=b_("storage"),{get:bl,post:Sr,put:Zp,head:tI,remove:wl}=eI,Wt=b_("vectors");var ni=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=GL(t),this.fetch=ZL(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Ud(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if($u(r))return{data:null,error:r};throw r}}};let w_;w_=Symbol.toStringTag;var rI=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[w_]="StreamDownloadBuilder",this.promise=null}
593then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if($u(t))return{data:null,error:t};throw t}}};let j_;j_=Symbol.toStringTag;var nI=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[j_]="BlobDownloadBuilder",this.promise=null}asStream(){return new rI(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if($u(t))return{data:null,error:t};throw t}}};const Xh={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},vb={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var sI=class extends ni{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let o;const i=se(se({},vb),n);let l=se(se({},s.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const c=i.metadata;if(typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),c&&o.append("metadata",s.encodeMetadata(c)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.has("cacheControl")||o.append("cacheControl",i.cacheControl),c&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(c))):(o=r,l["cache-control"]=`max-age=${i.cacheControl}`,l["content-type"]=i.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!i.duplex&&(i.duplex="half")),n!=null&&n.headers)for(const[p,f]of Object.entries(n.headers))l=Ud(l,p,f);const d=s._removeEmptyFolders(t),u=s._getFinalPath(d),h=await(e=="PUT"?Zp:Sr)(s.fetch,`${s.url}/object/${u}`,o,se({headers:l},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{path:d,id:h.Id,fullPath:h.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const o=s._removeEmptyFolders(e),i=s._getFinalPath(o),l=new URL(s.url+`/object/upload/sign/${i}`);return l.searchParams.set("token",t),s.handleOperation(async()=>{let c;const d=se(se({},vb),n);let u=se(se({},s.headers),{"x-upsert":String(d.upsert)});const h=d.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",d.cacheControl),h&&c.append("metadata",s.encodeMetadata(h)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",d.cacheControl),h&&!c.has("metadata")&&c.append("metadata",s.encodeMetadata(h))):(c=r,u["cache-control"]=`max-age=${d.cacheControl}`,u["content-type"]=d.contentType,h&&(u["x-metadata"]=s.toBase64(s.encodeMetadata(h))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!d.duplex&&(d.duplex="half")),n!=null&&n.headers)for(const[p,f]of Object.entries(n.headers))u=Ud(u,p,f);return{path:o,fullPath:(await Zp(s.fetch,l.toString(),c,se({headers:u},d!=null&&d.duplex?{duplex:d.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=se({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await Sr(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),i=new URL(r.url+o.url),l=i.searchParams.get("token");if(!l)throw new Iu("No token returned by API");return{signedUrl:i.toString(),path:e,token:l}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await Sr(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
593stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Sr(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const o=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let i=await Sr(n.fetch,`${n.url}/object/sign/${s}`,se({expiresIn:t},o?{transform:r.transform}:{}),{headers:n.headers});const l=new URLSearchParams;r!=null&&r.download&&l.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&l.set("cacheNonce",String(r.cacheNonce));const c=l.toString();return{signedUrl:encodeURI(`${n.url}${i.signedURL}${c?`&${c}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Sr(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=new URLSearchParams;r!=null&&r.download&&o.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&o.set("cacheNonce",String(r.cacheNonce));const i=o.toString();return s.map(l=>se(se({},l),{},{signedUrl:l.signedURL?encodeURI(`${n.url}${l.signedURL}${i?`&${i}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const o=s.toString(),i=this._getFinalPath(e),l=()=>bl(this.fetch,`${this.url}/${n}/${i}${o?`?${o}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new nI(l,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Gp(await bl(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await tI(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if($u(s)){var n;const o=s instanceof Kp?s.status:s instanceof y_?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(o!==void 0&&[400,404].includes(o))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const s=n.toString(),o=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await wl(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,r){var n=this;return n.handleOperation(async()=>{const s=n._getFinalPath(e),o=new URLSearchParams;t!=null&&t.transformations&&o.set("transformations","true");const i=o.toString();return await wl(n.fetch,`${n.url}/cdn/${s}${i?`?${i}`:""}`,{},{headers:n.headers},r)})}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=t!=null&&t.sortBy?se(se({},Xh.sortBy),t.sortBy):Xh.sortBy,o=se(se(se({},Xh),t),{},{sortBy:s,prefix:e||""});return await Sr(n.fetch,`${n.url}/object/list/${n.bucketId}`,o,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=se({},e);return await Sr(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("qual
593ity",t.quality.toString()),e}};const aI="2.110.1",Vl={"X-Client-Info":`storage-js/${aI}`};var oI=class extends ni{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const o=s.href.replace(/\/$/,""),i=se(se({},Vl),t);super(o,i,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await bl(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await bl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Sr(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await Zp(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await wl(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,r){var n=this;return n.handleOperation(async()=>{const s=new URLSearchParams;t!=null&&t.transformations&&s.set("transformations","true");const o=s.toString();return await wl(n.fetch,`${n.url}/cdn/${e}${o?`?${o}`:""}`,{},{headers:n.headers},r)})}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},iI=class extends ni{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=se(se({},Vl),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await bl(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await wl(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!QL(e))throw new Iu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new VL({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,o){const i=s[o];return typeof i!="function"?i:async(...l)=>{try{return{data:await i.apply(s,l),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}},lI=class extends ni{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=se(se({},Vl),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await Wt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await Wt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},cI=class extends ni{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=se(se({},Vl),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
593if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},dI=class extends ni{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=se(se({},Vl),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},uI=class extends dI{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new hI(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},hI=class extends lI{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,se(se({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,se(se({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new fI(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},fI=class extends cI{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,se(se({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,se(se({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,se(se({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,se(se({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,se(se({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},pI=class extends oI{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new sI(this.url,this.headers,e,this.fetch)}get vectors(){return new uI(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new iI(this.url+"/iceberg",this.headers,this.fetch)}};const k_="2.110.1",vn=30*1e3,Pi=3,ef=Pi*vn,mI=2*vn,gI="http://localhost:9999",vI="supabase.auth.token",xI={"X-Client-Info":`gotrue-js/${k_}`},Jp="X-Supabase-Api-Version",__={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},yI=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,bI=10*60*1e3;class jl extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function q(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class wI extends jl{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.co
593de=n}}function jI(e){return q(e)&&e.name==="AuthApiError"}class Ar extends jl{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class cn extends jl{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class nt extends cn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Sc(e){return q(e)&&e.name==="AuthSessionMissingError"}class Da extends cn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Cc extends cn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ec extends cn{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function kI(e){return q(e)&&e.name==="AuthImplicitGrantRedirectError"}class xb extends cn{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class _I extends cn{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Qp extends cn{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function yb(e){return q(e)&&e.name==="AuthRetryableFetchError"}class bb extends cn{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function NI(e){return q(e)&&e.name==="AuthRefreshDiscardedError"}class wb extends cn{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Bd extends cn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const qd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),jb=` 594\r=`.split(""),SI=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<jb.length;t+=1)e[jb[t].charCodeAt(0)]=-2;for(let t=0;t<qd.length;t+=1)e[qd[t].charCodeAt(0)]=t;return e})();function kb(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(qd[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(qd[n]),t.queuedBits-=6}}function N_(e,t,r){const n=SI[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function _b(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{RI(i,n,r)};for(let i=0;i<e.length;i+=1)N_(e.charCodeAt(i),s,o);return t.join("")}function CI(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function EI(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}CI(n,t)}}function RI(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function po(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;
594s+=1)N_(e.charCodeAt(s),r,n);return new Uint8Array(t)}function PI(e){const t=[];return EI(e,r=>t.push(r)),new Uint8Array(t)}function ea(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>kb(s,r,n)),kb(null,r,n),t.join("")}function TI(e){return Math.round(Date.now()/1e3)+e}function AI(){return Symbol("auth-callback")}const mt=()=>typeof window<"u"&&typeof document<"u",qs={tested:!1,writable:!1},S_=()=>{if(!mt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(qs.tested)return qs.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),qs.tested=!0,qs.writable=!0}catch{qs.tested=!0,qs.writable=!1}return qs.writable};function OI(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const C_=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),LI=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Va=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},wr=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},We=async(e,t)=>{await e.removeItem(t)};class Du{constructor(){this.promise=new Du.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Du.promiseConstructor=Promise;function Rc(e){const t=e.split(".");if(t.length!==3)throw new Bd("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!yI.test(t[n]))throw new Bd("JWT not in base64url format");return{header:JSON.parse(_b(t[0])),payload:JSON.parse(_b(t[1])),signature:po(t[2]),raw:{header:t[0],payload:t[1]}}}async function II(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function $I(e,t){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){n(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function DI(e){return("0"+e.toString(16)).substr(-2)}function MI(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,DI).join("")}async function zI(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function FI(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await zI(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Vs(e,t,r=!1){const n=MI();let s=n;r&&(s+="/recovery"),await Va(e,`${t}-code-verifier`,s);const o=await FI(n);return[o,n===o?"plain":"s256"]}const UI=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function BI(e){const t=e.headers.get(Jp);if(!t||!t.match(UI))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function qI(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function VI(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const HI=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function hn(e){if(!HI.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function jr(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function tf(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function WI(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
594if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function Nb(e){return JSON.parse(JSON.stringify(e))}const Gs=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},KI=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Sb(e){var t;if(!LI(e))throw new Qp(Gs(e),0);if(KI.includes(e.status))throw new Qp(Gs(e),e.status);let r;try{r=await e.json()}catch(o){throw new Ar(Gs(o),o)}let n;const s=BI(e);if(s&&s.getTime()>=__["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new wb(Gs(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new nt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,i)=>o&&typeof i=="string",!0))throw new wb(Gs(r),e.status,r.weak_password.reasons);throw new wI(Gs(r),e.status||500,n)}const GI=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function J(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[Jp]||(o[Jp]=__["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const i=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(i.redirect_to=n.redirectTo);const l=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",c=await ZI(e,t,r+l,{headers:o,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function ZI(e,t,r,n,s,o){const i=GI(t,n,s,o);let l;try{l=await e(r,Object.assign({},i))}catch(c){throw console.error(c),new Qp(Gs(c),0)}if(l.ok||await Sb(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await Sb(c)}}function rr(e){var t;let r=null;YI(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=TI(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:typeof(e==null?void 0:e.id)=="string"?e:null;return{data:{session:r,user:n},error:null}}function Cb(e){const t=rr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Xn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function JI(e){return{data:e,error:null}}function QI(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,i=ri(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o},c=Object.assign({},i);return{data:{properties:l,user:c},error:null}}function Eb(e){return e}function YI(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const rf=["global","local","others"];class XI{constructor({url:t="",headers:r={},fetch:n,experimental:s}){this.url=t,this.headers=r,this.fetch=C_(n),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,r=rf[0]){if(rf.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${rf.join(", ")}`);try{return await J(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(q(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await J(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Xn})}catch(n){if(q(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=ri(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await J(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:QI,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(q(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await J(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Xn})}catch(r){if(q(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,o,i,l,c;try{const d={nextPage:null,lastPage:0,total:0},u=await J(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Eb});if(u.error)throw u.error;const h=await u.json(),p=(i=u.headers.get("x-total-count"))!==null&&i!==void 0?i:0,f=(c=(l=u.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return f.length>0&&(f.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);d[`${w}Page`]=g}),d.total=parseInt(p)),{data:Object.assign(Object.assign({},h),d),error:null}}catch(d){if(q(d))return{data:{users:[]},error:d};throw d}}async getUserById(t){hn(t);try{return await J(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Xn})}catch(r){if(q(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){hn(t);try{return await J(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Xn})}catch(n){if(q(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){hn(t);
594try{return await J(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Xn})}catch(n){if(q(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){hn(t.userId);try{const{data:r,error:n}=await J(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _deleteFactor(t){hn(t.userId),hn(t.id);try{return{data:await J(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,o,i,l,c;try{const d={nextPage:null,lastPage:0,total:0},u=await J(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Eb});if(u.error)throw u.error;const h=await u.json(),p=(i=u.headers.get("x-total-count"))!==null&&i!==void 0?i:0,f=(c=(l=u.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return f.length>0&&(f.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);d[`${w}Page`]=g}),d.total=parseInt(p)),{data:Object.assign(Object.assign({},h),d),error:null}}catch(d){if(q(d))return{data:{clients:[]},error:d};throw d}}async _createOAuthClient(t){try{return await J(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await J(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await J(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(q(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await J(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await J(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await J(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(q(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await J(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await J(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await J(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(q(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await J(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){jr(this.experimental),hn(t.userId);try{return await J(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){jr(this.experimental),hn(t.userId),hn(t.passkeyId);
594try{return await J(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}}function Rb(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&S_()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class e$ extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function t$(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function E_(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function r$(e){return parseInt(e,16)}function n$(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function s$(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:l,requestId:c,resources:d,scheme:u,uri:h,version:p}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 595`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=E_(e.address),y=u?`${u}://${n}`:n,g=e.statement?`${e.statement} 596`:"",w=`${y} wants you to sign in with your Ethereum account: 597${f} 598 599${g}`;let v=`URI: ${h} 600Version: ${p} 601Chain ID: ${r}${i?` 602Nonce: ${i}`:""} 603Issued At: ${o.toISOString()}`;if(s&&(v+=` 604Expiration Time: ${s.toISOString()}`),l&&(v+=` 605Not Before: ${l.toISOString()}`),c&&(v+=` 606Request ID: ${c}`),d){let x=` 607Resources:`;for(const b of d){if(!b||typeof b!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b}`);x+=` 608- ${b}`}v+=x}return`${w} 609${v}`}class Ge extends Error{constructor({message:t,code:r,cause:n,name:s}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Vd extends Ge{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function a$({error:e,options:t}){var r,n,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ge({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Ge({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Ge({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ge({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Ge({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ge({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new Ge({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ge({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(R_(i)){if(o.rp.id!==i)return new Ge({message:`The RP ID "${o.rp.id}
609" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ge({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Ge({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Ge({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ge({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function o$({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ge({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ge({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(R_(n)){if(r.rpId!==n)return new Ge({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ge({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ge({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ge({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class i${createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Yp=new i$;function Pb(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=ri(e,["challenge","user","excludeCredentials"]),o=po(t).buffer,i=Object.assign(Object.assign({},r),{id:po(r.id).buffer}),l=Object.assign(Object.assign({},s),{challenge:o,user:i});if(n&&n.length>0){l.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const d=n[c];l.excludeCredentials[c]=Object.assign(Object.assign({},d),{id:po(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return l}function Tb(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=ri(e,["challenge","allowCredentials"]),s=po(t).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const l=r[i];o.allowCredentials[i]=Object.assign(Object.assign({},l),{id:po(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return o}function Ab(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:ea(new Uint8Array(e.response.attestationObject)),clientDataJSON:ea(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Ob(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:ea(new Uint8Array(s.authenticatorData)),clientDataJSON:ea(new Uint8Array(s.clientDataJSON)),signature:ea(new Uint8Array(s.signature)),userHandle:s.userHandle?ea(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function R_(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Hd(){var e,t;return!!(mt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function P_(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Vd("Browser returned unexpected credential type",t)}:{data:null,error:new Vd("Empty credential response",t)}}
609catch(t){return{data:null,error:a$({error:t,options:e})}}}async function T_(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Vd("Browser returned unexpected credential type",t)}:{data:null,error:new Vd("Empty credential response",t)}}catch(t){return{data:null,error:o$({error:t,options:e})}}}const l$={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},c$={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Wd(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))n[o]=i;else if(r(i))n[o]=i;else if(t(i)){const l=n[o];t(l)?n[o]=Wd(l,i):n[o]=Wd(i)}else n[o]=i}return n}function d$(e,t){return Wd(l$,e,t||{})}function u$(e,t){return Wd(c$,e,t||{})}class h${constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},o){var i;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!l)return{data:null,error:c};const d=s??Yp.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:u}=l.webauthn.credential_options.publicKey;if(!u.name){const h=n;if(h)u.name=`${u.id}:${h}`;else{const f=(await this.client.getUser()).data.user,y=((i=f==null?void 0:f.user_metadata)===null||i===void 0?void 0:i.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${y}`}}u.displayName||(u.displayName=u.name)}switch(l.webauthn.type){case"create":{const u=d$(l.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:h,error:p}=await P_({publicKey:u,signal:d});return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}case"request":{const u=u$(l.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:h,error:p}=await T_(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:u,signal:d}));return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}}}catch(l){return q(l)?{data:null,error:l}:{data:null,error:new Ar("Unexpected error in challenge",l)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new jl("rpId is required for WebAuthn authentication")};try{if(!Hd())return{data:null,error:new Ar("Browser does not support WebAuthn",null)};const{data:i,error:l}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!i)return{data:null,error:l};const{webauthn:c}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(i){return q(i)?{data:null,error:i}:{data:null,error:new Ar("Unexpected error in authenticate",i)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new jl("rpId is required for WebAuthn registration")};try{if(!Hd())return{data:null,error:new Ar("Browser does not support WebAuthn",null)};const{data:i,error:l}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(u=>{var h;
609return(h=u.data)===null||h===void 0?void 0:h.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:l};const{data:c,error:d}=await this._challenge({factorId:i.id,friendlyName:i.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:o});return c?this._verify({factorId:i.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:d}}catch(i){return q(i)?{data:null,error:i}:{data:null,error:new Ar("Unexpected error in register",i)}}}}t$();const f$={url:gI,storageKey:vI,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:xI,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Ma={};class kl{get jwks(){var t,r;return(r=(t=Ma[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Ma[this.storageKey]=Object.assign(Object.assign({},Ma[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Ma[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ma[this.storageKey]=Object.assign(Object.assign({},Ma[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},f$),t);if(this.storageKey=o.storageKey,this.instanceID=(r=kl.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,kl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&mt()){const i=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(n=o.experimental)!==null&&n!==void 0?n:{},this.admin=new XI({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=C_(o.fetch),this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock!=null&&(this.lock=o.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new h$(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:S_()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Rb(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Rb(this.memoryStorage)),mt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),(i.data.event==="TOKEN_REFRESHED"||i.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(i.data.event,i.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(i=>{this._debug("#initialize()","error",i)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${k_}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){var t;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();
609const r=await this.initializePromise,n=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const s of n)await this._notifyAllSubscribers(s.event,s.session,s.broadcast);return r}async _initialize(){var t;try{let r={},n="none";if(mt()&&(r=OI(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),mt()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),kI(o)){const c=(t=o.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:i,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",l),await this._saveSession(i),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return q(r)?this._returnResult({error:r}):this._returnResult({error:new Ar("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const o=await J(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:rr}),{data:i,error:l}=o;if(l||!i)return this._returnResult({data:{user:null,session:null},error:l});const c=i.session,d=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(o){if(q(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,s;try{let o;if("email"in t){const{email:u,password:h,options:p}=t;let f=null,y=null;this.flowType==="pkce"&&([f,y]=await Vs(this.storage,this.storageKey)),o=await J(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:u,password:h,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:f,code_challenge_method:y},xform:rr})}else if("phone"in t){const{phone:u,password:h,options:p}=t;o=await J(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:h,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:rr})}else throw new Cc("You must provide either an email or phone number and a password");const{data:i,error:l}=o;if(l||!i)return await We(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=i.session,d=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(o){if(await We(this.storage,`${this.storageKey}-code-verifier`),q(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:i,options:l}=t;r=await J(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Cb})}else if("phone"in t){const{phone:o,password:i,options:l}=t;r=await J(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Cb})}else throw new Cc("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const o=new Da;return this._returnResult({data:{user:null,session:null},error:o})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.o
609ptions)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,o,i,l,c,d,u,h,p;let f,y;if("message"in t)f=t.message,y=t.signature;else{const{chain:g,wallet:w,statement:v,options:x}=t;let b;if(mt())if(typeof w=="object")b=w;else{const R=window;if("ethereum"in R&&typeof R.ethereum=="object"&&"request"in R.ethereum&&typeof R.ethereum.request=="function")b=R.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=w}const j=new URL((r=x==null?void 0:x.url)!==null&&r!==void 0?r:window.location.href),k=await b.request({method:"eth_requestAccounts"}).then(R=>R).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=E_(k[0]);let N=(n=x==null?void 0:x.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!N){const R=await b.request({method:"eth_chainId"});N=r$(R)}const C={domain:j.host,address:_,statement:v,uri:j.href,version:"1",chainId:N,nonce:(s=x==null?void 0:x.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=x==null?void 0:x.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(l=x==null?void 0:x.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=x==null?void 0:x.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(d=x==null?void 0:x.signInWithEthereum)===null||d===void 0?void 0:d.requestId,resources:(u=x==null?void 0:x.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=s$(C),y=await b.request({method:"personal_sign",params:[n$(f),_]})}try{const{data:g,error:w}=await J(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:y},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:rr});if(w)throw w;if(!g||!g.session||!g.user){const v=new Da;return this._returnResult({data:{user:null,session:null},error:v})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:w})}catch(g){if(q(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var r,n,s,o,i,l,c,d,u,h,p,f;let y,g;if("message"in t)y=t.message,g=t.signature;else{const{chain:w,wallet:v,statement:x,options:b}=t;let j;if(mt())if(typeof v=="object")j=v;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))j=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=v}const k=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in j&&j.signIn){const _=await j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),x?{statement:x}:null));let N;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")N=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)N=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in N&&"signature"in N&&(typeof N.signedMessage=="string"||N.signedMessage instanceof Uint8Array)&&N.signature instanceof Uint8Array)y=typeof N.signedMessage=="string"?N.signedMessage:new TextDecoder().decode(N.signedMessage),g=N.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${k.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...x?["",x,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(n=b==null?void 0:b.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=b==null?void 0:b.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((i=b==null?void 0:b.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((l=b==null?void 0:b.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((c=b==null?void 0:b.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((d=b==null?void 0:b.signInWithSolana)===null||d===void 0)&&d.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((h=(u=b==null?void 0:b.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||h===void 0)&&h.length?["Resources",...b.signInWithSolana.resources.map(N=>`- ${N}`)]:[]].join(` 610`);const _=await j.signMessage(new TextEncoder().encode(y),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=_}}try{const{data:w,error:v}=await J(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:ea(g)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:rr});if(v)throw v;if(!w||!w.session||!w.user){const x=new Da;return this._returnResult({data:{user:null,session:null},error:x})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:v})}catch(w){if(q(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const r=await wr(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new _I;const{data:o,error:i}=await J(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:rr});if(await We(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const l=new Da;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(await We(this.storage,`${this.storageKey}-code-verifier`),q(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:o,nonce:i}=t,l=await J(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:rr}),{data:c,error:d}=l;if(d)return this._returnResult({data:{user:null,session:null},error:d});if(!c||!c.session||!c.user){const u=new Da;return this._returnResult({data:{user:null,session:null},error:u})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:d})}catch(r){if(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,o,i;try{if("email"in t){const{email:l,options:c}=t;let d=null,u=null;this.flowType==="pkce"&&([d,u]=await Vs(this.storage,this.storageKey));const{error:h}=await J(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:d,code_challenge_method:u},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:d,error:u}=await J(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(o=c==null?void 0:c.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(i=c==null?void 0:c.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:u})}throw new Cc("You must provide either an email or phone number.")}catch(l){if(await We(this.storage,`${this.storageKey}-code-verifier`),q(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var r,n;try{let s,o;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:l}=await J(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:rr});if(l)throw l;if(!i)throw new Error("An error occurred on token verification.");const c=i.session,d=i.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(s){if(q(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,o,i;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Vs(this.storage,this.storageKey));const d=await J(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:JI});return!((o=d.data)===null||o===void 0)&&o.url&&mt()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(d.data.url),this._returnResult(d)}catch(l){if(await We(this.storage,`${this.storageKey}-code-verifier`),q(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new nt;const{error:s}=await J(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(q(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:o}=t;let i=null,l=null;this.flowType==="pkce"&&([i,l]=await Vs(this.storage,this.storageKey));const{error:c}=await J(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken},code_challenge:i,code_challenge_method:l},redirectTo:o==null?void 0:o.emailRedirectTo});return c&&await We(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in t){const{phone:n,type:s,options:o}=t,{data:i,error:l}=await J(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:l})}throw new Cc("You must provide either an email or phone number and a type")}catch(r){if(await We(this.storage,`${this.storageKey}-code-verifier`),q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await wr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
610id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<ef:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await wr(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=tf()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=WI(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);if(o){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const l=await wr(this.storage,this.storageKey);if(l&&l.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:o})}return this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await J(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Xn}):await this._useSession(async r=>{var n,s,o;const{data:i,error:l}=r;if(l)throw l;return!(!((n=i.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new nt}:await J(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:Xn})})}catch(r){if(q(r))return Sc(r)&&(await this._removeSession(),await We(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r)):await this._updateUser(t,r)}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new nt;const i=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await Vs(this.storage,this.storageKey));const{data:d,error:u}=await J(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:i.access_token,xform:Xn});if(u)throw u;return i.user=d.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(await We(this.storage,`${this.storageKey}-code-verifier`),q(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new nt;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=Rc(t.access_token);if(i.exp&&(n=i.exp,s=n<=r),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};o=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});o={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(q(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:i,error:l}=r;if(l)throw l;t=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new nt;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;try{if(!mt())throw new Ec("No browser detected.");
610if(t.error||t.error_description||t.error_code)throw new Ec(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new xb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ec("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new xb("No code detected.");const{data:b,error:j}=await this._exchangeCodeForSession(t.code);if(j)throw j;const k=new URL(window.location.href);return k.searchParams.delete("code"),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:b.session,redirectType:(n=b.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:o,access_token:i,refresh_token:l,expires_in:c,expires_at:d,token_type:u}=t;if(!i||!c||!l||!u)throw new Ec("No session defined in URL");const h=Math.round(Date.now()/1e3),p=parseInt(c);let f=h+p;d&&(f=parseInt(d));const y=f-h;y*1e3<=vn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${p}s`);const g=f-p;h-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,f,h):h-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,f,h);const{data:w,error:v}=await this._getUser(i);if(v)throw v;const x={provider_token:s,provider_refresh_token:o,access_token:i,expires_in:p,expires_at:f,refresh_token:l,token_type:u,user:w.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:t.type},error:null})}catch(s){if(q(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const r=await wr(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o&&!Sc(o))return this._returnResult({error:o});const i=(n=s.session)===null||n===void 0?void 0:n.access_token;if(i){const{error:l}=await this.admin.signOut(i,t);if(l&&!(jI(l)&&(l.status===404||l.status===401||l.status===403)||Sc(l)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await We(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=AI(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),Sc(o)?console.warn(o):console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Vs(this.storage,this.storageKey,!0));try{return await J(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(await We(this.storage,`${this.storageKey}-code-verifier`),q(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async o=>{var i,l,c,d,u;const{data:h,error:p}=o;if(p)throw p;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await J(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(d=h.session)===null||d===void 0?void 0:d.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return mt()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(q(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:o}}=r;if(s)throw s;const{options:i,provider:l,token:c,access_token:d,nonce:u}=t,h=await J(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:l,id_token:c,access_token:d,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:rr}),{data:p,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new Da}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await We(this.storage,`${this.storageKey}-code-verifier`),q(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)throw i;
610return await J(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const n=Date.now();return await $I(async s=>(s>0&&await II(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await J(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:rr})),(s,o)=>{const i=200*Math.pow(2,s);return o&&yb(o)&&Date.now()+i-n<vn})}catch(n){if(this._debug(r,"error",n),q(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),mt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await wr(this.storage,this.storageKey);if(s&&this.userStorage){let i=await wr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await Va(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:tf()}else if(s&&!s.user&&!s.user){const i=await wr(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await We(this.storage,this.storageKey+"-user"),await Va(this.storage,this.storageKey,s)):s.user=tf()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<ef;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${ef}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(NI(i)?this._debug(n,"refresh discarded by commit guard",i):this._debug(n,"refresh failed",i))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:l}=await this._getUser(s.access_token);!l&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(n,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new nt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new Du;const o=await wr(this.storage,this.storageKey),{data:i,error:l}=await this._refreshAccessToken(t);if(l)throw l;if(!i.session)throw new nt;const c=await wr(this.storage,this.storageKey);if(o!==null&&(c===null||c.refresh_token!==o.refresh_token)){this._debug(s,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:c?"replaced":"cleared"});const p={data:null,error:new bb};return this.refreshingDeferred.resolve(p),p}const u=this._sessionRemovalEpoch;if(await this._saveSession(i.session),this._sessionRemovalEpoch!==u){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, und
610oing write"),await We(this.storage,this.storageKey),this.userStorage&&await We(this.userStorage,this.storageKey+"-user");const p={data:null,error:new bb};return this.refreshingDeferred.resolve(p),p}await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const h={data:i.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(h),h}catch(o){if(this._debug(s,"error",o),q(o)){const i={data:null,error:o};if(!yb(o)){const l=await wr(this.storage,this.storageKey);!!(l!=null&&l.expires_at&&l.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:i,expiresAt:Date.now()+mI},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){if(this._pendingInitNotifications!==null&&n){this._pendingInitNotifications.push({event:t,session:r,broadcast:n});return}const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,r)}catch(c){o.push(c)}});if(await Promise.all(i),o.length>0){for(let l=0;l<o.length;l+=1)console.error(o[l]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await We(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Va(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=Nb(s);await Va(this.storage,this.storageKey,o)}else{const s=Nb(r);await Va(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await We(this.storage,this.storageKey),await We(this.storage,this.storageKey+"-code-verifier"),await We(this.storage,this.storageKey+"-user"),this.userStorage&&await We(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&mt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),vn);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/vn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${vn}ms, refresh threshold is ${Pi} ticks`),s<=Pi&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof e$)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/vn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${vn}ms, refresh threshold is ${Pi} ticks`),s<=Pi&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!mt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
610{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,i]=await Vs(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(l.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?this._returnResult({data:null,error:o}):await J(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)return this._returnResult({data:null,error:i});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:d}=await J(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});return d?this._returnResult({data:null,error:d}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:o,error:i}=n;if(i)return this._returnResult({data:null,error:i});const l=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Ab(t.webauthn.credential_response):Ob(t.webauthn.credential_response)})}:{code:t.code}),{data:c,error:d}=await J(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:l,headers:this.headers,jwt:(s=o==null?void 0:o.session)===null||s===void 0?void 0:s.access_token});return d?this._returnResult({data:null,error:d}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+c.expires_in},c)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",c),this._returnResult({data:c,error:d}))})}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:o,error:i}=n;if(i)return this._returnResult({data:null,error:i});const l=await J(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(s=o==null?void 0:o.session)===null||s===void 0?void 0:s.access_token});if(l.error)return l;const{data:c}=l;if(c.type!=="webauthn")return{data:c,error:null};switch(c.webauthn.type){case"create":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:Pb(c.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:Tb(c.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,o;if(t)try{const{payload:f}=Rc(t);let y=null;f.aal&&(y=f.aal);let g=y;const{data:{user:w},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((n=(r=w==null?void 0:w.factors)===null||r===void 0?void 0:r.filter(j=>j.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(g="aal2");const b=f.amr||[];return{data:{currentLevel:y,nextLevel:g,currentAuthenticationMethods:b},error:null}}catch(f){if(q(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:i},error:l}
610=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Rc(i.access_token);let d=null;c.aal&&(d=c.aal);let u=d;((o=(s=i.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(u="aal2");const p=c.amr||[];return{data:{currentLevel:d,nextLevel:u,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await J(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new nt})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new nt});const i=await J(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return i.data&&i.data.redirect_url&&mt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new nt});const i=await J(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return i.data&&i.data.redirect_url&&mt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await J(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new nt})})}catch(t){if(q(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await J(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new nt})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(l=>l.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(l=>l.kid===t),n&&this.jwks_cached_at+bI>s)return n;const{data:o,error:i}=await J(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,n=o.keys.find(l=>l.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:f,error:y}
610=await this.getSession();if(y||!f.session)return this._returnResult({data:null,error:y});n=f.session.access_token}const{header:s,payload:o,signature:i,raw:{header:l,payload:c}}=Rc(n);if(!(r!=null&&r.allowExpired))try{qI(o.exp)}catch(f){throw new Bd(f instanceof Error?f.message:"JWT validation failed")}const d=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!d){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:o,header:s,signature:i},error:null}}const u=VI(s.alg),h=await crypto.subtle.importKey("jwk",d,u,!0,["verify"]);if(!await crypto.subtle.verify(u,h,i,PI(`${l}.${c}`)))throw new Bd("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(t){var r,n,s;jr(this.experimental);try{if(!Hd())return this._returnResult({data:null,error:new Ar("Browser does not support WebAuthn",null)});const{data:o,error:i}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}});if(i||!o)return this._returnResult({data:null,error:i});const l=Tb(o.options),c=(s=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:Yp.createNewAbortSignal(),{data:d,error:u}=await T_({publicKey:l,signal:c});if(u||!d)return this._returnResult({data:null,error:u??new Ar("WebAuthn ceremony failed",null)});const h=Ob(d);return this._verifyPasskeyAuthentication({challengeId:o.challenge_id,credential:h})}catch(o){if(q(o))return this._returnResult({data:null,error:o});throw o}}async registerPasskey(t){var r,n;jr(this.experimental);try{if(!Hd())return this._returnResult({data:null,error:new Ar("Browser does not support WebAuthn",null)});const{data:s,error:o}=await this._startPasskeyRegistration();if(o||!s)return this._returnResult({data:null,error:o});const i=Pb(s.options),l=(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:Yp.createNewAbortSignal(),{data:c,error:d}=await P_({publicKey:i,signal:l});if(d||!c)return this._returnResult({data:null,error:d??new Ar("WebAuthn ceremony failed",null)});const u=Ab(c);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if(q(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){jr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new nt});const{data:s,error:o}=await J(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:s,error:null})})}catch(t){if(q(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){jr(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new nt});const{data:o,error:i}=await J(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:o,error:null})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;jr(this.experimental);try{const{data:n,error:s}=await J(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(t){jr(this.experimental);try{const{data:r,error:n}=await J(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:rr});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){jr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new nt});const{data:s,error:o}=await J(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})});return o?this._returnResult({data:null,error:o}):this._returnResult({data:s,error:null})})}catch(t){if(q(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){jr(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new nt});const{data:o,error:i}=await J(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:t.friendlyName}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:o,error:null})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){jr(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new nt});const{error:o}
610=await J(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return o?this._returnResult({data:null,error:o}):this._returnResult({data:null,error:null})})}catch(r){if(q(r))return this._returnResult({data:null,error:r});throw r}}}kl.nextInstanceID={};const p$=kl,m$="2.110.1";let Ti="",Kd;if(typeof Deno<"u"){var nf;Ti="deno",Kd=(nf=Deno.version)===null||nf===void 0?void 0:nf.deno}else if(typeof document<"u")Ti="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Ti="react-native";else{var sf;Ti="node",Kd=typeof process<"u"?(sf=process.version)===null||sf===void 0?void 0:sf.replace(/^v/,""):void 0}const A_=[`runtime=${Ti}`];Kd&&A_.push(`runtime-version=${Kd}`);const g$={"X-Client-Info":`supabase-js/${m$}; ${A_.join("; ")}`},v$={headers:g$},x$={schema:"public"},y$={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},b$={},w$={enabled:!1,respectSamplingDecision:!0};function j$(e,t,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function l(u){try{d(n.next(u))}catch(h){i(h)}}function c(u){try{d(n.throw(u))}catch(h){i(h)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((n=n.apply(e,[])).next())})}let af=null;const k$="@opentelemetry/api";function _$(){return af===null&&(af=import(k$).catch(()=>null)),af}function N$(){return j$(this,void 0,void 0,function*(){try{const e=yield _$();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const r=t.traceparent;return r?{traceparent:r,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function S$(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,n,s,o]=t;if(r.length!==2||n.length!==32||s.length!==16||o.length!==2)return null;const i=/^[0-9a-f]+$/i;return!i.test(r)||!i.test(n)||!i.test(s)||!i.test(o)||n==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:r,traceId:n,parentId:s,traceFlags:o,isSampled:(parseInt(o,16)&1)===1}}function C$(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const n of t)try{if(typeof n=="string"){if(E$(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function E$(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function R$(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function _l(e){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}function P$(e,t){if(_l(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_l(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T$(e){var t=P$(e,"string");return _l(t)=="symbol"?t:t+""}function A$(e,t,r){return(t=T$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lb(Object(r),!0).forEach(function(n){A$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const O$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),L$=()=>Headers,I$=(e,t,r,n,s)=>{const o=O$(n),i=L$(),l=(s==null?void 0:s.enabled)===!0,c=(s==null?void 0:s.respectSamplingDecision)!==!1,d=l?R$(t):null;return async(u,h)=>{var p;const f=(p=await r())!==null&&p!==void 0?p:e;let y=new i(h==null?void 0:h.headers);if(y.has("apikey")||y.set("apikey",e),y.has("Authorization")||y.set("Authorization",`Bearer ${f}`),d){const g=await $$(u,d,c);g&&(g.traceparent&&!y.has("traceparent")&&y.set("traceparent",g.traceparent),g.tracestate&&!y.has("tracestate")&&y.set("tracestate",g.tracestate),g.baggage&&!y.has("baggage")&&y.set("baggage",g.baggage))}return o(u,Ve(Ve({},h),{},{headers:y}))}};async function $$(e,t,r){if(!C$(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const n=await N$();if(!n||!n.traceparent)return null;if(r){const s=S$(n.traceparent);if(s&&!s.isSampled)return null}return n}function Ib(e){return typeof e=="boolean"?{enabled:e}:e}function D$(e){return e.endsWith("/")?e:e+"/"}function M$(e,t){var r,n,s,o,i,l;const{db:c,auth:d,realtime:u,global:h}=e,{db:p,auth:f,realtime:y,global:g}=t,w=Ib(e.tracePropagation),v=Ib(t.tracePropagation),x={db:Ve(Ve({},p),c),auth:Ve(Ve({},f),d),realtime:Ve(Ve({},y),u),storage:{},global:Ve(Ve(Ve({},g),h),{},{headers:Ve(Ve({},(r=g==null?void 0:g.headers)!==null&&r!==void 0?r:{}),(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(s=(o=w==null?void 0:w.enabled)!==null&&o!==void 0?o:v==null?void 0:v.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(i=(l=w==null?void 0:w.respectSamplingDecision)!==null&&l!==void 0?l:v==null?void 0:v.respectSamplingDecision)!==null&&i!==void 0?i:!0},accessToken:async()=>""};return e.accessToken?x.accessToken=e.accessToken:delete x.accessToken,x}function z$(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");
610if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(D$(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var F$=class extends p${constructor(e){super(e)}},U$=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const o=z$(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const i=`sb-${o.hostname.split(".")[0]}-auth-token`,l={db:x$,realtime:b$,auth:Ve(Ve({},y$),{},{storageKey:i}),global:v$,tracePropagation:w$},c=M$(r??{},l);if(this.settings=c,this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(u,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var d;this.auth=this._initSupabaseAuthClient((d=c.auth)!==null&&d!==void 0?d:{},this.headers,c.global.fetch)}this.fetch=I$(t,e,this._getAccessToken.bind(this),c.global.fetch,c.tracePropagation),this.realtime=this._initRealtimeClient(Ve({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new JO(new URL("rest/v1",o).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new pI(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new UO(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:o,flowType:i,lock:l,debug:c,throwOnError:d,experimental:u,lockAcquireTimeout:h,skipAutoInitialize:p},f,y){const g={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new F$({url:this.authUrl.href,headers:Ve(Ve({},g),f),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:i,lock:l,debug:c,throwOnError:d,experimental:u,fetch:y,lockAcquireTimeout:h,skipAutoInitialize:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(w=>w.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new ML(this.realtimeUrl.href,Ve(Ve({},e),{},{params:Ve(Ve({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const B$=(e,t,r)=>new U$(e,t,r);function q$(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=20:!1}q$()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
610ode.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function V$(){var w,v;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(x=>e===x||e.endsWith("."+x)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((w=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:w[1])??((v=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:v[1]):void 0,o=window.parent&&window.parent!==window;if(!s||!o)return localStorage;const i=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),l=i?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,c=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),d=c&&l.test(c)?[c]:i?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",h=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(x,b,j)=>new Promise(k=>{const _=p();let N=!1,C;const R=I=>{N||(N=!0,clearTimeout(C),window.removeEventListener("message",T),k(I))},T=I=>{if(d.indexOf(I.origin)<0)return;const K=I.data;K&&K.type===u&&K.requestId===_&&R(K)};window.addEventListener("message",T);const O={type:x,requestId:_,projectId:s,key:b};j!==void 0&&(O.value=j);for(const I of d)window.parent.postMessage(O,I);C=setTimeout(()=>R(null),h)});let y=!0;const g=250;return{getItem:async x=>{let b=await f("lovable-preview-auth:get",x);return!b&&y&&(await new Promise(j=>setTimeout(j,g)),b=await f("lovable-preview-auth:get",x)),y=!1,b&&b.ok&&typeof b.value=="string"?b.value===""?(localStorage.removeItem(x),null):b.value:localStorage.getItem(x)},setItem:(x,b)=>(localStorage.setItem(x,b),f("lovable-preview-auth:set",x,b).then(j=>{j&&j.ok&&typeof j.value=="string"&&localStorage.getItem(x)===b&&(j.value===""?localStorage.removeItem(x):localStorage.setItem(x,j.value))})),removeItem:x=>(localStorage.removeItem(x),f("lovable-preview-auth:remove",x).then(()=>{}))}}const H$="https://qffuphjftutmnltnmkfj.supabase.co",W$="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InFmZnVwaGpmdHV0bW5sdG5ta2ZqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc0MDA2MjMsImV4cCI6MjA5Mjk3NjYyM30.USy0poSwY9yzZlI4ypCNkogTeUyl6S9ImYOZcfLWT8o",Le=B$(H$,W$,{auth:{storage:V$(),persistSession:!0,autoRefreshToken:!0}}),O_=m.createContext({user:null,session:null,isAdmin:!1,loading:!0,signOut:async()=>{}}),K$=({children:e})=>{const[t,r]=m.useState(null),[n,s]=m.useState(null),[o,i]=m.useState(!1),[l,c]=m.useState(!0);m.useEffect(()=>{const{data:h}=Le.auth.onAuthStateChange((p,f)=>{r(f),s((f==null?void 0:f.user)??null),f!=null&&f.user?setTimeout(()=>d(f.user.id),0):i(!1)});return Le.auth.getSession().then(({data:{session:p}})=>{r(p),s((p==null?void 0:p.user)??null),p!=null&&p.user&&d(p.user.id),c(!1)}),()=>h.subscription.unsubscribe()},[]);const d=async h=>{const{data:p,error:f}=await Le.from("user_roles").select("role").eq("user_id",h).eq("role","admin").maybeSingle();if(f){i(!1);return}i(!!p)},u=async()=>{await Le.auth.signOut(),i(!1)};return a.jsx(O_.Provider,{value:{user:n,session:t,isAdmin:o,loading:l,signOut:u},children:e})},Mu=()=>m.useContext(O_),L_="https://certificadorarecord.com.br",Dt=(e="/")=>`${L_}${e.startsWith("/")?e:`/${e}`}`,G$="https://qffuphjftutmnltnmkfj.supabase.co/storage/v1/object/public/article-covers/brand/og-record-fluvial-1200x630.jpg",Yg=(e,t,r)=>{const n="".trim()||(r??"");return n||(console.warn(`[config] Variável ${e} não configurada â o recurso associado ficará desligado.`),"")},$b=Yg("VITE_GSC_VERIFICATION",void 0,"S4WsyEWBcnXvAVLbdjRpGSLOkCdZGvXYTqPrqexvnNE"),wa=Yg("VITE_META_PIXEL_ID",void 0,"1350854992235565"),of=Yg("VITE_GA4_MEASUREMENT_ID",void 0,"G-6V0HB5WCRV"),Mt=({title:e,description:t,canonical:r,ogType:n="website",ogImage:s,jsonLd:o,noindex:i})=>(m.useEffect(()=>{const l=e.length>120?e.slice(0,117)+"...":e,c=t.length>160?t.slice(0,157)+"...":t;document.title=l;const d=(f,y)=>{let g=document.querySelector(`meta[name="${f}"]`);g||(g=document.createElement("meta"),g.setAttribute("name",f),document.head.appendChild(g)),g.setAttribute("content",y)},u=(f,y)=>{let g=document.querySelector(`meta[property="${f}"]`);g||(g=document.createElement("meta"),g.setAttribute("property",f),document.head.appendChild(g)),g.setAttribute("content",y)};d("description",c),d("robots",i?"noindex, nofollow":"index, follow"),u("og:title",l),u("og:description",c),u("og:type",n),d("twitter:title",l),d("twitter:description",c);const h=s||G$;if(u("og:image",h),d("twitter:image",h),r){let f=document.querySelector('link[rel="canonical"]');f||(f=document.createElement("link"),f.rel="canonical",document.head.appendChild(f)),f.href=r,u("og:url",r)}let p=document.getElementById("ld-json");o?(p||(p=document.createElement("script"),p.type="application/ld+json",p.id="ld-json",document.head.appendChild(p)),p.text=JSON.stringify(o)):p&&p.remove()},[e,t,r,n,s,o,i]),null),I_=()=>a.jsx(Mt,{title:"Painel administrativo | Record",description:"Ãrea restrita da Record Certificação Naval.",canonical:Dt(window.location.pathname),noindex:!0}),lf=({children:e})=>{const{user:t,isAdmin:r,loading:n}=Mu(),s=yt();return n?a.jsx("div",{className:"min-h-screen flex items-center justify-center",children:a.jsx(_t,{className:"h-6 w-6 animate-spin text-primary"})}):t?r?a.jsxs(a.Fragment,{children:[a.jsx(I_,{}),e]}):a.jsx("div",{className:"min-h-screen flex items-center justify-center p-6",children:a.jsxs("div",{className:"max-w-md text-center",children:[a.jsx("h1",{className:"font-display text-2xl font-bold text-ink mb-3",children:"Acesso restrito"}),a.jsxs("p",{className:"text-muted-foreground",children:["Sua conta não tem permissão de administrador. Peça ao gestor para liberar o papel ",a.jsx("strong",{children:"admin"})," para o seu email."]})]})}):a.jsx(dT,{to:"/admin/login",state:{from:s},replace:!0})},Db="app.certificadorarecord.com.br",Z$=()=>(m.useEffect(()=>{const e=window.location;if(e.hostname===Db)return;const t=new URL(e.href);t.hostname=Db,window.location.replace(t.toString())},[]),a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-6 text-center",children:a.jsx("p",{className:"text-muted-foreground",children:"Redirecionando para o sistema de certificados..."})})),Mb="app.certificadorarecord.com.br",Pc=()=>(m.useEffect(()=>{const e=window.location;if(e.hostname===Mb)return;const t=new URL(e.href);t.hostname=Mb,window.location.replace(t.toString())},[]),a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-6 text-center",children:a.jsx("p",{className:"text-muted-foreground",children:"Redirecionando para o sistema..."})}));let zb=!1;function J$(){var e;zb||typeof window>"u"||wa&&(function(t,r,n,s){if(t.fbq)return;const o=t.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)};t._fbq||(t._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[];const i=r.createElement(n);i.async=!0,i.src=s;const l=r.getElementsByTagName(n)[0];l.parentNode.insertBefore(i,l)}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js"),(e=window.fbq)==null||e.call(window,"init",wa),zb=!0)}function zu(e,t,r){if(!(typeof window>"u")){if(!window.fbq){wa&&console.warn("[meta-pixel] fbq indisponÃvel â evento ignorado:",e);return}r?window.fbq("track",e,t??{},{eventID:r}):window.fbq("track",e,t??{})}}let Fb=!1;function Q$(){if(Fb||typeof window>"u"||!of)return;const e=document.createElement("script");
610e.async=!0,e.src=`https://www.googletagmanager.com/gtag/js?id=${of}`,document.head.appendChild(e),window.dataLayer=window.dataLayer||[];function t(){window.dataLayer.push(arguments)}window.gtag=t,window.gtag("js",new Date),window.gtag("config",of,{send_page_view:!1}),Fb=!0}const Y$=["source","medium","campaign","campaign_id","term","content","utm_source","utm_medium","utm_campaign","utm_term","utm_content"];function X$(e){if(!e)return{};const t={};for(const[r,n]of Object.entries(e))Y$.includes(r)||(t[r]=n);return t}function _s(e,t){typeof window>"u"||!window.gtag||window.gtag("event",e,X$(t))}function eD(e){_s("page_view",{page_path:e,page_location:window.location.href,page_title:document.title}),zu("PageView")}function tD(e,t){const{item_type:r,item_destino:n,...s}={},o={item_label:e,item_type:r??"cta",item_destino:n??"#cta-final",...s};zu("DiagnosticoCTAClick",{content_name:e,...s}),_s("cta_click",o),_s("cta_diagnostico_click",o)}function Xg(e,t){zu("WhatsAppClick",{content_name:e,...t}),_s("cta_click",{item_label:e,item_type:"whatsapp",item_destino:"whatsapp",...t}),_s("whatsapp_click",{item_label:e,...t})}function rD(e,t){const r={percent:e,item_label:"video-diagnostico",...t};_s("video_progress",r),typeof window<"u"&&window.fbq&&window.fbq("trackCustom","VideoProgress",r)}function nD(e){const{eventId:t,email:r,phone:n,params:s}=e;typeof window<"u"&&window.fbq&&wa&&window.fbq("init",wa,{em:r.trim().toLowerCase(),ph:n.replace(/\D/g,"")}),zu("Lead",{content_name:"diagnostico-de-frota",...s},t),_s("generate_lead",{item_label:"diagnostico-de-frota",event_id:t,...s})}function Hs(e,t,r){const n={item_label:e,item_type:t,item_destino:r};_s("links_click",n),typeof window<"u"&&window.fbq&&window.fbq("trackCustom","LinksClick",n)}const sD=()=>{const e=yt();return m.useEffect(()=>{if(J$(),Q$(),$b&&!document.querySelector('meta[name="google-site-verification"]')){const t=document.createElement("meta");t.name="google-site-verification",t.content=$b,document.head.appendChild(t)}},[]),m.useEffect(()=>{let t=0;const r=requestAnimationFrame(()=>{t=requestAnimationFrame(()=>{eD(e.pathname+e.search)})});return()=>{cancelAnimationFrame(r),t&&cancelAnimationFrame(t)}},[e.pathname,e.search]),wa?a.jsx("noscript",{children:a.jsx("img",{height:"1",width:"1",style:{display:"none"},alt:"",src:`https://www.facebook.com/tr?id=${wa}&ev=PageView&noscript=1`})}):null},Hl="/assets/record-logo-DIpA9F0h.png",ev=Cg("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 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 hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),V=m.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?A4:"button";return a.jsx(i,{className:ue(ev({variant:t,size:r,className:e})),ref:o,...s})});V.displayName="Button";const Ub=[{label:"Método RCP",href:"#metodo"},{label:"ConnectRecord",href:"#connect"},{label:"Serviços",href:"#servicos"},{label:"Conteúdo técnico",href:"/conteudo-tecnico"},{label:"Escritórios",href:"#escritorios"},{label:"Verificar documentos",href:"/index_autenticidade_manual"},{label:"Contato",href:"#cta-final"}],aD=["/politica-da-qualidade","/politica-de-privacidade","/trabalhe-conosco","/ouvidoria","/termos-de-uso","/index_autenticidade_manual"],As=()=>{const[e,t]=m.useState(!1),[r,n]=m.useState(!1),s=yt(),o=aD.some(c=>s.pathname.startsWith(c)),i=s.pathname.startsWith("/politica-da-qualidade");m.useEffect(()=>{const c=()=>t(window.scrollY>20);return window.addEventListener("scroll",c),()=>window.removeEventListener("scroll",c)},[]);const l=e||o;return a.jsxs("header",{className:`fixed inset-x-0 top-0 z-50 transition-all duration-300 ${l?"bg-background/90 backdrop-blur-md border-b border-border shadow-sm":"bg-transparent"}`,children:[a.jsxs("div",{className:"container-record flex h-20 items-center justify-between",children:[a.jsx("a",{href:o?"/":"#",className:"flex items-center gap-3",children:a.jsx("img",{src:Hl,alt:"Record Certificação Naval",className:"h-12 w-auto"})}),a.jsx("nav",{className:"hidden lg:flex items-center gap-8",children:Ub.map(c=>{const d=o&&c.href.startsWith("#")?`/${c.href}`:c.href;return a.jsx("a",{href:d,className:`text-sm font-medium transition-colors hover:text-primary ${l?"text-ink-soft":"text-white/90 hover:text-accent"}`,children:c.label},c.href)})}),a.jsxs("div",{className:"hidden lg:flex items-center gap-3",children:[a.jsx(V,{asChild:!0,size:"sm",variant:"outline",className:`h-10 px-4 font-semibold transition-all ${l?"border-border text-ink-soft hover:text-primary hover:border-primary":"border-white/40 bg-white/10 text-white hover:bg-white/20 hover:text-white backdrop-blur-sm"}`,children:a.jsxs("a",{href:"https://app.certificadorarecord.com.br/login",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2",children:[a.jsx(Fy,{className:"h-4 w-4"}),"Acessar sistema"]})}),i&&a.jsx(V,{asChild:!0,size:"sm",className:"relative bg-gradient-to-r from-primary to-primary-deep hover:from-primary-deep hover:to-primary text-primary-foreground font-semibold shadow-red ring-2 ring-primary/30 hover:ring-accent/50 hover:scale-[1.03] transition-all h-10 px-5",children:a.jsxs("a",{href:"/__l5e/assets-v1/2315d6cc-36b2-4b31-a562-ac90805e40e8/certificado-qualidade.pdf",target:"_blank",rel:"noopener",className:"inline-flex items-center gap-2",children:[a.jsx(Pn,{className:"h-4 w-4"}),"Baixar certificado"]}
610)})]}),a.jsx("button",{className:`lg:hidden p-2 transition-colors ${l?"text-ink":"text-white"}`,onClick:()=>n(!r),"aria-label":"Menu",children:r?a.jsx(Qo,{className:"h-6 w-6"}):a.jsx(jk,{className:"h-6 w-6"})})]}),r&&a.jsx("div",{className:"lg:hidden bg-background border-t border-border",children:a.jsxs("nav",{className:"container-record py-6 flex flex-col gap-4",children:[Ub.map(c=>{const d=o&&c.href.startsWith("#")?`/${c.href}`:c.href;return a.jsx("a",{href:d,onClick:()=>n(!1),className:"text-base font-medium text-ink-soft hover:text-primary py-2",children:c.label},c.href)}),a.jsx(V,{asChild:!0,variant:"outline",className:"mt-2 font-semibold",children:a.jsxs("a",{href:"https://app.certificadorarecord.com.br/login",target:"_blank",rel:"noopener noreferrer",onClick:()=>n(!1),className:"inline-flex items-center gap-2",children:[a.jsx(Fy,{className:"h-4 w-4"}),"Acessar sistema (cliente / colaborador)"]})}),a.jsx(V,{asChild:!0,className:"bg-gradient-to-r from-primary to-primary-deep hover:from-primary-deep hover:to-primary text-primary-foreground font-semibold shadow-red ring-2 ring-primary/30",children:i?a.jsxs("a",{href:"/__l5e/assets-v1/2315d6cc-36b2-4b31-a562-ac90805e40e8/certificado-qualidade.pdf",target:"_blank",rel:"noopener",className:"inline-flex items-center gap-2",children:[a.jsx(Pn,{className:"h-4 w-4"}),"Baixar certificado"]}):o?a.jsxs("a",{href:"/",className:"inline-flex items-center gap-2",children:[a.jsx(Ln,{className:"h-4 w-4"}),"Voltar para página inicial"]}):a.jsxs("a",{href:"#cta-final",className:"inline-flex items-center gap-2",children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-accent animate-pulse"}),"Solicitar diagnóstico"]})})]})})]})};var cf="focusScope.autoFocusOnMount",df="focusScope.autoFocusOnUnmount",Bb={bubbles:!1,cancelable:!0},oD="FocusScope",Fu=m.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[l,c]=m.useState(null),d=Qt(s),u=Qt(o),h=m.useRef(null),p=de(t,c),f=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let g=function(b){if(f.paused||!l)return;const j=b.target;l.contains(j)?h.current=j:Kn(h.current,{select:!0})},w=function(b){if(f.paused||!l)return;const j=b.relatedTarget;j!==null&&(l.contains(j)||Kn(h.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const k of b)k.removedNodes.length>0&&Kn(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const x=new MutationObserver(v);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),x.disconnect()}}},[n,l,f.paused]),m.useEffect(()=>{if(l){Vb.add(f);const g=document.activeElement;if(!l.contains(g)){const v=new CustomEvent(cf,Bb);l.addEventListener(cf,d),l.dispatchEvent(v),v.defaultPrevented||(iD(hD($_(l)),{select:!0}),document.activeElement===g&&Kn(l))}return()=>{l.removeEventListener(cf,d),setTimeout(()=>{const v=new CustomEvent(df,Bb);l.addEventListener(df,u),l.dispatchEvent(v),v.defaultPrevented||Kn(g??document.body,{select:!0}),l.removeEventListener(df,u),Vb.remove(f)},0)}}},[l,d,u,f]);const y=m.useCallback(g=>{if(!r&&!n||f.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(w&&v){const x=g.currentTarget,[b,j]=lD(x);b&&j?!g.shiftKey&&v===j?(g.preventDefault(),r&&Kn(b,{select:!0})):g.shiftKey&&v===b&&(g.preventDefault(),r&&Kn(j,{select:!0})):v===x&&g.preventDefault()}},[r,n,f.paused]);return a.jsx(oe.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Fu.displayName=oD;function iD(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Kn(n,{select:t}),document.activeElement!==r)return}function lD(e){const t=$_(e),r=qb(t,e),n=qb(t.reverse(),e);return[r,n]}function $_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function qb(e,t){const r=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const n of e)if(!(r?!n.checkVisibility({checkVisibilityCSS:!0}):cD(n,{upTo:t})))return n}function cD(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 dD(e){return e instanceof HTMLInputElement&&"select"in e}function Kn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&dD(e)&&t&&e.select()}}var Vb=uD();function uD(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Hb(e,t),e.unshift(t)},remove(t){var r;e=Hb(e,t),(r=e[0])==null||r.resume()}}}function Hb(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hD(e){return e.filter(t=>t.tagName!=="A")}var Tc=0,Vr=null;function tv(){m.useEffect(()=>{Vr||(Vr={start:Wb(),end:Wb()});const{start:e,end:t}=Vr;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Tc++,()=>{Tc===1&&(Vr==null||Vr.start.remove(),Vr==null||Vr.end.remove(),Vr=null),Tc=Math.max(0,Tc-1)}},[])}function Wb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 2,335 bytes, line 610
610style.position="fixed",e.style.pointerEvents="none",e}var ad="right-scroll-bar-position",od="width-before-scroll-bar",fD="with-scroll-bars-hidden",pD="--removed-body-scroll-bar-size";function uf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mD(e,t){var r=m.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var gD=typeof window<"u"?m.useLayoutEffect:m.useEffect,Kb=new WeakMap;function vD(e,t){var r=mD(null,function(n){return e.forEach(function(s){return uf(s,n)})});return gD(function(){var n=Kb.get(r);if(n){var s=new Set(n),o=new Set(e),i=r.current;s.forEach(function(l){o.has(l)||uf(l,null)}),o.forEach(function(l){s.has(l)||uf(l,i)})}Kb.set(r,e)},[e]),r}function xD(e){return e}function yD(e,t){t===void 0&&(t=xD);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var i=t(o,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(o){for(n=!0;r.length;){var i=r;r=[],i.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(o),i=r}var c=function(){var u=i;i=[],u.forEach(o)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(u){i.push(u),d()},filter:function(u){return i=i.filter(u),r}}}};return s}function bD(e){e===void 0&&(e={});var t=yD(null);return t.options=Xr({async:!0,ssr:!1},e),t}var D_=function(e){var t=e.sideCar,r=ri(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return m.createElement(n,Xr({},r))};D_.isSideCarExport=!0;function wD(e,t){return e.useMedium(t),D_}var M_=bD(),hf=function(){},Uu=m.forwardRef(function(e,t){var r=m.useRef(null),n=m.useState({onScrollCapture:hf,onWheelCapture:hf,onTouchMoveCapture:hf}),s=n[0],o=n[1],i=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,h=e.shards,p=e.sideCar,f=e.noRelative,y=e.noIsolation,g=e.inert,w=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,b=e.ga
vendor: 8,917 bytes, lines 610-650
610pMode,j=ri(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,_=vD([r,t]),N=Xr(Xr({},j),s);return m.createElement(m.Fragment,null,u&&m.createElement(k,{sideCar:M_,removeScrollBar:d,shards:h,noRelative:f,noIsolation:y,inert:g,setCallbacks:o,allowPinchZoom:!!w,lockRef:r,gapMode:b}),i?m.cloneElement(m.Children.only(l),Xr(Xr({},N),{ref:_})):m.createElement(x,Xr({},N,{className:c,ref:_}),l))});Uu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Uu.classNames={fullWidth:od,zeroRight:ad};var jD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jD();return t&&e.setAttribute("nonce",t),e}function _D(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ND(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var SD=function(){var e=0,t=null;return{add:function(r){e==0&&(t=kD())&&(_D(t,r),ND(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},CD=function(){var e=SD();return function(t,r){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},z_=function(){var e=CD(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},ED={left:0,top:0,right:0,gap:0},ff=function(e){return parseInt(e||"",10)||0},RD=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[ff(r),ff(n),ff(s)]},PD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ED;var t=RD(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},TD=z_(),mo="data-scroll-locked",AD=function(e,t,r,n){var s=e.left,o=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),` 611 .`.concat(fD,` { 612 overflow: hidden `).concat(n,`; 613 padding-right: `).concat(l,"px ").concat(n,`; 614 } 615 body[`).concat(mo,`] { 616 overflow: hidden `).concat(n,`; 617 overscroll-behavior: contain; 618 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 619 padding-left: `.concat(s,`px; 620 padding-top: `).concat(o,`px; 621 padding-right: `).concat(i,`px; 622 margin-left:0; 623 margin-top:0; 624 margin-right: `).concat(l,"px ").concat(n,`; 625 `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),` 626 } 627 628 .`).concat(ad,` { 629 right: `).concat(l,"px ").concat(n,`; 630 } 631 632 .`).concat(od,` { 633 margin-right: `).concat(l,"px ").concat(n,`; 634 } 635 636 .`).concat(ad," .").concat(ad,` { 637 right: 0 `).concat(n,`; 638 } 639 640 .`).concat(od," .").concat(od,` { 641 margin-right: 0 `).concat(n,`; 642 } 643 644 body[`).concat(mo,`] { 645 `).concat(pD,": ").concat(l,`px; 646 } 647`)},Gb=function(){var e=parseInt(document.body.getAttribute(mo)||"0",10);return isFinite(e)?e:0},OD=function(){m.useEffect(function(){return document.body.setAttribute(mo,(Gb()+1).toString()),function(){var e=Gb()-1;e<=0?document.body.removeAttribute(mo):document.body.setAttribute(mo,e.toString())}},[])},LD=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;OD();var o=m.useMemo(function(){return PD(s)},[s]);return m.createElement(TD,{styles:AD(o,!t,s,r?"":"!important")})},Xp=!1;if(typeof window<"u")try{var Ac=Object.defineProperty({},"passive",{get:function(){return Xp=!0,!0}});window.addEventListener("test",Ac,Ac),window.removeEventListener("test",Ac,Ac)}catch{Xp=!1}var za=Xp?{passive:!1}:!1,ID=function(e){return e.tagName==="TEXTAREA"},F_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ID(e)&&r[t]==="visible")},$D=function(e){return F_(e,"overflowY")},DD=function(e){return F_(e,"overflowX")},Zb=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=U_(e,n);if(s){var o=B_(e,n),i=o[1],l=o[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},MD=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},zD=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},U_=function(e,t){return e==="v"?$D(t):DD(t)},B_=function(e,t){return e==="v"?MD(t):zD(t)},FD=function(e,t){return e==="h"&&t==="rtl"?-1:1},UD=function(e,t,r,n,s){var o=FD(e,window.getComputedStyle(t).direction),i=o*n,l=r.target,c=t.contains(l),d=!1,u=i>0,h=0,p=0;do{if(!l)break;var f=B_(e,l),y=f[0],g=f[1],w=f[2],v=g-w-o*y;(y||v)&&U_(e,l)&&(h+=v,p+=y);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(u&&Math.abs(h)<1||!u&&Math.abs(p)<1)&&(d=!0),d},Oc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Jb=function(e){return[e.deltaX,e.deltaY]},Qb=function(e){return e&&"current"in e?e.current:e},BD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qD=function(e){return` 648 .block-interactivity-`.concat(e,` {pointer-events: none;} 649 .allow-interactivity-`).concat(e,` {pointer-events: all;} 650`)},VD=0,Fa=[];function HD(e){var t=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(VD++)[0],o=m.useState(z_)[0],i=m.useRef(e);m.useEffect(function(){i.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=MO([e.lockRef.current],(e.shards||[]).map(Qb),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=m.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var v=Oc(g),x=r.current,b="deltaX"in g?g.deltaX:x[0]-v[0],j="deltaY"in g?g.deltaY:x[1]-v[1],k,_=g.target,N=Math.abs(b)>Math.abs(j)?"h":"v";if("touches"in g&&N==="h"&&_.type==="range")return!1;var C=window.getSelection(),R=C&&C.anchorNode,T=R?R===_||R.contains(_):!1;if(T)return!1;var O=Zb(N,_);if(!O)return!0;if(O?k=N:(k=N==="v"?"h":"v",O=Zb(N,_)),!O)return!1;if(!n.current&&"changedTouches"in g&&(b||j)&&(n.current=k),!k)return!0;var I=n.current||k;return UD(I,w,g,I==="h"?b:j)},[]),c=m.useCallback(function(g){var w=g;if(!(!Fa.length||Fa[Fa.length-1]!==o)){var v="deltaY"in w?Jb(w):Oc(w),x=t.current.filter(function(k){return k.name===w.type&&(k.target===w.target||w.target===k.shadowParent)&&BD(k.delta,v)})[0];if(x&&x.should){w.cancelable&&w.preventDefault();return}if(!x){var b=(i.current.shards||[]).map(Qb).filter(Boolean).filter(function(k){return k.contains(w.target)}),j=b.length>0?l(w,b[0]):!i.current.noIsolation;j&&w.cancelable&&w.preventDefault()}}},[]),d=m.useCallback(function(g,w,v,x){var b={name:g,delta:w,target:v,should:x,shadowParent:WD(v)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(j){return j!==b})},1)},[]),u=m.useCallback(function(g){r.current=Oc(g),n.current=void 0},[]),h=m.useCallback(function(g){d(g.type,Jb(g),g.target,l(g,e.lockRef.current))},[]),p=m.useCallback(function(g){d(g.type,Oc(g),g.target,l(g,e.lockRef.current))},[]);m.useEffect(function(){return Fa.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,za),document.addEventListener("touchmove",c,za),document.addEventListener("touchstart",u,za),function(){Fa=Fa.filter(function(g){return g!==o}),document.removeEventListener("wheel",c,za),document.removeEventListener("touchmove",c,za),document.removeEventListener("touchstart",u,za)}},[]);var f=e.removeScrollBar,y=e.inert;return m.createElement(m.Fragment,null,y?m.createElement(o,{styles:qD(s)}):null,f?m.createElement(LD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function WD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const KD=wD(M_,HD);var Bu=m.forwardRef(function(e,t){return m.createElement(Uu,Xr({},e,{ref:t,sideCar:KD}))});Bu.classNames=Uu.classNames;var GD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ua=new WeakMap,Lc=new WeakMap,Ic={},pf=0,q_=function(e){return e&&(e.host||q_(e.parentNode))},ZD=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=q_(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},JD=function(e,t,r,n){var s=ZD(t,Array.isArray(e)?e:[e]);Ic[r]||(Ic[r]=new WeakMap);var o=Ic[r],i=[],l=new Set,c=new Set(s),d=function(h){!h||l.has(h
vendor: 5,911 bytes, line 650
650)||(l.add(h),d(h.parentNode))};s.forEach(d);var u=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(p){if(l.has(p))u(p);else try{var f=p.getAttribute(n),y=f!==null&&f!=="false",g=(Ua.get(p)||0)+1,w=(o.get(p)||0)+1;Ua.set(p,g),o.set(p,w),i.push(p),g===1&&y&&Lc.set(p,!0),w===1&&p.setAttribute(r,"true"),y||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return u(t),l.clear(),pf++,function(){i.forEach(function(h){var p=Ua.get(h)-1,f=o.get(h)-1;Ua.set(h,p),o.set(h,f),p||(Lc.has(h)||h.removeAttribute(n),Lc.delete(h)),f||h.removeAttribute(r)}),pf--,pf||(Ua=new WeakMap,Ua=new WeakMap,Lc=new WeakMap,Ic={})}},rv=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=GD(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),JD(n,s,r,"aria-hidden")):function(){return null}},qu="Dialog",[V_,H_]=fr(qu),[QD,Ur]=V_(qu),nv=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,l=m.useRef(null),c=m.useRef(null),[d,u]=an({prop:n,defaultProp:s??!1,onChange:o,caller:qu});return a.jsx(QD,{scope:t,triggerRef:l,contentRef:c,contentId:_n(),titleId:_n(),descriptionId:_n(),open:d,onOpenChange:u,onOpenToggle:m.useCallback(()=>u(h=>!h),[u]),modal:i,children:r})};nv.displayName=qu;var W_="DialogTrigger",K_=m.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ur(W_,r),o=de(t,s.triggerRef);return a.jsx(oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":ov(s.open),...n,ref:o,onClick:te(e.onClick,s.onOpenToggle)})});K_.displayName=W_;var sv="DialogPortal",[YD,G_]=V_(sv,{forceMount:void 0}),av=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=Ur(sv,t);return a.jsx(YD,{scope:t,forceMount:r,children:m.Children.map(n,i=>a.jsx(on,{present:r||o.open,children:a.jsx(Fl,{asChild:!0,container:s,children:i})}))})};av.displayName=sv;var Gd="DialogOverlay",Vu=m.forwardRef((e,t)=>{const r=G_(Gd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Ur(Gd,e.__scopeDialog);return o.modal?a.jsx(on,{present:n||o.open,children:a.jsx(e6,{...s,ref:t})}):null});Vu.displayName=Gd;var XD=xa("DialogOverlay.RemoveScroll"),e6=m.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ur(Gd,r),o=K4(),i=de(t,o);return a.jsx(Bu,{as:XD,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(oe.div,{"data-state":ov(s.open),...n,ref:i,style:{pointerEvents:"auto",...n.style}})})}),Uo="DialogContent",Hu=m.forwardRef((e,t)=>{const r=G_(Uo,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Ur(Uo,e.__scopeDialog);return a.jsx(on,{present:n||o.open,children:o.modal?a.jsx(t6,{...s,ref:t}):a.jsx(r6,{...s,ref:t})})});Hu.displayName=Uo;var t6=m.forwardRef((e,t)=>{const r=Ur(Uo,e.__scopeDialog),n=m.useRef(null),s=de(t,r.contentRef,n);return m.useEffect(()=>{const o=n.current;if(o)return rv(o)},[]),a.jsx(Z_,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:te(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&o.preventDefault()}),onFocusOutside:te(e.onFocusOutside,o=>o.preventDefault())})}),r6=m.forwardRef((e,t)=>{const r=Ur(Uo,e.__scopeDialog),n=m.useRef(!1),s=m.useRef(!1);return a.jsx(Z_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Z_=m.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,l=Ur(Uo,r);return tv(),a.jsx(a.Fragment,{children:a.jsx(Fu,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:a.jsx(Zo,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ov(l.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})}),J_="DialogTitle",Wu=m.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ur(J_,r);return a.jsx(oe.h2,{id:s.titleId,...n,ref:t})});Wu.displayName=J_;var Q_="DialogDescription",Ku=m.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ur(Q_,r);return a.jsx(oe.p,{id:s.descriptionId,...n,ref:t})});Ku.displayName=Q_;var Y_="DialogClose",Gu=m.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ur(Y_,r);return a.jsx(oe.button,{type:"button",...n,ref:t,onClick:te(e.onClick,()=>s.onOpenChange(!1))})});Gu.displayName=Y_;function ov(e){return e?"open":"closed"}const X_=nv,n6=av,e2=m.forwardRef(({className:e,...t},r)=>a.jsx(Vu,{ref:r,className:ue("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}));e2.displayName=Vu.displayName;const iv=m.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(n6,{children:[a.jsx(e2,{}),a.jsxs(Hu,{ref:n,className:ue("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
650nded-lg",e),...r,children:[t,a.jsxs(Gu,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[a.jsx(Qo,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));iv.displayName=Hu.displayName;const lv=({className:e,...t})=>a.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});lv.displayName="DialogHeader";const cv=m.forwardRef(({className:e,...t},r)=>a.jsx(Wu,{ref:r,className:ue("text-lg font-semibold leading-none tracking-tight",e),...t}));cv.displayName=Wu.displayName;const t2=m.forwardRef(({className:e,...t},r)=>a.jsx(Ku,{ref:r,className:ue("text-sm text-muted-foreground",e),...t}));t2.displayName=Ku.displayName;const go=[{id:"manaus",praca:"Manaus",estado:"AM",regiao:"Norte",whatsapp:"5592993741019"},{id:"belem",praca:"Belém",estado:"PA",regiao:"Norte",whatsapp:"5591984095966"},{id:"santarem",praca:"Santarém",estado:"PA",regiao:"Norte",whatsapp:"5593984052152"},{id:"macapa",praca:"Macapá",estado:"AP",regiao:"Norte",whatsapp:"5592993741019"},{id:"porto-velho",praca:"Porto Velho",estado:"RO",regiao:"Norte",whatsapp:"5593984052152"},{id:"salvador",praca:"Salvador",estado:"BA",regiao:"Nordeste",whatsapp:"5514998612661"},{id:"sao-paulo",praca:"São Paulo",estado:"SP",regiao:"Sudeste",whatsapp:"5514997102033",padrao:!0},{id:"rio-de-janeiro",praca:"Rio de Janeiro",estado:"RJ",regiao:"Sudeste",whatsapp:"5514998612661"},{id:"itajai",praca:"ItajaÃ",estado:"SC",regiao:"Sul",whatsapp:"5514997102033"},{id:"porto-alegre",praca:"Porto Alegre",estado:"RS",regiao:"Sul",whatsapp:"5514997102033"}],s6=["Norte","Nordeste","Sudeste","Sul"],a6=go.find(e=>e.padrao)??go[go.length-1],r2=e=>go.find(t=>t.id===e),o6=e=>go.filter(t=>t.regiao===e);function i6(e={tipo:"site"},t){const r=t?`Sou de ${t} e `:"";switch(e.tipo){case"artigo":return`Olá! ${r}vim pelo artigo "${e.titulo}" no site da Record.`;case"unidade":return`Olá! ${r}vim pela página da unidade ${e.praca}.`;case"checklist":return`Olá! ${r}baixei o checklist de pré-vistoria no site da Record e gostaria de falar sobre certificação.`;case"vaga":return`Olá! ${r}vim pela página da vaga ${e.titulo} no site da Record.`;case"diagnostico":return`Olá! ${r}vim pela página de diagnóstico de frota da Record. Quero falar sobre os vencimentos das minhas embarcações.`;case"site":default:return`Olá! ${r}vim pelo site da Record. Quero falar sobre os vencimentos das minhas embarcações.`}}function dv(e,t){return`https://wa.me/${e.whatsapp}?text=${encodeURIComponent(i6(t,e.praca))}`}const uv="record:unidade";function l6(e){try{localStorage.setItem(uv,e)}catch{}}function n2(){try{return r2(localStorage.getItem(uv))}catch{return}}function c6(){try{localStorage.removeItem(uv)}catch{}}const s2=({origem:e,source:t,onPicked:r})=>{const[n,s]=m.useState(!1),o=(i,l=!1)=>{n&&l6(i.id),Xg(t,{unidade:i.id,praca:i.praca,estado:i.estado,regiao:i.regiao,page_path:typeof window<"u"?window.location.pathname:void 0,fallback:l}),window.open(dv(i,e),"_blank","noopener,noreferrer"),r==null||r()};return a.jsxs("div",{children:[a.jsx("div",{className:"space-y-5",children:s6.map(i=>a.jsxs("section",{children:[a.jsx("h3",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-muted-foreground mb-2",children:i}),a.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:o6(i).map(l=>a.jsxs("button",{type:"button",onClick:()=>o(l),className:"flex items-center gap-3 w-full min-h-[56px] px-4 py-3 rounded-xl bg-background border border-border text-left hover:border-primary hover:bg-primary/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring transition-all",children:[a.jsx("span",{className:"h-9 w-9 rounded-lg bg-primary/10 text-primary flex items-center justify-center shrink-0",children:a.jsx(Jo,{className:"h-4 w-4"})}),a.jsxs("span",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:"block font-display font-bold text-ink text-sm leading-tight",children:l.praca}),a.jsx("span",{className:"block text-[11px] text-muted-foreground uppercase tracking-wider",children:l.estado})]}),a.jsx(Dr,{className:"h-4 w-4 text-primary shrink-0"})]},l.id))})]},i))}),a.jsxs("button",{type:"button",onClick:()=>o(a6,!0),className:"mt-5 flex items-center gap-3 w-full min-h-[56px] px-4 py-3 rounded-xl border border-dashed border-border text-left hover:border-primary hover:bg-primary/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring transition-all",children:[a.jsx("span",{className:"h-9 w-9 rounded-lg bg-muted text-muted-foreground flex items-center justify-center shrink-0",children:a.jsx(hk,{className:"h-4 w-4"})}),a.jsxs("span",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:"block font-display font-bold text-ink text-sm leading-tight",children:"Não sei / outra região"}),a.jsx("span",{className:"block text-xs text-muted-foreground",children:"Falamos com você pelo atendimento central"})]}),a.jsx(Dr,{className:"h-4 w-4 text-primary shrink-0"})]}),a.jsxs("label",{className:"mt-4 flex items-center gap-2 text-xs text-muted-foreground cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:n,onChange:i=>
650s(i.target.checked),className:"h-4 w-4 rounded border-border accent-[hsl(var(--primary))]"}),"Lembrar minha praça e não perguntar de novo"]})]})},a2=m.createContext({openWhatsApp:()=>{}}),Ea=()=>m.useContext(a2),d6=({children:e})=>{const[t,r]=m.useState(null),n=m.useCallback(s=>{const o=s.origem??{tipo:"site"},i=n2();if(i){Xg(s.source,{unidade:i.id,praca:i.praca,estado:i.estado,regiao:i.regiao,page_path:window.location.pathname,lembrada:!0}),window.open(dv(i,o),"_blank","noopener,noreferrer");return}r({...s,origem:o})},[]);return a.jsxs(a2.Provider,{value:{openWhatsApp:n},children:[e,a.jsx(X_,{open:!!t,onOpenChange:s=>!s&&r(null),children:a.jsxs(iv,{className:"max-w-lg max-h-[85vh] overflow-y-auto",children:[a.jsxs(lv,{children:[a.jsx(cv,{className:"font-display text-xl",children:"Onde sua embarcação opera?"}),a.jsx(t2,{children:"Assim você fala direto com a unidade Record mais próxima, que conhece a sua região."})]}),t&&a.jsx(s2,{origem:t.origem??{tipo:"site"},source:t.source,onPicked:()=>r(null)})]})})]})},hv=({className:e="h-6 w-6",beam:t=!0})=>a.jsxs("svg",{viewBox:"0 0 64 64",fill:"none",className:e,"aria-hidden":"true",children:[t&&a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M32 18 L8 6 L8 14 L32 22 Z",fill:"hsl(var(--accent))",opacity:"0.35"}),a.jsx("path",{d:"M32 18 L56 6 L56 14 L32 22 Z",fill:"hsl(var(--accent))",opacity:"0.35"})]}),a.jsx("circle",{cx:"32",cy:"18",r:"5",fill:"hsl(var(--accent))"}),a.jsx("rect",{x:"29",y:"22",width:"6",height:"2",fill:"hsl(var(--ink))"}),a.jsx("path",{d:"M27 24 L37 24 L39 60 L25 60 Z",fill:"hsl(var(--primary))"}),a.jsx("rect",{x:"26",y:"32",width:"12",height:"6",fill:"white"}),a.jsx("rect",{x:"25.5",y:"46",width:"13",height:"6",fill:"white"}),a.jsx("rect",{x:"23",y:"60",width:"18",height:"3",fill:"hsl(var(--ink))"}),a.jsx("path",{d:"M32 8 L32 14",stroke:"hsl(var(--ink))",strokeWidth:"1.2"})]}),u6="/__l5e/assets-v1/cd782363-e473-4c34-b9d8-5c8ada2114fc/hero-vessel.jpg",o2={url:u6},h6=o2.url,f6=()=>{const{openWhatsApp:e}=Ea();return a.jsxs("section",{className:"relative min-h-[100svh] overflow-hidden bg-ink text-white pt-20",children:[a.jsxs("div",{className:"absolute inset-0",children:[a.jsx("img",{src:h6,alt:"Embarcação navegando ao amanhecer",className:"h-full w-full object-cover opacity-40",width:1920,height:1280,fetchPriority:"high",decoding:"async"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-ink via-ink/85 to-ink/30"}),a.jsx("div",{className:"absolute inset-0 grid-tech opacity-50"})]}),a.jsx("div",{className:"absolute right-[8%] top-1/2 -translate-y-1/2 hidden lg:block",children:a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute -inset-32 lighthouse-beam beam-sweep"}),a.jsx(hv,{className:"h-72 w-72 relative z-10 drop-shadow-[0_0_40px_hsl(var(--accent)/0.5)]"})]})}),a.jsx("div",{className:"container-record relative z-10 flex min-h-[calc(100svh-5rem)] items-center py-16",children:a.jsxs("div",{className:"max-w-3xl",children:[a.jsx("div",{className:"eyebrow text-accent mb-6 fade-up",children:a.jsx("span",{className:"!text-accent",children:"CERTIFICAÃÃO NAVAL ESTATUTÃRIA"})}),a.jsxs("h1",{className:"font-display text-5xl md:text-6xl lg:text-7xl font-extrabold leading-[1.05] mb-6 fade-up",style:{animationDelay:"0.1s"},children:["Certificação naval sem surpresa, evitando"," ",a.jsx("span",{className:"text-primary-glow",children:"multas"}),","," ",a.jsx("span",{className:"text-accent",children:"atrasos"})," e riscos operacionais."]}),a.jsx("p",{className:"text-xl md:text-2xl font-display font-semibold text-white/95 mb-4 fade-up max-w-2xl",style:{animationDelay:"0.2s"},children:"Mais de 20 anos ajudando armadores a evitar multas, atrasos e manter operações em conformidade."}),a.jsx("p",{className:"text-sm uppercase tracking-[0.25em] font-semibold text-accent mb-6 fade-up",style:{animationDelay:"0.25s"},children:"Referência nacional em certificação naval"}),a.jsx("p",{className:"text-lg text-white/70 max-w-2xl mb-6 leading-relaxed fade-up",style:{animationDelay:"0.3s"},children:"Tecnologia própria, acompanhamento contÃnuo e execução rápida para manter sua embarcação sempre regular."}),a.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary/15 border border-primary/40 mb-10 fade-up",style:{animationDelay:"0.35s"},children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary-glow animate-pulse"}),a.jsx("span",{className:"font-display text-sm font-bold text-primary-glow tracking-wide",children:"Pra quem quer o certo"})]}),a.jsxs("div",{className:"flex flex-wrap gap-4 mb-14 fade-up",style:{animationDelay:"0.4s"},children:[a.jsx(V,{asChild:!0,size:"lg",className:"bg-primary hover:bg-primary-deep text-primary-foreground shadow-red h-14 px-8 text-base font-semibold",children:a.jsxs("a",{href:"#cta-final",children:["Solicitar diagnóstico técnico",a.jsx(ot,{className:"ml-2 h-5 w-5"})]})}),a.jsxs(V,{size:"lg",variant:"outline","aria-haspopup":"dialog",onClick:()=>e({source:"hero",origem:{tipo:"site"}}),className:"h-14 px-8 text-base font-semibold border-white/30 bg-white/5 text-white hover:bg-white hover:text-ink",children:[a.jsx(Dr,{className:"mr-2 h-5 w-5"}),"Falar no WhatsApp"]})]}),a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 max-w-3xl border-t border-white/10 pt-8 fade-up",style:{animationDelay:"0.5s"},children:[a.jsx($c,{icon:a.jsx($t,{className:"h-5 w-5 text-accent"}),value:"20+",label:"Anos de atuação"}),a.jsx($c,{icon:a.jsx(Ca,{className:"h-5 w-5 text-accent"}),value:"+2.000",label:"Embarcações certificadas/ano"}),a.jsx($c,{icon:a.jsx(Rg,{className:"h-5 w-5 text-accent"}),value:"10",label:"Escritórios"}),a.jsx($c,{icon:a.jsx(Jo,{className:"h-5 w-5 text-accent"}),value:"Brasil inteiro",label:"Cobertura operacional"})]})]})})]})},$c=({icon:e,value:t,label:r})=>a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e,a.jsx("span",{className:"font-display text-2xl font-bold",children:t})]}),a.jsx("p",{className:"text-xs text-white/75 uppercase tracking-wider",children:r})]}),p6=[{icon:p5,title:"Multas regulatórias",desc:"Autuações que comprometem o caixa e a operação."},{icon:QA,title:"Perda de contrato",desc:"Embarcação irregular fora dos editais e fretamentos."},{icon:zA,title:"Falta de controle de vencimentos",desc:"Certificados que expiram sem aviso."},{icon:JA,title:"Exigências não cumpridas",desc:"Pendências da Marinha que travam a regularização."}
650,{icon:Tg,title:"Atrasos operacionais",desc:"Vistorias mal planejadas paralisam a frota."}],m6=()=>a.jsx("section",{className:"bg-surface-soft py-24 md:py-32",children:a.jsxs("div",{className:"container-record",children:[a.jsxs("div",{className:"max-w-3xl mb-16",children:[a.jsx("div",{className:"eyebrow mb-5",children:"Riscos que evitamos"}),a.jsxs("h2",{className:"font-display text-4xl md:text-5xl font-bold text-ink leading-tight mb-5",children:["Evite riscos que podem"," ",a.jsx("span",{className:"text-primary",children:"parar sua operação"}),"."]}),a.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Sem orientação técnica adequada, certificação vira dor de cabeça. A Record mapeia, antecipa e neutraliza cada risco antes que ele afete sua frota."})]}),a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-px bg-border rounded-2xl overflow-hidden border border-border",children:p6.map(e=>{const t=e.icon;return a.jsx("div",{className:"group bg-background p-8 hover:bg-ink hover:text-white transition-all duration-300 cursor-default",children:a.jsxs("div",{className:"flex items-start gap-5",children:[a.jsx("div",{className:"shrink-0 h-12 w-12 rounded-lg bg-primary/10 group-hover:bg-primary text-primary group-hover:text-white flex items-center justify-center transition-colors",children:a.jsx(t,{className:"h-6 w-6"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-display text-lg font-bold mb-2",children:e.title}),a.jsx("p",{className:"text-sm text-muted-foreground group-hover:text-white/70 leading-relaxed",children:e.desc})]})]})},e.title)})})]})}),g6=[{n:"01",icon:Pg,title:"Diagnóstico Técnico",desc:"Identificamos pendências antes da vistoria â você evita exigências inesperadas e ganha previsibilidade desde o inÃcio."},{n:"02",icon:HA,title:"Execução Programada",desc:"Vistoria agendada de forma rápida e eficiente, sem atrasos que comprometam a operação da sua embarcação."},{n:"03",icon:ZA,title:"Regularização Assistida",desc:"Acompanhamos o cumprimento de cada exigência para que nada fique pendente e o certificado saia no prazo."},{n:"04",icon:LA,title:"Certificação Definitiva",desc:"Emissão garantida do certificado, mantendo sua embarcação regular e protegida contra multas e perda de contrato."},{n:"05",icon:PA,title:"Monitoramento ContÃnuo",desc:"Você nunca mais perde um vencimento â alertas antecipados mantêm sua frota sempre regular.",highlight:!0,note:"Monitoramento realizado através do sistema ConnectRecord"}],v6=()=>a.jsxs("section",{id:"metodo",className:"relative bg-ink text-white py-24 md:py-32 overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 grid-tech opacity-40"}),a.jsx("div",{className:"absolute -right-40 top-0 w-[600px] h-[600px] bg-primary/10 rounded-full blur-3xl"}),a.jsxs("div",{className:"container-record relative z-10",children:[a.jsxs("div",{className:"max-w-3xl mb-20",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-accent/15 border border-accent/40 text-accent text-xs font-semibold uppercase tracking-wider mb-6",children:[a.jsx(Su,{className:"h-3.5 w-3.5"}),"Nosso método exclusivo"]}),a.jsxs("h2",{className:"font-display text-4xl md:text-6xl font-bold leading-[1.05] mb-6",children:["Método ",a.jsx("span",{className:"text-primary-glow",children:"RCP"}),a.jsx("span",{className:"block text-2xl md:text-3xl font-semibold text-white/70 mt-3",children:"Record de Certificação Programada"})]}),a.jsx("p",{className:"text-lg text-white/70 leading-relaxed",children:"Um sistema estruturado para garantir certificação sem surpresa e com previsibilidade."})]}),a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute hidden lg:block top-12 left-12 h-px bg-gradient-to-r from-primary via-accent to-primary opacity-50",style:{right:"calc(20% - 3rem)"}}),a.jsx("div",{className:"grid lg:grid-cols-5 gap-8 lg:gap-4",children:g6.map((e,t)=>{const r=e.icon,n=e.highlight;return a.jsxs("div",{className:"group relative fade-up transition-all duration-300 hover:-translate-y-1",style:{animationDelay:`${t*.08}s`},children:[a.jsxs("div",{className:"flex lg:block items-center gap-5 mb-5",children:[a.jsxs("div",{className:"relative shrink-0",children:[n&&a.jsx("span",{className:"absolute -inset-2 rounded-2xl bg-accent/30 blur-xl animate-pulse","aria-hidden":!0}),a.jsx("span",{className:"absolute -inset-3 rounded-2xl bg-accent/0 group-hover:bg-accent/20 blur-xl transition-all duration-500","aria-hidden":!0}),a.jsx("div",{className:`relative h-24 w-24 rounded-2xl flex items-center justify-center transition-all duration-300 group-hover:scale-110 group-hover:ring-2 group-hover:ring-accent/60 ${n?"bg-gradient-to-br from-accent to-primary-glow shadow-[0_0_40px_hsl(var(--accent)/0.5)] ring-2 ring-accent/60":"bg-gradient-red shadow-red"}`,children:a.jsx(r,{className:"h-10 w-10 text-white transition-transform duration-300 group-hover:scale-110"})}),a.jsx("span",{className:`absolute -top-2 -left-2 font-display font-bold text-xs h-7 w-7 rounded-full flex items-center justify-center z-10 shadow-md transition-colors ${n?"bg-white text-ink":"bg-accent text-ink group-hover:bg-white"}`,children:e.n})]}),a.jsx("h3",{className:`font-display text-xl font-bold lg:mt-6 transition-colors group-hover:text-accent ${n?"text-accent":""}`,children:e.title})]}),a.jsx("p",{className:"text-sm text-white/70 leading-relaxed lg:pl-0 pl-29",children:e.desc}),n&&e.note&&a.jsxs("div",{className:"mt-4 inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-accent/10 border border-accent/30 text-xs font-semibold text-accent",children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-accent animate-pulse"}),e.note]})]},e.n)})})]}),a.jsxs("div",{className:"mt-20 flex items-center justify-center gap-4 text-white/70",children:[a.jsx(hv,{className:"h-8 w-8"}),a.jsx("p",{className:"text-sm font-display font-semibold tracking-wider up
650percase",children:"Do diagnóstico ao monitoramento â sempre orientado pelo farol Record."})]}),a.jsx("div",{className:"mt-16 md:mt-20 max-w-3xl mx-auto text-center",children:a.jsxs("div",{className:"inline-flex flex-col items-center gap-4",children:[a.jsx("span",{className:"h-12 w-px bg-gradient-to-b from-transparent via-accent/60 to-accent","aria-hidden":!0}),a.jsxs("p",{className:"font-display text-xl md:text-2xl font-semibold text-white/90 leading-snug",children:["E para garantir que tudo continue sob controle"," ",a.jsx("span",{className:"text-accent",children:"após a certificação:"})]}),a.jsxs("a",{href:"#connect",className:"inline-flex items-center gap-2 text-sm font-semibold uppercase tracking-wider text-primary-glow hover:text-primary transition-colors",children:["Conheça o ConnectRecord",a.jsx("span",{"aria-hidden":!0,children:"â"})]})]})})]})]}),x6="/assets/connectrecord-logo-uuh8QPIj.png",y6="/assets/connect-mockup-C0_9QksI.jpg",b6=[{icon:ik,label:"Alertas automáticos por WhatsApp"},{icon:Lg,label:"Alertas por e-mail"},{icon:lk,label:"Controle de vencimentos"},{icon:Pn,label:"Download de certificados"},{icon:ya,label:"Download de relatórios"},{icon:Ca,label:"Controle completo da frota"},{icon:mk,label:"Histórico técnico da embarcação"}],w6=[{icon:Ag,title:"Tecnologia",desc:"Plataforma proprietária da Record."},{icon:$t,title:"Controle",desc:"Gestão centralizada e auditável."},{icon:dk,title:"Previsibilidade",desc:"Antecipação de prazos e riscos."}],j6=()=>a.jsxs("section",{id:"connect",className:"relative bg-gradient-to-b from-ink via-ink-soft to-ink text-white py-32 md:py-44 overflow-hidden border-y border-white/5",children:[a.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[a.jsx("div",{className:"absolute -top-32 -right-32 h-[500px] w-[500px] rounded-full bg-primary/20 blur-[120px]"}),a.jsx("div",{className:"absolute -bottom-32 -left-32 h-[500px] w-[500px] rounded-full bg-accent/15 blur-[120px]"}),a.jsx("div",{className:"absolute inset-0 opacity-[0.04]",style:{backgroundImage:"linear-gradient(white 1px, transparent 1px), linear-gradient(90deg, white 1px, transparent 1px)",backgroundSize:"48px 48px"}})]}),a.jsxs("div",{className:"container-record relative",children:[a.jsxs("div",{className:"max-w-3xl mb-14 md:mb-20",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-primary/15 border border-primary/30 text-primary text-xs font-semibold uppercase tracking-wider mb-6",children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary animate-pulse"}),"Solução tecnológica proprietária"]}),a.jsx("img",{src:x6,alt:"ConnectRecord",className:"h-14 mb-6 brightness-0 invert"}),a.jsxs("h2",{className:"font-display text-5xl md:text-7xl font-extrabold leading-[1.02] tracking-tight mb-5",children:["Controle total da sua"," ",a.jsx("span",{className:"bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent",children:"certificação"})]}),a.jsx("p",{className:"font-display text-xl md:text-2xl font-semibold text-accent mb-5",children:"Nunca mais perca um prazo de certificação."}),a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-accent/10 border border-accent/30 text-accent text-xs font-bold uppercase tracking-wider mb-6",children:[a.jsx(Ag,{className:"h-3.5 w-3.5"}),"Sistema exclusivo da Record"]}),a.jsx("p",{className:"text-lg md:text-xl text-white/70 leading-relaxed",children:"Com o ConnectRecord, sua embarcação permanece sempre regular e você nunca perde um prazo."})]}),a.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-20 items-center mb-16",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold uppercase tracking-wider text-primary mb-6",children:"Com o ConnectRecord você tem:"}),a.jsx("div",{className:"grid sm:grid-cols-2 gap-3 mb-6",children:b6.map(e=>{const t=e.icon;return a.jsxs("div",{className:"group flex items-start gap-3 p-4 rounded-xl bg-white/[0.04] border border-white/10 hover:bg-white/[0.08] hover:border-primary/40 hover:-translate-y-0.5 transition-all",children:[a.jsx("div",{className:"shrink-0 h-10 w-10 rounded-lg bg-primary/15 text-primary flex items-center justify-center group-hover:bg-primary group-hover:text-ink transition-colors tech-icon-pulse",children:a.jsx(t,{className:"h-5 w-5"})}),a.jsx("span",{className:"text-sm font-medium text-white/90 leading-snug pt-1.5",children:e.label})]},e.label)})}),a.jsxs("div",{className:"flex items-center gap-2 text-sm text-white/75 mb-8",children:[a.jsx($t,{className:"h-4 w-4 text-accent shrink-0"}),a.jsx("span",{children:"Acesso seguro, simples e disponÃvel a qualquer momento."})]}),a.jsxs("p",{className:"text-base text-white/70 leading-relaxed border-l-2 border-primary/60 pl-5",children:["O ConnectRecord é a"," ",a.jsx("span",{className:"font-semibold text-white",children:"plataforma exclusiva da Record"})," ","â uma tecnologia proprietária que permite acompanhar toda a certificação da sua embarcação de forma simples, segura e centralizada."]})]}),a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute -inset-10 bg-gradient-to-tr from-primary/30 via-accent/20 to-primary/10 rounded-[2rem] blur-3xl tech-glow"}),a.jsxs("div",{className:"relative rounded-2xl overflow-hidden shadow-elevated border border-white/10 bg-ink-soft tech-float tech-scan-line",children:[a.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 bg-white/[0.03] border-b border-white/10",children:[a.jsxs("div",{className:"flex gap-1.5",children:[a.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-red-400/70"}),a.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-yellow-400/70"}),a.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-green-400/70"})]}),a.jsx("div",{className:"flex-1 text-center text-[10px] font-mono text-white/70",children:"app.connectrecord.com.br"})]}),a.jsx("img",{src:y6,alt:"Simulação do painel ConnectRecord â gestão de frota e certificações",className:"w-full h-auto",loading:"lazy",width:1600,height:1280})]}),a.jsxs("div",{className:"absolute -top-5 -right-5 bg-background text-ink border border-border rounded-xl shadow-elevated p-4 max-w-[200px] hidden md:block",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx(ik,{className:"h-4 w-4 text-primary"}),a.jsx("span",{className:"text-xs font-bold",children:"Alerta enviado"})]}),a.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:"Vistoria de casco vence em 30 dias."})]}),a.jsxs("div",{className:"absolute -bottom-6 -left-6 bg-background text-ink border border-border rounded-xl shadow-elevated p-4 max-w-[220px] hidden md:block",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500 animate-pulse"}),a.jsx("span",{className:"text-xs font-semibold",children:"Frota 100% regular"})]}),a.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:"Tecnologia que evita esquecimentos e reduz riscos."})]})]})]}),a.jsx("div",{className:"grid md:grid-cols-3 gap-5 mb-12",children:w6.map(e=>{const t=e.icon;return a.jsxs("div",{className:"relative p-6 rounded-2xl bg-gradient-to-br from-white/[0.06] to-white/[0.02] border border-white/10 backdrop-blur-sm",children:[a.jsx("div",{className:"h-12 w-12 rounded-xl bg-primary/20 text-primary flex items-center justify-center mb-4 tech-icon-pulse",children:a.jsx(t,{className:"h-6 w-6"})}),a.jsx("h3",{className:"font-display text-xl font-bold mb-1.5",children:e.title}),a.jsx("p",{className:"text-sm text-white/75 leading-relaxed",children:e.desc})]},e.title)})}),a.jsx("div",{className:"max-w-3xl mx-auto text-center mb-10",children:a.jsxs("div",{className:"relative inline-block",children:[a.jsx("div",{className:"absolute -inset-x-8 -inset-y-4 bg-gradient-to-r from-primary/10 via-accent/10 to-primary/10 blur-2xl rounded-full","aria-hidden":!0}),a.jsxs("p",{className:"relative font-display text-xl md:text-2xl font-semibold text-white leading-snug",children:["Reduza riscos, evite multas e"," ",a.jsx("span",{className:"bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent",children:"mantenha sua operação sempre ativa."})]})]})}),a.jsx("div",{className:"flex justify-center",children:a.jsx(V,{asChild:!0,size:"lg",className:"bg-primary hover:bg-primary/90 text-ink font-semibold",children:a.jsxs("a",{href:"#cta-final",children:["Conhecer o ConnectRecord",a.jsx(ot,{className:"ml-2 h-5 w-5"})]})})})]})]}),ae=m.forwardRef(({className:e,type:t,...r},n)=>
650a.jsx("input",{type:t,className:ue("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background 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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));ae.displayName="Input";var k6="Label",i2=m.forwardRef((e,t)=>a.jsx(oe.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));i2.displayName=k6;var l2=i2;const _6=Cg("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),X=m.forwardRef(({className:e,...t},r)=>a.jsx(l2,{ref:r,className:ue(_6(),e),...t}));X.displayName=l2.displayName;function Zd(e,[t,r]){return Math.min(r,Math.max(t,e))}var N6=m.createContext(void 0);function fv(e){const t=m.useContext(N6);return e||t||"ltr"}function pv(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var c2=["PageUp","PageDown"],d2=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],u2={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},si="Slider",[em,S6,C6]=ku(si),[mv]=fr(si,[C6]),[E6,Wl]=mv(si),gv=m.forwardRef((e,t)=>{const{name:r,min:n=0,max:s=100,step:o=1,orientation:i="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:d=[n],value:u,onValueChange:h=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:y,...g}=e,w=m.useRef(new Set),v=m.useRef(0),x=m.useRef(!1),j=i==="horizontal"?R6:P6,[k,_]=m.useState(null),N=de(t,_),[C=[],R]=an({prop:u,defaultProp:d,onChange:U=>{var E;(E=[...w.current][v.current])==null||E.focus({preventScroll:!0,focusVisible:x.current}),x.current=!1,h(U)}}),T=m.useRef(C),O=m.useRef(C);m.useEffect(()=>{const U=y?k==null?void 0:k.ownerDocument.getElementById(y):k==null?void 0:k.closest("form");if(U instanceof HTMLFormElement){const Z=()=>R(O.current);return U.addEventListener("reset",Z),()=>U.removeEventListener("reset",Z)}},[k,y,R]);function I(U){const Z=L6(C,U);H(U,Z)}function K(U){H(U,v.current)}function $(){const U=T.current[v.current];C[v.current]!==U&&p(C)}function H(U,Z,{commit:E}={commit:!1}){const P=C2(o),z=ld(Math.round((U-n)/o)*o+n,P),ee=Zd(z,[n,s]);R((F=[])=>{const Y=A6(F,ee,Z);if(D6(Y,c*o)){v.current=Y.indexOf(ee);const re=String(Y)!==String(F);return re&&E&&p(Y),re?Y:F}else return F})}return a.jsx(E6,{scope:e.__scopeSlider,name:r,disabled:l,min:n,max:s,valueIndexToChangeRef:v,thumbs:w.current,values:C,orientation:i,form:y,children:a.jsx(em.Provider,{scope:e.__scopeSlider,children:a.jsx(em.Slot,{scope:e.__scopeSlider,children:a.jsx(j,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:N,onPointerDown:te(g.onPointerDown,()=>{l||(T.current=C,x.current=!1)}),min:n,max:s,inverted:f,onSlideStart:l?void 0:I,onSlideMove:l?void 0:K,onSlideEnd:l?void 0:$,onHomeKeyDown:()=>{l||(x.current=!0,H(n,0,{commit:!0}))},onEndKeyDown:()=>{l||(x.current=!0,H(s,C.length-1,{commit:!0}))},onStepKeyDown:({event:U,direction:Z})=>{if(!l){x.current=!0;const z=c2.includes(U.key)||U.shiftKey&&d2.includes(U.key)?10:1,ee=v.current,F=C[ee],Y=M6(F,{min:n,step:o,direction:Z,multiplier:z});H(Y,ee,{commit:!0})}}})})})})});gv.displayName=si;var[h2,f2]=mv(si,{startEdge:"left",endEdge:"right",size:"width",direction:1}),R6=m.forwardRef((e,t)=>{const{min:r,max:n,dir:s,inverted:o,onSlideStart:i,onSlideMove:l,onSlideEnd:c,onStepKeyDown:d,...u}=e,[h,p]=m.useState(null),f=de(t,p),y=m.useRef(void 0),g=fv(s),w=g==="ltr",v=w&&!o||!w&&o;function x(b){const j=y.current||h.getBoundingClientRect(),k=[0,j.width],N=vv(k,v?[r,n]:[n,r]);return y.current=j,N(b-j.left)}
650return a.jsx(h2,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:a.jsx(p2,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const j=x(b.clientX);i==null||i(j)},onSlideMove:b=>{const j=x(b.clientX);l==null||l(j)},onSlideEnd:()=>{y.current=void 0,c==null||c()},onStepKeyDown:b=>{const k=u2[v?"from-left":"from-right"].includes(b.key);d==null||d({event:b,direction:k?-1:1})}})})}),P6=m.forwardRef((e,t)=>{const{min:r,max:n,inverted:s,onSlideStart:o,onSlideMove:i,onSlideEnd:l,onStepKeyDown:c,...d}=e,u=m.useRef(null),h=de(t,u),p=m.useRef(void 0),f=!s;function y(g){const w=p.current||u.current.getBoundingClientRect(),v=[0,w.height],b=vv(v,f?[n,r]:[r,n]);return p.current=w,b(g-w.top)}return a.jsx(h2,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:a.jsx(p2,{"data-orientation":"vertical",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const w=y(g.clientY);o==null||o(w)},onSlideMove:g=>{const w=y(g.clientY);i==null||i(w)},onSlideEnd:()=>{p.current=void 0,l==null||l()},onStepKeyDown:g=>{const v=u2[f?"from-bottom":"from-top"].includes(g.key);c==null||c({event:g,direction:v?-1:1})}})})}),p2=m.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:s,onSlideEnd:o,onHomeKeyDown:i,onEndKeyDown:l,onStepKeyDown:c,...d}=e,u=Wl(si,r);return a.jsx(oe.span,{...d,ref:t,onKeyDown:te(e.onKeyDown,h=>{h.key==="Home"?(i(h),h.preventDefault()):h.key==="End"?(l(h),h.preventDefault()):c2.concat(d2).includes(h.key)&&(c(h),h.preventDefault())}),onPointerDown:te(e.onPointerDown,h=>{const p=h.target;p.setPointerCapture(h.pointerId),h.preventDefault(),u.thumbs.has(p)?p.focus({preventScroll:!0,focusVisible:!1}):n(h)}),onPointerMove:te(e.onPointerMove,h=>{h.target.hasPointerCapture(h.pointerId)&&s(h)}),onPointerUp:te(e.onPointerUp,h=>{const p=h.target;p.hasPointerCapture(h.pointerId)&&(p.releasePointerCapture(h.pointerId),o(h))})})}),m2="SliderTrack",g2=m.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=Wl(m2,r);return a.jsx(oe.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});g2.displayName=m2;var tm="SliderRange",v2=m.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=Wl(tm,r),o=f2(tm,r),i=m.useRef(null),l=de(t,i),c=s.values.length,d=s.values.map(p=>S2(p,s.min,s.max)),u=c>1?Math.min(...d):0,h=100-Math.max(...d);return a.jsx(oe.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:l,style:{...e.style,[o.startEdge]:u+"%",[o.endEdge]:h+"%"}})});v2.displayName=tm;
650var x2="SliderThumb",[T6,y2]=mv(x2),b2="SliderThumbProvider";function w2(e){const{__scopeSlider:t,name:r,children:n,internal_do_not_use_render:s}=e,o=Wl(b2,t),i=S6(t),[l,c]=m.useState(null),d=m.useMemo(()=>l?i().findIndex(w=>w.ref.current===l):-1,[i,l]),u=Vg(l),h=l?!!o.form||!!l.closest("form"):!0,p=o.values[d],f=r??(o.name?o.name+(o.values.length>1?"[]":""):void 0),y=p===void 0?0:S2(p,o.min,o.max);m.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]);const g={value:p,name:f,form:o.form,isFormControl:h,index:d,thumb:l,onThumbChange:c,percent:y,size:u};return a.jsx(T6,{scope:t,...g,children:z6(s)?s(g):n})}w2.displayName=b2;var id="SliderThumbTrigger",j2=m.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=Wl(id,r),o=f2(id,r),{index:i,value:l,percent:c,size:d,onThumbChange:u}=y2(id,r),h=de(t,u),p=O6(i,s.values.length),f=d==null?void 0:d[o.size],y=f?I6(f,c,o.direction):0;return a.jsx("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[o.startEdge]:`calc(${c}% + ${y}px)`},children:a.jsx(em.ItemSlot,{scope:r,children:a.jsx(oe.span,{role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":s.min,"aria-valuenow":l,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...n,ref:h,style:l===void 0?{display:"none"}:e.style,onFocus:te(e.onFocus,()=>{s.valueIndexToChangeRef.current=i})})})})});j2.displayName=id;var k2=m.forwardRef((e,t)=>{const{__scopeSlider:r,name:n,...s}=e;return a.jsx(w2,{__scopeSlider:r,name:n,internal_do_not_use_render:({index:o,isFormControl:i})=>a.jsxs(a.Fragment,{children:[a.jsx(j2,{...s,ref:t,__scopeSlider:r}),i?a.jsx(N2,{__scopeSlider:r},o):null]})})});k2.displayName=x2;var _2="SliderBubbleInput",N2=m.forwardRef(({__scopeSlider:e,...t},r)=>{const{value:n,name:s,form:o}=y2(_2,e),i=m.useRef(null),l=de(i,r),c=pv(n);return m.useEffect(()=>{const d=i.current;if(!d)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==n&&p){const f=new Event("input",{bubbles:!0});p.call(d,n),d.dispatchEvent(f)}},[c,n]),a.jsx(oe.input,{style:{display:"none"},name:s,form:o,...t,ref:l,defaultValue:n})});N2.displayName=_2;function A6(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,o)=>s-o)}function S2(e,t,r){const o=100/(r-t)*(e-t);return Zd(o,[0,100])}function O6(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function L6(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function I6(e,t,r){const n=e/2,o=vv([0,50],[0,n]);return(n-o(t)*r)*r}function $6(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function D6(e,t){if(t>0){const r=$6(e);return Math.min(...r)>=t}return!0}function vv(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function C2(e){if(!Number.isFinite(e))return 0;const t=e.toString();if(t.includes("e")){const[n,s]=t.split("e"),o=n.split(".")[1]||"",i=Number(s);return Math.max(0,o.length-i)}const r=t.split(".")[1];return r?r.length:0}function ld(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}function M6(e,{min:t,step:r,direction:n,multiplier:s}){const o=C2(r),i=(e-t)/r,l=Math.round(i),c=ld(l*r+t,o)===ld(e,o);let d;return c?d=l+s*n:n>0?d=Math.ceil(i):d=Math.floor(i),ld(d*r+t,o)}function z6(e){return typeof e=="function"}const E2=m.forwardRef(({className:e,...t},r)=>a.jsxs(gv,{ref:r,className:ue("relative flex w-full touch-none select-none items-center",e),...t,children:[a.jsx(g2,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:a.jsx(v2,{className:"absolute h-full bg-primary"})}),a.jsx(k2,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));E2.displayName=gv.displayName;const mf=e=>e.toLocaleString("pt-BR",{style:"currency",currency:"BRL",maximumFractionDigits:0}),ki=e=>
650e.toLocaleString("pt-BR",{maximumFractionDigits:0}),F6=3,gf=({id:e,label:t,icon:r,value:n,min:s=0,step:o=1,suffix:i,onChange:l})=>a.jsxs("div",{className:"group",children:[a.jsxs(X,{htmlFor:e,className:"flex items-center gap-2 text-sm font-semibold text-white/80 mb-2",children:[a.jsx("span",{className:"h-8 w-8 rounded-lg bg-primary/15 text-primary flex items-center justify-center",children:a.jsx(r,{className:"h-4 w-4"})}),t]}),a.jsxs("div",{className:"relative",children:[a.jsx(ae,{id:e,type:"number",inputMode:"numeric",min:s,step:o,value:Number.isFinite(n)?n:0,onChange:c=>l(Math.max(s,Number(c.target.value)||0)),className:"h-12 bg-white/[0.04] border-white/15 text-white text-base font-semibold focus-visible:ring-primary/60 focus-visible:border-primary/60 pr-14"}),i&&a.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs font-medium text-white/70",children:i})]})]}),U6=()=>{const[e,t]=m.useState(10),[r,n]=m.useState(2),[s,o]=m.useState(6e3),[i,l]=m.useState(30),c=m.useMemo(()=>{const h=e*F6*r,p=h*(i/100),f=p*12,y=f/8,g=s/176,w=p*g,v=w*12,x=v*1.15;return{currentMonthlyHours:h,savedMonthlyHours:p,savedYearlyHours:f,workdaysFreed:y,monthlySavings:w,yearlySavings:v,displayYearlySavings:x}},[e,i,s,r]),d=[{icon:yi,label:"Horas economizadas / mês",value:`${ki(c.savedMonthlyHours)} h`,tone:"primary"},{icon:yi,label:"Horas economizadas / ano",value:`${ki(c.savedYearlyHours)} h`,tone:"primary"},{icon:MA,label:"Tempo recuperado para sua equipe",value:`${ki(c.workdaysFreed)} dias úteis/ano`,tone:"accent"},{icon:yi,label:"Economia mensal estimada",value:mf(c.monthlySavings),tone:"primary"}],u={value:mf(c.displayYearlySavings)};return a.jsxs("section",{id:"calculadora",className:"relative bg-gradient-to-b from-ink via-ink-soft to-ink text-white py-28 md:py-36 overflow-hidden border-y border-white/5",children:[a.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[a.jsx("div",{className:"absolute -top-32 -left-32 h-[500px] w-[500px] rounded-full bg-accent/15 blur-[120px]"}),a.jsx("div",{className:"absolute -bottom-32 -right-32 h-[500px] w-[500px] rounded-full bg-primary/20 blur-[120px]"}),a.jsx("div",{className:"absolute inset-0 opacity-[0.04]",style:{backgroundImage:"linear-gradient(white 1px, transparent 1px), linear-gradient(90deg, white 1px, transparent 1px)",backgroundSize:"48px 48px"}})]}),a.jsxs("div",{className:"container-record relative",children:[a.jsxs("div",{className:"max-w-3xl mb-12 md:mb-16",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-accent/15 border border-accent/30 text-accent text-xs font-semibold uppercase tracking-wider mb-6",children:[a.jsx(Ag,{className:"h-3.5 w-3.5"}),"Simulador ConnectRecord"]}),a.jsxs("h2",{className:"font-display text-4xl md:text-6xl font-extrabold leading-[1.05] tracking-tight mb-5",children:["Calculadora de"," ",a.jsx("span",{className:"bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent",children:"Economia com Gestão Documental Naval"})]}),a.jsx("p",{className:"text-lg text-white/70 leading-relaxed",children:"Estime quanto tempo e dinheiro sua operação pode economizar ao centralizar documentos, certificados, prazos e relatórios da frota com o ConnectRecord."})]}),a.jsxs("div",{className:"grid lg:grid-cols-12 gap-8 lg:gap-12 max-w-[1400px] mx-auto",children:[a.jsx("div",{className:"lg:col-span-5",children:a.jsxs("div",{className:"relative rounded-2xl bg-gradient-to-br from-white/[0.06] to-white/[0.02] border border-white/10 backdrop-blur-sm p-8 md:p-10 space-y-7",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs font-bold uppercase tracking-wider text-primary",children:[a.jsx(yi,{className:"h-4 w-4"}),"Dados da sua operação"]}),a.jsx(gf,{id:"vessels",label:"Embarcações na frota",icon:Ca,value:e,min:1,onChange:t,suffix:"un."}),a.jsx(gf,{id:"staff",label:"Colaboradores na gestão documental",icon:Cu,value:r,min:1,onChange:n,suffix:"pessoas"}),a.jsx(gf,{id:"cost",label:"Custo mensal médio por colaborador",icon:b5,value:s,min:0,step:100,onChange:o,suffix:"R$"}),a.jsxs("div",{children:[a.jsxs(X,{className:"flex items-center justify-between text-sm font-semibold text-white/80 mb-3",children:[a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"h-8 w-8 rounded-lg bg-accent/15 text-accent flex items-center justify-center",children:a.jsx(yi,{className:"h-4 w-4"})}),"Redução de tempo com ConnectRecord"]}),a.jsxs("span",{className:"text-accent font-bold text-base tabular-nums",children:[i,"%"]})]}),a.jsx(E2,{value:[i],onValueChange:h=>l(h[0]),min:10,max:80,step:5,className:"mt-2"}),a.jsxs("div",{className:"flex justify-between text-[10px] font-medium text-white/70 mt-2",children:[a.jsx("span",{children:"10%"}),a.jsx("span",{children:"Padrão 30%"}),a.jsx("span",{children:"80%"})]})]})]})}),a.jsxs("div",{className:"lg:col-span-7",children:[a.jsxs("div",{className:"relative overflow-hidden rounded-3xl p-8 md:p-10 mb-5 bg-gradient-to-br from-ink-soft via-ink to-ink-soft border-2 border-primary/40 shadow-[0_30px_80px_-30px_hsl(var(--primary)/0.4)]",children:[a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/[0.08] via-trans
650parent to-accent/[0.05]"}),a.jsxs("div",{className:"relative flex items-start justify-between gap-3 mb-6",children:[a.jsx("span",{className:"h-14 w-14 rounded-2xl flex items-center justify-center bg-accent/15 text-accent border border-accent/30",children:a.jsx(u5,{className:"h-7 w-7"})}),a.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-full bg-accent/15 text-accent border border-accent/30",children:"Destaque principal"})]}),a.jsx("p",{className:"relative text-sm font-bold uppercase tracking-[0.2em] text-accent mb-3",children:"Economia anual estimada"}),a.jsxs("p",{className:"relative font-display font-extrabold tabular-nums leading-[0.95] text-5xl md:text-7xl lg:text-[5.5rem] text-white",children:[u.value,a.jsx("span",{className:"text-2xl md:text-4xl lg:text-5xl text-white/75 ml-2 align-baseline",children:"/ano"})]}),a.jsx("p",{className:"relative text-sm text-white/75 mt-4",children:"Em produtividade recuperada ao longo de 12 meses."})]}),a.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:d.map(h=>{const p=h.icon;return a.jsxs("div",{className:"relative overflow-hidden rounded-2xl p-6 bg-white/[0.04] border border-white/10 hover:border-primary/40 hover:bg-white/[0.06] transition-all",children:[a.jsx("div",{className:"relative flex items-start justify-between gap-3 mb-4",children:a.jsx("span",{className:`h-11 w-11 rounded-xl flex items-center justify-center ${h.tone==="accent"?"bg-accent/20 text-accent":"bg-primary/20 text-primary"}`,children:a.jsx(p,{className:"h-5 w-5"})})}),a.jsx("p",{className:"relative text-xs font-semibold uppercase tracking-wider text-white/75 mb-2",children:h.label}),a.jsx("p",{className:"relative font-display font-extrabold tabular-nums leading-none text-2xl md:text-3xl text-white",children:h.value})]},h.label)})}),a.jsxs("div",{className:"mt-6 p-6 rounded-2xl bg-white/[0.03] border border-white/10",children:[a.jsxs("p",{className:"text-sm font-semibold text-white/80 mb-3 flex items-center gap-2",children:[a.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-accent"}),"Sua operação poderia recuperar:"]}),a.jsxs("ul",{className:"space-y-2",children:[a.jsxs("li",{className:"flex items-center gap-2 text-sm text-white/70",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0"}),a.jsxs("span",{children:[a.jsxs("strong",{className:"text-white",children:[ki(c.savedYearlyHours)," horas"]})," por ano"]})]}),a.jsxs("li",{className:"flex items-center gap-2 text-sm text-white/70",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0"}),a.jsxs("span",{children:[a.jsxs("strong",{className:"text-white",children:[ki(c.workdaysFreed)," dias úteis"]})," da equipe"]})]}),a.jsxs("li",{className:"flex items-center gap-2 text-sm text-white/70",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0"}),a.jsxs("span",{children:[a.jsx("strong",{className:"text-white",children:mf(c.displayYearlySavings)})," em produtividade estimada"]})]})]})]}),a.jsxs("div",{className:"mt-6 p-5 rounded-2xl bg-white/[0.03] border border-white/10 flex items-start gap-3",children:[a.jsx(gk,{className:"h-5 w-5 text-accent shrink-0 mt-0.5"}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("p",{className:"text-sm text-white/70 leading-relaxed",children:["O cálculo é uma ",a.jsx("strong",{className:"text-white",children:"estimativa"})," baseada no tempo dedicado à organização documental, controle de vencimentos, busca de certificados, relatórios e acompanhamento de prazos da frota. Os valores podem variar conforme a estrutura interna de cada armador."]}),a.jsx("p",{className:"text-sm text-white/70 leading-relaxed",children:"Estimativa construÃda com base em atividades recorrentes como organização documental, certificados, controle de vencimentos, exigências e acompanhamento operacional da frota."})]})]}),a.jsxs("div",{className:"mt-6 relative overflow-hidden p-6 md:p-7 rounded-2xl bg-gradient-to-r from-primary/20 via-ink-soft to-accent/15 border border-primary/30",children:[a.jsx("div",{className:"absolute inset-0 grid-tech opacity-20","aria-hidden":!0}),a.jsxs("p",{className:"relative font-display text-xl md:text-2xl font-bold leading-snug",children:["Com o ",a.jsx("span",{className:"text-accent",children:"ConnectRecord"}),", sua equipe ganha tempo, reduz retrabalho e mantém a frota"," ",a.jsx("span",{className:"bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent",children:"sob controle."})]})]}),a.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[a.jsx(V,{asChild:!0,size:"lg",className:"bg-primary hover:bg-primary/90 text-primary-foreground font-bold h-14 px-7 shadow-[0_10px_30px_-8px_hsl(var(--primary)/0.6)]",children:a.jsxs("a",{href:"#cta-final",className:"inline-flex items-center gap-2",children:["Receber diagnóstico da minha frota",a.jsx(ot,{className:"h-5 w-5"})]})}),a.jsx(V,{asChild:!0,size:"lg",variant:"outline",className:"bg-transparent border-white/25 text-white hover:bg-white hover:text-ink h-14 px-7 font-semibold",children:a.jsx("a",{href:"#connect",className:"inline-flex items-center gap-2",children:"Conhecer o ConnectRecord"})})]})]})]})]})]})},Yb=["Certificado vence em menos de 6 meses","Possui exigências abertas","Possui documentos espalhados","Não controla prazos da frota"],B6=()=>{const[e,t]=m.useState(Yb.map(()=>!1)),r=e.filter(Boolean).length,n=s=>t(o=>o.map((i,l)=>l===s?!i:i));return a.jsxs("section",{id:"diagnostico-rapido",className:"relative bg-ink text-white py-20 md:py-28 overflow-hidden border-t border-white/5",children:[a.jsx("div",{className:"absolute inset-0 grid-tech opacity-30","aria-hidden":!0}),a.jsx("div",{className:"absolute -left-32 top-1/2 -translate-y-1/2 h-[420px] w-[420px] rounded-full bg-primary/10 blur-[120px]","aria-hidden":!0}),a.jsx("div",{className:"container-record relative",children:a.jsxs("div",{className:"max-w-4xl mx-auto",children:[a.jsxs("div",{className:"text-center mb-10",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-primary/15 border border-primary/40 text-primary-glow text-xs font-semibold uppercase tracking-wider mb-5",children:[a.jsx(Ig,{className:"h-3.5 w-3.5"}),"Diagnóstico rápido"]}),a.jsxs("h2",{className:"font-display text-4xl md:text-5xl font-extrabold leading-[1.05] mb-4",children:["Sua embarcação está em"," ",a.jsx("span",{className:"text-primary-glow",children:"risco?"})]}),a.jsx("p",{className:"text-white/70 text-lg",children:"Marque os itens que se aplicam à sua operação hoje."})]}),a.jsxs("div",{className:"rounded-2xl bg-gradient-to-br from-white/[0.06] to-white/[0.02] border border-white/10 backdrop-blur-sm p-6 md:p-8",children:[a.jsx("ul",{className:"grid sm:grid-cols-2 gap-5 mb-6",children:Yb.map((s,o)=>{const i=e[o];return a.jsx("li",{children:a.jsxs("button",{type:"button",onClick:()=>n(o),className:`w-full flex items-center gap-5 text-left p-6 rounded-xl border transition-all duration-300 ease-out hover:-translate-y-0.5 hover:shadow-[0_10px_30px_-12px_hsl(var(--primary)/0.5)] ${i?"bg-primary/15 border-primary/60 text-white":"bg-white/[0.03] border-white/10 text-white/80 hover:border-primary/50 hover:bg-white/[0.06]"}`,children:[a.jsx("span",{className:`h-11 w-11 rounded-lg flex items-center justify-center shrink-0 border-2 transition-all duration-300 ${i?"bg-primary border-primary scale-110":"bg-transparent border-white/40"}`,children:a.jsx(pl,{className:`h-6 w-6 text-white transition-all duration-300 ${i?"opacity-100 scale-100":"opacity-0 scale-50"}`})}),a.jsx("span",{className:"text-base font-medium",children:s})]})},s)})}),a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 pt-4 border-t border-white/10",children:[a.jsxs("p",{className:"text-sm text-white/70",children:[r===0&&"Não tem certeza? Faça um diagnóstico com nossa equipe.",r>0&&r<3&&a.jsxs(a.Fragment,{children:["Você marcou ",a.jsx("strong",{className:"text-white",children:r})," ",r===1?"item":"itens"," â vale uma análise técnica."]}),r>=3&&a.jsx("span",{className:"text-primary-glow font-semibold",children:"Sua frota apresenta risco operacional. Recomendamos diagnóstico imediato."})]}),a.jsx(V,{asChild:!0,size:"lg",className:"bg-primary hover:bg-primary/90 text-primary-foreground font-bold h-12 px-6 shadow-[0_10px_30px_-8px_hsl(var(--primary)/0.6)]",children:a.jsxs("a",{href:"#cta-final",className:"inline-flex items-center gap-2",children:["Receber diagnóstico",a.jsx(ot,{className:"h-5 w-5"})]})})]})]})]})})]})}
650,q6="/__l5e/assets-v1/070c73b1-9df2-41ea-9646-0f15a66e53c7/ldc.png",V6={url:q6},H6="/__l5e/assets-v1/d70e22af-21dd-421e-8ba2-44376a7cf6b0/transdourada.png",W6={url:H6},K6="/__l5e/assets-v1/1ca00a27-d316-4312-8c46-5ff07ff5af8c/marfort.png",G6={url:K6},Z6="/__l5e/assets-v1/f517bf2c-985f-467c-ba09-cc71fb1e6908/mega.png",J6={url:Z6},Q6="/__l5e/assets-v1/ac6656b5-c41b-4d52-a99c-cc7556ea748d/jurua.png",Y6={url:Q6},X6="/__l5e/assets-v1/39dd991e-e3ed-45ce-80c4-015c2eff9d34/wpereira.png",eM={url:X6},tM="/__l5e/assets-v1/f7437173-6f4b-46a5-ac8f-0b576aaa49df/3nf.png",rM={url:tM},nM="/__l5e/assets-v1/c9d1e5ed-bfa3-4aac-a6e6-84fe95bafdb8/gf.png",sM={url:nM},aM="/__l5e/assets-v1/6723af9a-0648-4a62-92ed-5ab1a9766e91/fandreis.png",oM={url:aM},iM="/__l5e/assets-v1/268ee1d6-00a2-4df9-8b88-a837afb7992b/belnave.png",lM={url:iM},cM="/__l5e/assets-v1/173421b3-22ef-4818-bbd5-c8ad3ebf171a/gdias.png",dM={url:cM},uM="/__l5e/assets-v1/f076025f-1b9f-42fc-9ee8-d2231fc4d9c7/wilsonsons.png",hM={url:uM},fM="/__l5e/assets-v1/5618cae7-085d-4344-9b1b-488ee7ac48ec/tgs.png",pM={url:fM},mM="/__l5e/assets-v1/2eb23287-9c46-4c11-b5cc-c5618551cd96/cristalmar.png",gM={url:mM},vM="/__l5e/assets-v1/66b0b562-6232-4d20-ae0f-1357f504b9d0/bertuol.png",xM={url:vM},yM="/__l5e/assets-v1/a3970919-f412-4f2d-95d6-4159111abb06/amazonia.jpg",bM={url:yM},wM="/__l5e/assets-v1/a9c07b77-6fd1-4b29-8bb2-eb8105eec050/bibi.png",jM={url:wM},kM=V6.url,_M=W6.url,NM=G6.url,SM=J6.url,CM=Y6.url,EM=eM.url,RM=rM.url,PM=sM.url,TM=oM.url,AM=lM.url,OM=dM.url,LM=hM.url,IM=pM.url,$M=gM.url,DM=xM.url,MM=bM.url,zM=jM.url,FM=[{name:"Louis Dreyfus Company",logo:kM,scale:"md"},{name:"Wilson Sons",logo:LM,scale:"lg"},{name:"Transdourada Navegação",logo:_M,scale:"wide"},{name:"Grupo GDias",logo:OM,scale:"lg"},{name:"TGS",logo:IM,scale:"lg"},{name:"Juruá Estaleiro & Navegação",logo:CM,scale:"wide"},{name:"Mega LogÃstica",logo:SM,scale:"wide"},{name:"Marfort Serviços MarÃtimos",logo:NM,scale:"wide"},{name:"W Pereira Navegação",logo:EM,scale:"wide"},{name:"Cidade Transporte / Grupo 3NF",logo:RM,scale:"wide"},{name:"Cristalmar Transportes MarÃtimos",logo:$M,scale:"lg"},{name:"Bertuol Fertilizantes",logo:DM,scale:"lg"},{name:"Amazônia Navegações",logo:MM,scale:"wide"},{name:"Bibi Shipyards",logo:zM,scale:"lg"},{name:"Belnave Rodofluvial e LogÃstica",logo:AM,scale:"wide"},{name:"Gf Navegação e Serviços de Máquinas",logo:PM,scale:"md"},{name:"F. Andreis",logo:TM,scale:"md"}],UM={wide:"max-h-12 max-w-[95%]",md:"max-h-16 max-w-[85%]",lg:"max-h-20 max-w-[75%]"},BM=[{value:"20+",label:"Anos de atuação"},{value:"873+",label:"Armadores atendidos no último ano"},{value:"10",label:"Escritórios"},{value:"Brasil inteiro",label:"Cobertura operacional"}],R2=()=>a.jsxs("div",{children:[a.jsx("p",{className:"mb-8 text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground",children:"Armadores e operadores que escolheram a Record"}),a.jsx("div",{className:"grid grid-cols-2 gap-px overflow-hidden rounded-xl border border-border bg-border md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:FM.map(e=>a.jsx("div",{className:"group flex h-28 items-center justify-center bg-background px-4 text-center transition-colors hover:bg-ink/5",title:e.name,children:e.logo?a.jsx("img",{src:e.logo,alt:`Logo ${e.name}`,width:240,height:96,loading:"lazy",decoding:"async",className:`${UM[e.scale??"md"]} object-contain grayscale opacity-80 transition group-hover:grayscale-0 group-hover:opacity-100`}):a.jsx("span",{className:"font-display text-sm font-semibold text-ink",children:e.name})},e.name))})]}),qM=()=>a.jsx("section",{className:"bg-surface-soft py-24 md:py-32",children:a.jsxs("div",{className:"container-record",children:[a.jsxs("div",{className:"max-w-3xl mb-16",children:[a.jsx("div",{className:"eyebrow mb-5",children:"Quem confia na Record"}),a.jsxs("h2",{className:"font-display text-4xl md:text-5xl font-bold text-ink leading-tight",children:["Resultados que sustentam"," ",a.jsx("span",{className:"text-primary",children:"nossa atuação"}),"."]})]}),a.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-8 mb-20 pb-20 border-b border-border",children:BM.map(e=>a.jsxs("div",{children:[a.jsx("div",{className:"font-display text-5xl md:text-6xl font-extrabold text-primary mb-2",children:e.value}),a.jsx("p",{className:"text-sm text-muted-foreground leading-snug max-w-[200px]",children:e.label})]},e.label))}),a.jsx(R2,{})]})}),VM=[{title:"Navegação interior",icon:w5,desc:"Embarcações de rios, lagos e hidrovias com cobertura técnica completa."},{title:"Apoio marÃtimo",icon:Eg,desc:"Suporte à s operações offshore e atendimento à s plataformas."}
650,{title:"Transporte de passageiros",icon:Cu,desc:"Certificação para embarcações de turismo, travessia e cabotagem."},{title:"Rebocadores",icon:Ca,desc:"Vistoria e renovação para rebocadores portuários e de longo curso."},{title:"Carga",icon:d5,desc:"Cargueiros, graneleiros e embarcações de transporte de mercadorias."},{title:"Balsas",icon:xk,desc:"Balsas de carga seca, fluvial e travessia com regularização ágil."},{title:"Empurradores",icon:l5,desc:"Empurradores fluviais e comboios com acompanhamento contÃnuo."},{title:"Offshore",icon:KA,desc:"Unidades offshore certificadas dentro das exigências da Marinha."}],HM=()=>a.jsx("section",{id:"servicos",className:"bg-background py-24 md:py-32",children:a.jsxs("div",{className:"container-record",children:[a.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-8 mb-16",children:[a.jsxs("div",{className:"max-w-2xl",children:[a.jsx("div",{className:"eyebrow mb-5",children:"Cobertura técnica"}),a.jsxs("h2",{className:"font-display text-4xl md:text-5xl font-bold text-ink leading-tight",children:["Categorias atendidas pela"," ",a.jsx("span",{className:"text-primary",children:"Record"}),"."]})]}),a.jsxs("a",{href:"#cta-final",className:"text-sm font-semibold text-primary hover:text-primary-deep flex items-center gap-2",children:["Falar com especialista",a.jsx(Lp,{className:"h-4 w-4"})]})]}),a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6",children:VM.map(e=>{const t=e.icon;return a.jsxs("div",{className:"group relative flex flex-col bg-surface-soft border border-border rounded-2xl p-6 hover:border-primary hover:shadow-card hover:-translate-y-0.5 transition-all duration-300",children:[a.jsx("div",{className:"h-12 w-12 rounded-xl bg-primary/10 text-primary flex items-center justify-center mb-5 group-hover:bg-primary group-hover:text-white transition-colors",children:a.jsx(t,{className:"h-6 w-6"})}),a.jsx("h3",{className:"font-display text-lg font-bold text-ink mb-2",children:e.title}),a.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed flex-1",children:e.desc})]},e.title)})})]})}),WM=[{icon:uk,label:"Documente o estado da embarcação antes da viagem."},{icon:ck,label:"Registre fotos organizadas por item inspecionado."},{icon:kk,label:"Colete assinatura digital do comandante ou responsável."},{icon:ya,label:"Gere relatórios profissionais em PDF."},{icon:YA,label:"Compare inspeções anteriores."},{icon:$g,label:"Apoie a equipe de manutenção com informações precisas."},{icon:mk,label:"Crie histórico completo da frota."}],KM=[{icon:xk,label:"Checklists personalizados para cada armador."},{icon:Ca,label:"Itens especÃficos da operação do cliente."},{icon:Cu,label:"Capacitação de colaboradores para inspeções preventivas."},{icon:$t,label:"Padronização das inspeções internas."}],Xb=[{icon:$t,title:"Certificação Record",desc:"Vistorias estatutárias e conformidade regulatória da frota."},{icon:c5,title:"ConnectRecord",desc:"Gestão documental, certificados e vencimentos."},{icon:$p,title:"Aplicativo de Inspeção Preventiva",desc:"Inspeções digitais, fotos, relatórios e histórico."},{icon:$g,title:"Manutenção",desc:"Mais informações para tomada de decisão."},{icon:DA,title:"Próxima Vistoria",desc:"Muito mais previsibilidade e conformidade."}],GM=()=>a.jsxs("section",{className:"bg-ink text-white py-28 md:py-36 relative overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 grid-tech opacity-30"}),a.jsx("div",{className:"absolute -left-40 bottom-0 w-[500px] h-[500px] bg-accent/10 rounded-full blur-3xl"}),a.jsx("div",{className:"absolute -right-40 top-0 w-[500px] h-[500px] bg-primary/10 rounded-full blur-3xl"}),a.jsxs("div",{className:"container-record relative z-10",children:[a.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-center",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-accent/15 text-accent text-xs font-semibold uppercase tracking-wider mb-6",children:[a.jsx($p,{className:"h-3.5 w-3.5"}),"Inspeção Preventiva de Frota"]}),a.jsx("h2",{className:"font-display text-4xl md:text-6xl font-extrabold leading-[1.05] tracking-tight mb-5",children:"Sua frota pronta antes, durante e depois de cada viagem."}),a.jsx("p",{className:"text-base md:text-lg text-white/75 leading-relaxed mb-6",children:"O aplicativo Record transforma inspeções de rotina em relatórios completos, criando histórico, evidências e apoiando a manutenção preventiva da frota."}),a.jsx("p",{className:"text-base md:text-lg text-white/65 leading-relaxed mb-8",children:"Conheça exatamente o estado da embarcação antes da saÃda e após o retorno â com dados, fotos e assinaturas que protegem a sua operação."}),a.jsxs("div",{className:"flex flex-wrap gap-3 mb-6",children:[a.jsxs(V,{size:"lg",className:"bg-primary hover:bg-primary-deep h-12 text-base font-semibold",children:[a.jsx(Pn,{className:"mr-2 h-5 w-5"}),"Baixar aplicativo"]}),a.jsxs(V,{size:"lg",variant:"outline",className:"h-12 text-base font-semibold bg-transparent border-white/30 text-white hover:bg-white/10 hover:text-white",children:["Solicitar acesso",a.jsx(ot,{className:"ml-2 h-5 w-5"})]})]}),a.jsxs("div",{className:"flex flex-wrap gap-3 mb-5",children:[a.jsxs("a",{href:"#","aria-label":"DisponÃvel na Google Play",className:"inline-flex items-center gap-2 px-4 h-12 rounded-xl bg-white/5 border border-white/15 hover:bg-white/10 transition",children:[a.jsx("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"currentColor","aria-hidden":!0,
650children:a.jsx("path",{d:"M3.6 2.3c-.3.3-.5.8-.5 1.5v16.4c0 .7.2 1.2.5 1.5l9.2-9.6L3.6 2.3zm10.3 10.4l2.7 2.8-11 6.2c-.4.2-.8.2-1.1 0l9.4-9zM18.9 9l-3.6 2L13 13.5l2.3 2.4 3.6 2c1.2.7 1.2 1.7 0 2.4l-3.6 2 1.6-1.6 5.4-3c1.2-.7 1.2-1.7 0-2.4l-5.4-3-1.6-1.6L13 10.5l2.3-2.4 3.6 2c.1-.4.1-.7 0-1.1zM13.9 11.3L4.7 1.7c.3-.1.7-.1 1.1.1l11 6.2-2.9 3.3z"})}),a.jsxs("span",{className:"text-left leading-tight",children:[a.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-white/60",children:"DisponÃvel na"}),a.jsx("span",{className:"block text-sm font-semibold",children:"Google Play"})]})]}),a.jsxs("a",{href:"#","aria-label":"DisponÃvel na App Store",className:"inline-flex items-center gap-2 px-4 h-12 rounded-xl bg-white/5 border border-white/15 hover:bg-white/10 transition",children:[a.jsx("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"currentColor","aria-hidden":!0,children:a.jsx("path",{d:"M16.4 12.7c0-2.6 2.1-3.8 2.2-3.9-1.2-1.8-3.1-2-3.7-2-1.6-.2-3.1.9-3.9.9-.8 0-2.1-.9-3.4-.9-1.7 0-3.4 1-4.3 2.6-1.8 3.2-.5 7.9 1.3 10.5.9 1.3 1.9 2.7 3.3 2.6 1.3-.1 1.8-.9 3.4-.9 1.6 0 2 .9 3.4.9 1.4 0 2.3-1.3 3.2-2.6.7-1 1.2-2 1.5-3.1-3.3-1.2-3-4-3-4.1zM13.9 4.3C14.6 3.4 15.1 2.2 15 1c-1.1.1-2.4.7-3.1 1.6-.7.8-1.3 2-1.1 3.2 1.2.1 2.4-.6 3.1-1.5z"})}),a.jsxs("span",{className:"text-left leading-tight",children:[a.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-white/60",children:"DisponÃvel na"}),a.jsx("span",{className:"block text-sm font-semibold",children:"App Store"})]})]})]}),a.jsx("p",{className:"text-xs md:text-sm text-white/60",children:"Gratuito para clientes Record. DisponÃvel para não clientes mediante plano mensal."})]}),a.jsxs("div",{className:"relative flex justify-center lg:justify-end",children:[a.jsx("div",{className:"absolute -inset-10 bg-gradient-to-tr from-accent/30 via-primary/20 to-accent/10 rounded-[3rem] blur-3xl pointer-events-none","aria-hidden":!0}),a.jsxs("div",{className:"relative w-[280px] md:w-[320px] aspect-[9/19] rounded-[2.5rem] bg-gradient-to-b from-zinc-900 to-black border-[10px] border-zinc-800 shadow-elevated ring-1 ring-white/10 overflow-hidden",children:[a.jsx("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 w-24 h-5 bg-black rounded-full z-20"}),a.jsxs("div",{className:"relative h-full w-full bg-background text-ink flex flex-col",children:[a.jsxs("div",{className:"px-5 pt-10 pb-4 bg-gradient-to-br from-primary to-primary-deep text-primary-foreground",children:[a.jsxs("div",{className:"flex items-center gap-2 text-[10px] uppercase tracking-wider opacity-80",children:[a.jsx($p,{className:"h-3 w-3"})," Record App"]}),a.jsx("h3",{className:"font-display font-bold text-lg mt-1 leading-tight",children:"Inspeção em andamento"}),a.jsx("p",{className:"text-[11px] opacity-90 mt-1",children:"Embarcação: M/V Atlântico"})]}),a.jsxs("div",{className:"flex-1 p-4 space-y-2.5 overflow-hidden",children:[[{label:"Equipamentos de salvatagem",ok:!0},{label:"Sistema de combate a incêndio",ok:!0},{label:"Documentação a bordo",ok:!0},{label:"Sinalização náutica",ok:!1},{label:"Casco e estrutura",ok:!0}].map(e=>a.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg bg-muted/60 border border-border",children:[a.jsx("div",{className:`h-7 w-7 rounded-md flex items-center justify-center shrink-0 ${e.ok?"bg-primary/15 text-primary":"bg-accent/20 text-accent"}`,children:e.ok?a.jsx(Ze,{className:"h-4 w-4"}):a.jsx(uk,{className:"h-4 w-4"})}),a.jsx("span",{className:"text-[11px] font-medium flex-1 truncate",children:e.label}),a.jsx(ck,{className:"h-3.5 w-3.5 text-muted-foreground"})]},e.label)),a.jsxs("div",{className:"mt-3 p-3 rounded-lg bg-ink text-white",children:[a.jsxs("div",{className:"flex items-center justify-between text-[10px] uppercase tracking-wider opacity-70",children:[a.jsx("span",{children:"Progresso"}),a.jsx("span",{children:"80%"})]}),a.jsx("div",{className:"mt-1.5 h-1.5 rounded-full bg-white/10 overflow-hidden",children:a.jsx("div",{className:"h-full w-4/5 bg-gradient-to-r from-primary to-accent"})})]})]}),a.jsx("div",{className:"px-4 pb-4",children:a.jsx("div",{className:"rounded-lg bg-primary text-primary-foreground text-center py-2.5 text-xs font-semibold",children:"Gerar relatório PDF"})})]})]})]})]}),a.jsxs("div",{className:"mt-24 md:mt-32",children:[a.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-12",children:[a.jsx("span",{className:"inline-block text-xs font-semibold uppercase tracking-[0.2em] text-accent mb-3",children:"Ciclo operacional da embarcação"}),a.jsx("h3",{className:"font-display text-3xl md:text-4xl font-bold leading-tight",children:"Um aplicativo que acompanha toda a viagem"})]}),a.jsxs("div",{className:"grid md:grid-cols-3 gap-5 md:gap-6 relative",children:[a.jsxs("div",{className:"relative p-7 rounded-2xl bg-white/[0.04] border border-white/10",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-accent",children:"Etapa 01"}),a.jsx(Eg,{className:"h-4 w-4 text-accent"})]}),a.jsx("h4",{className:"font-display text-xl font-bold mb-3",children:"Antes da viagem"}),a.jsxs("ul",{className:"space-y-2 text-sm text-white/80",children:[a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),"Inspeção completa"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),"Registro fotográfico"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}
vendor: 5,009 bytes, line 650
650),"Observações e pendências"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),"Assinatura digital do comandante"]})]}),a.jsx("div",{className:"hidden md:flex absolute -right-4 top-1/2 -translate-y-1/2 z-10 h-8 w-8 rounded-full bg-primary text-primary-foreground items-center justify-center shadow-red",children:a.jsx(ot,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"relative p-7 rounded-2xl bg-gradient-to-br from-primary/15 to-accent/10 border border-white/15",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-accent",children:"Etapa 02"}),a.jsx(Ca,{className:"h-4 w-4 text-accent"})]}),a.jsx("h4",{className:"font-display text-xl font-bold mb-3",children:"Durante a operação"}),a.jsx("p",{className:"text-sm text-white/80 leading-relaxed",children:"A embarcação executa normalmente sua missão, com a tranquilidade de uma inspeção documentada e evidências preservadas."}),a.jsx("div",{className:"hidden md:flex absolute -right-4 top-1/2 -translate-y-1/2 z-10 h-8 w-8 rounded-full bg-primary text-primary-foreground items-center justify-center shadow-red",children:a.jsx(ot,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"relative p-7 rounded-2xl bg-white/[0.04] border border-white/10",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-accent",children:"Etapa 03"}),a.jsx($g,{className:"h-4 w-4 text-accent"})]}),a.jsx("h4",{className:"font-display text-xl font-bold mb-3",children:"Após o retorno"}),a.jsxs("ul",{className:"space-y-2 text-sm text-white/80",children:[a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),"Nova inspeção"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),"Comparação das condições"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),"Identificação de novos danos"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx(Ze,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),"Encaminhamento para manutenção"]})]})]})]})]}),a.jsxs("div",{className:"mt-24 md:mt-32",children:[a.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-12",children:[a.jsx("span",{className:"inline-block text-xs font-semibold uppercase tracking-[0.2em] text-accent mb-3",children:"Evidências e Controle"}),a.jsx("h3",{className:"font-display text-3xl md:text-4xl font-bold leading-tight",children:"Inspeções que viram decisões mais seguras"})]}),a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-5",children:WM.map(({icon:e,label:t})=>a.jsxs("div",{className:"group p-6 rounded-2xl bg-white/[0.03] border border-white/10 hover:border-accent/40 hover:bg-white/[0.05] transition-colors flex items-start gap-4",children:[a.jsx("div",{className:"h-11 w-11 rounded-xl bg-gradient-to-br from-primary to-primary-deep flex items-center justify-center shrink-0 shadow-red",children:a.jsx(e,{className:"h-5 w-5 text-primary-foreground"})}),a.jsx("p",{className:"text-sm md:text-base text-white/85 leading-snug pt-1.5",children:t})]},t))}),a.jsxs("div",{className:"relative mt-12 p-8 md:p-12 rounded-3xl bg-gradient-to-br from-primary/15 via-white/[0.03] to-accent/15 border border-white/10 text-center overflow-hidden",children:[a.jsx("div",{className:"absolute -top-20 -right-20 w-72 h-72 bg-primary/20 rounded-full blur-3xl"}),a.jsx("div",{className:"absolute -bottom-20 -left-20 w-72 h-72 bg-accent/20 rounded-full blur-3xl"}),a.jsxs("p",{className:"relative font-display text-2xl md:text-4xl font-extrabold leading-tight",children:["Mais controle. Mais evidências."," ",a.jsx("span",{className:"bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent",children:"Menos riscos."})]}),a.jsx("p",{className:"relative mt-4 text-base md:text-lg text-white/75 max-w-2xl mx-auto",children:"Transforme inspeções em decisões mais seguras para sua operação e mantenha a frota organizada, do convés à manutenção."})]})]}),a.jsx("div",{className:"mt-24 md:mt-32",children:a.jsxs("div",{className:"grid lg:grid-cols-[1fr_2fr] gap-10 lg:gap-16 items-start",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-accent/15 text-accent text-xs font-semibold uppercase tracking-wider mb-5",children:[a.jsx(Su,{className:"h-3.5 w-3.5"}),"Em evolução"]}),a.jsx("h3",{className:"font-display text-3xl md:text-4xl font-bold leading-tight mb-4",children:"Uma plataforma em evolução contÃnua"}),a.jsx("p",{className:"text-white/70 leading-relaxed",children:"Novas funcionalidades estão sendo desenvolvidas para aproximar ainda mais o aplicativo da realidade operacional de ca
650da armador."})]}),a.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:KM.map(({icon:e,label:t})=>a.jsxs("div",{className:"p-5 rounded-2xl bg-white/[0.03] border border-dashed border-white/15 flex items-start gap-3",children:[a.jsx("div",{className:"h-10 w-10 rounded-lg bg-accent/15 text-accent flex items-center justify-center shrink-0",children:a.jsx(e,{className:"h-5 w-5"})}),a.jsx("p",{className:"text-sm md:text-base text-white/85 leading-snug pt-1.5",children:t})]},t))})]})}),a.jsxs("div",{className:"mt-24 md:mt-32",children:[a.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-12",children:[a.jsx("span",{className:"inline-block text-xs font-semibold uppercase tracking-[0.2em] text-accent mb-3",children:"Ecossistema Record"}),a.jsx("h3",{className:"font-display text-3xl md:text-4xl font-bold leading-tight",children:"Um sistema completo de gestão preventiva da frota"}),a.jsx("p",{className:"mt-4 text-white/70",children:"Todas as soluções Record trabalham de forma complementar â da certificação à próxima vistoria."})]}),a.jsx("div",{className:"grid md:grid-cols-5 gap-4 md:gap-3 relative",children:Xb.map((e,t)=>{const r=e.icon;return a.jsxs("div",{className:"relative",children:[a.jsxs("div",{className:"h-full p-5 rounded-2xl bg-white/[0.04] border border-white/10 hover:border-primary/40 transition-colors",children:[a.jsx("div",{className:"flex items-center gap-2 mb-3",children:a.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-accent",children:String(t+1).padStart(2,"0")})}),a.jsx("div",{className:"h-11 w-11 rounded-xl bg-gradient-to-br from-primary to-primary-deep flex items-center justify-center mb-3 shadow-red",children:a.jsx(r,{className:"h-5 w-5 text-primary-foreground"})}),a.jsx("h4",{className:"font-display font-bold text-base leading-tight mb-1.5",children:e.title}),a.jsx("p",{className:"text-xs text-white/65 leading-relaxed",children:e.desc})]}),t<Xb.length-1&&a.jsx("div",{className:"hidden md:flex absolute -right-2 top-1/2 -translate-y-1/2 z-10 h-6 w-6 rounded-full bg-primary text-primary-foreground items-center justify-center",children:a.jsx(ot,{className:"h-3 w-3"})})]},e.title)})})]}),a.jsx("p",{className:"mt-16 text-center text-xs uppercase tracking-[0.2em] text-white/70",children:"Utilizado por armadores em todo o Brasil"})]})]}),ZM="/__l5e/assets-v1/fb6d545b-f5af-41f7-8df4-e27d41cfa2df/fleet-aerial.jpg",JM={url:ZM},QM=JM.url,P2=[{city:"Manaus",state:"AM",region:"Norte"},{city:"Belém",state:"PA",region:"Norte"},{city:"Santarém",state:"PA",region:"Norte"},{city:"Macapá",state:"AP",region:"Norte"},{city:"Porto Velho",state:"RO",region:"Norte"},{city:"Salvador",state:"BA",region:"Nordeste"},{city:"São Paulo",state:"SP",region:"Sudeste"},{city:"Rio de Janeiro",state:"RJ",region:"Sudeste"},{city:"ItajaÃ",state:"SC",region:"Sul"},{city:"Porto Alegre",state:"RS",region:"Sul"}],YM={Manaus:{x:222,y:197},Belém:{x:381,y:174},Santarém:{x:296,y:187},Macapá:{x:346,y:153},"Porto Velho":{x:169,y:274},Salvador:{x:519,y:332},"São Paulo":{x:380,y:464},"Rio de Janeiro":{x:455,y:469},ItajaÃ:{x:379,y:524},"Porto Alegre":{x:344,y:567}},XM="M332 588 L329 592 L332 597 L325 609 L313 619 L313 610 L317 605 L323 606 L324 596 L318 604 L314 603 L309 596 L288 584 L284 578 L278 582 L278 578 L267 568 L255 570 L280 544 L282 545 L281 543 L294 533 L308 528 L310 525 L309 521 L310 515 L307 507 L297 506 L301 485 L296 482 L286 484 L280 461 L272 458 L266 461 L250 458 L253 442 L248 432 L252 429 L248 426 L258 405 L254 396 L245 390 L246 378 L220 378 L219 367 L215 362 L219 362 L216 344 L209 339 L197 340 L193 334 L184 333 L179 327 L164 326 L153 319 L149 309 L148 287 L132 290 L105 307 L76 305 L78 284 L68 291 L55 291 L52 284 L41 283 L45 278 L30 258 L34 254 L35 247 L42 243 L40 237 L45 225 L59 216 L72 214 L76 211 L85 213 L93 169 L90 161 L84 156 L84 146 L97 145 L95 139 L87 139 L87 130 L110 130 L110 126 L113 128 L121 123 L125 138 L128 137 L136 143 L146 140 L146 145 L152 138 L162 133 L163 135 L168 126 L176 124 L176 120 L167 119 L165 105 L157 95 L168 100 L179 99 L182 104 L189 96 L196 97 L209 91 L215 86 L213 82 L221 81 L223 85 L220 92 L227 93 L229 99 L225 104 L225 107 L223 114 L226 128 L239 138 L246 132 L257 130 L260 126 L278 128 L276 122 L278 119 L292 118 L299 123 L309 121 L320 124 L340 93 L346 100 L351 124 L354 123 L362 130 L360 149 L365 149 L375 157 L382 157 L382 161 L388 163 L398 162 L403 166 L407 165 L406 167 L410 166 L409 168 L411 169 L413 166 L416 171 L418 168 L425 172 L428 175 L430 175 L432 173 L432 177 L434 178 L435 178 L436 183 L438 184 L439 188 L443 187 L443 189 L448 184 L461 190 L476 194 L491 192 L496 192 L499 193 L519 205 L537 222 L559 224 L564 229 L569 250 L570 252 L567 272 L563 280 L548 299 L540 304 L525 328 L513 336 L511 356 L514 372 L509 390 L510 397 L502 407 L501 424 L498 427 L492 438 L490 441 L488 441 L484 450 L485 457 L471 464 L471 470 L456 470 L456 466 L451 471 L445 469 L438 469 L434 472 L431 475 L424 479 L423 482 L418 481 L414 482 L413 484 L404 487 L391 497 L380 510 L379 521 L382 528 L380 529 L378 547 L365 556 L350 582 L332 597 L335 593 L340 589 L344 582 L351 577 L351 572 L348 573 L343 567 L341 576
650L341 582 L334 585 Z",T2=()=>a.jsxs("div",{className:"relative mx-auto aspect-[6/7] w-full max-w-[520px] overflow-hidden rounded-2xl border-2 border-border bg-surface-soft shadow-[0_20px_60px_-30px_hsl(var(--ink)/0.25)]",children:[a.jsx("img",{src:QM,alt:"",width:600,height:700,className:"absolute inset-0 h-full w-full object-cover opacity-[0.08]",loading:"lazy",decoding:"async","aria-hidden":"true"}),a.jsxs("svg",{viewBox:"0 0 600 700",preserveAspectRatio:"xMidYMid meet",className:"absolute inset-0 h-full w-full","aria-label":"Mapa do Brasil com escritórios Record",children:[a.jsx("path",{d:XM,fill:"hsl(var(--ink) / 0.08)",stroke:"hsl(var(--ink) / 0.35)",strokeWidth:"1.2",strokeLinejoin:"round",strokeLinecap:"round"}),P2.map(e=>{const t=YM[e.city];return a.jsxs("g",{children:[a.jsx("circle",{cx:t.x,cy:t.y,r:"14",fill:"hsl(var(--primary) / 0.2)",className:"beacon-pulse"}),a.jsx("circle",{cx:t.x,cy:t.y,r:"6",fill:"hsl(var(--primary))"}),a.jsx("text",{x:t.x+12,y:t.y+4,fill:"hsl(var(--ink))",fontSize:"12",fontWeight:"700",fontFamily:"Montserrat",stroke:"hsl(var(--surface-soft))",strokeWidth:"3",paintOrder:"stroke",strokeLinejoin:"round",children:e.city})]},e.city)})]})]}),ez=()=>a.jsx("section",{id:"escritorios",className:"bg-background py-24 md:py-32 relative overflow-hidden",children:a.jsx("div",{className:"container-record",children:a.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-center",children:[a.jsxs("div",{children:[a.jsx("div",{className:"eyebrow mb-5",children:"Cobertura nacional"}),a.jsxs("h2",{className:"font-display text-4xl md:text-5xl font-bold text-ink leading-tight mb-5",children:["Onde o Brasil navega,"," ",a.jsx("span",{className:"text-primary",children:"a Record está"}),"."]}),a.jsxs("div",{className:"inline-flex items-center gap-4 px-5 py-4 rounded-2xl bg-primary/5 border-2 border-primary/30 mb-6",children:[a.jsx("span",{className:"font-display text-5xl md:text-6xl font-extrabold text-primary leading-none",children:"10"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-display text-lg font-bold text-ink leading-tight",children:"Escritórios"}),a.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Estrategicamente posicionados"})]})]}),a.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed mb-10",children:"Atendemos armadores da costa Atlântica, da Amazônia e do interior do paÃs com a mesma agilidade técnica."}),a.jsx("div",{className:"grid grid-cols-2 gap-3",children:P2.map(e=>a.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-xl bg-surface-soft border border-border hover:border-primary hover:bg-background transition-all",children:[a.jsx("div",{className:"h-9 w-9 rounded-lg bg-primary/10 text-primary flex items-center justify-center shrink-0",children:a.jsx(Jo,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-display font-bold text-ink text-sm leading-tight",children:e.city}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.state," · ",e.region]})]})]},e.city))})]}),a.jsx(T2,{})]})})}),tz="/assets/inspection-B1MurL5C.jpg",rz=[{icon:ml,label:"Identificação de riscos regulatórios"},{icon:hk,label:"Orientação técnica clara"},{icon:$A,label:"Planejamento da certificação"},{icon:dk,label:"Maior previsibilidade operacional"}],nz=()=>{const{openWhatsApp:e}=Ea();return a.jsxs("section",{id:"cta-final",className:"relative bg-ink text-white py-28 md:py-40 overflow-hidden border-t border-white/5",children:[a.jsxs("div",{className:"absolute inset-0",children:[a.jsx("img",{src:tz,alt:"","aria-hidden":!0,className:"absolute inset-0 w-full h-full object-cover opacity-20",loading:"lazy"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-ink via-ink/95 to-ink/80"}),a.jsx("div",{className:"absolute inset-0 grid-tech opacity-30"})]}),a.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-[500px] h-[500px] bg-accent/15 rounded-full blur-3xl beam-sweep"}),a.jsx("div",{className:"absolute -left-40 -bottom-20 w-[420px] h-[420px] bg-primary/15 rounded-full blur-3xl"}),a.jsx("div",{className:"container-record relative z-10",children:a.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 lg:gap-24 items-center",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[a.jsx(hv,{className:"h-10 w-10"}),a.jsx("span",{className:"text-xs uppercase tracking-[0.25em] font-semibold text-accent",children:"O farol que guia sua frota"})]}),a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/15 border border-primary/30 text-primary text-xs font-bold uppercase tracking-wider mb-6",children:[a.jsx(Su,{className:"h-3.5 w-3.5"}),"Encerre com decisão"]}),a.jsxs("h2",{className:"font-display text-5xl md:text-7xl font-extrabold leading-[1.02] tracking-tight mb-6",children:["Solicite um"," ",a.jsx("span",{className:"bg-gradient-to-r from-primary-glow to-accent bg-clip-text text-transparent",children:"diagnóstico técnico"})]}),a.jsx("p",{className:"text-xl md:text-2xl text-white/80 leading-relaxed mb-4 max-w-xl",children:"Entenda a situação da sua embarcação, evite riscos e mantenha sua operação segura."}),a.jsx("p",{className:"text-base md:text-lg font-semibold text-accent mb-10 max-w-xl",children:"Evite multas, perda de prazo e atrasos operacionais."}),a.jsxs("div",{className:"flex flex-wrap gap-4 mb-8",children:[a.jsxs(V,{size:"lg",onClick:()=>tD("cta-final-diagnostico"),className:"bg-primary hover:bg-primary-deep text-white shadow-red h-14 px-8 text-base font-semibold",children:["Solicitar diagnóstico técnico",a.jsx(ot,{className:"ml-2 h-5 w-5"})]}),a.jsxs(V,{size:"lg",variant:"outline","aria-haspopup":"dialog",onClick:()=>e({source:"cta-final-whatsapp",origem:{tipo:"site"}}),className:"h-14 px-8 text-base font-semibold border-white/30 bg-white/5 text-white hover:bg-white hover:text-ink",children:[a.jsx(Dr,{className:"mr-2 h-5 w-5"}),"Falar no WhatsApp"]})]}),a.jsx("p",{className:"text-sm font-semibold text-white/90 mb-4",children:"Mais de 20 anos ajudando armadores em todo o Brasil."}),a.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-accent/10 border border-accent/40 text-accent text-sm font-semibold mb-6",children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-accent animate-pulse"}),"Pra quem quer o certo"]}),a.jsxs("div",{className:"flex items-center gap-2 text-sm text-white/70 mb-2",children:[a.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500 animate-pulse"}),a.jsx("span",{children:"Atendimento rápido e acompanhamento completo."})]}),a.jsx("p",{className:"text-sm text-accent font-semibold",children:"Evite problemas futuros e mantenha sua embarcação sempre regular."})]}),a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute -inset-6 bg-gradient-to-tr from-primary/30 via-accent/20 to-primary/10 rounded-[2rem] blur-3xl pointer-events-none","aria-hidden":!0}),a.jsxs("div",{className:"relative rounded-2xl border border-white/15 bg-white/[0.04] backdrop-blur-sm p-8 md:p-10 shadow-elevated",children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-primary mb-6",children:"O que você recebe no diagnóstico"}),a.jsx("ul",{className:"space-y-4",children:rz.map(t=>{const r=t.icon;return a.jsxs("li",{className:"group flex items-center gap-4 p-4 rounded-xl bg-white/[0.04] border border-white/10 hover:border-primary/40 hover:bg-white/[0.07] transition-all",children:[a.jsx("div",{className:"shrink-0 h-11 w-11 rounded-lg bg-primary/15 text-primary flex items-center justify-center group-hover:bg-primary group-hover:text-ink transition-colors",children:a.jsx(r,{className:"h-5 w-5"})}),a.jsx("span",{className:"text-base font-medium text-white/90",children:t.label}),a.jsx(Ze,{className:"ml-auto h-5 w-5 text-primary/60 shrink-0"})]},t.label)})})]})]})]})})]})},sz="/assets/selo-marinha-Bv_mDMU7.png",az="/__l5e/assets-v1/f740b085-f61a-4c
650d6-ac36-8c9bf43651ab/selo-iso9001.png",oz={url:az},iz=oz.url,lz=[{logo:sz,alt:"Marinha do Brasil",icon:$t,tag:"Organização Reconhecida",title:"Marinha do Brasil",desc:"Atuação conforme requisitos da Autoridade MarÃtima Brasileira."},{logo:iz,alt:"ISO 9001 â Sistema de Gestão da Qualidade",icon:OA,tag:"ISO 9001",title:"Sistema de Gestão da Qualidade Certificado",desc:"Compromisso com melhoria contÃnua, conformidade e qualidade dos processos."}],cz=()=>a.jsx("section",{id:"certificacoes","aria-labelledby":"certificacoes-title",className:"bg-surface-soft border-t border-border py-20 md:py-24",children:a.jsxs("div",{className:"container-record",children:[a.jsxs("div",{className:"max-w-2xl mx-auto text-center mb-12",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-border bg-background px-3 py-1 text-xs font-semibold uppercase tracking-wider text-ink-soft mb-5",children:[a.jsx($t,{className:"h-3.5 w-3.5 text-primary"}),"Credibilidade institucional"]}),a.jsx("h2",{id:"certificacoes-title",className:"font-display text-3xl md:text-4xl font-bold text-ink mb-3",children:"Certificações e Reconhecimentos"}),a.jsx("p",{className:"text-muted-foreground",children:"Operamos sob padrões reconhecidos pela Autoridade MarÃtima Brasileira e por sistema de gestão da qualidade certificado."})]}),a.jsx("div",{className:"grid md:grid-cols-2 gap-6 max-w-4xl mx-auto",children:lz.map(e=>{const t=e.icon;return a.jsxs("article",{className:"group relative flex flex-col sm:flex-row items-center sm:items-start gap-6 rounded-2xl bg-background border border-border p-6 md:p-8 shadow-[0_1px_2px_hsl(var(--ink)/0.04)] hover:shadow-[0_20px_40px_-20px_hsl(var(--ink)/0.18)] hover:border-primary/30 transition-all",children:[a.jsx("div",{className:"shrink-0 h-24 w-24 rounded-xl bg-surface-soft border border-border flex items-center justify-center p-3",children:a.jsx("img",{src:e.logo,alt:e.alt,className:"max-h-full max-w-full object-contain",loading:"lazy"})}),a.jsxs("div",{className:"flex-1 text-center sm:text-left",children:[a.jsxs("div",{className:"inline-flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-wider text-primary mb-2",children:[a.jsx(t,{className:"h-3.5 w-3.5"}),e.tag]}),a.jsx("h3",{className:"font-display text-lg font-bold text-ink leading-snug mb-1.5",children:e.title}),a.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.desc})]})]},e.title)})})]})}),dz="/__l5e/assets-v1/06c7e737-27d2-4911-938b-be1e70a7fe0b/reconhecimento-marinha-record.pdf",uz={url:dz},hz=[{label:"PolÃtica da Qualidade",href:"/politica-da-qualidade"},{label:"Reconhecimento da Marinha",href:uz.url,external:!0},{label:"PolÃtica de Privacidade",href:"/politica-de-privacidade"},{label:"Trabalhe Conosco",href:"https://app.orbitgestao.com.br/p/vagas/record-certificacao-naval",external:!0},{label:"Nosso time",href:"/time"},{label:"Ouvidoria",href:"/ouvidoria"},{label:"Verificar documentos",href:"/index_autenticidade_manual"}],fz=[{Icon:vk,href:"https://www.instagram.com/certificadorarecord/",label:"Instagram"},{Icon:bk,href:"https://www.linkedin.com/company/recordnaval/",label:"LinkedIn"},{Icon:Nk,href:"https://www.youtube.com/@recordcertificacaonaval9853",label:"YouTube"},{Icon:pk,href:"https://www.facebook.com/certificadorarecord",label:"Facebook"}],pr=()=>a.jsx("footer",{className:"bg-ink text-white/80",children:a.jsxs("div",{className:"container-record py-14",children:[a.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-start lg:justify-between gap-10",children:[a.jsxs("div",{className:"max-w-xs",children:[a.jsx("img",{src:Hl,alt:"Record Certificação Naval",className:"h-12 mb-5 brightness-0 invert"}),a.jsx("p",{className:"text-sm text-white/75 leading-relaxed",children:"Mais de 20 anos guiando armadores brasileiros à certificação correta, segura e sem surpresas."})]}),a.jsx("nav",{"aria-label":"Links institucionais",children:a.jsx("ul",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-10 gap-y-3 text-sm",children:hz.map(({label:e,href:t,external:r})=>a.jsx("li",{children:a.jsx("a",{href:t,...r?{target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer"}:{},className:"text-white/75 hover:text-white transition-colors",children:e})},e))})}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs uppercase tracking-[0.18em] text-white/70 mb-4",children:"Siga-nos"}),a.jsx("div",{className:"flex gap-3",children:fz.map(({Icon:e,href:t,label:r})=>a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":r,className:"h-10 w-10 rounded-full border border-white/15 flex items-center justify-center text-white/70 hover:text-white hover:border-white/40 hover:bg-white/5 transition-all",children:a.jsx(e,{className:"h-4 w-4"})},r))})]})]}),a.jsxs("div",{className:"mt-12 pt-6 border-t border-white/10 flex flex-col md:flex-row justify-between items-center gap-3 text-xs text-white/70",children:[a.jsxs("p",{children:["© ",new Date().getFullYear()," Record Certificação Naval Ltda. Todos os direitos reservados."]}),a.jsxs("div",{className:"flex gap-5",children:[a.jsx("a",{href:"/termos-de-uso",className:"hover:text-white transition-colors",children:"Termos de uso"}),a.jsx("a",{href:"/admin/login",className:"opacity-50 hover:opacity-100 transition-opacity",children:"Painel"})]})]})]})}),vf=768;function pz(){const[e,t]=m.useState(void 0);return m.useEffect(()=>{const r=window.matchMedia(`(max-width: ${vf-1}px)`),n=()=>{t(window.innerWidth<vf)};return r.addEventListener("change",n),t(window.innerWidth<vf),()=>r.removeEventListener("change",n)},[]),!!e}const Kl=({unidadeId:e,origem:t,source:r="float"})=>
650{const[n,s]=m.useState(!1),o=pz(),{openWhatsApp:i}=Ea(),l=r2(e);m.useEffect(()=>{const h=setTimeout(()=>s(!0),2500);return()=>clearTimeout(h)},[]);const c={bottom:`calc(var(--sticky-bar-offset, 0px) + env(safe-area-inset-bottom, 0px) + ${o?"3.75rem":"2.25rem"})`},d=`fixed right-3 md:right-6 z-40 group transition-all duration-500 ease-out ${n?"opacity-100 translate-y-0":"opacity-0 translate-y-3 pointer-events-none"}`,u=a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"absolute inset-0 rounded-full bg-green-500 animate-ping opacity-20"}),a.jsxs("span",{className:"relative flex items-center gap-2 bg-green-500/95 hover:bg-green-600 text-white pl-3.5 pr-4 h-12 md:h-[52px] rounded-full shadow-md hover:shadow-lg transition-all",children:[a.jsx(Dr,{className:"h-5 w-5 md:h-[22px] md:w-[22px]"}),a.jsx("span",{className:"font-semibold text-sm hidden md:inline",children:"WhatsApp"})]})]});return l?a.jsx("a",{href:dv(l,t??{tipo:"unidade",praca:l.praca}),target:"_blank",rel:"noreferrer","aria-label":`Falar no WhatsApp com a unidade de ${l.praca}`,style:c,className:d,onClick:()=>Xg(r,{unidade:l.id,praca:l.praca,estado:l.estado,regiao:l.regiao,page_path:window.location.pathname}),children:u}):a.jsx("button",{type:"button","aria-label":"Falar no WhatsApp","aria-haspopup":"dialog",style:c,className:d,onClick:()=>i({source:r,origem:t}),children:u})},Zu=()=>a.jsx("a",{href:"#cta-final","aria-label":"Solicitar diagnóstico",className:"fixed bottom-6 left-6 z-40 group hidden md:inline-flex",children:a.jsxs("span",{className:"relative inline-flex items-center gap-2 bg-primary hover:bg-primary-deep text-primary-foreground pl-5 pr-4 h-14 rounded-full shadow-red transition-all",children:[a.jsx("span",{className:"font-semibold text-sm",children:"Solicitar diagnóstico"}),a.jsx(ot,{className:"h-4 w-4 transition-transform group-hover:translate-x-0.5"})]})}),mz=()=>a.jsxs(a.Fragment,{children:[a.jsx(Mt,{title:"Record Certificação Naval â Vistoria de embarcações",description:"Certificação naval estatutária com segurança e previsibilidade. +20 anos guiando armadores brasileiros â vistoria, renovação e ConnectRecord.",canonical:Dt("/")}),a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(As,{}),a.jsxs("main",{children:[a.jsx(f6,{}),a.jsx(B6,{}),a.jsx(m6,{}),a.jsx(v6,{}),a.jsx(j6,{}),a.jsx(U6,{}),a.jsx(qM,{}),a.jsx(HM,{}),a.jsx(GM,{}),a.jsx(ez,{}),a.jsx(nz,{}),a.jsx(cz,{})]}),a.jsx(pr,{}),a.jsx(Kl,{}),a.jsx(Zu,{})]})]}),gz=e=>Ps({queryKey:["redirecionamento",e],enabled:!!e,retry:!1,staleTime:5*60*1e3,queryFn:async()=>{const t=(e??"").replace(/\/+$/,"")||"/",{data:r,error:n}=await Le.from("redirecionamentos").select("destino").eq("origem",t).eq("ativo",!0).maybeSingle();if(n)throw n;return(r==null?void 0:r.destino)??null}}),xv=()=>{const e=yt(),{data:t,isLoading:r}=gz(e.pathname);return m.useEffect(()=>{t&&window.location.replace(t)},[t]),r||t?a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:a.jsx(_t,{className:"h-6 w-6 animate-spin text-primary"})}):a.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-background px-6",children:[a.jsx(Mt,{title:"Página não encontrada | Record Certificação Naval",description:"O endereço acessado não existe ou foi removido. Veja o conteúdo técnico da Record.",canonical:Dt(e.pathname),noindex:!0}),a.jsxs("div",{className:"max-w-lg text-center",children:[a.jsx("p",{className:"text-sm font-bold uppercase tracking-[0.2em] text-accent mb-3",children:"Erro 404"}),a.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold text-ink mb-4",children:"Página não encontrada"}),a.jsx("p",{className:"text-muted-foreground mb-8",children:"O endereço acessado não existe ou o conteúdo foi retirado do ar."}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[a.jsx(we,{to:"/conteudo-tecnico",className:"inline-flex items-center justify-center h-12 px-6 rounded-full bg-primary text-primary-foreground font-bold hover:bg-primary-deep transition-colors",children:"Ver conteúdo técnico"}),a.jsx(we,{to:"/",className:"inline-flex items-center justify-center h-12 px-6 rounded-full border border-border text-ink font-semibold hover:bg-muted transition-colors",children:"Ir para a página inicial"})]})]})]})},e0=[{label:"Conteúdo técnico",href:"/conteudo-tecnico"},{label:"Checklist",href:"/checklist-pre-vistoria"}],Ju=({forceSolid:e=!1})=>{const[t,r]=m.useState(!1),[n,s]=m.useState(!1);m.useEffect(()=>{const i=()=>r(window.scrollY>20);return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)},[]);const o=e||t;return a.jsxs("header",{className:`fixed inset-x-0 top-0 z-50 transition-all duration-300 ${o?"bg-background/95 backdrop-blur-md border-b border-border shadow-sm":"bg-transparent"}`,children:[a.jsxs("div",{className:"container-record flex h-20 items-center justify-between",children:[a.jsx(we,{to:"/",className:"flex items-center gap-3",children:a.jsx("img",{src:Hl,alt:"Record Certificação Naval",className:"h-12 w-auto"})}),a.jsxs("nav",{className:"hidden lg:flex items-center gap-8",children:[a.jsxs(we,{to:"/",className:`inline-flex items-center gap-1.5 text-sm font-medium transition-colors ${o?"text-ink-soft hover:text-primary":"text-white/90 hover:text-accent"}`,children:[a.jsx(Ln,{className:"h-4 w-4"}),"InÃcio"]}),e0.map(i=>a.jsx(we,{to:i.href,className:`text-sm font-medium transition-colors ${o?"text-ink-soft hover:text-primary":"text-white/90 hover:text-accent"}`,children:i.label},i.href))]}),a.jsx("div",{className:"hidden lg:flex items-center gap-3",children:a.jsx(V,{asChild:!0,size:"sm",className:"bg-gradient-to-r from-primary to-primary-deep hover:from-primary-deep hover:to-primary text-primary-foreground font-semibold shadow-red ring-2 ring-primary/30 hover:ring-accent/50 transition-all h-10 px-5",children:a.jsxs("a",{href:"/#cta-final",className:"inline-flex items-center gap-2",children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-accent animate-pulse"}),"Solicitar diagnóstico"]})})}),a.jsx("button",{className:`lg:hidden p-2 transition-colors ${o?"text-ink":"text-white"}`,onClick:()=>s(!n),"aria-label":"Menu",children:n?a.jsx(Qo,{className:"h-6 w-6"}):a.jsx(jk,{className:"h-6 w-6"})})]}),n&&a.jsx("div",{className:"lg:hidden bg-background border-t border-border",children:a.jsxs("nav",{className:"container-record py-6 flex flex-col gap-4",children:[a.jsx(we,{to:"/",onClick:()=>s(!1),className:"text-base font-medium text-ink-soft py-2",children:"InÃcio"}),e0.map(i=>a.jsx(we,{to:i.href,onClick:()=>s(!1),className:"text-base font-medium text-ink-soft hover:text-primary py-2",children:i.label},i.href)),a.jsx(V,{asChild:!0,className:"bg-gradient-to-r from-primary to-primary-deep text-primary-foreground font-semibold shadow-red mt-2",children:a.jsx("a",{href:"/#cta-final",children:"Solicitar diagnóstico"})})]})})]})},vz=()=>{const[e,t]=m.useState(!1),[r,n]=m.useState(!1),s=m.useRef(null);return m.useEffect(()=>{let o=!1,i=!1;const l=()=>{if(o=!1,r)return;const d=window.scrollY>600;
650d!==i&&(i=d,t(d))},c=()=>{o||(o=!0,requestAnimationFrame(l))};return l(),window.addEventListener("scroll",c,{passive:!0}),()=>window.removeEventListener("scroll",c)},[r]),m.useEffect(()=>{const o=document.documentElement,i=()=>{e&&!r&&s.current?requestAnimationFrame(()=>{if(!s.current)return;const l=s.current.offsetHeight,c=window.innerWidth<768?36:24;o.style.setProperty("--sticky-bar-offset",`${l+c}px`)}):o.style.setProperty("--sticky-bar-offset","0px")};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),o.style.setProperty("--sticky-bar-offset","0px")}},[e,r]),!e||r?null:a.jsx("div",{ref:s,role:"region","aria-label":"Verificar situação da embarcação",className:"fixed bottom-0 inset-x-0 z-50 border-t border-primary-deep/40 bg-ink/95 backdrop-blur-md text-white shadow-[0_-10px_30px_-10px_rgba(0,0,0,0.5)] animate-in slide-in-from-bottom duration-300",children:a.jsxs("div",{className:"container-record py-2.5 md:py-3 pr-20 md:pr-28 flex items-center justify-between gap-3",children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[a.jsx("span",{className:"hidden sm:inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary/20 ring-1 ring-primary/40",children:a.jsx(ml,{className:"h-5 w-5 text-primary-glow"})}),a.jsx("p",{className:"text-sm md:text-base font-semibold leading-tight truncate",children:"Sua embarcação está dentro das exigências?"})]}),a.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[a.jsxs("a",{href:"/#cta-final",className:"inline-flex items-center gap-1.5 bg-primary hover:bg-primary-deep text-primary-foreground font-bold text-sm h-10 px-4 rounded-full shadow-[0_6px_20px_-6px_hsl(var(--primary)/0.7)] hover:-translate-y-0.5 transition-all",children:[a.jsx("span",{className:"hidden sm:inline",children:"Verificar agora"}),a.jsx("span",{className:"sm:hidden",children:"Verificar"}),a.jsx(ot,{className:"h-4 w-4"})]}),a.jsx("button",{onClick:()=>n(!0),"aria-label":"Fechar",className:"p-2 rounded-full text-white/75 hover:text-white hover:bg-white/10 transition-colors",children:a.jsx(Qo,{className:"h-4 w-4"})})]})]})})},rm="/storage/v1/object/public/",xz="/storage/v1/render/image/public/",ys=(e,t,r=75)=>{if(!e)return;if(!e.includes(rm))return e;const[n,s]=e.split("?"),o=new URLSearchParams(s);return o.set("width",String(t)),o.set("quality",String(r)),o.set("resize","contain"),`${n.replace(rm,xz)}?${o.toString()}`},Jd=(e,t,r=75)=>{if(!(!e||!e.includes(rm)))return`${ys(e,t,r)} 1x, ${ys(e,t*2,r)} 2x`},tn={cardCover:640,cardCoverFeatured:960,articleCover:1200,contentImage:1e3,mediaText:720},vo=({article:e,category:t,featured:r=!1})=>{const n=Ts(),s=r?tn.cardCoverFeatured:tn.cardCover,o=`/conteudo-tecnico/${e.category_slug}/${e.slug}`;return a.jsxs("article",{onClick:()=>n(o),className:`group relative flex flex-col rounded-2xl border border-border bg-card hover:border-primary/40 hover:shadow-card transition-all overflow-hidden cursor-pointer ${r?"lg:col-span-2":""}`,children:[a.jsxs("div",{className:`relative overflow-hidden ${r?"aspect-[16/9]":"aspect-[16/10]"} ${e.cover_url?"":"bg-gradient-to-br from-secondary via-ink to-secondary"}`,children:[e.cover_url?a.jsx("img",{src:ys(e.cover_url,s),srcSet:Jd(e.cover_url,s),alt:e.cover_alt||e.title,loading:"lazy",decoding:"async",width:s,height:Math.round(s*(r?9/16:10/16)),className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"absolute inset-0 grid-tech opacity-30"}),a.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 rounded-full bg-primary/30 blur-3xl"})]}),t&&a.jsx("div",{className:"absolute bottom-4 left-4",children:a.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full bg-accent text-accent-foreground text-xs font-bold uppercase tracking-wide",children:t.name})})]}),a.jsxs("div",{className:"flex-1 flex flex-col p-6",children:[a.jsx("h3",{className:`font-display font-bold text-ink leading-tight mb-3 group-hover:text-primary transition-colors ${r?"text-2xl md:text-3xl":"text-lg"}`,children:e.title}),a.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-3 flex-1",children:e.excerpt}),a.jsxs("a",{href:"/#cta-final",onClick:i=>i.stopPropagation(),className:"inline-flex items-center gap-1 text-xs font-semibold text-primary hover:text-primary-deep mb-3 group/cta self-start",children:[a.jsx($t,{className:"h-3.5 w-3.5"}),"Verificar situação da embarcação",a.jsx(Lp,{className:"h-3 w-3 opacity-0 group-hover/cta:opacity-100 transition-opacity"})]}),a.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground border-t border-border pt-3",children:[a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx(Tg,{className:"h-3.5 w-3.5"}),e.read_time]}),a.jsx(Lp,{className:"h-4 w-4 text-primary opacity-0 group-hover:opacity-100 group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-all"})]})]})]})},yv=({compact:e=!1,articleTitle:t})=>{const{openWhatsApp:r}=Ea();return a.jsxs("div",{className:`relative overflow-hidden rounded-2xl bg-gradient-to-br from-secondary via-ink to-secondary text-white ${e?"p-6 md:p-8":"p-8 md:p-12"}`,children:[a.jsx("div",{className:"absolute inset-0 grid-tech opacity-30"}),a.jsx("div",{className:"absolute -top-20 -right-20 w-64 h-64 roun
650ded-full bg-primary/30 blur-3xl"}),a.jsxs("div",{className:"relative",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-accent/15 border border-accent/40 text-xs font-semibold mb-4",children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-accent animate-pulse"}),a.jsx("span",{className:"text-accent",children:"Diagnóstico técnico gratuito"})]}),a.jsx("h3",{className:"font-display text-2xl md:text-3xl font-bold mb-3 leading-tight",children:"Não espere o problema aparecer"}),a.jsx("p",{className:"text-white/80 mb-6 max-w-xl",children:"Descubra agora se sua embarcação está em risco e evite problemas na certificação."}),a.jsxs("div",{className:"flex flex-wrap gap-3",children:[a.jsx(V,{asChild:!0,size:"lg",className:"bg-primary hover:bg-primary-deep text-primary-foreground font-bold h-14 px-7 shadow-[0_10px_30px_-8px_hsl(var(--primary)/0.6)] hover:shadow-[0_14px_36px_-8px_hsl(var(--primary)/0.8)] hover:-translate-y-0.5 transition-all",children:a.jsxs("a",{href:"/#cta-final",className:"inline-flex items-center gap-2",children:["Verificar situação da minha embarcação",a.jsx(ot,{className:"h-5 w-5"})]})}),a.jsxs(V,{variant:"outline","aria-haspopup":"dialog",onClick:()=>r({source:"blog-cta-whatsapp",origem:t?{tipo:"artigo",titulo:t}:{tipo:"site"}}),className:"bg-transparent border-white/30 text-white hover:bg-white hover:text-ink h-12 px-6 inline-flex items-center gap-2",children:[a.jsx(Dr,{className:"h-4 w-4"}),"WhatsApp"]}),a.jsx(V,{asChild:!0,variant:"outline",className:"bg-transparent border-accent/60 text-accent hover:bg-accent hover:text-accent-foreground h-12 px-6",children:a.jsxs(we,{to:"/checklist-pre-vistoria",className:"inline-flex items-center gap-2",children:[a.jsx(Pn,{className:"h-4 w-4"}),"Baixar checklist"]})})]})]})]})},ai=e=>({id:e.id,slug:e.slug,title:e.title,excerpt:e.excerpt??"",meta_description:e.meta_description??"",category_slug:e.category_slug,author:e.author,cover_url:e.cover_url,cover_alt:e.cover_alt??"",preview_token:e.preview_token,read_time:e.read_time,keywords:e.keywords??[],blocks:Array.isArray(e.blocks)?e.blocks:[],published:e.published,published_at:e.published_at,created_at:e.created_at,updated_at:e.updated_at}),Gl=()=>Ps({queryKey:["articles","published"],queryFn:async()=>{const{data:e,error:t}=await Le.from("articles").select("*").eq("published",!0).order("published_at",{ascending:!1});if(t)throw t;return(e??[]).map(ai)}}),Qu=()=>Ps({queryKey:["categories"],queryFn:async()=>{const{data:e,error:t}=await Le.from("categories").select("*").order("sort_order");if(t)throw t;return e??[]}}),A2=e=>Ps({queryKey:["article",e],enabled:!!e,queryFn:async()=>{const{data:t,error:r}=await Le.from("articles").select("*").eq("slug",e).eq("published",!0).maybeSingle();if(r)throw r;return t?ai(t):null}}),yz=e=>Ps({queryKey:["article","preview",e],enabled:!!e,queryFn:async()=>{const{data:t,error:r}=await Le.from("articles").select("*").eq("slug",e).maybeSingle();if(r)throw r;return t?ai(t):null}}),bz=()=>Ps({queryKey:["articles","admin","all"],queryFn:async()=>{const{data:e,error:t}=await Le.from("articles").select("*").order("updated_at",{ascending:!1});if(t)throw t;return(e??[]).map(ai)}}),wz=e=>Ps({queryKey:["article","admin",e],enabled:!!e,queryFn:async()=>{const{data:t,error:r}=await Le.from("articles").select("*").eq("id",e).maybeSingle();if(r)throw r;return t?ai(t):null}}),jz=(e,t)=>Ps({queryKey:["article","preview-token",e,t],enabled:!!e&&!!t,retry:!1,queryFn:async()=>{const r="https://qffuphjftutmnltnmkfj.supabase.co",n="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InFmZnVwaGpmdHV0bW5sdG5ta2ZqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc0MDA2MjMsImV4cCI6MjA5Mjk3NjYyM30.USy0poSwY9yzZlI4ypCNkogTeUyl6S9ImYOZcfLWT8o",s=`${r}/functions/v1/article-preview?slug=${encodeURIComponent(e)}&token=${encodeURIComponent(t)}`,o=await fetch(s,{headers:{apikey:n,Authorization:`Bearer ${n}`}});if(o.status===404)return null;if(!o.ok)throw new Error("preview_failed");const i=await o.json();return i!=null&&i.article?ai(i.article):null}}),kz=()=>{const[e,t]=m.useState(""),{data:r=[],isLoading:n}=Gl(),{data:s=[]}=Qu(),o=m.useMemo(()=>Object.fromEntries(s.map(p=>[p.slug,p])),[s]),i=m.useMemo(()=>s.filter(p=>r.some(f=>f.category_slug===p.slug)),[s,r]),l=m.useMemo(()=>{const p=e.toLowerCase().trim();return p?r.filter(f=>f.title.toLowerCase().includes(p)||f.excerpt.toLowerCase().includes(p)||f.keywords.some(y=>y.toLowerCase().includes(p))):r},[e,r]),c=l[0],d=l.slice(1),h=["vistoria-naval-o-que-e-quando-fazer","certificado-seguranca-navegacao-csn-o-que-e-validade","documentos-obrigatorios-certificacao"].map(p=>r.find(f=>
650f.slug===p)).filter(Boolean);return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(Mt,{title:"Conteúdo técnico â Vistoria e certificação naval | Record",description:"Guias técnicos, alertas regulatórios e checklists para certificação de embarcações no Brasil. Referência nacional em vistoria naval.",canonical:Dt("/conteudo-tecnico"),jsonLd:{"@context":"https://schema.org","@type":"Blog",name:"Conteúdo técnico Record Certificação Naval",description:"Conteúdos técnicos sobre certificação naval, vistoria de embarcação e regulamentação no Brasil."}}),a.jsx(Ju,{}),a.jsxs("main",{className:"pb-20",children:[a.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-secondary via-ink to-secondary text-white",children:[a.jsx("div",{className:"absolute inset-0 grid-tech opacity-30"}),a.jsx("div",{className:"absolute -top-32 -right-32 w-96 h-96 rounded-full bg-primary/30 blur-3xl"}),a.jsx("div",{className:"absolute -bottom-32 -left-32 w-96 h-96 rounded-full bg-accent/20 blur-3xl"}),a.jsx("div",{className:"container-record relative py-20 md:py-28",children:a.jsxs("div",{className:"max-w-3xl",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-accent/15 border border-accent/40 text-xs font-semibold mb-6",children:[a.jsx($t,{className:"h-3.5 w-3.5 text-accent"}),a.jsx("span",{className:"text-accent uppercase tracking-wider",children:"Conteúdo técnico Record"})]}),a.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-extrabold leading-[1.05] mb-6",children:["Conteúdo técnico para manter sua embarcação"," ",a.jsx("span",{className:"text-primary-glow",children:"regular"})," e"," ",a.jsx("span",{className:"text-accent",children:"sem risco"})]}),a.jsx("p",{className:"text-lg md:text-xl text-white/85 leading-relaxed mb-4 max-w-2xl",children:"Guias e prazos para evitar multa, atraso e problemas na certificação da sua embarcação"}),a.jsx("p",{className:"text-sm uppercase tracking-[0.2em] font-semibold text-accent/90 mb-8",children:"20+ ANOS | ATUAÃÃO NACIONAL | MILHARES DE EMBARCAÃÃES CERTIFICADAS"}),a.jsxs("div",{className:"flex flex-col sm:flex-row flex-wrap gap-3 mb-2",children:[a.jsx(V,{asChild:!0,size:"lg",className:"bg-primary hover:bg-primary-deep text-primary-foreground font-bold text-base h-14 px-8 shadow-[0_10px_30px_-8px_hsl(var(--primary)/0.6)] hover:shadow-[0_14px_36px_-8px_hsl(var(--primary)/0.8)] hover:-translate-y-0.5 transition-all ring-1 ring-primary-glow/40",children:a.jsxs("a",{href:"/#cta-final",className:"inline-flex items-center justify-center gap-2",children:["Verificar situação da minha embarcação",a.jsx(ot,{className:"h-5 w-5"})]})}),a.jsx(V,{asChild:!0,variant:"outline",className:"bg-transparent border-white/30 text-white hover:bg-white hover:text-ink h-14 px-6",children:a.jsxs(we,{to:"/checklist-pre-vistoria",className:"inline-flex items-center justify-center gap-2",children:[a.jsx(Pn,{className:"h-4 w-4"}),"Baixar checklist pré-vistoria"]})})]}),a.jsxs("p",{className:"text-xs text-white/75 mb-10 inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-accent animate-pulse"}),"Resposta em até 24h"]}),a.jsxs("div",{className:"relative max-w-xl",children:[a.jsx("label",{htmlFor:"blog-search",className:"sr-only",children:"Buscar artigos"}),a.jsx(_k,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-ink-soft","aria-hidden":"true"}),a.jsx(ae,{id:"blog-search",type:"search","aria-label":"Buscar artigos",value:e,onChange:p=>t(p.target.value),placeholder:"Buscar por vistoria, certificado, prazos ou multasâ¦",className:"h-13 pl-12 text-base rounded-full bg-white text-ink border-transparent focus-visible:ring-primary",maxLength:100})]})]})})]}),a.jsx("section",{className:"border-b border-border bg-muted/30",children:a.jsx("div",{className:"container-record py-4",children:a.jsxs("ul",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-2 text-xs md:text-sm text-muted-foreground",children:[a.jsxs("li",{className:"inline-flex items-center gap-2",children:[a.jsx($t,{className:"h-4 w-4 text-accent"}),a.jsxs("span",{children:[a.jsx("strong",{className:"text-ink",children:"+20 anos"})," de experiência"]})]}),a.jsx("li",{className:"hidden md:block text-border",children:"|"}),a.jsx("li",{className:"inline-flex items-center gap-2",children:a.jsxs("span",{children:[a.jsx("strong",{className:"text-ink",children:"Atuação"})," em todo o Brasil"]})}),a.jsx("li",{className:"hidden md:block text-border",children:"|"}),a.jsx("li",{className:"inline-flex items-center gap-2",children:a.jsxs("span",{children:[a.jsx("strong",{className:"text-ink",children:"Milhares"})," de embarcações certificadas por ano"]})})]})})}),h.length>0&&a.jsx("section",{className:"container-record mt-16",children:a.jsxs("div",{className:"rounded-2xl border-2 border-accent/30 bg-gradient-to-br from-accent/5 via-card to-card p-6 md:p-8 shadow-sm",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx("span",{className:"inline-flex items-center justify-center h-8 w-8 rounded-full bg-accent text-accent-foreground font-bold text-sm",children:"â
"}),a.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold text-ink",children:"Comece por aqui"})]}),a.jsx("p",{className:"text-sm text-muted-foreground mb-6 ml-11",children:"Os 3 conteúdos essenciais para entender a certificação da sua embarcação."}),a.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:h.map((p,f)=>a.jsxs(we,{to:`/conteudo-tecnico/${p.category_slug}/${p.slug}`,className:"group relative rounded-xl border border-border bg-card hover:border-primary/50 hover:shadow-md transition-all p-5 flex flex-col",children:[a.jsxs("span",{className:"text-xs font-bold text-accent uppercase tracking-wider mb-2",children:["Passo ",f+1]}),a.jsx("h3",{className:"font-display font-bold text-base text-ink group-hover:text-primary leading-snug mb-2",children:p.title}),a.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-4 flex-1",children:p.excerpt}),a.jsxs("span",{className:"inline-flex items-center gap-1 text-sm font-semibold text-primary",children:["Ler agora",a.jsx(ot,{className:"h-3.5 w-3.5 group-hover:translate-x-0.5 transition-transform"})]})]},p.slug))})]})}),a.jsxs("section",{className:"container-record mt-16 mb-16",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink",children:"Explore por assunto"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1 max-w-2xl",children:"Navegue pelos principais temas sobre certificação naval, documentação, prazos, riscos e exigências regulatórias."})]}),a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:i.map(p=>a.jsxs(we,{to:`/conteudo-tecnico/${p.slug}`,className:"group relative px-4 py-4 rounded-xl border border-border bg-card hover:border-primary/40 hover:bg-primary/5 transition-all",children:[a.jsx("p",{className:"font-display font-bold text-sm text-ink group-hover:text-primary leading-snug",children:p.name}),a.jsx(ot,{className:"absolute top-3 right-3 h-3.5 w-3.5 text-muted-foreground opacity-0 group-hover:opacity-100 group-hover:translate-x-0.5 transition-all"})]},p.slug))})]}),a.jsxs("section",{className:"container-record mb-16",children:[a.jsx("div",{className:"flex items-end justify-between mb-8",children:a.jsx("h2",{className:"font-display text-2xl font-bold text-ink",children:e?`${l.length} resultado(s)`:"Artigos recentes"})}),n?a.jsx("div",{className:"py-20 flex justify-center",children:a.jsx(_t,{className:"h-6 w-6 animate-spin text-primary"})}):l.length===0?a.jsx("p",{className:"text-muted-foreground py-12 text-center",children:e?`Nenhum artigo encontrado para "${e}".`:"Em breve, novos artigos."}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 auto-rows-fr",children:[c&&a.jsx(vo,{article:c,category:o[c.category_slug],featured:!0}),d.slice(0,4).map(p=>
650a.jsx(vo,{article:p,category:o[p.category_slug]},p.slug))]}),d.length>3&&!e&&a.jsxs("div",{className:"my-12 relative overflow-hidden rounded-2xl bg-gradient-to-br from-primary via-primary-deep to-primary text-primary-foreground p-8 md:p-10 shadow-[0_20px_50px_-15px_hsl(var(--primary)/0.5)]",children:[a.jsx("div",{className:"absolute -top-20 -right-20 w-64 h-64 rounded-full bg-white/10 blur-3xl"}),a.jsx("div",{className:"absolute -bottom-20 -left-20 w-64 h-64 rounded-full bg-accent/20 blur-3xl"}),a.jsxs("div",{className:"relative grid md:grid-cols-[1fr_auto] items-center gap-6",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/15 border border-white/30 text-xs font-bold uppercase tracking-wider mb-3",children:[a.jsx(ml,{className:"h-3.5 w-3.5"}),"Atenção"]}),a.jsx("h3",{className:"font-display text-2xl md:text-3xl font-extrabold mb-2 leading-tight",children:"Não espere o problema aparecer"}),a.jsx("p",{className:"text-primary-foreground/90 max-w-xl",children:"Descubra agora se sua embarcação está dentro das exigências e evite multa, atraso ou embargo."})]}),a.jsx(V,{asChild:!0,size:"lg",className:"bg-white hover:bg-white/95 text-primary font-bold h-14 px-7 shadow-lg hover:-translate-y-0.5 transition-all w-full md:w-auto",children:a.jsxs("a",{href:"/#cta-final",className:"inline-flex items-center justify-center gap-2",children:["Verificar situação da minha embarcação",a.jsx(ot,{className:"h-5 w-5"})]})})]})]}),d.length>4&&a.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 auto-rows-fr",children:d.slice(4).map(p=>a.jsx(vo,{article:p,category:o[p.category_slug]},p.slug))})]})]}),a.jsx("section",{className:"container-record",children:a.jsx(yv,{})})]}),a.jsx(pr,{}),a.jsx(Kl,{}),a.jsx(vz,{})]})},_z=()=>{const{categorySlug:e}=mg(),{data:t=[],isLoading:r}=Qu(),{data:n=[],isLoading:s}=Gl();if(r)return a.jsx("div",{className:"min-h-screen flex items-center justify-center",children:a.jsx(_t,{className:"h-6 w-6 animate-spin text-primary"})});const o=t.find(l=>l.slug===e);if(!o)return a.jsx(xv,{});const i=n.filter(l=>l.category_slug===o.slug);return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(Mt,{title:`${o.name} â Conteúdo técnico Record`,description:o.description,canonical:Dt(`/conteudo-tecnico/${o.slug}`),noindex:!s&&i.length===0}),a.jsx(Ju,{}),a.jsxs("main",{className:"pt-32 pb-20",children:[a.jsxs("section",{className:"container-record mb-12",children:[a.jsxs(we,{to:"/conteudo-tecnico",className:"inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-primary mb-6",children:[a.jsx(Ln,{className:"h-4 w-4"}),"Conteúdo técnico"]}),a.jsx("span",{className:"eyebrow mb-4",children:"Categoria"}),a.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold text-ink mb-5 leading-tight",children:o.name}),a.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed max-w-3xl",children:o.intro})]}),a.jsx("section",{className:"container-record mb-16",children:s?a.jsx("div",{className:"py-20 flex justify-center",children:a.jsx(_t,{className:"h-6 w-6 animate-spin text-primary"})}):i.length===0?a.jsx("p",{className:"text-muted-foreground py-12",children:"Em breve, novos artigos nesta categoria."}):a.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:i.map(l=>a.jsx(vo,{article:l,category:o},l.slug))})}),a.jsx("section",{className:"container-record",children:a.jsx(yv,{})})]}),a.jsx(pr,{}),a.jsx(Kl,{}),a.jsx(Zu,{})]})};var Yu="Collapsible",[Nz,O2]=fr(Yu),[Sz,bv]=Nz(Yu),L2=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:o,onOpenChange:i,...l}=e,[c,d]=an({prop:n,defaultProp:s??!1,onChange:i,caller:Yu});return a.jsx(Sz,{scope:r,disabled:o,contentId:_n(),open:c,onOpenToggle:m.useCallback(()=>d(u=>!u),[d]),children:a.jsx(oe.div,{"data-state":jv(c),"data-disabled":o?"":void 0,...l,ref:t})})});L2.displayName=Yu;var I2="CollapsibleTrigger",$2=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,s=bv(I2,r);return a.jsx(oe.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":jv(s.open
vendor: 4,265 bytes, line 650
650),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:t,onClick:te(e.onClick,s.onOpenToggle)})});$2.displayName=I2;var wv="CollapsibleContent",D2=m.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=bv(wv,e.__scopeCollapsible);return a.jsx(on,{present:r||s.open,children:({present:o})=>a.jsx(Cz,{...n,ref:t,present:o})})});D2.displayName=wv;var Cz=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:s,...o}=e,i=bv(wv,r),[l,c]=m.useState(n),d=m.useRef(null),u=de(t,d),h=m.useRef(0),p=h.current,f=m.useRef(0),y=f.current,g=i.open||l,w=m.useRef(g),v=m.useRef(void 0);return m.useEffect(()=>{const x=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(x)},[]),et(()=>{const x=d.current;if(x){v.current=v.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();h.current=b.height,f.current=b.width,w.current||(x.style.transitionDuration=v.current.transitionDuration,x.style.animationName=v.current.animationName),c(n)}},[i.open,n]),a.jsx(oe.div,{"data-state":jv(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...o,ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:g&&s})});function jv(e){return e?"open":"closed"}var Ez=L2,Rz=$2,Pz=D2,Br="Accordion",Tz=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[kv,Az,Oz]=ku(Br),[Xu]=fr(Br,[Oz,O2]),_v=O2(),M2=m.forwardRef((e,t)=>{const{type:r,...n}=e,s=n,o=n;return a.jsx(kv.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?a.jsx(Dz,{...o,ref:t}):a.jsx($z,{...s,ref:t})})});M2.displayName=Br;var[z2,Lz]=Xu(Br),[F2,Iz]=Xu(Br,{collapsible:!1}),$z=m.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[l,c]=an({prop:r,defaultProp:n??"",onChange:s,caller:Br});return a.jsx(z2,{scope:e.__scopeAccordion,value:m.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:m.useCallback(()=>o&&c(""),[o,c]),children:a.jsx(F2,{scope:e.__scopeAccordion,collapsible:o,children:a.jsx(U2,{...i,ref:t})})})}),Dz=m.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...o}=e,[i,l]=an({prop:r,defaultProp:n??[],onChange:s,caller:Br}),c=m.useCallback(u=>l((h=[])=>[...h,u]),[l]),d=m.useCallback(u=>l((h=[])=>h.filter(p=>p!==u)),[l]);return a.jsx(z2,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:d,children:a.jsx(F2,{scope:e.__scopeAccordion,collapsible:!0,children:a.jsx(U2,{...o,ref:t})})})}),[Mz,eh]=Xu(Br),U2=m.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:o="vertical",...i}=e,l=m.useRef(null),c=de(l,t),d=Az(r),h=fv(s)==="ltr",p=te(e.onKeyDown,f=>{var C;if(!Tz.includes(f.key))return;const y=f.target,g=d().filter(R=>{var T;return!((T=R.ref.current)!=null&&T.disabled)}),w=g.findIndex(R=>R.ref.current===y),v=g.length;if(w===-1)return;f.preventDefault();let x=w;const b=0,j=v-1,k=()=>{x=w+1,x>j&&(x=b)},_=()=>{x=w-1,x<b&&(x=j)};switch(f.key){case"Home":x=b;break;case"End":x=j;break;case"ArrowRight":o==="horizontal"&&(h?k():_());break;case"ArrowDown":o==="vertical"&&k();break;case"ArrowLeft":o==="horizontal"&&(h?_():k());break;case"ArrowUp":o==="vertical"&&_();break}const N=x%v;(C=g[N].ref.current)==null||C.focus()});return a.jsx(Mz,{scope:r,disabled:n,direction:s,orientation:o,children:a.jsx(kv.Slot,{scope:r,children:a.jsx(oe.div,{...i,"data-orientation":o,ref:c,onKeyDown:n?void 0:p})})})}),Qd="AccordionItem",[zz,Nv]=Xu(Qd),B2=m.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...s}=e,o=eh(Qd,r),i=Lz(Qd,r),l=_v(r),c=_n(),d=n&&i.value.includes(n)||!1,u=o.disabled||e.disabled;return a.jsx(zz,{scope:r,open:d,disabled:u,triggerId:c,children:a.jsx(Ez,{"data-orientation":o.orientation,"data-state":G2(d),...l,...s,ref:t,disabled:u,open:d,onOpenChange:h=>{h?i.onItemOpen(n):i.onItemClose(n)}})})});B2.displayName=Qd;var q2="AccordionHeader",V2=m.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=eh(Br,r),o=Nv(q2,r);return a.jsx(oe.h3,{"data-orientation":s.orientation,"data-state":G2(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:t})});V2.displayName=q2;var nm="AccordionTrigger",H2=m.forwardRef((e,t)=>
650{const{__scopeAccordion:r,...n}=e,s=eh(Br,r),o=Nv(nm,r),i=Iz(nm,r),l=_v(r);return a.jsx(kv.ItemSlot,{scope:r,children:a.jsx(Rz,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...l,...n,ref:t})})});H2.displayName=nm;var W2="AccordionContent",K2=m.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=eh(Br,r),o=Nv(W2,r),i=_v(r);return a.jsx(Pz,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});K2.displayName=W2;function G2(e){return e?"open":"closed"}var Fz=M2,Uz=B2,Bz=V2,Z2=H2,J2=K2;const Q2=Fz,Sv=m.forwardRef(({className:e,...t},r)=>a.jsx(Uz,{ref:r,className:ue("border-b",e),...t}));Sv.displayName="AccordionItem";const Cv=m.forwardRef(({className:e,children:t,...r},n)=>a.jsx(Bz,{className:"flex",children:a.jsxs(Z2,{ref:n,className:ue("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,a.jsx(Bl,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Cv.displayName=Z2.displayName;const Ev=m.forwardRef(({className:e,children:t,...r},n)=>a.jsx(J2,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:a.jsx("div",{className:ue("pb-4 pt-0",e),children:t})}));Ev.displayName=J2.displayName;const Y2=e=>e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/<[^>]*>/g,"").replace(/&[a-z]+;/g," ").replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-").replace(/-+/g,"-"),X2=/<h2\b([^>]*)>([\s\S]*?)<\/h2>/gi,eN=e=>e.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").trim(),qz=e=>{const t=[],r=new Map;for(const n of e)if(!(!n||n.type!=="richtext"||typeof n.html!="string"))for(const s of n.html.matchAll(X2)){const o=eN(s[2]);if(!o)continue;const i=Y2(o)||"secao",l=r.get(i)??0;r.set(i,l+1),t.push({id:l===0?i:`${i}-${l+1}`,text:o})}return t},t0=(e,t)=>e.replace(X2,(r,n,s)=>{const o=eN(s),i=Y2(o)||"secao",l=t.get(i)??0;t.set(i,l+1);const c=l===0?i:`${i}-${l+1}`,d=String(n).replace(/\sid="[^"]*"/gi,"");return`<h2 id="${c}"${d}>${s}</h2>`}),r0=e=>e==="whatsapp"?a.jsx(Dr,{className:"h-4 w-4"}):e==="checklist"?a.jsx(Pn,{className:"h-4 w-4"}):a.jsx(ot,{className:"h-4 w-4"}),Vz=e=>{if(e.href)return e.href;switch(e.action){case"whatsapp":return"/fale-conosco";case"checklist":return"/conteudo-tecnico/checklist-vistoria";case"diagnostic":default:return"/#diagnostico"}},xf={info:{bg:"bg-secondary/5",border:"border-border",icon:a.jsx(gk,{className:"h-5 w-5 text-secondary"}),label:"Informação"},warning:{bg:"bg-accent/10",border:"border-accent/40",icon:a.jsx(Ig,{className:"h-5 w-5 text-accent-foreground"}),label:"Atenção"},success:{bg:"bg-primary/5",border:"border-primary/30",icon:a.jsx(Ze,{className:"h-5 w-5 text-primary"}),label:"Boa prática"}},Hz=e=>e==="warning"||e==="danger"?xf.warning:e==="success"||e==="tip"?xf.success:xf.info,Wz=e=>{const t=document.getElementById(e);if(!t)return;const r=t.getBoundingClientRect().top+window.scrollY-100;window.scrollTo({top:r,behavior:"smooth"})},tN=({blocks:e,allArticles:t,categories:r,articleTitle:n})=>{const{openWhatsApp:s}=Ea(),o=Array.isArray(e)?e.filter(c=>c&&typeof c=="object"):[],i=qz(o),l=new Map;return a.jsx("div",{className:"space-y-10",children:o.map((c,d)=>{const u=c.id??`block-${d}`;switch(c.type){case"richtext":return a.jsx("div",{className:"prose-record",dangerouslySetInnerHTML:{__html:t0(c.html??"",l)}},u);case"highlight":{const h=Hz(c.variant);return a.jsx("aside",{className:`relative rounded-2xl border p-6 ${h.bg} ${h.border}`,children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"shrink-0 h-10 w-10 rounded-full bg-background border border-border flex items-center justify-center",children:h.icon}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.18em] text-primary mb-1",children:c.title||h.label}),a.jsx("p",{className:"text-ink-soft leading-relaxed whitespace-pre-line",children:c.text})]})]})},u)}case"cta":return a.jsxs("div",{className:"rounded-2xl border border-primary/20 bg-gradient-to-br from-secondary to-ink p-8 md:p-10 text-secondary-foreground",children:[c.title&&a.jsx("h3",{className:"font-display text-2xl md:text-3xl font-bold mb-2",children:c.title}
650),c.subtitle&&a.jsx("p",{className:"text-secondary-foreground/80 mb-6 max-w-2xl",children:c.subtitle}),a.jsx("div",{className:"flex flex-wrap gap-3",children:(c.buttons??[]).map((h,p)=>{const f=Vz(h),y=h.variant==="accent"?"bg-accent text-accent-foreground hover:bg-accent/90":h.variant==="outline"?"border border-secondary-foreground/40 text-secondary-foreground hover:bg-secondary-foreground/10":"bg-primary text-primary-foreground hover:bg-primary/90",g=f.startsWith("http"),w=`inline-flex items-center gap-2 h-11 px-5 rounded-md font-semibold text-sm transition ${y}`;return h.action==="whatsapp"&&!h.href?a.jsxs("button",{type:"button",onClick:()=>s({source:"artigo-bloco-cta",origem:n?{tipo:"artigo",titulo:n}:{tipo:"site"}}),className:w,children:[r0(h.action),h.label]},p):a.jsxs("a",{href:f,target:g?"_blank":void 0,rel:g?"noopener noreferrer":void 0,className:w,children:[r0(h.action),h.label]},p)})})]},u);case"list":{const h=c.ordered?"ol":"ul";return a.jsxs("div",{children:[c.title&&a.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold text-ink mb-5",children:c.title}),a.jsx(h,{className:c.ordered?"list-decimal pl-6 space-y-2 text-ink-soft":"list-disc pl-6 space-y-2 text-ink-soft",children:(c.items??[]).map((p,f)=>a.jsx("li",{className:"leading-relaxed",children:p},f))})]},u)}case"checklist":return a.jsxs("div",{children:[c.title&&a.jsxs("h2",{className:"font-display text-2xl md:text-3xl font-bold text-ink mb-5 flex items-center gap-2",children:[a.jsx(Ze,{className:"h-7 w-7 text-primary"}),c.title]}),a.jsx("ul",{className:"space-y-2",children:(c.items??[]).map((h,p)=>a.jsxs("li",{className:"flex items-start gap-3 p-4 rounded-xl border border-border bg-card hover:border-primary/40 transition",children:[a.jsx(Ze,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),a.jsx("span",{className:"text-ink-soft leading-relaxed",children:h})]},p))})]},u);case"faq":return a.jsxs("div",{children:[c.title&&a.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold text-ink mb-5",children:c.title}),a.jsx(Q2,{type:"single",collapsible:!0,className:"border border-border rounded-2xl bg-card",children:(c.items??[]).map((h,p)=>a.jsxs(Sv,{value:`q-${p}`,className:"px-5 last:border-b-0",children:[a.jsx(Cv,{className:"text-left font-semibold text-ink hover:no-underline",children:h.q}),a.jsx(Ev,{className:"text-muted-foreground leading-relaxed whitespace-pre-line",children:h.a})]},p))})]},u);case"related":{const h=(c.slugs??[]).map(p=>t.find(f=>f.slug===p)).filter(p=>!!p);return h.length===0?null:a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-6",children:c.title||"Leituras relacionadas"}),a.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:h.map(p=>a.jsx(vo,{article:p,category:r.find(f=>f.slug===p.category_slug)},p.slug))})]},u)}case"media-text":{if(!c.image_url||!c.alt)return null;const h=c.position==="right";return a.jsxs("div",{className:"grid md:grid-cols-2 gap-6 md:gap-8 items-start",children:[a.jsxs("figure",{className:h?"md:order-2":"md:order-1",children:[a.jsx("img",{src:ys(c.image_url,tn.mediaText),srcSet:Jd(c.image_url,tn.mediaText),alt:c.alt,loading:"lazy",decoding:"async",width:720,height:480,className:"w-full h-auto rounded-2xl border border-border object-cover"}),c.caption&&a.jsx("figcaption",{className:"mt-2 text-xs text-muted-foreground leading-relaxed",children:c.caption})]}),a.jsxs("div",{className:h?"md:order-1":"md:order-2",children:[c.title&&a.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold text-ink mb-4",children:c.title}),a.jsx("div",{className:"prose-record",dangerouslySetInnerHTML:{__html:t0(c.html??"",l)}})]})]},u)}case"table":{const h=c.headers??[],p=c.rows??[];return h.length===0&&p.length===0?null:a.jsxs("div",{className:"max-w-full",children:[c.title&&a.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold text-ink mb-5",children:c.title}),a.jsx("div",{className:"w-full overflow-x-auto rounded-2xl border border-border",children:a.jsxs("table",{className:"w-full min-w-[520px] border-collapse text-sm",children:[h.length>0&&a.jsx("thead",{children:a.jsx("tr",{className:"bg-secondary text-secondary-foreground",children:h.map((f,y)=>a.jsx("th",{scope:"col",className:"text-left font-semibold px-4 py-3 whitespace-nowrap",children:f},y))})}),a.jsx("tbody",{children:p.map((f,y)=>a.jsx("tr",{className:y%2===1?"bg-muted/40":"bg-card",children:(f??[]).map((g,w)=>a.jsx("td",{className:`px-4 py-3 align-top border-t border-border text-ink-soft ${c.highlight_first_column&&w===0?"font-semibold text-ink":""}`,children:g},w))},y))})]})})]},u)}
650case"steps":{const h=(c.items??[]).filter(Boolean);return h.length===0?null:a.jsxs("div",{children:[c.title&&a.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold text-ink mb-6",children:c.title}),a.jsx("ol",{className:"relative space-y-6",children:h.map((p,f)=>a.jsxs("li",{className:"relative flex gap-4",children:[a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsx("span",{className:"h-10 w-10 shrink-0 rounded-full bg-primary text-primary-foreground font-display font-bold flex items-center justify-center",children:f+1}),f<h.length-1&&a.jsx("span",{className:"flex-1 w-px bg-border mt-2","aria-hidden":"true"})]}),a.jsxs("div",{className:"pb-2",children:[a.jsx("p",{className:"font-semibold text-ink leading-snug",children:p.title}),p.text&&a.jsx("p",{className:"mt-1 text-ink-soft leading-relaxed whitespace-pre-line",children:p.text})]})]},f))})]},u)}case"image":return!c.image_url||!c.alt?null:a.jsxs("figure",{className:c.full_width?"-mx-4 md:mx-0":"",children:[a.jsx("img",{src:ys(c.image_url,tn.contentImage),srcSet:Jd(c.image_url,tn.contentImage),alt:c.alt,loading:"lazy",decoding:"async",width:1e3,height:563,className:`w-full h-auto object-cover border border-border ${c.full_width?"md:rounded-2xl":"rounded-2xl"}`}),c.caption&&a.jsx("figcaption",{className:"mt-2 px-4 md:px-0 text-xs text-muted-foreground leading-relaxed",children:c.caption})]},u);case"toc":return i.length===0?null:a.jsxs("nav",{"aria-label":c.title||"Neste artigo",className:"rounded-2xl border border-border bg-muted/40 p-5 md:p-6",children:[a.jsxs("p",{className:"flex items-center gap-2 text-xs font-bold uppercase tracking-[0.18em] text-primary mb-3",children:[a.jsx(Og,{className:"h-4 w-4"}),c.title||"Neste artigo"]}),a.jsx("ul",{className:"space-y-2",children:i.map(h=>a.jsx("li",{children:a.jsx("a",{href:`#${h.id}`,onClick:p=>{var f;p.preventDefault(),Wz(h.id),(f=window.history)!=null&&f.replaceState&&window.history.replaceState(null,"",`#${h.id}`)},className:"text-sm text-ink-soft hover:text-primary underline-offset-4 hover:underline leading-relaxed",children:h.text})},h.id))})]},u);case"stat":{const h=(c.items??[]).filter(Boolean).slice(0,4);return h.length===0?null:a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-px rounded-2xl overflow-hidden border border-border bg-border",style:{gridTemplateColumns:void 0},children:h.map((p,f)=>a.jsxs("div",{className:"bg-card px-4 py-6 text-center",children:[a.jsx("p",{className:"font-display text-3xl md:text-4xl font-bold text-primary leading-none",children:p.value}),a.jsx("p",{className:"mt-2 text-xs md:text-sm text-muted-foreground leading-snug",children:p.label})]},f))},u)}default:return null}})})},n0=({className:e})=>a.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:e,"aria-hidden":"true",children:a.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.002-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),s0=({title:e,variant:t="inline"})=>{const[r,n]=m.useState(!1),{toast:s}=jg(),o=typeof window<"u"?window.location.href:"",i=`${e} 651 652${o}`,l=`https://wa.me/?text=${encodeURIComponent(i)}`,c=async()=>{try{await navigator.clipboard.writeText(o),n(!0),s({title:"Link copiado",description:"Cole onde quiser enviar."}),setTimeout(()=>n(!1),2e3)}catch{s({title:"Não foi possÃvel copiar",variant:"destructive"})}},d=async()=>
652{if(navigator.share)try{await navigator.share({title:e,url:o})}catch{}else c()};return t==="seller"?a.jsx("section",{className:"my-12 rounded-2xl border-2 border-accent/30 bg-gradient-to-br from-accent/5 via-card to-card p-6 md:p-7",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("span",{className:"hidden sm:inline-flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-accent/15 ring-1 ring-accent/40",children:a.jsx(Gh,{className:"h-5 w-5 text-accent"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h3",{className:"font-display text-xl md:text-2xl font-bold text-ink mb-1 leading-tight",children:"Compartilhe com seu cliente"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Envie este conteúdo para armadores, comandantes ou parceiros que precisam manter a embarcação regular."}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 h-11 px-5 rounded-full bg-[#25D366] hover:bg-[#1ebe5a] text-white font-semibold text-sm transition-colors shadow-sm",children:[a.jsx(n0,{className:"h-4 w-4"}),"Enviar no WhatsApp"]}),a.jsx("button",{onClick:c,className:"inline-flex items-center gap-2 h-11 px-5 rounded-full bg-card border border-border hover:border-primary/40 hover:bg-primary/5 text-ink font-semibold text-sm transition-all",children:r?a.jsxs(a.Fragment,{children:[a.jsx(pl,{className:"h-4 w-4 text-accent"}),"Link copiado"]}):a.jsxs(a.Fragment,{children:[a.jsx(My,{className:"h-4 w-4"}),"Copiar link"]})}),a.jsxs("button",{onClick:d,className:"inline-flex items-center gap-2 h-11 px-5 rounded-full bg-card border border-border hover:border-primary/40 hover:bg-primary/5 text-ink font-semibold text-sm transition-all sm:hidden",children:[a.jsx(Gh,{className:"h-4 w-4"}),"Compartilhar"]})]})]})]})}):a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mr-1",children:"Compartilhar:"}),a.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer","aria-label":"Compartilhar no WhatsApp",className:"inline-flex items-center gap-1.5 h-9 px-3 rounded-full bg-[#25D366] hover:bg-[#1ebe5a] text-white text-xs font-semibold transition-colors",children:[a.jsx(n0,{className:"h-3.5 w-3.5"}),"WhatsApp"]}),a.jsx("button",{onClick:c,"aria-label":"Copiar link",className:"inline-flex items-center gap-1.5 h-9 px-3 rounded-full border border-border bg-card hover:border-primary/40 hover:bg-primary/5 text-ink text-xs font-semibold transition-all",children:r?a.jsxs(a.Fragment,{children:[a.jsx(pl,{className:"h-3.5 w-3.5 text-accent"}),"Copiado"]}):a.jsxs(a.Fragment,{children:[a.jsx(My,{className:"h-3.5 w-3.5"}),"Copiar link"]})}),a.jsxs("button",{onClick:d,"aria-label":"Compartilhar",className:"inline-flex items-center gap-1.5 h-9 px-3 rounded-full border border-border bg-card hover:border-primary/40 hover:bg-primary/5 text-ink text-xs font-semibold transition-all sm:hidden",children:[a.jsx(Gh,{className:"h-3.5 w-3.5"}),"Compartilhar"]})]})},Kz=()=>{const{slug:e}=mg(),[t]=wg(),{loading:r,isAdmin:n}=Mu(),s=t.get("preview"),o=!!s,i=s&&s!=="1"?s:void 0,l=A2(o?void 0:e),c=yz(o&&!i&&!r?e:void 0),d=jz(i?e:void 0,i),{data:u,isLoading:h}=i?d:o?c:l,{data:p=[]}=Qu(),{data:f=[]}=Gl();if(h||o&&!i&&r)return a.jsx("div",{className:"min-h-screen flex items-center justify-center",children:a.jsx(_t,{className:"h-6 w-6 animate-spin text-primary"})});if(!u&&o)return a.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center gap-3 px-6 text-center",children:[a.jsx(ml,{className:"h-8 w-8 text-muted-foreground"}),a.jsx("p",{className:"text-ink font-semibold",children:"Não foi possÃvel carregar a pré-visualização"}),a.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:i?"Este link de pré-visualização é inválido ou foi revogado. Peça um novo link.":n?"Artigo não encontrado para este endereço.":"Faça login como administrador nesta aba para visualizar rascunhos."}),!i&&a.jsx(we,{to:"/admin/artigos",className:"text-sm font-semibold text-primary underline",children:"Ir para o painel"})]});if(!u)return a.jsx(xv,{});const y=p.find(N=>N.slug===u.category_slug),g=f.filter(N=>N.category_slug===u.category_slug&&N.slug!==u.slug),w=f.filter(N=>N.category_slug!==u.category_slug&&N.slug!==u.slug),v=[...g,...w].slice(0,3),x=u.published_at??u.created_at,b=Dt(`/conteudo-tecnico/${u.category_slug}/${u.slug}`),j=u.meta_description||u.excerpt,k=(u.blocks??[]).flatMap(N=>(N==null?void 0:N.type)==="faq"&&Array.isArray(N.items)?N.items:[]).filter(N=>(N==null?void 0:N.q)&&(N==null?void 0:N.a)),_=[{"@context":"https://schema.org","@type":"BlogPosting",mainEntityOfPage:{"@type":"WebPage","@id":b}
652,headline:u.title,description:j,datePublished:x,dateModified:u.updated_at??x,author:{"@type":"Organization",name:u.author},publisher:{"@type":"Organization",name:"Record Certificadora",url:L_},keywords:u.keywords.join(", "),image:ys(u.cover_url,tn.articleCover)??void 0}];return k.length>0&&_.push({"@context":"https://schema.org","@type":"FAQPage",mainEntity:k.map(N=>({"@type":"Question",name:N.q,acceptedAnswer:{"@type":"Answer",text:N.a}}))}),a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(Mt,{title:`${u.title} | Record Certificação Naval`,description:j,canonical:b,ogType:"article",ogImage:ys(u.cover_url,tn.articleCover)??void 0,jsonLd:o?void 0:_,noindex:o}),a.jsx(Ju,{forceSolid:!0}),o&&a.jsxs("div",{className:"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 rounded-full border border-border bg-card px-4 py-2 text-xs font-semibold text-ink shadow-lg",children:["Pré-visualização ",u.published?"(publicado)":"(rascunho â não publicado)"]}),a.jsx("main",{className:"pt-32 pb-20",children:a.jsxs("article",{className:"container-record max-w-4xl",children:[a.jsxs(we,{to:`/conteudo-tecnico/${u.category_slug}`,className:"inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-primary mb-6",children:[a.jsx(Ln,{className:"h-4 w-4"}),y==null?void 0:y.name]}),a.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full bg-accent text-accent-foreground text-xs font-bold uppercase tracking-wide mb-4",children:y==null?void 0:y.name}),a.jsx("h1",{className:"font-display text-3xl md:text-5xl font-bold text-ink leading-tight mb-6",children:u.title}),a.jsxs("div",{className:"flex flex-wrap items-center gap-5 text-sm text-muted-foreground mb-6",children:[a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx(y5,{className:"h-4 w-4"}),u.author]}),a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx(FA,{className:"h-4 w-4"}),new Date(x).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"})]}),a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx(Tg,{className:"h-4 w-4"}),u.read_time]})]}),a.jsx("div",{className:"mb-8 pb-8 border-b border-border",children:a.jsx(s0,{title:u.title,variant:"inline"})}),a.jsxs("aside",{className:"mb-10 rounded-xl border border-primary/25 bg-primary/5 px-5 py-4 flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4",children:[a.jsx(ml,{className:"h-6 w-6 text-primary shrink-0"}),a.jsx("p",{className:"text-sm md:text-base text-ink font-semibold flex-1 leading-snug",children:"Este conteúdo pode evitar problemas na sua embarcação."}),a.jsxs("a",{href:"/#cta-final",className:"inline-flex items-center justify-center gap-1.5 h-10 px-5 rounded-full bg-primary hover:bg-primary-deep text-primary-foreground text-sm font-bold shadow-sm hover:-translate-y-0.5 transition-all whitespace-nowrap",children:["Verificar situação",a.jsx(ot,{className:"h-4 w-4"})]})]}),u.cover_url&&a.jsx("img",{src:ys(u.cover_url,tn.articleCover),srcSet:Jd(u.cover_url,tn.articleCover),alt:u.cover_alt||u.title,width:1200,height:675,fetchPriority:"high",decoding:"async",className:"w-full h-auto rounded-2xl border border-border mb-10 aspect-[16/9] object-cover"}),a.jsx(tN,{articleTitle:u.title,blocks:u.blocks,allArticles:f,categories:p}),a.jsx(s0,{title:u.title,variant:"seller"}),a.jsxs("aside",{className:"mt-12 rounded-xl border border-border bg-muted/40 px-5 py-4 text-sm text-muted-foreground leading-relaxed",children:[a.jsx("strong",{className:"text-ink",children:"Sobre este conteúdo:"})," elaborado pela Equipe Técnica Record, com foco em boas práticas de certificação naval, conformidade documental e prevenção de riscos operacionais."]}),a.jsx("section",{className:"my-16",children:a.jsx(yv,{articleTitle:u.title})}),v.length>0&&a.jsxs("section",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-6",children:"Leia também"}),a.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:v.map(N=>a.jsx(vo,{article:N,category:p.find(C=>C.slug===N.category_slug)},N.slug))})]})]})}),a.jsx(pr,{}),a.jsx(Kl,{source:"artigo-float",origem:{tipo:"artigo",titulo:u.title}}
vendor: 4,573 bytes, line 652
652),a.jsx(Zu,{})]})};var a0;function A(e,t,r){function n(l,c){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,c);const d=i.prototype,u=Object.keys(d);for(let h=0;h<u.length;h++){const p=u[h];p in l||(l[p]=d[p].bind(l))}}const s=(r==null?void 0:r.Parent)??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function i(l){var c;const d=r!=null&&r.Parent?new o:this;n(d,l),(c=d._zod).deferred??(c.deferred=[]);for(const u of d._zod.deferred)u();return d}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>{var c,d;return r!=null&&r.Parent&&l instanceof r.Parent?!0:(d=(c=l==null?void 0:l._zod)==null?void 0:c.traits)==null?void 0:d.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class xo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class rN extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(a0=globalThis).__zod_globalConfig??(a0.__zod_globalConfig={});const Rv=globalThis.__zod_globalConfig;function ja(e){return Rv}function nN(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,s])=>t.indexOf(+n)===-1).map(([n,s])=>s)}function sm(e,t){return typeof t=="bigint"?t.toString():t}function Pv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Tv(e){return e==null}function Av(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}const o0=Symbol("evaluating");function Se(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==o0)return n===void 0&&(n=o0,n=r()),n},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function Ra(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Os(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function i0(e){return JSON.stringify(e)}function Gz(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const sN="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Yd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Zz=Pv(()=>{var e;if(Rv.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Nl(e){if(Yd(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Yd(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function aN(e){return Nl(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Jz=new Set(["string","number","symbol"]);function th(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ls(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(n._zod.parent=e),n}function ie(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Qz(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Yz(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=Os(e._zod.def,{get shape(){const i={};for(const l in t){if(!(l in r.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(i[l]=r.shape[l])}return Ra(this,"shape",i),i},checks:[]});return Ls(e,o)}function Xz(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=Os(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const l in t){if(!(l in r.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete i[l]}return Ra(this,"shape",i),i},checks:[]});return Ls(e,o)}function e8(e,t){if(!Nl(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const o=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot over
652write keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Os(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Ra(this,"shape",o),o}});return Ls(e,s)}function t8(e,t){if(!Nl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Os(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Ra(this,"shape",n),n}});return Ls(e,r)}function r8(e,t){var n;if((n=e._zod.def.checks)!=null&&n.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=Os(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t._zod.def.shape};return Ra(this,"shape",s),s},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ls(e,r)}function n8(e,t,r){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=Os(t._zod.def,{get shape(){const l=t._zod.def.shape,c={...l};if(r)for(const d in r){if(!(d in l))throw new Error(`Unrecognized key: "${d}"`);r[d]&&(c[d]=e?new e({type:"optional",innerType:l[d]}):l[d])}else for(const d in l)c[d]=e?new e({type:"optional",innerType:l[d]}):l[d];return Ra(this,"shape",c),c},checks:[]});return Ls(t,i)}function s8(e,t,r){const n=Os(t._zod.def,{get shape(){const s=t._zod.def.shape,o={...s};if(r)for(const i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=new e({type:"nonoptional",innerType:s[i]}))}else for(const i in s)o[i]=new e({type:"nonoptional",innerType:s[i]});return Ra(this,"shape",o),o}});return Ls(t,n)}function so(e,t=0){var r;if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(((r=e.issues[n])==null?void 0:r.continue)!==!0)return!0;return!1}function a8(e,t=0){var r;if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(((r=e.issues[n])==null?void 0:r.continue)===!1)return!0;return!1}function oN(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Dc(e){return typeof e=="string"?e:e==null?void 0:e.message}function ka(e,t,r){var c,d,u,h,p,f;const n=e.message?e.message:Dc((u=(d=(c=e.inst)==null?void 0:c._zod.def)==null?void 0:d.error)==null?void 0:u.call(d,e))??Dc((h=t==null?void 0:t.error)==null?void 0:h.call(t,e))??Dc((p=r.customError)==null?void 0:p.call(r,e))??Dc((f=r.localeError)==null?void 0:f.call(r,e))??"Invalid input",{inst:s,continue:o,input:i,...l}=e;return l.path??(l.path=[]),l.message=n,t!=null&&t.reportInput&&(l.input=i),l}function Ov(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Sl(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const iN=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,sm,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},lN=A("$ZodError",iN),cN=A("$ZodError",iN,{Parent:Error});function o8(e,t=r=>r.message){const r={},n=[];for(const s of e.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}function i8(e,t=r=>r.message){const r={_errors:[]},n=(s,o=[])=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(l=>n({issues:l},[...o,...i.path]));else if(i.code==="invalid_key")n({issues:i.issues},[...o,...i.path]);else if(i.code==="invalid_element")n({issues:i.issues},[...o,...i.path]);else{const l=[...o,...i.path];if(l.length===0)r._errors.push(t(i));else{let c=r,d=0;for(;d<l.length;){const u=l[d];d===l.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(i))):c[u]=c[u]||{_errors:[]},c=c[u],d++}}}};return n(e),r}const Lv=e=>(t,r,n,s)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new xo;if(i.issues.length){const l=new((s==null?void 0:s.Err)??e)(i.issues.map(c=>ka(c,o,ja())));throw sN(l,s==null?void 0:s.callee),l}return i.value},Iv=e=>async(t,r,n,s)=>{const o=n?{...n,async:!0}:{async:!0};let i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new((s==null?void 0:s.Err)??e)(i.issues.map(c=>ka(c,o,ja())));throw sN(l,s==null?void 0:s.callee),l}return i.value},rh=e=>(t,r,n)=>{const s=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new xo;return o.issues.length?{success:!1,error:new(e??lN)(o.issues.map(i=>ka(i,s,ja())))}:{success:!0,data:o.value}},l8=rh(cN),nh=e=>async(t,r,n)=>{const s=n?{...n,async:!0}:{async:!0};let o=t._zod.run({value:r,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(i=>ka(i,s,ja())))}:{success:!0,data:o.value}},c8=nh(cN),d8=e=>(t,r,n)=>{const s=n?{...n,direction:"backward"}:{direction:"backward"};return Lv(e)(t,r,s)},u8=e=>(t,r,n)=>Lv(e)(t,r,n),h8=e=>async(t,r,n)=>{const s=n?{...n,direction:"backward"}:{direction:"backward"};return Iv(e)(t,r,s)},f8=e=>async(t,r,n)=>Iv(e)(t,r,n),p8=e=>(t,r,n)=>{const s=n?{...n,direction:"backward"}:{direction:"backward"};return rh(e)(t,r,s)},m8=e=>(t,r,n)=>rh(e)(t,r,n),g8=e=>async(t,r,n)=>{const s=n?{...n,direction:"backward"}:{direction:"backward"};return nh(e)(t,r,s)},v8=e=>async(t,r,n)=>nh(e)(t,r,n),x8=/^[cC][0-9a-z]{6,}
vendor: 4,187 bytes, line 652
652$/,y8=/^[0-9a-z]+$/,b8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,w8=/^[0-9a-vA-V]{20}$/,j8=/^[A-Za-z0-9]{27}$/,k8=/^[a-zA-Z0-9_-]{21}$/,_8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,N8=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,l0=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,S8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,C8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function E8(){return new RegExp(C8,"u")}const R8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,P8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,T8=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,A8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,O8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dN=/^[A-Za-z0-9_-]*$/,L8=/^https?$/,I8=/^\+[1-9]\d{6,14}$/,uN="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",$8=new RegExp(`^${uN}$`);function hN(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function D8(e){return new RegExp(`^${hN(e)}$`)}function M8(e){const t=hN({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${uN}T(?:${n})$`)}const z8=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},F8=/^[^A-Z]*$/,U8=/^[^a-z]*$/,dn=A("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),B8=A("$ZodCheckMaxLength",(e,t)=>{var r;dn.init(e,t),(r=e._zod.def).when??(r.when=n=>{const s=n.value;return!Tv(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const s=n.value;if(s.length<=t.maximum)return;const i=Ov(s);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),q8=A("$ZodCheckMinLength",(e,t)=>{var r;dn.init(e,t),(r=e._zod.def).when??(r.when=n=>{const s=n.value;return!Tv(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const s=n.value;if(s.length>=t.minimum)return;const i=Ov(s);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),V8=A("$ZodCheckLengthEquals",(e,t)=>{var r;dn.init(e,t),(r=e._zod.def).when??(r.when=n=>{const s=n.value;return!Tv(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=n=>{const s=n.value,o=s.length;if(o===t.length)return;const i=Ov(s),l=o>t.length;n.issues.push({origin:i,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sh=A("$ZodCheckStringFormat",(e,t)=>{var r,n;dn.init(e,t),e._zod.onattach.push(s=>
vendor: 35,255 bytes, lines 652-715
652{const o=s._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),H8=A("$ZodCheckRegex",(e,t)=>{sh.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),W8=A("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=F8),sh.init(e,t)}),K8=A("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=U8),sh.init(e,t)}),G8=A("$ZodCheckIncludes",(e,t)=>{dn.init(e,t);const r=th(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Z8=A("$ZodCheckStartsWith",(e,t)=>{dn.init(e,t);const r=new RegExp(`^${th(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),J8=A("$ZodCheckEndsWith",(e,t)=>{dn.init(e,t);const r=new RegExp(`.*${th(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Q8=A("$ZodCheckOverwrite",(e,t)=>{dn.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Y8{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(` 653`).filter(i=>i),s=Math.min(...n.map(i=>i.length-i.trimStart().length)),o=n.map(i=>i.slice(s)).map(i=>" ".repeat(this.indent*2)+i);for(const i of o)this.content.push(i)}compile(){const t=Function,r=this==null?void 0:this.args,s=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new t(...r,s.join(` 654`))}}const X8={major:4,minor:4,patch:3},tt=A("$ZodType",(e,t)=>{var s;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=X8;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,c,d)=>{let u=so(l),h;for(const p of c){if(p._zod.def.when){if(a8(l)||!p._zod.def.when(l))continue}else if(u)continue;const f=l.issues.length,y=p._zod.check(l);if(y instanceof Promise&&(d==null?void 0:d.async)===!1)throw new xo;if(h||y instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await y,l.issues.length!==f&&(u||(u=so(l,f)))});else{if(l.issues.length===f)continue;u||(u=so(l,f))}}return h?h.then(()=>l):l},i=(l,c,d)=>{if(so(l))return l.aborted=!0,l;const u=o(c,n,d);if(u instanceof Promise){if(d.async===!1)throw new xo;return u.then(h=>e._zod.parse(h,d))}return e._zod.parse(u,d)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const u=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return u instanceof Promise?u.then(h=>i(h,l,c)):i(u,l,c)}const d=e._zod.parse(l,c);if(d instanceof Promise){if(c.async===!1)throw new xo;return d.then(u=>o(u,n,c))}return o(d,n,c)}}Se(e,"~standard",()=>({validate:o=>{var i;try{const l=l8(e,o);return l.success?{value:l.data}:{issues:(i=l.error)==null?void 0:i.issues}}catch{return c8(e,o).then(c=>{var d;return c.success?{value:c.data}:{issues:(d=c.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),$v=A("$ZodString",(e,t)=>{var r;tt.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??z8(e._zod.bag),e._zod.parse=(n,s)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Me=A("$ZodStringFormat",(e,t)=>{sh.init(e,t),$v.init(e,t)}),e9=A("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=N8),Me.init(e,t)}),t9=A("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=l0(n))}else t.pattern??(t.pattern=l0());Me.init(e,t)}),r9=A("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=S8),Me.init(e,t)}),n9=A("$ZodURL",(e,t)=>{Me.init(e,t),e._zod.check=r=>{var n;try{const s=r.value.trim();if(!t.normalize&&((n=t.protocol)==null?void 0:n.source)===L8.source&&!/^https?:\/\//i.test(s)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const o=new URL(s);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=s;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),s9=A("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=E8()),Me.init(e,t)}),a9=A("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=k8),Me.init(e,t)}),o9=A("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=x8),Me.init(e,t)}),i9=A("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=y8),Me.init(e,t)}),l9=A("$ZodULID",(e,t)=>{t.pattern??(t.pattern=b8),Me.init(e,t)}),c9=A("$ZodXID",(e,t)=>{t.pattern??(t.pattern=w8),Me.init(e,t)}),d9=A("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=j8),Me.init(e,t)}),u9=A("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=M8(t)),Me.init(e,t)}),h9=A("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$8),Me.init(e,t)}),f9=A("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=D8(t)),Me.init(e,t)}),p9=A("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=_8),Me.init(e,t)}),m9=A("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=R8),Me.init(e,t),e._zod.bag.format="ipv4"}),g9=A("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=P8),Me.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),v9=A("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=T8),Me.init(e,t)}),x9=A("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=A8),Me.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[s,o]=n;if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${s}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function fN(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const y9=A("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=O8),Me.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{fN(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function b9(e){if(!dN.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return fN(r)}const w9=A("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=dN),Me.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{b9(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),j9=A("$ZodE164",(e,t)=>{t.pattern??(t.pattern=I8),Me.init(e,t)});function k9(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const s=JSON.parse(atob(n));return!("typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const _9=A("$ZodJWT",(e,t)=>{Me.init(e,t),e._zod.check=r=>{k9(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),N9=A("$ZodUnknown",(e,t)=>{tt.init(e,t),e._zod.parse=r=>r}),S9=A("$ZodNever",(e,t)=>{tt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function c0(e,t,r){e.issues.length&&t.issues.push(...oN(r,e.issues)),t.value[r]=e.value}const C9=A("$ZodArray",(e,t)=>{tt.init(e,t),e._zod.parse=(r,n)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=Array(s.length);const o=[];for(let i=0;i<s.length;i++){const l=s[i],c=t.element._zod.run({value:l,issues:[]},n);c instanceof Promise?o.push(c.then(d=>c0(d,r,i))):c0(c,r,i)}return o.length?Promise.all(o).then(()=>r):r}});function Xd(e,t,r,n,s,o){const i=r in n;if(e.issues.length){if(s&&o&&!i)return;t.issues.push(...oN(r,e.issues))}if(!i&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?i&&(t.value[r]=void 0):t.value[r]=e.value}function pN(e){var n,s,o,i;const t=Object.keys(e.shape);for(const l of t)if(!((i=(o=(s=(n=e.shape)==null?void 0:n[l])==null?void 0:s._zod)==null?void 0:o.traits)!=null&&i.has("$ZodType")))throw new Error(`Invalid element at key "${l}": expected a Zod schema`);const r=Qz(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function mN(e,t,r,n,s,o){const i=[],l=s.keySet,c=s.catchall._zod,d=c.def.type,u=c.optin==="optional",h=c.optout==="optional";for(const p in t){if(p==="__proto__"||l.has(p))continue;if(d==="never"){i.push(p);continue}const f=c.run({value:t[p],issues:[]},n);f instanceof Promise?e.push(f.then(y=>Xd(y,r,p,t,u,h))):Xd(f,r,p,t,u,h)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const E9=A("$ZodObject",(e,t)=>{tt.init(e,t);const r=Object.getOwnPropertyDescriptor(t,"shape");if(!(r!=null&&r.get)){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...l};return Object.defineProperty(t,"shape",{value:c}),c}})}const n=Pv(()=>pN(t));Se(e._zod,"propValues",()=>{const l=t.shape,c={};for(const d in l){const u=l[d]._zod;if(u.values){c[d]??(c[d]=new Set);for(const h of u.values)c[d].add(h)}}return c});const s=Yd,o=t.catchall;let i;e._zod.parse=(l,c)=>{i??(i=n.value);const d=l.value;if(!s(d))return l.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),l;l.value={};const u=[],h=i.shape;for(const p of i.keys){const f=h[p],y=f._zod.optin==="optional",g=f._zod.optout==="optional",w=f._zod.run({value:d[p],issues:[]},c);w instanceof Promise?u.push(w.then(v=>Xd(v,l,p,d,y,g))):Xd(w,l,p,d,y,g)}return o?mN(u,d,l,c,n.value,e):u.length?Promise.all(u).then(()=>l):l}}),R9=A("$ZodObjectJIT",(e,t)=>{E9.init(e,t);const r=e._zod.parse,n=Pv(()=>pN(t)),s=p=>{var b,j;const f=new Y8(["shape","payload","ctx"]),y=n.value,g=k=>{const _=i0(k);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};f.write("const input = payload.value;");const w=Object.create(null);let v=0;for(const k of y.keys)w[k]=`key_${v++}`;f.write("const newResult = {};");for(const k of y.keys){const _=w[k],N=i0(k),C=p[k],R=((b=C==null?void 0:C._zod)==null?void 0:b.optin)==="optional",T=((j=C==null?void 0:C._zod)==null?void 0:j.optout)==="optional";f.write(`const ${_} = ${g(k)};`),R&&T?f.write(` 655 if (${_}.issues.length) { 656 if (${N} in input) { 657 payload.issues = payload.issues.concat(${_}.issues.map(iss => ({ 658 ...iss, 659 path: iss.path ? [${N}, ...iss.path] : [${N}] 660 }))); 661 } 662 } 663 664 if (${_}.value === undefined) { 665 if (${N} in input) { 666 newResult[${N}] = undefined; 667 } 668 } else { 669 newResult[${N}] = ${_}.value; 670 } 671 672 `):R?f.write(` 673 if (${_}.issues.length) { 674 payload.issues = payload.issues.concat(${_}.issues.map(iss => ({ 675 ...iss, 676 path: iss.path ? [${N}, ...iss.path] : [${N}] 677 }))); 678 } 679 680 if (${_}.value === undefined) { 681 if (${N} in input) { 682 newResult[${N}] = undefined; 683 } 684 } else { 685 newResult[${N}] = ${_}.value; 686 } 687 688 `):f.write(` 689 const ${_}_present = ${N} in input; 690 if (${_}.issues.length) { 691 payload.issues = payload.issues.concat(${_}.issues.map(iss => ({ 692 ...iss, 693 path: iss.path ? [${N}, ...iss.path] : [${N}] 694 }))); 695 } 696 if (!${_}_present && !${_}.issues.length) { 697 payload.issues.push({ 698 code: "invalid_type", 699 expected: "nonoptional", 700 input: undefined, 701 path: [${N}] 702 }); 703 } 704 705 if (${_}_present) { 706 if (${_}.value === undefined) { 707 newResult[${N}] = undefined; 708 } else { 709 newResult[${N}] = ${_}.value; 710 } 711 } 712 713 `)}f.write("payload.value = newResult;"),f.write("return payload;");const x=f.compile();return(k,_)=>x(p,k,_)};let o;const i=Yd,l=!Rv.jitless,d=l&&Zz.value,u=t.catchall;let h;e._zod.parse=(p,f)=>{h??(h=n.value);const y=p.value;return i(y)?l&&d&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(o||(o=s(t.shape)),p=o(p,f),u?mN([],y,p,f,h,e):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),p)}});function d0(e,t,r,n){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const s=e.filter(o=>!so(o));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(i=>ka(i,n,ja())))}),t)}const P9=A("$ZodUnion",(e,t)=>{tt.init(e,t),Se(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Se(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Se(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Se(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${n.map(s=>Av(s.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,s)=>{if(r)return r(n,s);let o=!1;const i=[];for(const l of t.options){const c=l._zod.run({value:n.value,issues:[]},s);if(c instanceof Promise)i.push(c),o=!0;else{if(c.issues.length===0)return c;i.push(c)}}return o?Promise.all(i).then(l=>d0(l,n,e,s)):d0(i,n,e,s)}}),T9=A("$ZodIntersection",(e,t)=>{tt.init(e,t),e._zod.parse=(r,n)=>{const s=r.value,o=t.left._zod.run({value:s,issues:[]},n),i=t.right._zod.run({value:s,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([c,d])=>u0(r,c,d)):u0(r,o,i)}});function am(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Nl(e)&&Nl(t)){const r=Object.keys(t),n=Object.keys(e).filter(o=>r.indexOf(o)!==-1),s={...e,...t};for(const o of n){const i=am(e[o],t[o]);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};s[o]=i.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const s=e[n],o=t[n],i=am(s,o);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function u0(e,t,r){const n=new Map;let s;for(const l of t.issues)if(l.code==="unrecognized_keys"){s??(s=l);for(const c of l.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else e.issues.push(l);for(const l of r.issues)if(l.code==="unrecognized_keys")for(const c of l.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else e.issues.push(l);const o=[...n].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(o.length&&s&&e.issues.push({...s,keys:o}),so(e))return e;const i=am(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const A9=A("$ZodEnum",(e,t)=>{tt.init(e,t);const r=nN(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(s=>Jz.has(typeof s)).map(s=>typeof s=="string"?th(s):s.toString()).join("|")})$`),e._zod.parse=(s,o)=>{const i=s.value;return n.has(i)||s.issues.push({code:"invalid_value",values:r,input:i,inst:e}),s}}),O9=A("$ZodTransform",(e,t)=>{tt.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new rN(e.constructor.name);const s=t.transform(r.value,r);if(n.async)return(s instanceof Promise?s:Promise.resolve(s)).then(i=>(r.value=i,r.fallback=!0,r));if(s instanceof Promise)throw new xo;return r.value=s,r.fallback=!0,r}});function h0(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const gN=A("$ZodOptional",(e,t)=>{tt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Se(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Av(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const s=r.value,o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>h0(i,s)):h0(o,s)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),L9=A("$ZodExactOptional",(e,t)=>{gN.init(e,t),Se(e._zod,"values",()=>t.innerType._zod.values),Se(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),I9=A("$ZodNullable",(e,t)=>{tt.init(e,t),Se(e._zod,"optin",()=>t.innerType._zod.optin),Se(e._zod,"optout",()=>t.innerType._zod.optout),Se(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Av(r.source)}|null)$`):void 0}),Se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),$9=A("$ZodDefault",(e,t)=>{tt.init(e,t),e._zod.optin="optional",Se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(o=>f0(o,t)):f0(s,t)}});function f0(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const D9=A("$ZodPrefault",(e,t)=>{tt.init(e,t),e._zod.optin="optional",Se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),M9=A("$ZodNonOptional",(e,t)=>{tt.init(e,t),Se(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(o=>p0(o,e)):p0(s,e)}});function p0(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const z9=A("$ZodCatch",(e,t)=>{tt.init(e,t),e._zod.optin="optional",Se(e._zod,"optout",()=>t.innerType._zod.optout),Se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>ka(i,n,ja()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(o=>ka(o,n,ja()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),F9=A("$ZodPipe",(e,t)=>{tt.init(e,t),Se(e._zod,"values",()=>t.in._zod.values),Se(e._zod,"optin",()=>t.in._zod.optin),Se(e._zod,"optout",()=>t.out._zod.optout),Se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const o=t.out._zod.run(r,n);return o instanceof Promise?o.then(i=>Mc(i,t.in,n)):Mc(o,t.in,n)}const s=t.in._zod.run(r,n);return s instanceof Promise?s.then(o=>Mc(o,t.out,n)):Mc(s,t.out,n)}});function Mc(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}const U9=A("$ZodReadonly",(e,t)=>{tt.init(e,t),Se(e._zod,"propValues",()=>t.innerType._zod.propValues),Se(e._zod,"values",()=>t.innerType._zod.values),Se(e._zod,"optin",()=>{var r,n;return(n=(r=t.innerType)==null?void 0:r._zod)==null?void 0:n.optin}),Se(e._zod,"optout",()=>{var r,n;return(n=(r=t.innerType)==null?void 0:r._zod)==null?void 0:n.optout}),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(m0):m0(s)}});function m0(e){return e.value=Object.freeze(e.value),e}const B9=A("$ZodCustom",(e,t)=>{dn.init(e,t),tt.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,s=t.fn(n);if(s instanceof Promise)return s.then(o=>g0(o,r,n,e));g0(s,r,n,e)}});function g0(e,t,r,n){if(!e){const s={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(s.params=n._zod.def.params),t.issues.push(Sl(s))}}var v0;class q9{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const s={...n,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function V9(){return new q9}(v0=globalThis).__zod_globalRegistry??(v0.__zod_globalRegistry=V9());const Ai=globalThis.__zod_globalRegistry;function H9(e,t){return new e({type:"string",...ie(t)})}function W9(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ie(t)})}function x0(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ie(t)})}function K9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ie(t)})}function G9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ie(t)})}function Z9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ie(t)})}function J9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ie(t)})}function Q9(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ie(t)})}function Y9(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ie(t)})}function X9(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ie(t)})}function eF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ie(t)})}function tF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ie(t)})}function rF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ie(t)})}function nF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ie(t)})}function sF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ie(t)})}function aF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ie(t)})}function oF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ie(t)})}function iF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ie(t)})}function lF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ie(t)})}function cF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ie(t)})}function dF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ie(t)})}function uF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ie(t)})}function hF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ie(t)})}function fF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ie(t)})}function pF(e,t){return new e({type:"string",format:"date",check:"string_format",...ie(t)})}function mF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ie(t)})}function gF(e,t){return new e({type:"string",format:"duration",check:"string_format",...ie(t)})}function vF(e){return new e({type:"unknown"})}function xF(e,t){return new e({type:"never",...ie(t)})}function vN(e,t){return new B8({check:"max_length",...ie(t),maximum:e})}function eu(e,t){return new q8({check:"min_length",...ie(t),minimum:e})}function xN(e,t){return new V8({check:"length_equals",...ie(t),length:e})}function yF(e,t){return new H8({check:"string_format",format:"regex",...ie(t),pattern:e})}function bF(e){return new W8({check:"string_format",format:"lowercase",...ie(e)})}function wF(e){return new K8({check:"string_format",format:"uppercase",...ie(e)})}function jF(e,t){return new G8({check:"string_format",format:"includes",...ie(t),includes:e})}function kF(e,t){return new Z8({check:"string_format",format:"starts_with",...ie(t),prefix:e})}function _F(e,t){return new J8({check:"string_format",format:"ends_with",...ie(t),suffix:e})}function oi(e){return new Q8({check:"overwrite",tx:e})}function NF(e){return oi(t=>t.normalize(e))}function SF(){return oi(e=>e.trim())}function CF(){return oi(e=>e.toLowerCase())}function EF(){return oi(e=>e.toUpperCase())}function RF(){return oi(e=>Gz(e))}function PF(e,t,r){return new e({type:"array",element:t,...ie(r)})}function TF(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ie(r)})}function AF(e,t){const r=OF(n=>(n.addIssue=s=>{if(typeof s=="string")n.issues.push(Sl(s,n.value,r._zod.def));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),n.issues.push(Sl(o))}},e(n.value,n)),t);return r}function OF(e,t){const r=new dn({check:"custom",...ie(t)});return r._zod.check=e,r}function yN(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Ai,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function ht(e,t,r={path:[],schemaPath:[]}){var u,h;var n;const s=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;const i={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,i);const l=(h=(u=e._zod).toJSONSchema)==null?void 0:h.call(u);if(l)i.schema=l;else{const p={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,p);else{const y=i.schema,g=t.processors[s.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);g(e,t,y,p)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),ht(f,t,p),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),t.io==="input"&&bt(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((n=i.schema).default??(n.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function bN(e,t){var i,l,c,d;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const u of e.seen.entries()){const h=(i=e.metadataRegistry.get(u[0]))==null?void 0:i.id;if(h){const p=n.get(h);if(p&&p!==u[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(h,u[0])}}const s=u=>{var g;const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const w=(g=e.external.registry.get(u[0]))==null?void 0:g.id,v=e.external.uri??(b=>b);if(w)return{ref:v(w)};const x=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=x,{defId:x,ref:`${v("__shared")}#/${h}/${x}`}}if(u[1]===r)return{ref:"#"};const f=`#/${h}/`,y=u[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:f+y}},o=u=>{if(u[1].schema.$ref)return;const h=u[1],{ref:p,defId:f}=s(u);h.def={...h.schema},f&&(h.defId=f);const y=h.schema;for(const g in y)delete y[g];y.$ref=p};if(e.cycles==="throw")for(const u of e.seen.entries()){const h=u[1];if(h.cycle)throw new Error(`Cycle detected: #/${(l=h.cycle)==null?void 0:l.join("/")}/<root> 714 715Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const h=u[1];if(t===u[0]){o(u);continue}if(e.external){const f=(c=e.external.registry.get(u[0]))==null?void 0:c.id;if(t!==u[0]&&f){o(u);continue}}if((d=e.metadataRegistry.get(u[0]))==null?void 0:d.id){o(u);continue}if(h.cycle){o(u);continue}if(h.count>1&&e.reused==="ref"){o(u);continue}}}function wN(e,t){var l,c,d,u;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=h=>{const p=e.seen.get(h);if(p.ref===null)return;const f=p.def??p.schema,y={...f},g=p.ref;if(p.ref=null,g){n(g);const v=e.seen.get(g),x=v.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(x)):Object.assign(f,x),Object.assign(f,y),h._zod.parent===g)for(const j in f)j==="$ref"||j==="allOf"||j in y||delete f[j];if(x.$ref&&v.def)for(const j in f)j==="$ref"||j==="allOf"||j in v.def&&JSON.stringify(f[j])===JSON.stringify(v.def[j])&&delete f[j]}const w=h._zod.parent;if(w&&w!==g){n(w);const v=e.seen.get(w);if(v!=null&&v.schema.$ref&&(f.$ref=v.schema.$ref,v.def))for(const x in f)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(f[x])===JSON.stringify(v.def[x])&&delete f[x]}e.override({zodSchema:h,jsonSchema:f,path:p.path??[]})};for(const h of[...e.seen.entries()].reverse())n(h[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,(l=e.external)!=null&&l.uri){const h=(c=e.external.registry.get(t))==null?void 0:c.id;if(!h)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(h)}Object.assign(s,r.def??r.schema);const o=(d=e.metadataRegistry.get(t))==null?void 0:d.id;o!==void 0&&s.id===o&&delete s.id;const i=((u=e.external)==null?void 0:u.defs)??{};for(const h of e.seen.entries()){const p=h[1];p.def&&p.defId&&(p.def.id===p.defId&&delete p.def.id,i[p.defId]=p.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{const h=JSON.parse(JSON.stringify(s));return Object.defineProperty(h,"~standard",{value:{...t["~standard"],jsonSchema:{input:tu(t,"input",e.processors),output:tu(t,"output",e.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function bt(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return bt(n.element,r);if(n.type==="set")return bt(n.valueType,r);if(n.type==="lazy")return bt(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return bt(n.innerType,r);if(n.type==="intersection")return bt(n.left,r)||bt(n.right,r);if(n.type==="record"||n.type==="map")return bt(n.keyType,r)||bt(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:bt(n.in,r)||bt(n.out,r);if(n.type==="object"){for(const s in n.shape)if(bt(n.shape[s],r))return!0;return!1}if(n.type==="union"){for(const s of n.options)if(bt(s,r))return!0;return!1}if(n.type==="tuple"){for(const s of n.items)if(bt(s,r))return!0;return!!(n.rest&&bt(n.rest,r))}return!1}const LF=(e,t={})=>r=>{const n=yN({...r,processors:t});return ht(e,n),bN(n,e),wN(n,e)},tu=(e,t,r={})=>n=>{const{libraryOptions:s,target:o}=n??{},i=yN({...s??{},target:o,io:t,processors:r});return ht(e,i),bN(i,e),wN(i,e)},IF={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$F=(e,t,r,n)=>{const s=r;s.type="string";const{minimum:o,maximum:i,format:l,patterns:c,contentEncoding:d}=e._zod.bag;if(typeof o=="number"&&(s.minLength=o),typeof i=="number"&&(s.maxLength=i),l&&(s.format=IF[l]??l,s.format===""&&delete s.format,l==="time"&&delete s.format),d&&(s.contentEncoding=d),c&&c.size>0){const u=[...c];u.length===1?s.pattern=u[0].source:u.length>1&&(s.allOf=[...u.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},DF=(e,t,r,n)=>{r.not={}},MF=(e,t,r,n)=>{},zF=(e,t,r,n)=>{const s=e._zod.def,o=nN(s.entries);o.every(i=>typeof i=="number")&&(r.type="number"),o.every(i=>typeof i=="string")&&(r.type="string"),r.enum=o},FF=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},UF=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},BF=(e,t,r,n)=>{const s=r,o=e._zod.def,{minimum:i,maximum:l}=e._zod.bag;typeof i=="number"&&(s.minItems=i),typeof l=="number"&&(s.maxItems=l),s.type="array",s.items=ht(o.element,t,{...n,path:[...n.path,"items"]})},qF=(e,t,r,n)=>{var d;const s=r,o=e._zod.def;s.type="object",s.properties={};const i=o.shape;for(const u in i)s.properties[u]=ht(i[u],t,{...n,path:[...n.path,"properties",u]});const l=new Set(Object.keys(i)),c=new Set([...l].filter(u=>{const h=o.shape[u]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));c.size>0&&(s.required=Array.from(c)),((d=o.catchall)==null?void 0:d._zod.def.type)==="never"?s.additionalProperties=!1:o.catchall?o.catchall&&(s.additionalProperties=ht(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},VF=(e,t,r,n)=>{const s=e._zod.def,o=s.inclusive===!1,i=s.options.map((l,c)=>ht(l,t,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=i:r.anyOf=i}
vendor: 5,121 bytes, line 715
715,HF=(e,t,r,n)=>{const s=e._zod.def,o=ht(s.left,t,{...n,path:[...n.path,"allOf",0]}),i=ht(s.right,t,{...n,path:[...n.path,"allOf",1]}),l=d=>"allOf"in d&&Object.keys(d).length===1,c=[...l(o)?o.allOf:[o],...l(i)?i.allOf:[i]];r.allOf=c},WF=(e,t,r,n)=>{const s=e._zod.def,o=ht(s.innerType,t,n),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=s.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},KF=(e,t,r,n)=>{const s=e._zod.def;ht(s.innerType,t,n);const o=t.seen.get(e);o.ref=s.innerType},GF=(e,t,r,n)=>{const s=e._zod.def;ht(s.innerType,t,n);const o=t.seen.get(e);o.ref=s.innerType,r.default=JSON.parse(JSON.stringify(s.defaultValue))},ZF=(e,t,r,n)=>{const s=e._zod.def;ht(s.innerType,t,n);const o=t.seen.get(e);o.ref=s.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},JF=(e,t,r,n)=>{const s=e._zod.def;ht(s.innerType,t,n);const o=t.seen.get(e);o.ref=s.innerType;let i;try{i=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=i},QF=(e,t,r,n)=>{const s=e._zod.def,o=s.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?o?s.out:s.in:s.out;ht(i,t,n);const l=t.seen.get(e);l.ref=i},YF=(e,t,r,n)=>{const s=e._zod.def;ht(s.innerType,t,n);const o=t.seen.get(e);o.ref=s.innerType,r.readOnly=!0},jN=(e,t,r,n)=>{const s=e._zod.def;ht(s.innerType,t,n);const o=t.seen.get(e);o.ref=s.innerType},XF=A("ZodISODateTime",(e,t)=>{u9.init(e,t),Be.init(e,t)});function e7(e){return fF(XF,e)}const t7=A("ZodISODate",(e,t)=>{h9.init(e,t),Be.init(e,t)});function r7(e){return pF(t7,e)}const n7=A("ZodISOTime",(e,t)=>{f9.init(e,t),Be.init(e,t)});function s7(e){return mF(n7,e)}const a7=A("ZodISODuration",(e,t)=>{p9.init(e,t),Be.init(e,t)});function o7(e){return gF(a7,e)}const i7=(e,t)=>{lN.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>i8(e,r)},flatten:{value:r=>o8(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,sm,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,sm,2)}},isEmpty:{get(){return e.issues.length===0}}})},mr=A("ZodError",i7,{Parent:Error}),l7=Lv(mr),c7=Iv(mr),d7=rh(mr),u7=nh(mr),h7=d8(mr),f7=u8(mr),p7=h8(mr),m7=f8(mr),g7=p8(mr),v7=m8(mr),x7=g8(mr),y7=v8(mr),y0=new WeakMap;function ah(e,t,r){const n=Object.getPrototypeOf(e);let s=y0.get(n);if(s||(s=new Set,y0.set(n,s)),!s.has(t)){s.add(t);for(const o in r){const i=r[o];Object.defineProperty(n,o,{configurable:!0,enumerable:!1,get(){const l=i.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}const rt=A("ZodType",(e,t)=>(tt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:tu(e,"input"),output:tu(e,"output")}}),e.toJSONSchema=LF(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>l7(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>d7(e,r,n),e.parseAsync=async(r,n)=>c7(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>u7(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>h7(e,r,n),e.decode=(r,n)=>f7(e,r,n),e.encodeAsync=async(r,n)=>p7(e,r,n),e.decodeAsync=async(r,n)=>m7(e,r,n),e.safeEncode=(r,n)=>g7(e,r,n),e.safeDecode=(r,n)=>v7(e,r,n),e.safeEncodeAsync=async(r,n)=>x7(e,r,n),e.safeDecodeAsync=async(r,n)=>y7(e,r,n),ah(e,"ZodType",{check(...r){const n=this.def;return this.clone(Os(n,{checks:[...n.checks??[],...r.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return Ls(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(uU(r,n))},superRefine(r,n){return this.check(hU(r,n))},overwrite(r){return this.check(oi(r))},optional(){return j0(this)},exactOptional(){return Y7(this)},nullable(){return k0(this)},nullish(){return j0(k0(this))},nonoptional(r){return sU(this,r)},array(){return B7(this)},or(r){return H7([this,r])},and(r){return K7(this,r)},transform(r){return _0(this,J7(r))},default(r){return tU(this,r)},prefault(r){return nU(this,r)},catch(r){return oU(this,r)},pipe(r){return _0(this,r)},readonly(){return cU(this)},describe(r){const n=this.clone();return Ai.add(n,{description:r}),n},meta(...r){if(r.length===0)return Ai.get(this);const n=this.clone();return Ai.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){var r;return(r=Ai.get(e))==null?void 0:r.description},configurable:!0}),e)),kN=A("_ZodString",(e,t)=>{$v.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(n,s,o)=>$F(e,n,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,ah(e,"_ZodString",{regex(...n){return this.check(yF(...n))},includes(...n){return this.check(jF(...n))},startsWith(...n){return this.check(kF(...n))},endsWith(...n){return this.check(_F(...n))},min(...n){return this.check(eu(...n))},max(...n){return this.check(vN(...n))},length(...n){return this.check(xN(...n))}
715,nonempty(...n){return this.check(eu(1,...n))},lowercase(n){return this.check(bF(n))},uppercase(n){return this.check(wF(n))},trim(){return this.check(SF())},normalize(...n){return this.check(NF(...n))},toLowerCase(){return this.check(CF())},toUpperCase(){return this.check(EF())},slugify(){return this.check(RF())}})}),b7=A("ZodString",(e,t)=>{$v.init(e,t),kN.init(e,t),e.email=r=>e.check(W9(w7,r)),e.url=r=>e.check(Q9(j7,r)),e.jwt=r=>e.check(hF(D7,r)),e.emoji=r=>e.check(Y9(k7,r)),e.guid=r=>e.check(x0(b0,r)),e.uuid=r=>e.check(K9(zc,r)),e.uuidv4=r=>e.check(G9(zc,r)),e.uuidv6=r=>e.check(Z9(zc,r)),e.uuidv7=r=>e.check(J9(zc,r)),e.nanoid=r=>e.check(X9(_7,r)),e.guid=r=>e.check(x0(b0,r)),e.cuid=r=>e.check(eF(N7,r)),e.cuid2=r=>e.check(tF(S7,r)),e.ulid=r=>e.check(rF(C7,r)),e.base64=r=>e.check(cF(L7,r)),e.base64url=r=>e.check(dF(I7,r)),e.xid=r=>e.check(nF(E7,r)),e.ksuid=r=>e.check(sF(R7,r)),e.ipv4=r=>e.check(aF(P7,r)),e.ipv6=r=>e.check(oF(T7,r)),e.cidrv4=r=>e.check(iF(A7,r)),e.cidrv6=r=>e.check(lF(O7,r)),e.e164=r=>e.check(uF($7,r)),e.datetime=r=>e.check(e7(r)),e.date=r=>e.check(r7(r)),e.time=r=>e.check(s7(r)),e.duration=r=>e.check(o7(r))});function Zs(e){return H9(b7,e)}const Be=A("ZodStringFormat",(e,t)=>{Me.init(e,t),kN.init(e,t)}),w7=A("ZodEmail",(e,t)=>{r9.init(e,t),Be.init(e,t)}),b0=A("ZodGUID",(e,t)=>{e9.init(e,t),Be.init(e,t)}),zc=A("ZodUUID",(e,t)=>{t9.init(e,t),Be.init(e,t)}),j7=A("ZodURL",(e,t)=>{n9.init(e,t),Be.init(e,t)}),k7=A("ZodEmoji",(e,t)=>{s9.init(e,t),Be.init(e,t)}),_7=A("ZodNanoID",(e,t)=>{a9.init(e,t),Be.init(e,t)}),N7=A("ZodCUID",(e,t)=>{o9.init(e,t),Be.init(e,t)}),S7=A("ZodCUID2",(e,t)=>{i9.init(e,t),Be.init(e,t)}),C7=A("ZodULID",(e,t)=>{l9.init(e,t),Be.init(e,t)}),E7=A("ZodXID",(e,t)=>{c9.init(e,t),Be.init(e,t)}),R7=A("ZodKSUID",(e,t)=>{d9.init(e,t),Be.init(e,t)}),P7=A("ZodIPv4",(e,t)=>{m9.init(e,t),Be.init(e,t)}),T7=A("ZodIPv6",(e,t)=>{g9.init(e,t),Be.init(e,t)}),A7=A("ZodCIDRv4",(e,t)=>{v9.init(e,t),Be.init(e,t)}),O7=A("ZodCIDRv6",(e,t)=>{x9.init(e,t),Be.init(e,t)}),L7=A("ZodBase64",(e,t)=>{y9.init(e,t),Be.init(e,t)}),I7=A("ZodBase64URL",(e,t)=>{w9.init(e,t),Be.init(e,t)}),$7=A("ZodE164",(e,t)=>{j9.init(e,t),Be.init(e,t)}),D7=A("ZodJWT",(e,t)=>{_9.init(e,t),Be.init(e,t)}),M7=A("ZodUnknown",(e,t)=>{N9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>MF()});function w0(){return vF(M7)}const z7=A("ZodNever",(e,t)=>{S9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>DF(e,r,n)});function F7(e){return xF(z7,e)}const U7=A("ZodArray",(e,t)=>{C9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>BF(e,r,n,s),e.element=t.element,ah(e,"ZodArray",{min(r,n){return this.check(eu(r,n))},nonempty(r){return this.check(eu(1,r))},max(r,n){return this.check(vN(r,n))},length(r,n){return this.check(xN(r,n))},unwrap(){return this.element}})});function B7(e,t){return PF(U7,e,t)}const q7=A("ZodObject",(e,t)=>{R9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>qF(e,r,n,s),Se(e,"shape",()=>t.shape),ah(e,"ZodObject",{keyof(){return G7(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:w0()})},loose(){return this.clone({...this._zod.def,catchall:w0()})},strict(){return this.clone({...this._zod.def,catchall:F7()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return e8(this,r)},safeExtend(r){return t8(this,r)},merge(r){return r8(this,r)},pick(r){return Yz(this,r)},omit(r){return Xz(this,r)},partial(...r){return n8(NN,this,r[0])},required(...r){return s8(SN,this,r[0])}})});function _N(e,t){const r={type:"object",shape:e??{},...ie(t)};return new q7(r)}const V7=A("ZodUnion",(e,t)=>{P9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>VF(e,r,n,s),e.options=t.options});function H7(e,t){return new V7({type:"union",options:e,...ie(t)})}const W7=A("ZodIntersection",(e,t)=>{T9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>HF(e,r,n,s)});function K7(e,t){return new W7({type:"intersection",left:e,right:t})}const om=A("ZodEnum",(e,t)=>{A9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(n,s,o)=>zF(e,n,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,s)=>{const o={};for(const i of n)if(r.has(i))o[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);
715return new om({...t,checks:[],...ie(s),entries:o})},e.exclude=(n,s)=>{const o={...t.entries};for(const i of n)if(r.has(i))delete o[i];else throw new Error(`Key ${i} not found in enum`);return new om({...t,checks:[],...ie(s),entries:o})}});function G7(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new om({type:"enum",entries:r,...ie(t)})}const Z7=A("ZodTransform",(e,t)=>{O9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>UF(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new rN(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(Sl(o,r.value,t));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Sl(i))}};const s=t.transform(r.value,r);return s instanceof Promise?s.then(o=>(r.value=o,r.fallback=!0,r)):(r.value=s,r.fallback=!0,r)}});function J7(e){return new Z7({type:"transform",transform:e})}const NN=A("ZodOptional",(e,t)=>{gN.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>jN(e,r,n,s),e.unwrap=()=>e._zod.def.innerType});function j0(e){return new NN({type:"optional",innerType:e})}const Q7=A("ZodExactOptional",(e,t)=>{L9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>jN(e,r,n,s),e.unwrap=()=>e._zod.def.innerType});function Y7(e){return new Q7({type:"optional",innerType:e})}const X7=A("ZodNullable",(e,t)=>{I9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>WF(e,r,n,s),e.unwrap=()=>e._zod.def.innerType});function k0(e){return new X7({type:"nullable",innerType:e})}const eU=A("ZodDefault",(e,t)=>{$9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>GF(e,r,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function tU(e,t){return new eU({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():aN(t)}})}const rU=A("ZodPrefault",(e,t)=>{D9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>ZF(e,r,n,s),e.unwrap=()=>e._zod.def.innerType});function nU(e,t){return new rU({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():aN(t)}})}const SN=A("ZodNonOptional",(e,t)=>{M9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>KF(e,r,n,s),e.unwrap=()=>e._zod.def.innerType});function sU(e,t){return new SN({type:"nonoptional",innerType:e,...ie(t)})}const aU=A("ZodCatch",(e,t)=>{z9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>JF(e,r,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oU(e,t){return new aU({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const iU=A("ZodPipe",(e,t)=>{F9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>QF(e,r,n,s),e.in=t.in,e.out=t.out});function _0(e,t){return new iU({type:"pipe",in:e,out:t})}const lU=A("ZodReadonly",(e,t)=>{U9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>YF(e,r,n,s),e.unwrap=()=>e._zod.def.innerType});function cU(e){return new lU({type:"readonly",innerType:e})}const dU=A("ZodCustom",(e,t)=>{B9.init(e,t),rt.init(e,t),e._zod.processJSONSchema=(r,n,s)=>FF(e,r)});function uU(e,t={}){return TF(dU,e,t)}function hU(e,t){return AF(e,t)}const fU=_N({nome:Zs().trim().min(2,"Nome muito curto").max(100),empresa:Zs().trim().min(2,"Informe a empresa").max(120),telefone:Zs().trim().min(10,"Telefone inválido").max(20).regex(/^[0-9()+\-\s]+$/,"Use apenas números"),email:Zs().trim().email("E-mail inválido").max(160),embarcacoes:Zs().trim().regex(/^\d+$/,"Use apenas números").max(5)}),pU=["27 itens crÃticos de pré-vistoria","Organizado por sistema da embarcação","CompatÃvel com NORMAM atualizada","Pronto para imprimir e levar a bordo"],mU=()=>{const{toast:e}=jg(),[t,r]=m.useState(!1),[n,s]=m.useState({nome:"",empresa:"",telefone:"",email:"",embarcacoes:""}),o=i=>{var c;i.preventDefault();const l=fU.safeParse(n);if(!l.success){e({title:"Verifique os campos",description:((c=l.error.issues[0])==null?void 0:c.message)??"Dados inválidos",variant:"destructive"});return}r(!0),e({title:"Checklist liberado",description:"Enviamos o link de download para o seu e-mail."})};return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(Mt,{title:"Checklist pré-vistoria naval â Download grátis | Record",description:"Baixe o checklist técnico com 27 itens essenciais de pré-vistoria de embarcação. Material gratuito para armadores e operadores.",canonical:Dt("/checklist-pre-vistoria")}),a.jsx(Ju,{}),a.jsx("main",{className:"pt-32 pb-20",children:a.jsx("section",{className:"container-record",children:a.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-start",children:[a.jsxs("div",{children:[a.jsx("span",{className:"eyebrow mb-5",children:"Material gratuito"}),a.jsxs("h1",{className:"font-display text-4xl md:text-5xl font-bold text-ink leading-[1.05] mb-5",children:["Checklist Pré-Vistoria",a.jsx("span",{className:"text-primary",children:" Naval"})]}),a.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed mb-8",children:"O documento técnico que armadores experientes usam para evitar reprovações e garantir vistorias sem retrabalho."}),a.jsx("ul",{className:"space-y-3 mb-8",children:pU.map(i=>a.jsxs("li",{className:"flex items-start gap-3",children:[a.jsx(Ze,{className:"h-5 w-5 text-primary mt-0.5 shrink-0"}),a.jsx("span",{className:"text-ink-soft",children:i})]},i))}),a.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[a.jsx($t,{className:"h-5 w-5 text-primary"}),"Seus dados são protegidos. Nenhum spam."]})]}),a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-primary/20 to-accent/20 blur-3xl rounded-3xl"}),a.jsx("div",{className:"relative bg-card border border-border rounded-2xl shadow-elevated p-8",children:t?a.jsxs("div",{className:"text-center py-8",children:[a.jsx("div",{className:"h-16 w-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-5",children:a.jsx(Ze,{className:"h-8 w-8 text-primary"})}),a.jsx("h2",{className:"font-display font-bold text-ink text-2xl mb-2",children:"Checklist enviado!"}),a.jsx("p",{className:"text-muted-foreground mb-6",children:"Confira sua caixa de entrada â e o spam, por garantia."}),a.jsx(V,{asChild:!0,className:"bg-primary hover:bg-primary-deep text-primary-foreground",children:a.jsx("a",{href:"/conteudo-tecnico",children:"Ver mais conteúdos"})})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[a.jsx("div",{className:"h-12 w-12 rounded-xl bg-primary/10 flex items-center justify-center",children:a.jsx(ya,{className:"h-6 w-6 text-primary"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"font-display font-bold text-ink text-xl",children:"Receba seu checklist"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Acesso imediato por e-mail"})]})]}),a.jsxs("form",{onSubmit:o,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"lead-nome",className:"text-sm font-medium text-ink-soft mb-1.5 block",children:"Nome"}),a.jsx(ae,{id:"lead-nome",name:"nome",autoComplete:"name",value:n.nome,onChange:i=>s({...n,nome:i.target.value}),placeholder:"Seu nome completo",maxLength:100,required:!0})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"lead-empresa",className:"text-sm font-medium text-ink-soft mb-1.5 block",children:"Empresa"}),a.jsx(ae,{id:"lead-empresa",name:"empresa",autoComplete:"organization",value:n.empresa,onChange:i=>s({...n,empresa:i.target.value}),placeholder:"Nome da empresa",maxLength:120,required:!0})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"lead-telefone",className:"text-sm font-medium text-ink-soft mb-1.5 block",children:"Telefone"}
715),a.jsx(ae,{id:"lead-telefone",name:"telefone",type:"tel",autoComplete:"tel",value:n.telefone,onChange:i=>s({...n,telefone:i.target.value}),placeholder:"(14) 99710-2033",maxLength:20,required:!0})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"lead-embarcacoes",className:"text-sm font-medium text-ink-soft mb-1.5 block",children:"Embarcações"}),a.jsx(ae,{id:"lead-embarcacoes",name:"embarcacoes",value:n.embarcacoes,onChange:i=>s({...n,embarcacoes:i.target.value}),placeholder:"Ex.: 3",maxLength:5,inputMode:"numeric",required:!0})]})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"lead-email",className:"text-sm font-medium text-ink-soft mb-1.5 block",children:"E-mail"}),a.jsx(ae,{id:"lead-email",name:"email",type:"email",autoComplete:"email",value:n.email,onChange:i=>s({...n,email:i.target.value}),placeholder:"[email protected]",maxLength:160,required:!0})]}),a.jsxs(V,{type:"submit",className:"w-full h-12 bg-gradient-to-r from-primary to-primary-deep hover:from-primary-deep hover:to-primary text-primary-foreground font-semibold shadow-red text-base",children:[a.jsx(Pn,{className:"h-4 w-4"}),"Baixar checklist agora"]})]})]})})]})]})})}),a.jsx(pr,{}),a.jsx(Kl,{}),a.jsx(Zu,{})]})},gU=_N({email:Zs().trim().email("Email inválido").max(255),password:Zs().min(6,"MÃnimo 6 caracteres").max(72)}),vU=()=>{var x,b;const e=Ts(),t=yt(),{user:r,isAdmin:n,loading:s}=Mu(),[o,i]=m.useState("login"),[l,c]=m.useState(""),[d,u]=m.useState(""),[h,p]=m.useState(!1),y=new URLSearchParams(t.search).get("next"),g=y&&y.startsWith("/")&&!y.startsWith("//")?y:null,w=g||((b=(x=t.state)==null?void 0:x.from)==null?void 0:b.pathname)||"/admin/artigos";m.useEffect(()=>{!s&&r&&(g||n)&&e(w,{replace:!0})},[s,r,n,w,e,g]);const v=async j=>{j.preventDefault();const k=gU.safeParse({email:l,password:d});if(!k.success){Ye.error(k.error.issues[0].message);return}p(!0);try{if(o==="signup"){const{error:_}=await Le.auth.signUp({email:k.data.email,password:k.data.password,options:{emailRedirectTo:`${window.location.origin}${g??"/admin/login"}`}});if(_)throw _;Ye.success("Conta criada. Avise o gestor para liberar o papel admin para o seu email.")}else{const{error:_}=await Le.auth.signInWithPassword({email:k.data.email,password:k.data.password});if(_)throw _}}catch(_){Ye.error((_==null?void 0:_.message)??"Erro de autenticação")}finally{p(!1)}};return a.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-6",children:[a.jsx(I_,{}),a.jsxs("div",{className:"w-full max-w-md",children:[a.jsx(we,{to:"/",className:"block text-center mb-6 font-display font-bold text-ink",children:"Record · Painel"}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-card",children:[a.jsx("h1",{className:"font-display text-2xl font-bold text-ink mb-1",children:o==="login"?"Entrar":"Criar conta"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Acesso restrito à equipe editorial."}),a.jsxs("form",{onSubmit:v,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(X,{children:"Email"}),a.jsx(ae,{type:"email",value:l,onChange:j=>c(j.target.value),maxLength:255,required:!0})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Senha"}),a.jsx(ae,{type:"password",value:d,onChange:j=>u(j.target.value),maxLength:72,required:!0})]}),a.jsx(V,{type:"submit",className:"w-full",disabled:h,children:h?a.jsx(_t,{className:"h-4 w-4 animate-spin"}):o==="login"?"Entrar":"Criar conta"})]}),a.jsx("button",{onClick:()=>i(o==="login"?"signup":"login"),className:"mt-4 text-sm text-muted-foreground hover:text-primary w-full text-center",children:o==="login"?"Criar uma conta":"Já tenho conta"})]})]})]})},CN=()=>{const{user:e,signOut:t}=Mu(),r=Ts();return a.jsx("header",{className:"border-b border-border bg-card sticky top-0 z-40",children:a.jsxs("div",{className:"container-record h-16 flex items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-6",children:[a.jsx(we,{to:"/admin/artigos",className:"font-display font-bold text-ink",children:"Record · Painel"}),a.jsx("nav",{className:"hidden md:flex items-center gap-1 text-sm",children:a.jsxs(we,{to:"/admin/artigos",className:"px-3 py-1.5 rounded-lg text-muted-foreground hover:text-ink hover:bg-secondary/40 inline-flex items-center gap-2",children:[a.jsx(ya,{className:"h-4 w-4"})," Artigos"]})})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(V,{asChild:!0,size:"sm",children:a.jsxs(we,{to:"/admin/artigos/novo",children:[a.jsx(Nr,{className:"h-4 w-4 mr-1.5"})," Novo artigo"]})}),a.jsx("span",{className:"hidden sm:block text-xs text-muted-foreground",children:e==null?void 0:e.email}),a.jsx(V,{variant:"ghost",size:"sm",onClick:async()=>{await t(),r("/admin/login")},children:a.jsx(o5,{className:"h-4 w-4"})})]})]})})};var xU=[" ","Enter","ArrowUp","ArrowDown"],yU=[" ","Enter"],_a="Select",[oh,ih,bU]=ku(_a),[Pa]=fr(_a,[bU,ti]),lh=ti(),[wU,Is]=Pa(_a),[jU,kU]=Pa(_a),_U="SelectProvider";function EN(e){const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:i,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:h,disabled:p,required:f,form:y,internal_do_not_use_render:g}=e,w=lh(t),[v,x]=m.useState(null),[b,j]=m.useState(null),[k,_]=m.useState(!1),N=fv(d),[C,R]=an({prop:n,defaultProp:s??!1,onChange:o,caller:_a}),[T,O]=an({prop:i,defaultProp:l,onChange:c,caller:_a}),I=m.useRef(null),K=m.useRef(T);m.useEffect(()=>{const F=y?v==null?void 0:v.ownerDocument.getElementById(y):v==null?void 0:v.form;if(F instanceof HTMLFormElement){const Y=()=>O(K.current);return F.addEventListener("reset",Y),()=>F.removeEventListener("reset",Y)}},[y,v,O]);const $=v?!!y||!!v.closest("form"):!0,[H,U]=m.useState(new Set),Z=_n(),E=Array.from(H).map(F=>F.props.value).join(";"),P=m.useCallback(F=>{U(Y=>new Set(Y).add(F))},[]),z=m.useCallback(F=>{U(Y=>{const re=new Set(Y);return re.delete(F),re})},[]),ee={required:f,trigger:v,onTriggerChange:x,valueNode:b,onValueNodeChange:j,valueNodeHasChildren:k,onValueNodeHasChildrenChange:_,contentId:Z,value:T,onValueChange:O,open:C,onOpenChange:R,dir:N,triggerPointerDownPosRef:I,disabled:p,name:u,autoComplete:h,form:y,nativeOptions:H,nativeSelectKey:E,isFormControl:$};return a.jsx(r_,{...w,children:a.jsx(wU,{scope:t,...ee,children:a.jsx(oh.Provider,{scope:t,children:a.jsx(jU,{scope:t,onNativeOptionAdd:P,onNativeOptionRemove:z,children:zU(g)?g(ee):r})})})})}EN.displayName=_U;var RN=e=>{const{__scopeSelect:t,children:r,...n}=e;return a.jsx(EN,{__scopeSelect:t,...n,internal_do_not_use_render:({isFormControl:s})=>a.jsxs(a.Fragment,{children:[r,s?a.jsx(JN,{__scopeSelect:t}):null]})})};RN.displayName=_a;var PN="SelectTrigger",Dv=m.forwardRef((e,t)=>
vendor: 17,410 bytes, line 715
715{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=lh(r),i=Is(PN,r),l=i.disabled||n,c=de(t,i.onTriggerChange),d=ih(r),u=m.useRef("touch"),[h,p,f]=QN(g=>{const w=d().filter(b=>!b.disabled),v=w.find(b=>b.value===i.value),x=YN(w,g,v);x!==void 0&&i.onValueChange(x.value)}),y=g=>{l||(i.onOpenChange(!0),f()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return a.jsx(Au,{asChild:!0,...o,children:a.jsx(oe.button,{type:"button",role:"combobox","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":ch(i.value)?"":void 0,...s,ref:c,onClick:te(s.onClick,g=>{g.currentTarget.focus(),u.current!=="mouse"&&y(g)}),onPointerDown:te(s.onPointerDown,g=>{u.current=g.pointerType;const w=g.target;w.hasPointerCapture(g.pointerId)&&w.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:te(s.onKeyDown,g=>{const w=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(w&&g.key===" ")&&xU.includes(g.key)&&(y(),g.preventDefault())})})})});Dv.displayName=PN;var TN="SelectValue",AN=m.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:i="",...l}=e,c=Is(TN,r),{onValueNodeHasChildrenChange:d}=c,u=o!==void 0,h=de(t,c.onValueNodeChange);et(()=>{d(u)},[d,u]);const p=ch(c.value);return a.jsx(oe.span,{...l,asChild:p?!1:l.asChild,ref:h,style:{pointerEvents:"none"},children:a.jsx(m.Fragment,{children:p?i:o},p?"placeholder":"value")})});AN.displayName=TN;var NU="SelectIcon",ON=m.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return a.jsx(oe.span,{"aria-hidden":!0,...s,ref:t,children:n||"â¼"})});ON.displayName=NU;var LN="SelectPortal",[SU,CU]=Pa(LN,{forceMount:void 0}),IN=e=>{const{__scopeSelect:t,forceMount:r,...n}=e;return a.jsx(SU,{scope:e.__scopeSelect,forceMount:r,children:a.jsx(Fl,{asChild:!0,...n})})};IN.displayName=LN;var Ns="SelectContent",Mv=m.forwardRef((e,t)=>{const r=CU(Ns,e.__scopeSelect),{forceMount:n=r.forceMount,...s}=e,o=Is(Ns,e.__scopeSelect),[i,l]=m.useState();return et(()=>{l(new DocumentFragment)},[]),a.jsx(on,{present:n||o.open,children:({present:c})=>c?a.jsx(MN,{...s,ref:t}):a.jsx($N,{...s,fragment:i})})});Mv.displayName=Ns;var $N=m.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,fragment:s}=e;return s?Rs.createPortal(a.jsx(DN,{scope:r,children:a.jsx(oh.Slot,{scope:r,children:a.jsx("div",{ref:t,children:n})})}),s):null});$N.displayName="SelectContentFragment";var kr=10,[DN,$s]=Pa(Ns),EU="SelectContentImpl",RU=xa("SelectContent.RemoveScroll"),MN=m.forwardRef((e,t)=>{const{__scopeSelect:r}=e,{position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:y,hideWhenDetached:g,avoidCollisions:w,...v}=e,x=Is(Ns,r),[b,j]=m.useState(null),[k,_]=m.useState(null),N=de(t,j),[C,R]=m.useState(null),[T,O]=m.useState(null),I=ih(r),[K,$]=m.useState(!1),H=m.useRef(!1);m.useEffect(()=>{if(b)return rv(b)},[b]),tv();const U=m.useCallback(M=>{const[he,...Ee]=I().map(ye=>ye.ref.current),[be]=Ee.slice(-1),fe=document.activeElement;for(const ye of M)if(ye===fe||(ye==null||ye.scrollIntoView({block:"nearest"}),ye===he&&k&&(k.scrollTop=0),ye===be&&k&&(k.scrollTop=k.scrollHeight),ye==null||ye.focus(),document.activeElement!==fe))return},[I,k]),Z=m.useCallback(()=>U([C,b]),[U,C,b]);m.useEffect(()=>{K&&Z()},[K,Z]);const{onOpenChange:E,triggerPointerDownPosRef:P}=x;m.useEffect(()=>{if(b){let M={x:0,y:0};const he=be=>{var fe,ye;M={x:Math.abs(Math.round(be.pageX)-(((fe=P.current)==null?void 0:fe.x)??0)),y:Math.abs(Math.round(be.pageY)-(((ye=P.current)==null?void 0:ye.y)??0))}},Ee=be=>{M.x<=10&&M.y<=10?be.preventDefault():be.composedPath().includes(b)||E(!1),document.removeEventListener("pointermove",he),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",Ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",Ee,{capture:!0})}}},[b,E,P]),m.useEffect(()=>{const M=()=>E(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[E]);const[z,ee]=QN(M=>{const he=I().filter(fe=>!fe.disabled),Ee=he.find(fe=>fe.ref.current===document.activeElement),be=YN(he,M,Ee);be&&setTimeout(()=>{var fe;return(fe=be.ref.current)==null?void 0:fe.focus()})}),F=m.useCallback((M,he,Ee)=>{const be=!H.current&&!Ee;(x.value!==void 0&&x.value===he||be)&&(R(M),be&&(H.current=!0))},[x.value]),Y=m.useCallback(()=>b==null?void 0:b.focus(),[b]),re=m.useCallback((M,he,Ee)=>{const be=!H.current&&!Ee;(x.value!==void 0&&x.value===he||be)&&O(M)},[x.value]),Q=n==="popper"?im:zN,ve=Q===im?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:y,hideWhenDetached:g,avoidCollisions:w}:{};return a.jsx(DN,{scope:r,content:b,viewport:k,onViewportChange:_,itemRefCallback:F,selectedItem:C,onItemLeave:Y,itemTextRefCallback:re,focusSelectedItem:Z,selectedItemText:T,position:n,isPositioned:K,searchRef:z,children:a.jsx(Bu,{as:RU,allowPinchZoom:!0,children:a.jsx(Fu,{asChild:!0,trapped:x.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:te(s,M=>{var he;(he=x.trigger)==null||he.focus({preventScroll:!0}),M.preventDefault()}),children:a.jsx(Zo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:a.jsx(Q,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:M=>M.preventDefault(),...v,...ve,onPlaced:()=>$(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:te(v.onKeyDown,M=>{const he=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!he&&M.key.length===1&&ee(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let be=I().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);if(["ArrowUp","End"].includes(M.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const fe=M.target,ye=be.indexOf(fe);be=be.slice(ye+1)}setTimeout(()=>U(be)),M.preventDefault()}})})})})})})});MN.displayName=EU;var PU="SelectItemAlignedPosition",zN=m.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=Is(Ns,r),i=$s(Ns,r),[l,c]=m.useState(null),[d,u]=m.useState(null),h=de(t,u),p=ih(r),f=m.useRef(!1),y=m.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:v,focusSelectedItem:x}=i,b=m.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&d&&g&&w&&v){const N=o.trigger.getBoundingClientRect(),C=d.getBoundingClientRect(),R=o.valueNode.getBoundingClientRect(),T=v.getBoundingClientRect();if(o.dir!=="rtl"){const fe=T.left-C.left,ye=R.left-fe,zt=N.left-ye,Ft=N.width+zt,Dn=Math.max(Ft,C.width),Mn=window.innerWidth-kr,Ms=Zd(ye,[kr,Math.max(kr,Mn-Dn)]);l.style.minWidth=Ft+"px",l.style.left=Ms+"px"}else{const fe=C.right-T.right,ye=window.innerWidth-R.right-fe,zt=window.innerWidth-N.right-ye,Ft=N.width+zt,Dn=Math.max(Ft,C.width),Mn=window.innerWidth-kr,Ms=Zd(ye,[kr,Math.max(kr,Mn-Dn)]);l.style.minWidth=Ft+"px",l.style.right=Ms+"px"}const O=p(),I=window.innerHeight-kr*2,K=g.scrollHeight,$=window.getComputedStyle(d),H=parseInt($.borderTopWidth,10),U=parseInt($.paddingTop,10),Z=parseInt($.borderBottomWidth,10),E=parseInt($.paddingBottom,10),P=H+U+K+E+Z,z=Math.min(w.offsetHeight*5,P),ee=window.getComputedStyle(g),F=parseInt(ee.paddingTop,10),Y=parseInt(ee.paddingBottom,10),re=N.top+N.height/2-kr,Q=I-re,ve=w.offsetHeight/2,M=w.offsetTop+ve,he=H+U+M,Ee=P-he;if(he<=re){const fe=O.length>0&&w===O[O.length-1].ref.current;l.style.bottom="0px";const ye=d.clientHeight-g.offsetTop-g.offsetHeight,zt=Math.max(Q,ve+(fe?Y:0)+ye+Z),Ft=he+zt;l.style.height=Ft+"px"}else{const fe=O.length>0&&w===O[0].ref.current;l.style.top="0px";const zt=Math.max(re,H+g.offsetTop+(fe?F:0)+ve)+Ee;l.style.height=zt+"px",g.scrollTop=he-re+g.offsetTop}l.style.margin=`${kr}px 0`,l.style.minHeight=z+"px",l.style.maxHeight=I+"px",n==null||n(),requestAnimationFrame(()=>f.current=!0)}},[p,o.trigger,o.valueNode,l,d,g,w,v,o.dir,n]);et(()=>b(),[b]);const[j,k]=m.useState();et(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const _=m.useCallback(N=>{N&&y.current===!0&&(b(),x==null||x(),y.current=!1)},[b,x]);return a.jsx(AU,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:f,onScrollButtonChange:_,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:a.jsx(oe.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});zN.displayName=PU;var TU="SelectPopperPosition",im=m.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=kr,...o}=e,i=lh(r);return a.jsx(Gg,{...i,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.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)"}})});im.displayName=TU;var[AU,zv]=Pa(Ns,{}),lm="SelectViewport",FN=m.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=$s(lm,r),i=zv(lm,r),l=de(t,o.onViewportChange),c=m.useRef(0);return a.jsxs(a.Fragment,{children:[a.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:n}),a.jsx(oh.Slot,{scope:r,children:a.jsx(oe.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:te(s.onScroll,d=>{const u=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&h){const f=Math.abs(c.current-u.scrollTop);if(f>0){const y=window.innerHeight-kr*2,g=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),v=Math.max(g,w);if(v<y){const x=v+f,b=Math.min(y,x),j=x-b;h.style.height=b+"px",h.style.bottom==="0px"&&(u.scrollTop=j>0?j:0,h.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});FN.displayName=lm;var UN="SelectGroup",[OU,LU]=Pa(UN),IU=m.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=_n();return a.jsx(OU,{scope:r,id:s,children:a.jsx(oe.div,{role:"group","aria-labelledby":s,...n,ref:t})})});IU.displayName=UN;var BN="SelectLabel",Fv=m.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=LU(BN,r);return a.jsx(oe.div,{id:s.id,...n,ref:t})});Fv.displayName=BN;var ru="SelectItem",[$U,qN]=Pa(ru),Uv=m.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...i}=e,l=Is(ru,r),c=$s(ru,r),d=l.value===n,[u,h]=m.useState(o??""),[p,f]=m.useState(!1),y=Qt(b=>{var j;return(j=c.itemRefCallback)==null?void 0:j.call(c,b,n,s)}),g=de(t,y),w=_n(),v=m.useRef("touch"),x=()=>{s||(l.onValueChange(n),l.onOpenChange(!1))};return a.jsx($U,{scope:r,value:n,disabled:s,textId:w,isSelected:d,onItemTextChange:m.useCallback(b=>{h(j=>j||((b==null?void 0:b.textContent)??"").trim())},[]),children:a.jsx(oh.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:a.jsx(oe.div,{role:"option","aria-labelledby":w,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:g,onFocus:te(i.onFocus,()=>f(!0)),onBlur:te(i.onBlur,()=>f(!1)),onClick:te(i.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:te(i.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:te(i.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:te(i.onPointerMove,b=>{var j;v.current=b.pointerType,s?(j=c.onItemLeave)==null||j.call(c):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(i.onPointerLeave,b=>{var j;b.currentTarget===document.activeElement&&((j=c.onItemLeave)==null||j.call(c))}),onKeyDown:te(i.onKeyDown,b=>{var k;s||b.target!==b.currentTarget||((k=c.searchRef)==null?void 0:k.current)!==""&&b.key===" "||(yU.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});Uv.displayName=ru;var Oi="SelectItemText",VN=m.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,i=Is(Oi,r),l=$s(Oi,r),c=qN(Oi,r),d=kU(Oi,r),[u,h]=m.useState(null),p=Qt(x=>{var b;return(b=l.itemTextRefCallback)==null?void 0:b.call(l,x,c.value,c.disabled)}),f=de(t,h,c.onItemTextChange,p),y=u==null?void 0:u.textContent,g=m.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:w,onNativeOptionRemove:v}=d;return et(()=>(w(g),()=>v(g)),[w,v,g]),a.jsxs(a.Fragment,{children:[a.jsx(oe.span,{id:c.textId,...o,ref:f}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren&&!ch(i.value)?Rs.createPortal(o.children,i.valueNode):null]})});VN.displayName=Oi;var HN="SelectItemIndicator",WN=m.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return qN(HN,r).isSelected?a.jsx(oe.span,{"aria-hidden":!0,...n,ref:t}):null});WN.displayName=HN;var cm="SelectScrollUpButton",Bv=m.forwardRef((e,t)=>{const r=$s(cm,e.__scopeSelect),n=zv(cm,e.__scopeSelect),[s,o]=m.useState(!1),i=de(t,n.onScrollButtonChange);return et(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollTop>0;o(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?a.jsx(KN,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Bv.displayName=cm;var dm="SelectScrollDownButton",qv=m.forwardRef((e,t)=>{const r=$s(dm,e.__scopeSelect),n=zv(dm,e.__scopeSelect),[s,o]=m.useState(!1),i=de(t,n.onScrollButtonChange);return et(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<d;o(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?a.jsx(KN,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});qv.displayName=dm;var KN=m.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=$s("SelectScrollButton",r),i=m.useRef(null),l=ih(r),c=m.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return m.useEffect(()=>()=>c(),[c]),et(()=>{var u;const d=l().find(h=>h.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[l]),a.jsx(oe.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:te(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:te(s.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:te(s.onPointerLeave,()=>{c()})})}),DU="SelectSeparator",Vv=m.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return a.jsx(oe.div,{"aria-hidden":!0,...n,ref:t})});Vv.displayName=DU;var GN="SelectArrow",MU=m.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=lh(r);return $s(GN,r).position==="popper"?a.jsx(Zg,{...s,...n,ref:t}):null});MU.displayName=GN;var ZN="SelectBubbleInput",JN=m.forwardRef(({__scopeSelect:e,...t},r)=>{const n=Is(ZN,e),{value:s,onValueChange:o,required:i,disabled:l,name:c,autoComplete:d,form:u}=n,{nativeOptions:h,nativeSelectKey:p}=n,f=m.useRef(null),y=de(r,f),g=s??"",w=pv(g),v=Array.from(h).some(x=>(x.props.value??"")==="");return m.useEffect(()=>{const x=f.current;if(!x)return;const b=window.HTMLSelectElement.prototype,k=Object.getOwnPropertyDescriptor(b,"value").set;if(w!==g&&k){const _=new Event("change",{bubbles:!0});k.call(x,g),x.dispatchEvent(_)}},[w,g]),a.jsxs(oe.select,{"aria-hidden":!0,required:i,tabIndex:-1,name:c,autoComplete:d,disabled:l,form:u,onChange:x=>o(x.target.value),...t,style:{...Mj,...t.style},ref:y,defaultValue:g,children:[ch(s)&&!v?a.jsx("option",{value:""}):null,Array.from(h)]},p)});JN.displayName=ZN;function zU(e){return typeof e=="function"}function ch(e){return e===""||e===void 0}function QN(e){const t=Qt(e),r=m.useRef(""),n=m.useRef(0),s=m.useCallback(i=>{const l=r.current+i;t(l),function c(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),o=m.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function YN(e,t,r){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=FU(e,Math.max(o,0));s.length===1&&(i=i.filter(d=>d!==r));const c=i.find(d=>d.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function FU(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const Rr=RN,Pr=AN,sr=m.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(Dv,{ref:n,className:ue("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
715ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,a.jsx(ON,{asChild:!0,children:a.jsx(Bl,{className:"h-4 w-4 opacity-50"})})]}));sr.displayName=Dv.displayName;const XN=m.forwardRef(({className:e,...t},r)=>a.jsx(Bv,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(BA,{className:"h-4 w-4"})}));XN.displayName=Bv.displayName;const eS=m.forwardRef(({className:e,...t},r)=>a.jsx(qv,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Bl,{className:"h-4 w-4"})}));eS.displayName=qv.displayName;const ar=m.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>a.jsx(IN,{children:a.jsxs(Mv,{ref:s,className:ue("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",r==="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:r,...n,children:[a.jsx(XN,{}),a.jsx(FN,{className:ue("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(eS,{})]})}));ar.displayName=Mv.displayName;const UU=m.forwardRef(({className:e,...t},r)=>a.jsx(Fv,{ref:r,className:ue("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));UU.displayName=Fv.displayName;const je=m.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(Uv,{ref:n,className:ue("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(WN,{children:a.jsx(pl,{className:"h-4 w-4"})})}),a.jsx(VN,{children:t})]}));je.displayName=Uv.displayName;const BU=m.forwardRef(({className:e,...t},r)=>a.jsx(Vv,{ref:r,className:ue("-mx-1 my-1 h-px bg-muted",e),...t}));BU.displayName=Vv.displayName;var tS="AlertDialog",[qU]=fr(tS,[H_]),$n=H_(),rS=e=>{const{__scopeAlertDialog:t,...r}=e,n=$n(t);return a.jsx(nv,{...n,...r,modal:!0})};rS.displayName=tS;var VU="AlertDialogTrigger",HU=m.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=$n(r);return a.jsx(K_,{...s,...n,ref:t})});HU.displayName=VU;var WU="AlertDialogPortal",nS=e=>{const{__scopeAlertDialog:t,...r}=e,n=$n(t);return a.jsx(av,{...n,...r})};nS.displayName=WU;var KU="AlertDialogOverlay",sS=m.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=$n(r);return a.jsx(Vu,{...s,...n,ref:t})});sS.displayName=KU;var aS="AlertDialogContent",[GU,ZU]=qU(aS),oS=m.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,o=$n(r),i=m.useRef(null),l=de(t,i),c=m.useRef(null);return a.jsx(GU,{scope:r,cancelRef:c,children:a.jsx(Hu,{role:"alertdialog",...o,...s,ref:l,onOpenAutoFocus:te(s.onOpenAutoFocus,d=>{var u;d.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:n})})});oS.displayName=aS;var JU="AlertDialogTitle",iS=m.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=$n(r);return a.jsx(Wu,{...s,...n,ref:t})});iS.displayName=JU;var QU="AlertDialogDescription",lS=m.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=$n(r);return a.jsx(Ku,{...s,...n,ref:t})});lS.displayName=QU;var YU="AlertDialogAction",cS=m.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=$n(r);return a.jsx(Gu,{...s,...n,ref:t})});cS.displayName=YU;var dS="AlertDialogCancel",uS=m.forwardRef((e,t)=>
715{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=ZU(dS,r),o=$n(r),i=de(t,s);return a.jsx(Gu,{...o,...n,ref:i})});uS.displayName=dS;var XU=rS,eB=nS,hS=sS,fS=oS,pS=cS,mS=uS,gS=iS,vS=lS;const tB=XU,rB=eB,xS=m.forwardRef(({className:e,...t},r)=>a.jsx(hS,{className:ue("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,ref:r}));xS.displayName=hS.displayName;const yS=m.forwardRef(({className:e,...t},r)=>a.jsxs(rB,{children:[a.jsx(xS,{}),a.jsx(fS,{ref:r,className:ue("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:rounded-lg",e),...t})]}));yS.displayName=fS.displayName;const bS=({className:e,...t})=>a.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...t});bS.displayName="AlertDialogHeader";const wS=({className:e,...t})=>a.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});wS.displayName="AlertDialogFooter";const jS=m.forwardRef(({className:e,...t},r)=>a.jsx(gS,{ref:r,className:ue("text-lg font-semibold",e),...t}));jS.displayName=gS.displayName;const kS=m.forwardRef(({className:e,...t},r)=>a.jsx(vS,{ref:r,className:ue("text-sm text-muted-foreground",e),...t}));kS.displayName=vS.displayName;const _S=m.forwardRef(({className:e,...t},r)=>a.jsx(pS,{ref:r,className:ue(ev(),e),...t}));_S.displayName=pS.displayName;const NS=m.forwardRef(({className:e,...t},r)=>a.jsx(mS,{ref:r,className:ue(ev({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));NS.displayName=mS.displayName;const nB=()=>{const{data:e,isLoading:t}=bz(),r=ug(),[n,s]=m.useState(""),[o,i]=m.useState("created_desc"),[l,c]=m.useState(null),d=async(f,y,g)=>{if(!g){Ye.error("Link de pré-visualização indisponÃvel.");return}const w=`${window.location.origin}/conteudo-tecnico/${f}/${y}?preview=${g}`;try{await navigator.clipboard.writeText(w),Ye.success("Link público de pré-visualização copiado.")}catch{Ye.error("Não foi possÃvel copiar o link.")}},u=m.useMemo(()=>{const y=[...(e??[]).filter(w=>w.title.toLowerCase().includes(n.toLowerCase()))],g=w=>new Date(w).getTime();switch(o){case"created_desc":y.sort((w,v)=>g(v.created_at)-g(w.created_at));break;case"created_asc":y.sort((w,v)=>g(w.created_at)-g(v.created_at));break;case"updated_desc":y.sort((w,v)=>g(v.updated_at)-g(w.updated_at));break;case"updated_asc":y.sort((w,v)=>g(w.updated_at)-g(v.updated_at));break;case"title_asc":y.sort((w,v)=>w.title.localeCompare(v.title,"pt-BR"));break;case"title_desc":y.sort((w,v)=>v.title.localeCompare(w.title,"pt-BR"));break;case"status_pub":y.sort((w,v)=>Number(v.published)-Number(w.published));break;case"status_draft":y.sort((w,v)=>Number(w.published)-Number(v.published));break}return y},[e,n,o]),h=async(f,y)=>{const{error:g}=await Le.from("articles").update({published:!y,published_at:y?null:new Date().toISOString()}).eq("id",f);if(g){Ye.error(g.message);return}r.invalidateQueries({queryKey:["articles"]}),Ye.success(y?"Despublicado":"Publicado")},p=async f=>{const{error:y}=await Le.from("articles").delete().eq("id",f);if(y){Ye.error(y.message);return}r.invalidateQueries({queryKey:["articles"]}),Ye.success("Artigo excluÃdo"),c(null)};return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(CN,{}),a.jsxs("main",{className:"container-record py-8",children:[a.jsxs("p",{className:"mb-6 rounded-lg border border-border bg-muted/40 px-4 py-3 text-sm text-muted-foreground",children:["Depois de publicar ou editar um artigo, clique em ",a.jsx("strong",{children:"Publicar"})," no Lovable: é isso que atualiza a página estática que o Google e as prévias do WhatsApp leem."]}),a.jsxs("div",{className:"flex items-center justify-between mb-6 gap-4 flex-wrap",children:[a.jsx("h1",{className:"font-display text-2xl font-bold text-ink",children:"Artigos"}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative",children:[a.jsx(_k,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(ae,{value:n,onChange:f=>s(f.target.value),placeholder:"Buscar...",className:"pl-9 w-64",maxLength:100})]}),a.jsxs(Rr,{value:o,onValueChange:f=>i(f),children:[a.jsx(sr,{className:"w-[220px]",children:a.jsx(Pr,{placeholder:"Ordenar por"})}),a.jsxs(ar,{children:[a.jsx(je,{value:"created_desc",children:"Data de criação (mais recente)"}),a.jsx(je,{value:"created_asc",children:"Data de criação (mais antiga)"}),a.jsx(je,{value:"updated_desc",children:"Atualização (mais recente)"}),a.jsx(je,{value:"updated_asc",children:"Atualização (mais antiga)"}),a.jsx(je,{value:"title_asc",children:"TÃtulo (A â Z)"}),a.jsx(je,{value:"title_desc",children:"TÃtulo (Z â A)"}),a.jsx(je,{value:"status_pub",children:"Status (publicados primeiro)"}
715),a.jsx(je,{value:"status_draft",children:"Status (rascunhos primeiro)"})]})]}),a.jsx(V,{asChild:!0,children:a.jsxs(we,{to:"/admin/artigos/novo",children:[a.jsx(Nr,{className:"h-4 w-4 mr-1.5"})," Novo"]})})]})]}),t?a.jsx("div",{className:"py-20 flex justify-center",children:a.jsx(_t,{className:"h-6 w-6 animate-spin text-primary"})}):u.length===0?a.jsx("div",{className:"py-20 text-center text-muted-foreground",children:"Nenhum artigo encontrado."}):a.jsx("div",{className:"border border-border rounded-xl bg-card overflow-hidden",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"bg-secondary/30 text-left text-xs uppercase tracking-wide text-muted-foreground",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-3",children:"TÃtulo"}),a.jsx("th",{className:"px-4 py-3 hidden md:table-cell",children:"Categoria"}),a.jsx("th",{className:"px-4 py-3",children:"Status"}),a.jsx("th",{className:"px-4 py-3 hidden lg:table-cell",children:"Criado"}),a.jsx("th",{className:"px-4 py-3 hidden lg:table-cell",children:"Atualizado"}),a.jsx("th",{className:"px-4 py-3 text-right",children:"Ações"})]})}),a.jsx("tbody",{children:u.map(f=>a.jsxs("tr",{className:"border-t border-border hover:bg-secondary/20",children:[a.jsx("td",{className:"px-4 py-3 max-w-md",children:a.jsx(we,{to:`/admin/artigos/${f.id}`,className:"font-medium text-ink hover:text-primary line-clamp-2",children:f.title})}),a.jsx("td",{className:"px-4 py-3 hidden md:table-cell text-muted-foreground",children:f.category_slug}),a.jsx("td",{className:"px-4 py-3",children:a.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-semibold ${f.published?"bg-emerald-100 text-emerald-700":"bg-amber-100 text-amber-700"}`,children:f.published?"Publicado":"Rascunho"})}),a.jsx("td",{className:"px-4 py-3 hidden lg:table-cell text-muted-foreground",children:new Date(f.created_at).toLocaleDateString("pt-BR")}),a.jsx("td",{className:"px-4 py-3 hidden lg:table-cell text-muted-foreground",children:new Date(f.updated_at).toLocaleDateString("pt-BR")}),a.jsx("td",{className:"px-4 py-3",children:a.jsxs("div",{className:"flex items-center justify-end gap-1",children:[a.jsx(V,{size:"icon",variant:"ghost",title:f.published?"Despublicar":"Publicar",onClick:()=>h(f.id,f.published),children:f.published?a.jsx(GA,{className:"h-4 w-4"}):a.jsx(fk,{className:"h-4 w-4"})}),a.jsx(V,{asChild:!0,size:"icon",variant:"ghost",title:"Pré-visualizar",children:a.jsx("a",{href:`/conteudo-tecnico/${f.category_slug}/${f.slug}?preview=1`,target:"_blank",rel:"noopener noreferrer",children:a.jsx(Ip,{className:"h-4 w-4"})})}),a.jsx(V,{size:"icon",variant:"ghost",title:"Copiar link público de pré-visualização",disabled:!f.preview_token,onClick:()=>d(f.category_slug,f.slug,f.preview_token),children:a.jsx(yk,{className:"h-4 w-4"})}),a.jsx(V,{asChild:!0,size:"icon",variant:"ghost",title:"Editar",children:a.jsx(we,{to:`/admin/artigos/${f.id}`,children:a.jsx(kk,{className:"h-4 w-4"})})}),a.jsx(V,{size:"icon",variant:"ghost",title:"Excluir",onClick:()=>c(f.id),children:a.jsx(Wr,{className:"h-4 w-4 text-destructive"})})]})})]},f.id))})]})})]}),a.jsx(tB,{open:!!l,onOpenChange:f=>!f&&c(null),children:a.jsxs(yS,{children:[a.jsxs(bS,{children:[a.jsx(jS,{children:"Excluir artigo?"}),a.jsx(kS,{children:"Esta ação não pode ser desfeita."})]}),a.jsxs(wS,{children:[a.jsx(NS,{children:"Cancelar"}),a.jsx(_S,{onClick:()=>l&&p(l),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Excluir"})]})]})})]})},ha=m.forwardRef(({className:e,...t},r)=>a.jsx("textarea",{className:ue("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
715ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));ha.displayName="Textarea";var dh="Switch",[sB]=fr(dh),[aB,Hv]=sB(dh);function oB(e){const{__scopeSwitch:t,checked:r,children:n,defaultChecked:s,disabled:o,form:i,name:l,onCheckedChange:c,required:d,value:u="on",internal_do_not_use_render:h}=e,[p,f]=an({prop:r,defaultProp:s??!1,onChange:c,caller:dh}),[y,g]=m.useState(null),[w,v]=m.useState(null),x=m.useRef(!1),b=y?!!i||!!y.closest("form"):!0,j={checked:p,setChecked:f,disabled:o,control:y,setControl:g,name:l,form:i,value:u,hasConsumerStoppedPropagationRef:x,required:d,defaultChecked:s,isFormControl:b,bubbleInput:w,setBubbleInput:v};return a.jsx(aB,{scope:t,...j,children:iB(h)?h(j):n})}var SS="SwitchTrigger",CS=m.forwardRef(({__scopeSwitch:e,onClick:t,...r},n)=>{const{control:s,form:o,value:i,disabled:l,checked:c,required:d,setControl:u,setChecked:h,hasConsumerStoppedPropagationRef:p,isFormControl:f,bubbleInput:y}=Hv(SS,e),g=de(n,u),w=m.useRef(c);return m.useEffect(()=>{const v=o?s==null?void 0:s.ownerDocument.getElementById(o):s==null?void 0:s.form;if(v instanceof HTMLFormElement){const x=()=>h(w.current);return v.addEventListener("reset",x),()=>v.removeEventListener("reset",x)}},[s,o,h]),a.jsx(oe.button,{type:"button",role:"switch","aria-checked":c,"aria-required":d,"data-state":AS(c),"data-disabled":l?"":void 0,disabled:l,value:i,...r,ref:g,onClick:te(t,v=>{h(x=>!x),y&&f&&(p.current=v.isPropagationStopped(),p.current||v.stopPropagation())})})});CS.displayName=SS;var Wv=m.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:i,disabled:l,value:c,onCheckedChange:d,form:u,...h}=e;return a.jsx(oB,{__scopeSwitch:r,checked:s,defaultChecked:o,disabled:l,required:i,onCheckedChange:d,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:p})=>a.jsxs(a.Fragment,{children:[a.jsx(CS,{...h,ref:t,__scopeSwitch:r}),p&&a.jsx(TS,{__scopeSwitch:r})]})})});Wv.displayName=dh;var ES="SwitchThumb",RS=m.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=Hv(ES,r);return a.jsx(oe.span,{"data-state":AS(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});RS.displayName=ES;var PS="SwitchBubbleInput",TS=m.forwardRef(({__scopeSwitch:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:i,required:l,disabled:c,name:d,value:u,form:h,bubbleInput:p,setBubbleInput:f}=Hv(PS,e),y=de(r,f),g=pv(o),w=Vg(n);m.useEffect(()=>{const x=p;if(!x)return;const b=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(b,"checked").set,_=!s.current;if(g!==o&&k){const N=new Event("click",{bubbles:_});k.call(x,o),x.dispatchEvent(N)}},[p,g,o,s]);const v=m.useRef(o);return a.jsx(oe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:l,disabled:c,name:d,value:u,form:h,...t,tabIndex:-1,ref:y,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});TS.displayName=PS;function iB(e){return typeof e=="function"}function AS(e){return e?"checked":"unchecked"}const OS=m.forwardRef(({className:e,...t},r)=>a.jsx(Wv,{className:ue("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input 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",e),...t,ref:r,children:a.jsx(RS,{className:ue("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));OS.displayName=Wv.displayName;var uh="Popover",[LS]=fr(uh,[ti]),Zl=ti(),[lB,Ds]=LS(uh),IS=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!1}=e,l=Zl(t),c=m.useRef(null),[d,u]=m.useState(!1),[h,p]=an({prop:n,defaultProp:s??!1,onChange:o,caller:uh});return a.jsx(r_,{...l,children:a.jsx(lB,{scope:t,contentId:_n(),triggerRef:c,open:h,onOpenChange:p,onOpenToggle:m.useCallback(()=>p(f=>!f),[p]),hasCustomAnchor:d,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:i,children:r})})};IS.displayName=uh;var $S="PopoverAnchor",cB=m.forwardRef((e,t)=>
vendor: 4,490 bytes, line 715
715{const{__scopePopover:r,...n}=e,s=Ds($S,r),o=Zl(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=s;return m.useEffect(()=>(i(),()=>l()),[i,l]),a.jsx(Au,{...o,...n,ref:t})});cB.displayName=$S;var DS="PopoverTrigger",MS=m.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Ds(DS,r),o=Zl(r),i=de(t,s.triggerRef),l=a.jsx(oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":qS(s.open),...n,ref:i,onClick:te(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?l:a.jsx(Au,{asChild:!0,...o,children:l})});MS.displayName=DS;var Kv="PopoverPortal",[dB,uB]=LS(Kv,{forceMount:void 0}),zS=e=>{const{__scopePopover:t,forceMount:r,children:n,container:s}=e,o=Ds(Kv,t);return a.jsx(dB,{scope:t,forceMount:r,children:a.jsx(on,{present:r||o.open,children:a.jsx(Fl,{asChild:!0,container:s,children:n})})})};zS.displayName=Kv;var Bo="PopoverContent",FS=m.forwardRef((e,t)=>{const r=uB(Bo,e.__scopePopover),{forceMount:n=r.forceMount,...s}=e,o=Ds(Bo,e.__scopePopover);return a.jsx(on,{present:n||o.open,children:o.modal?a.jsx(fB,{...s,ref:t}):a.jsx(pB,{...s,ref:t})})});FS.displayName=Bo;var hB=xa("PopoverContent.RemoveScroll"),fB=m.forwardRef((e,t)=>{const r=Ds(Bo,e.__scopePopover),n=m.useRef(null),s=de(t,n),o=m.useRef(!1);return m.useEffect(()=>{const i=n.current;if(i)return rv(i)},[]),a.jsx(Bu,{as:hB,allowPinchZoom:!0,children:a.jsx(US,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),o.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;o.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:te(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),pB=m.forwardRef((e,t)=>{const r=Ds(Bo,e.__scopePopover),n=m.useRef(!1),s=m.useRef(!1);return a.jsx(US,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),US=m.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...h}=e,p=Ds(Bo,r),f=Zl(r);return tv(),a.jsx(Fu,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:a.jsx(Zo,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:a.jsx(Gg,{"data-state":qS(p.open),role:"dialog",id:p.contentId,...f,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),BS="PopoverClose",mB=m.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Ds(BS,r);return a.jsx(oe.button,{type:"button",...n,ref:t,onClick:te(e.onClick,()=>s.onOpenChange(!1))})});mB.displayName=BS;var gB="PopoverArrow",vB=m.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,s=Zl(r);return a.jsx(Zg,{...s,...n,ref:t})});vB.displayName=gB;function qS(e){return e?"open":"closed"}var xB=IS,yB=MS,bB=zS,VS=FS;const wB=xB,jB=yB,HS=m.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},s)=>a.jsx(bB,{children:a.jsx(VS,{ref:s,align:t,sideOffset:r,className:ue("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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
715de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));HS.displayName=VS.displayName;const Hn=(e,t)=>{document.execCommand(e,!1,t)},N0=({value:e,onChange:t,placeholder:r})=>{const n=m.useRef(null);m.useEffect(()=>{n.current&&n.current.innerHTML!==e&&(n.current.innerHTML=e||"")},[e]);const s=()=>{n.current&&t(n.current.innerHTML)},o=({onClick:i,children:l,title:c})=>a.jsx("button",{type:"button",title:c,onMouseDown:d=>d.preventDefault(),onClick:()=>{i(),s()},className:"h-8 w-8 flex items-center justify-center rounded hover:bg-secondary/40 text-ink-soft",children:l});return a.jsxs("div",{className:"rounded-md border border-input bg-background",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 border-b border-border px-2 py-1",children:[a.jsx(o,{title:"TÃtulo H2",onClick:()=>Hn("formatBlock","H2"),children:a.jsx(e5,{className:"h-4 w-4"})}),a.jsx(o,{title:"SubtÃtulo H3",onClick:()=>Hn("formatBlock","H3"),children:a.jsx(t5,{className:"h-4 w-4"})}),a.jsx(o,{title:"Parágrafo",onClick:()=>Hn("formatBlock","P"),children:a.jsx("span",{className:"text-xs font-bold",children:"P"})}),a.jsx("span",{className:"mx-1 h-5 w-px bg-border"}),a.jsx(o,{title:"Negrito",onClick:()=>Hn("bold"),children:a.jsx(IA,{className:"h-4 w-4"})}),a.jsx(o,{title:"Itálico",onClick:()=>Hn("italic"),children:a.jsx(n5,{className:"h-4 w-4"})}),a.jsx("span",{className:"mx-1 h-5 w-px bg-border"}),a.jsx(o,{title:"Lista",onClick:()=>Hn("insertUnorderedList"),children:a.jsx(wk,{className:"h-4 w-4"})}),a.jsx(o,{title:"Lista numerada",onClick:()=>Hn("insertOrderedList"),children:a.jsx(Og,{className:"h-4 w-4"})}),a.jsx(o,{title:"Link",onClick:()=>{const i=prompt("URL do link (use /conteudo-tecnico/... para link interno)");i&&Hn("createLink",i)},children:a.jsx(yk,{className:"h-4 w-4"})})]}),a.jsx("div",{ref:n,contentEditable:!0,suppressContentEditableWarning:!0,"data-placeholder":r??"Escreva aqui...",onInput:s,onBlur:s,className:"rt-editor prose-record min-h-[160px] px-4 py-3 focus:outline-none"})]})},Ut=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),kB=e=>{switch(e){case"richtext":return{id:Ut(),type:e,html:""};case"highlight":return{id:Ut(),type:e,variant:"warning",title:"",text:""};case"cta":return{id:Ut(),type:e,title:"Pronto para garantir conformidade total?",subtitle:"Fale com nossos especialistas e receba um diagnóstico técnico.",buttons:[{label:"Solicitar diagnóstico técnico",action:"diagnostic",variant:"primary"},{label:"Falar no WhatsApp",action:"whatsapp",variant:"accent"}]};case"list":return{id:Ut(),type:e,ordered:!1,title:"",items:[""]};case"checklist":return{id:Ut(),type:e,title:"",items:[""]};case"faq":return{id:Ut(),type:e,title:"Perguntas frequentes",items:[{q:"",a:""}]};case"related":return{id:Ut(),type:e,title:"Leituras relacionadas",slugs:[""]};case"media-text":return{id:Ut(),type:e,image_url:"",alt:"",caption:"",position:"left",title:"",html:""};case"table":return{id:Ut(),type:e,title:"",headers:["Coluna A","Coluna B"],rows:[["",""]],highlight_first_column:!0};case"steps":return{id:Ut(),type:e,title:"",items:[{title:"",text:""}]};case"image":return{id:Ut(),type:e,image_url:"",alt:"",caption:"",full_width:!1};case"toc":return{id:Ut(),type:e,title:"Neste artigo"};case"stat":return{id:Ut(),type:e,items:[{value:"",label:""},{value:"",label:""}]}}},S0=[{type:"richtext",label:"Texto livre",icon:a.jsx(v5,{className:"h-4 w-4"}),desc:"Parágrafos, tÃtulos, listas, links"},{type:"highlight",label:"Destaque",icon:a.jsx(Ig,{className:"h-4 w-4"}),desc:"Aviso, risco, dica"},{type:"cta",label:"CTA (conversão)",icon:a.jsx(i5,{className:"h-4 w-4"}),desc:"Botões de ação"},{type:"list",label:"Lista",icon:a.jsx(wk,{className:"h-4 w-4"}),desc:"Itens em bullet ou numerados"},{type:"checklist",label:"Checklist",icon:a.jsx(m5,{className:"h-4 w-4"}),desc:"Itens marcáveis"},{type:"faq",label:"FAQ",icon:a.jsx(VA,{className:"h-4 w-4"}),desc:"Perguntas e respostas"},{type:"related",label:"Links relacionados",icon:a.jsx(s5,{className:"h-4 w-4"}),desc:"Outros artigos internos"},{type:"media-text",label:"Imagem + texto",icon:a.jsx(WA,{className:"h-4 w-4"}),desc:"Imagem lado a lado com texto"},{type:"table",label:"Tabela",icon:a.jsx(g5,{className:"h-4 w-4"}),desc:"Comparativos e prazos"},{type:"steps",label:"Etapas",icon:a.jsx(Og,{className:"h-4 w-4"}),desc:"Passo a passo numerado"},{type:"image",label:"Imagem",icon:a.jsx(r5,{className:"h-4 w-4"}),desc:"Imagem com legenda"},{type:"toc",label:"Ãndice do artigo",icon:a.jsx(a5,{className:"h-4 w-4"}),desc:"Gerado dos tÃtulos H2"},{type:"stat",label:"Números",icon:a.jsx(UA,{className:"h-4 w-4"}),desc:"Faixa de indicadores"}],_B=({blocks:e,onChange:t})=>{const r=(l,c)=>{const d=e.map((u,h)=>h===l?{...u,...c}:u);t(d)},n=l=>t(e.filter((c,d)=>d!==l)),s=(l,c)=>{const d=l+c;
715if(d<0||d>=e.length)return;const u=[...e];[u[l],u[d]]=[u[d],u[l]],t(u)},o=(l,c)=>{const d=kB(l);if(c===void 0)t([...e,d]);else{const u=[...e];u.splice(c,0,d),t(u)}},i=({at:l})=>{const[c,d]=m.useState(!1);return a.jsxs(wB,{open:c,onOpenChange:d,children:[a.jsx(jB,{asChild:!0,children:a.jsxs(V,{type:"button",variant:"outline",size:"sm",children:[a.jsx(Nr,{className:"h-3.5 w-3.5 mr-1"})," Adicionar bloco"]})}),a.jsx(HS,{className:"w-72 p-1",align:"start",children:a.jsx("div",{className:"grid",children:S0.map(u=>a.jsxs("button",{type:"button",onClick:()=>{o(u.type,l),d(!1)},className:"text-left px-3 py-2 rounded-md hover:bg-secondary/30 flex items-start gap-3",children:[a.jsx("span",{className:"mt-0.5 text-primary",children:u.icon}),a.jsxs("span",{children:[a.jsx("span",{className:"block text-sm font-semibold text-ink",children:u.label}),a.jsx("span",{className:"block text-xs text-muted-foreground",children:u.desc})]})]},u.type))})})]})};return e.length===0?a.jsxs("div",{className:"rounded-2xl border-2 border-dashed border-border p-10 text-center",children:[a.jsx("p",{className:"text-muted-foreground mb-4",children:"Comece adicionando o primeiro bloco do seu artigo."}),a.jsx(i,{})]}):a.jsx("div",{className:"space-y-4",children:e.map((l,c)=>{const d=S0.find(u=>u.type===l.type);return a.jsxs("div",{className:"rounded-xl border border-border bg-card",children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-secondary/5",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-ink",children:[d==null?void 0:d.icon,d==null?void 0:d.label]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>s(c,-1),disabled:c===0,children:a.jsx(AA,{className:"h-4 w-4"})}),a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>s(c,1),disabled:c===e.length-1,children:a.jsx(TA,{className:"h-4 w-4"})}),a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>n(c),children:a.jsx(Wr,{className:"h-4 w-4 text-destructive"})})]})]}),a.jsx("div",{className:"p-4",children:a.jsx(NB,{block:l,onChange:u=>r(c,u)})}),a.jsx("div",{className:"px-4 pb-3 flex justify-center",children:a.jsx(i,{at:c+1})})]},l.id)})})},NB=({block:e,onChange:t})=>{switch(e.type){case"richtext":return a.jsx(N0,{value:e.html,onChange:r=>t({html:r}),placeholder:"Escreva o conteúdo. Use a barra para tÃtulos, listas e links."});case"highlight":return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(X,{children:"Tipo"}),a.jsxs(Rr,{value:e.variant,onValueChange:r=>t({variant:r}),children:[a.jsx(sr,{children:a.jsx(Pr,{})}),a.jsxs(ar,{children:[a.jsx(je,{value:"info",children:"Informação"}),a.jsx(je,{value:"warning",children:"Aviso / risco"}),a.jsx(je,{value:"success",children:"Boa prática"})]})]})]}),a.jsxs("div",{children:[a.jsx(X,{children:"TÃtulo (opcional)"}),a.jsx(ae,{value:e.title??"",onChange:r=>t({title:r.target.value})})]})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Texto"}),a.jsx(ha,{rows:3,value:e.text,onChange:r=>t({text:r.target.value})})]})]});case"cta":{const r=e.buttons??[],n=s=>t({buttons:s});return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(X,{children:"TÃtulo"}),a.jsx(ae,{value:e.title??"",onChange:s=>t({title:s.target.value})})]}),a.jsxs("div",{children:[a.jsx(X,{children:"SubtÃtulo"}),a.jsx(ae,{value:e.subtitle??"",onChange:s=>t({subtitle:s.target.value})})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(X,{children:"Botões"}),a.jsxs(V,{type:"button",size:"sm",variant:"outline",onClick:()=>n([...r,{label:"Falar com especialista",action:"diagnostic",variant:"primary"}]),children:[a.jsx(Nr,{className:"h-3.5 w-3.5 mr-1"})," Adicionar"]})]}),r.map((s,o)=>a.jsxs("div",{className:"grid md:grid-cols-12 gap-2 items-end p-3 rounded-lg border border-border",children:[a.jsxs("div",{className:"md:col-span-4",children:[a.jsx(X,{className:"text-xs",children:"Texto"}),a.jsx(ae,{value:s.label,onChange:i=>n(r.map((l,c)=>c===o?{...l,label:i.target.value}:l))})]}),a.jsxs("div",{className:"md:col-span-3",children:[a.jsx(X,{className:"text-xs",children:"Ação"}),a.jsxs(Rr,{value:s.action,onValueChange:i=>n(r.map((l,c)=>c===o?{...l,action:i}:l)),children:[a.jsx(sr,{children:a.jsx(Pr,{})}),a.jsxs(ar,{children:[a.jsx(je,{value:"diagnostic",children:"Diagnóstico técnico"}),a.jsx(je,{value:"whatsapp",children:"WhatsApp"}),a.jsx(je,{value:"checklist",children:"Baixar checklist"}),a.jsx(je,{value:"custom",children:"Link personalizado"})]})]})]}),a.jsxs("div",{className:"md:col-span-3",children:[a.jsx(X,{className:"text-xs",children:"Cor"}),a.jsxs(Rr,{value:s.variant??"primary",onValueChange:i=>n(r.map((l,c)=>c===o?{...l,variant:i}:l)),children:[a.jsx(sr,{children:a.jsx(Pr,{})}),a.jsxs(ar,{children:[a.jsx(je,{value:"primary",children:"Vermelho Record"}),a.jsx(je,{value:"accent",children:"Amarelo destaque"}),a.jsx(je,{value:"outline",children:"Contorno"})]})]})]}),a.jsx("div",{className:"md:col-span-2 flex gap-1",children:a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>n(r.filter((i,l)=>l!==o)),children:a.jsx(Wr,{className:"h-4 w-4"})})}),s.action==="custom"&&a.jsxs("div",{className:"md:col-span-12",children:[a.jsx(X,{className:"text-xs",children:"URL"}),a.jsx(ae,{placeholder:"https://...",value:s.href??"",onChange:i=>n(r.map((l,c)=>c===o?{...l,href:i.target.value}:l))})]})]},o))]})]})}case"list":case"checklist":{const r=e.type==="list",n=e.items??[],s=o=>t({items:o});return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(X,{children:"TÃtulo (opcional)"}),a.jsx(ae,{value:e.title??"",onChange:o=>t({title:o.target.value})})]}),r&&a.jsxs("div",{children:[a.jsx(X,{children:"Estilo"}),a.jsxs(Rr,{value:e.ordered?"ordered":"bullet",onValueChange:o=>t({ordered:o==="ordered"}),children:[a.jsx(sr,{children:a.jsx(Pr,{})}),a.jsxs(ar,{children:[a.jsx(je,{value:"bullet",children:"Marcadores"}),a.jsx(je,{value:"ordered",children:"Numerada"})]})]})]})]}),n.map((o,i)=>a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{value:o,onChange:l=>s(n.map((c,d)=>d===i?l.target.value:c))}),a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>s(n.filter((l,c)=>c!==i)),disabled:n.length<=1,children:a.jsx(Wr,{className:"h-4 w-4"})})]},i)),a.jsxs(V,{type:"button",size:"sm",variant:"outline",onClick:()=>s([...n,""]),children:[a.jsx(Nr,{className:"h-3.5 w-3.5 mr-1"})," Item"]})]})}case"faq":{const r=e.items??[],n=s=>t({items:s});return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx(X,{children:"TÃtulo"}),a.jsx(ae,{value:e.title??"",onChange:s=>t({title:s.target.value})})]}),r.map((s,o)=>a.jsxs("div",{className:"space-y-2 p-3 rounded-lg border border-border",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(X,{className:"text-xs",children:["Pergunta ",o+1]}),a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>n(r.filter((i,l)=>l!==o)),disabled:r.length<=1,children:a.jsx(Wr,{className:"h-4 w-4"})})]}),a.jsx(ae,{placeholder:"Pergunta",value:s.q,onChange:i=>n(r.map((l,c)=>c===o?{...l,q:i.target.value}:l))}),a.jsx(ha,{rows:3,placeholder:"Resposta",value:s.a,onChange:i=>n(r.map((l,c)=>c===o?{...l,a:i.target.value}:l))})]},o)),a.jsxs(V,{type:"button",size:"sm",variant:"outline",onClick:()=>n([...r,{q:"",a:""}]),children:[a.jsx(Nr,{className:"h-3.5 w-3.5 mr-1"})," Pergunta"]})]})}case"related":{const r=e.slugs??[],n=s=>t({slugs:s});return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx(X,{children:"TÃtulo"}),a.jsx(ae,{value:e.title??"",onChange:s=>t({title:s.target.value})})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Insira o slug de ca
715da artigo (parte final da URL)."}),r.map((s,o)=>a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{placeholder:"ex: vistoria-anual-embarcacoes",value:s,onChange:i=>n(r.map((l,c)=>c===o?i.target.value:l))}),a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>n(r.filter((i,l)=>l!==o)),disabled:r.length<=1,children:a.jsx(Wr,{className:"h-4 w-4"})})]},o)),a.jsxs(V,{type:"button",size:"sm",variant:"outline",onClick:()=>n([...r,""]),children:[a.jsx(Nr,{className:"h-3.5 w-3.5 mr-1"})," Artigo"]})]})}case"media-text":return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(X,{children:"URL da imagem"}),a.jsx(ae,{placeholder:"https://...",value:e.image_url??"",onChange:r=>t({image_url:r.target.value})})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Texto alternativo (obrigatório)"}),a.jsx(ae,{value:e.alt??"",onChange:r=>t({alt:r.target.value})})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Posição da imagem"}),a.jsxs(Rr,{value:e.position??"left",onValueChange:r=>t({position:r}),children:[a.jsx(sr,{children:a.jsx(Pr,{})}),a.jsxs(ar,{children:[a.jsx(je,{value:"left",children:"Esquerda"}),a.jsx(je,{value:"right",children:"Direita"})]})]})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Legenda (opcional)"}),a.jsx(ae,{value:e.caption??"",onChange:r=>t({caption:r.target.value})})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx(X,{children:"TÃtulo (opcional)"}),a.jsx(ae,{value:e.title??"",onChange:r=>t({title:r.target.value})})]})]}),a.jsx(N0,{value:e.html??"",onChange:r=>t({html:r}),placeholder:"Texto ao lado da imagem"})]});case"image":return a.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(X,{children:"URL da imagem"}),a.jsx(ae,{placeholder:"https://...",value:e.image_url??"",onChange:r=>t({image_url:r.target.value})})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Texto alternativo (obrigatório)"}),a.jsx(ae,{value:e.alt??"",onChange:r=>t({alt:r.target.value})})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Legenda (opcional)"}),a.jsx(ae,{value:e.caption??"",onChange:r=>t({caption:r.target.value})})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Largura"}),a.jsxs(Rr,{value:e.full_width?"full":"normal",onValueChange:r=>t({full_width:r==="full"}),children:[a.jsx(sr,{children:a.jsx(Pr,{})}),a.jsxs(ar,{children:[a.jsx(je,{value:"normal",children:"Padrão"}),a.jsx(je,{value:"full",children:"Largura total"})]})]})]})]});case"toc":return a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"TÃtulo"}),a.jsx(ae,{value:e.title??"",onChange:r=>t({title:r.target.value})}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Os itens são gerados automaticamente a partir dos tÃtulos H2 do artigo."})]});case"table":{const r=e.headers??[],n=e.rows??[],s=c=>t({headers:c}),o=c=>t({rows:c}),i=()=>{s([...r,`Coluna ${r.length+1}`]),o(n.map(c=>[...c,""]))},l=c=>{s(r.filter((d,u)=>u!==c)),o(n.map(d=>d.filter((u,h)=>h!==c)))};return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(X,{children:"TÃtulo (opcional)"}),a.jsx(ae,{value:e.title??"",onChange:c=>t({title:c.target.value})})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Primeira coluna em negrito"}),a.jsxs(Rr,{value:e.highlight_first_column?"yes":"no",onValueChange:c=>t({highlight_first_column:c==="yes"}),children:[a.jsx(sr,{children:a.jsx(Pr,{})}),a.jsxs(ar,{children:[a.jsx(je,{value:"yes",children:"Sim"}),a.jsx(je,{value:"no",children:"Não"})]})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{className:"text-xs",children:"Cabeçalhos"}),r.map((c,d)=>a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{value:c,onChange:u=>s(r.map((h,p)=>p===d?u.target.value:h))}),a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>l(d),disabled:r.length<=1,children:a.jsx(Wr,{className:"h-4 w-4"})})]},d)),a.jsxs(V,{type:"button",size:"sm",variant:"outline",onClick:i,children:[a.jsx(Nr,{className:"h-3.5 w-3.5 mr-1"})," Coluna"]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{className:"text-xs",children:"Linhas"}),n.map((c,d)=>a.jsxs("div",{className:"flex gap-2 items-start",children:[a.jsx("div",{className:"grid gap-2 flex-1",style:{gridTemplateColumns:`repeat(${Math.max(r.length,1)}, minmax(0, 1fr))`},children:r.map((u,h)=>a.jsx(ae,{value:(c==null?void 0:c[h])??"",onChange:p=>o(n.map((f,y)=>y===d?r.map((g,w)=>w===h?p.target.value:(f==null?void 0:f[w])??""):f))},h))}),a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>o(n.filter((u,h)=>h!==d)),children:a.jsx(Wr,{className:"h-4 w-4"})})]},d)),a.jsxs(V,{type:"button",size:"sm",variant:"outline",onClick:()=>o([...n,r.map(()=>"")]),children:[a.jsx(Nr,{className:"h-3.5 w-3.5 mr-1"})," Linha"]})]})]})}case"steps":{const r=e.items??[],n=s=>t({items:s});return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx(X,{children:"TÃtulo (opcional)"}),a.jsx(ae,{value:e.title??"",onChange:s=>t({title:s.target.value})})]}),r.map((s,o)=>a.jsxs("div",{className:"space-y-2 p-3 rounded-lg border border-border",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(X,{className:"text-xs",children:["Etapa ",o+1]}),a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>n(r.filter((i,l)=>l!==o)),disabled:r.length<=1,children:a.jsx(Wr,{className:"h-4 w-4"})})]}),a.jsx(ae,{placeholder:"TÃtulo da etapa",value:s.title??"",onChange:i=>n(r.map((l,c)=>c===o?{...l,title:i.target.value}:l))}),a.jsx(ha,{rows:2,placeholder:"Descrição (opcional)",value:s.text??"",onChange:i=>n(r.map((l,c)=>c===o?{...l,text:i.target.value}:l))})]},o)),a.jsxs(V,{type:"button",size:"sm",variant:"outline",onClick:()=>n([...r,{title:"",text:""}]),children:[a.jsx(Nr,{className:"h-3.5 w-3.5 mr-1"})," Etapa"]}
715)]})}case"stat":{const r=e.items??[],n=s=>t({items:s});return a.jsxs("div",{className:"space-y-3",children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:"De 2 a 4 indicadores."}),r.map((s,o)=>a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{className:"max-w-[120px]",placeholder:"20",value:s.value??"",onChange:i=>n(r.map((l,c)=>c===o?{...l,value:i.target.value}:l))}),a.jsx(ae,{placeholder:"anos de mercado",value:s.label??"",onChange:i=>n(r.map((l,c)=>c===o?{...l,label:i.target.value}:l))}),a.jsx(V,{type:"button",size:"icon",variant:"ghost",onClick:()=>n(r.filter((i,l)=>l!==o)),disabled:r.length<=2,children:a.jsx(Wr,{className:"h-4 w-4"})})]},o)),a.jsxs(V,{type:"button",size:"sm",variant:"outline",disabled:r.length>=4,onClick:()=>n([...r,{value:"",label:""}]),children:[a.jsx(Nr,{className:"h-3.5 w-3.5 mr-1"})," Indicador"]})]})}default:return null}},SB=e=>e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-").replace(/-+/g,"-"),CB=({initial:e})=>{var Y,re;const t=Ts(),r=ug(),{data:n}=Qu(),{data:s=[]}=Gl(),[o,i]=m.useState(!1),[l,c]=m.useState(!1),[d,u]=m.useState(!1),[h,p]=m.useState((e==null?void 0:e.title)??""),[f,y]=m.useState((e==null?void 0:e.slug)??""),[g,w]=m.useState((e==null?void 0:e.excerpt)??""),[v,x]=m.useState((e==null?void 0:e.meta_description)??""),[b,j]=m.useState((e==null?void 0:e.category_slug)??""),[k,_]=m.useState((e==null?void 0:e.author)??"Equipe Técnica Record"),[N,C]=m.useState((e==null?void 0:e.read_time)??"5 min"),[R,T]=m.useState(((Y=e==null?void 0:e.keywords)==null?void 0:Y.join(", "))??""),[O,I]=m.useState((e==null?void 0:e.cover_url)??""),[K,$]=m.useState((e==null?void 0:e.cover_alt)??""),[H,U]=m.useState((e==null?void 0:e.blocks)??[]),[Z,E]=m.useState(!0),P=()=>{!f&&h&&y(SB(h))},z=async Q=>{if(Q.size>5*1024*1024){Ye.error("Imagem muito grande (máx 5MB)");return}c(!0);try{const ve=Q.name.split(".").pop(),M=`covers/${crypto.randomUUID()}.${ve}`,{error:he}=await Le.storage.from("article-covers").upload(M,Q,{cacheControl:"3600",upsert:!1});if(he)throw he;const{data:Ee}=Le.storage.from("article-covers").getPublicUrl(M);I(Ee.publicUrl),Ye.success("Capa enviada")}catch(ve){Ye.error((ve==null?void 0:ve.message)??"Falha no upload")}finally{c(!1)}},ee=()=>h.trim().length<5?"TÃtulo muito curto":/^[a-z0-9-]+$/.test(f)?g.trim().length<10?"Resumo muito curto":b?H.length===0?"Adicione pelo menos um bloco de conteúdo":null:"Selecione uma categoria":"Slug inválido (letras minúsculas, números e hÃfens)",F=async Q=>{const ve=ee();if(ve){Ye.error(ve);return}u(!0);try{const M={title:h.trim(),slug:f.trim(),excerpt:g.trim(),meta_description:v.trim(),category_slug:b,author:k.trim(),read_time:N.trim(),keywords:R.split(",").map(Ee=>Ee.trim()).filter(Boolean),cover_url:O||null,cover_alt:K.trim(),blocks:H,published:Q,published_at:Q?(e==null?void 0:e.published_at)??new Date().toISOString():null};let he;if(e!=null&&e.id?{error:he}=await Le.from("articles").update(M).eq("id",e.id):{error:he}=await Le.from("articles").insert(M),he)throw he;r.invalidateQueries({queryKey:["articles"]}),r.invalidateQueries({queryKey:["article"]}),Ye.success(Q?"Artigo publicado":"Rascunho salvo"),t("/admin/artigos")}catch(M){Ye.error((M==null?void 0:M.message)??"Erro ao salvar")}finally{u(!1)}};return a.jsxs("form",{className:"space-y-8",onSubmit:Q=>Q.preventDefault(),children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(X,{children:"Imagem de capa"}),O?a.jsxs("div",{className:"relative inline-block",children:[a.jsx("img",{src:O,alt:"Capa",className:"h-44 w-auto rounded-lg border border-border object-cover"}),a.jsx("button",{type:"button",onClick:()=>I(""),className:"absolute top-2 right-2 h-7 w-7 rounded-full bg-background/90 border border-border flex items-center justify-center hover:bg-background",children:a.jsx(Qo,{className:"h-3.5 w-3.5"})})]}):a.jsxs("label",{className:"flex flex-col items-center justify-center h-44 w-full max-w-md border-2 border-dashed border-border rounded-lg cursor-pointer hover:bg-secondary/30 transition",children:[l?a.jsx(_t,{className:"h-6 w-6 animate-spin text-muted-foreground"}):a.jsxs(a.Fragment,{children:[a.jsx(x5,{className:"h-6 w-6 text-muted-foreground mb-2"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"Clique para enviar (máx 5MB)"})]}),a.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:Q=>{var M;const ve=(M=Q.target.files)==null?void 0:M[0];ve&&z(ve)}})]}),O&&a.jsxs("div",{className:"max-w-md pt-2",children:[a.jsxs(X,{children:["Texto alternativo da capa"," ",a.jsx("span",{className:"text-muted-foreground text-xs",children:"(acessibilidade e SEO)"})]}),a.jsx(ae,{value:K,onChange:Q=>$(Q.target.value),maxLength:300,placeholder:"Ex: Vistoriador inspecionando o casco de uma embarcação"})]})]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[a.jsxs("div",{className:"md:col-span-2",children:[a.jsxs(X,{children:["TÃtulo ",a.jsx("span",{className:"text-muted-foreground text-xs",children:"(H1 â usado para SEO)"})]}),a.jsx(ae,{value:h,onChange:Q=>p(Q.target.value),onBlur:P,maxLength:200})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Slug (URL)"}),a.jsx(ae,{value:f,onChange:Q=>y(Q.target.value),maxLength:200})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Categoria"}),a.jsxs(Rr,{value:b,onValueChange:j,children:[a.jsx(sr,{children:a.jsx(Pr,{placeholder:"Selecione"})}),a.jsx(ar,{children:n==null?void 0:n.map(Q=>a.jsx(je,{value:Q.slug,children:Q.name},Q.slug))})]})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Autor"}),a.jsx(ae,{value:k,onChange:Q=>_(Q.target.value),maxLength:100})]}),a.jsxs("div",{children:[a.jsx(X,{children:"Tempo de leitura"}),a.jsx(ae,{value:N,onChange:Q=>C(Q.target.value),placeholder:"5 min",maxLength:20})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx(X,{children:"Palavras-chave (separadas por vÃrgula)"}),a.jsx(ae,{value:R,onChange:Q=>T(Q.target.value),placeholder:"certificação naval, vistoria, NORMAM",maxLength:400})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx(X,{children:"Resumo (exibido nos cards)"}),a.jsx(ha,{value:g,onChange:Q=>w(Q.target.value),rows:2,maxLength:400})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsxs(X,{children:["Meta descrição"," ",a.jsxs("span",{className:"text-muted-foreground text-xs",children:["(para Google â ideal entre 120 e 160 caracteres) â ",v.length,"/160"]})]}
715),a.jsx(ha,{value:v,onChange:Q=>x(Q.target.value),rows:2,maxLength:200,placeholder:"Descrição que aparece nos resultados de busca."})]})]}),a.jsxs("div",{className:"border-t border-border pt-6",children:[a.jsx("div",{className:"flex items-center justify-between mb-4",children:a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-xl font-bold text-ink",children:"Conteúdo do artigo"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Monte seu artigo com blocos modulares. Adicione CTAs no meio e no final para converter."})]})}),a.jsx(_B,{blocks:H,onChange:U})]}),a.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-border pt-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(OS,{checked:Z,onCheckedChange:E}),a.jsx(X,{className:"cursor-pointer",children:"Mostrar CTA flutuante de diagnóstico"})]}),a.jsxs("div",{className:"flex items-center gap-3 flex-wrap justify-end",children:[a.jsxs(V,{variant:"outline",type:"button",onClick:()=>i(!0),children:[a.jsx(fk,{className:"h-4 w-4 mr-1.5"})," Pré-visualizar"]}),(e==null?void 0:e.slug)&&a.jsx(V,{variant:"outline",type:"button",asChild:!0,children:a.jsxs("a",{href:`/conteudo-tecnico/${e.category_slug}/${e.slug}?preview=1`,target:"_blank",rel:"noopener noreferrer",children:[a.jsx(Ip,{className:"h-4 w-4 mr-1.5"})," Ver página salva"]})}),(e==null?void 0:e.slug)&&(e==null?void 0:e.preview_token)&&a.jsxs(V,{variant:"outline",type:"button",onClick:async()=>{const Q=`${window.location.origin}/conteudo-tecnico/${e.category_slug}/${e.slug}?preview=${e.preview_token}`;try{await navigator.clipboard.writeText(Q),Ye.success("Link público de pré-visualização copiado.")}catch{Ye.error("Não foi possÃvel copiar o link.")}},children:[a.jsx(Ip,{className:"h-4 w-4 mr-1.5"})," Copiar link de preview"]}),a.jsx(V,{variant:"outline",type:"button",onClick:()=>t("/admin/artigos"),children:"Cancelar"}),a.jsx(V,{variant:"secondary",type:"button",disabled:d,onClick:()=>F(!1),children:d?a.jsx(_t,{className:"h-4 w-4 animate-spin"}):"Salvar rascunho"}),a.jsx(V,{type:"button",disabled:d,onClick:()=>F(!0),children:d?a.jsx(_t,{className:"h-4 w-4 animate-spin"}):"Publicar"})]})]}),a.jsx(X_,{open:o,onOpenChange:i,children:a.jsxs(iv,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[a.jsx(lv,{children:a.jsx(cv,{children:"Pré-visualização (não publicado)"})}),a.jsxs("article",{className:"pt-2",children:[O&&a.jsx("img",{src:O,alt:K||h,className:"w-full h-auto rounded-2xl border border-border mb-8 aspect-[16/9] object-cover"}),a.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold text-ink leading-tight mb-4",children:h||"Sem tÃtulo"}),a.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground mb-8",children:[a.jsx("span",{children:k}),a.jsx("span",{children:N}),a.jsx("span",{children:(re=n==null?void 0:n.find(Q=>Q.slug===b))==null?void 0:re.name})]}),a.jsx(tN,{blocks:H,allArticles:s,categories:n??[]})]})]})})]})},C0=()=>{const{id:e}=mg(),t=!e||e==="novo",r=Ts(),{data:n,isLoading:s}=wz(t?void 0:e);return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(CN,{}),a.jsxs("main",{className:"container-record py-8 max-w-4xl",children:[a.jsxs(V,{variant:"ghost",size:"sm",onClick:()=>r("/admin/artigos"),className:"mb-4",children:[a.jsx(Ln,{className:"h-4 w-4 mr-1.5"})," Voltar"]}),a.jsx("h1",{className:"font-display text-2xl font-bold text-ink mb-8",children:t?"Novo artigo":"Editar artigo"}),!t&&s?a.jsx("div",{className:"py-20 flex justify-center",children:a.jsx(_t,{className:"h-6 w-6 animate-spin text-primary"})}):a.jsx(CB,{initial:t?null:n})]})]})},EB=[{id:"introducao",label:"Introdução, abrangência e princÃpios"},{id:"dados-coletados",label:"Dados pessoais coletados"},{id:"finalidades",label:"Finalidades e bases legais"},{id:"compartilhamento",label:"Compartilhamento, retenção e exclusão"},{id:"cookies",label:"Cookies"},{id:"seguranca",label:"Segurança da informação"}
715,{id:"direitos",label:"Direitos dos titulares"},{id:"contato",label:"Contato e disposições finais"}],RB=()=>a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(Mt,{title:"PolÃtica de Privacidade â Record Certificação Naval",description:"Saiba como a Record Certificação Naval coleta, usa, compartilha e protege seus dados pessoais em conformidade com a LGPD.",canonical:Dt("/politica-de-privacidade")}),a.jsx(As,{}),a.jsx("main",{className:"container-record py-24 md:py-28",children:a.jsxs("div",{className:"max-w-3xl",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-border bg-surface px-3 py-1 text-xs font-medium text-ink-soft mb-6",children:[a.jsx(zy,{className:"h-3.5 w-3.5 text-primary"}),"Privacidade e proteção de dados"]}),a.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold text-ink mb-3",children:"PolÃtica de Privacidade"}),a.jsxs("p",{className:"text-muted-foreground mb-10",children:["Ãltima atualização: ",new Date().toLocaleDateString("pt-BR")]}),a.jsxs("nav",{"aria-label":"Ãndice",className:"mb-12 rounded-xl border border-border bg-surface/60 p-6",children:[a.jsx("p",{className:"text-sm font-semibold text-ink mb-3",children:"Nesta página"}),a.jsx("ol",{className:"grid sm:grid-cols-2 gap-x-6 gap-y-2 text-sm",children:EB.map((e,t)=>a.jsx("li",{children:a.jsxs("a",{href:`#${e.id}`,className:"text-ink-soft hover:text-primary transition-colors inline-flex items-baseline gap-2",children:[a.jsx("span",{className:"text-primary font-semibold tabular-nums",children:String(t+1).padStart(2,"0")}),e.label]})},e.id))})]}),a.jsxs("article",{className:"prose prose-lg max-w-none text-foreground space-y-10",children:[a.jsxs("section",{id:"introducao",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"CapÃtulo 1 â Introdução, Abrangência, Definições e PrincÃpios da Proteção de Dados"}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3",children:"1. Apresentação"}),a.jsx("p",{children:'A Record Certificação Naval Ltda. ("Record", "nós" ou "empresa") reconhece a importância da privacidade, da proteção de dados pessoais e da transparência em todas as suas atividades.'}),a.jsxs("p",{children:["Esta PolÃtica de Privacidade tem como objetivo explicar, de forma clara e acessÃvel, como coletamos, utilizamos, armazenamos, compartilhamos, protegemos e eliminamos os dados pessoais tratados pela Record, em conformidade com a"," ",a.jsx("strong",{children:"Lei nº 13.709/2018 (Lei Geral de Proteção de Dados Pessoais â LGPD)"})," e demais normas aplicáveis."]}),a.jsx("p",{children:"A proteção das informações de nossos clientes, colaboradores, candidatos, fornecedores, parceiros e usuários de nossos sistemas faz parte do compromisso da Record com a ética, a segurança da informação e a confiança construÃda ao longo de sua atuação como Organização Reconhecida homologada pela Marinha do Brasil."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"2. Abrangência desta PolÃtica"}),a.jsx("p",{children:"Esta PolÃtica aplica-se a todos os tratamentos de dados pessoais realizados pela Record, incluindo aqueles decorrentes de:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"acesso ao site institucional;"}),a.jsx("li",{children:"utilização do Aplicativo Record de Vistoria;"}),a.jsx("li",{children:"utilização de sistemas internos;"}),a.jsx("li",{children:"atendimento comercial;"}),a.jsx("li",{children:"prestação de serviços de certificação e vistoria naval;"}),a.jsx("li",{children:"recrutamento e seleção;"}),a.jsx("li",{children:"relacionamento com clientes, fornecedores e colaboradores;"}),a.jsx("li",{children:"participação em treinamentos, eventos e programas promovidos pela Record;"}),a.jsx("li",{children:"utilização de formulários eletrônicos;"}),a.jsx("li",{children:"envio de currÃculos;"}),a.jsx("li",{children:"contatos realizados por telefone, WhatsApp, e-mail ou outros meios de comunicação."})]}),a.jsx("p",{children:"Sempre que houver tratamento especÃfico de dados pessoais em determinada operação, poderão existir avisos complementares, que prevalecerão sobre esta PolÃtica quando aplicáveis."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"3. Quem é o Controlador dos Dados"}),a.jsx("p",{children:"Para fins da LGPD, a responsável pelo tratamento dos dados pessoais é:"}),a.jsx("p",{className:"font-semibold text-ink",children:"Record Certificação Naval Ltda."}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"CNPJ: 07.774.554/0001-95"}),a.jsx("li",{children:"Endereço: Rua Prudente de Moraes, nº 1558, Vila Nova, Barra Bonita - SP, CEP 17347-010."}),a.jsxs("li",{children:["E-mail para assuntos relacionados à privacidade:"," ",a.jsx("strong",{children:"[email protected]"})]})]}),a.jsx("p",{children:'Sempre que esta PolÃtica mencionar "Record", estará se referindo ao Controlador dos dados pessoais.'}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"4. Conceitos Importantes"}),a.jsx("p",{children:"Para facilitar a compreensão desta PolÃtica, utilizamos alguns conceitos previstos na LGPD."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Dados pessoais"}),a.jsx("p",{children:"São quaisquer informações relacionadas a uma pessoa natural identificada ou identificável."}),a.jsx("ul",{className:"list-disc pl-6 space-y-1",children:a.jsx("li",{children:"nome; CPF; RG; telefone; endereço; e-mail; fotografia; geolocalização; endereço IP; dados profissionais."})}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Dados pessoais sensÃveis"}),a.jsx("p",{children:"São dados que exigem proteção reforçada pela legislação, tais como:"}),a.jsx("ul",{className:"list-disc pl-6 space-y-1",children:a.jsx("li",{children:"origem racial ou ét
715nica; convicção religiosa; opinião polÃtica; filiação sindical; dados referentes à saúde; dados biométricos; dados genéticos."})}),a.jsx("p",{children:"A Record somente realiza o tratamento desses dados quando estritamente necessário e autorizado pela legislação aplicável."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Titular dos dados"}),a.jsx("p",{children:"à a pessoa natural a quem os dados pessoais se referem. Podem ser titulares: clientes; representantes de clientes; colaboradores; candidatos; fornecedores; parceiros; usuários do aplicativo; visitantes do site."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Tratamento"}),a.jsx("p",{children:"à qualquer operação realizada com dados pessoais, como: coleta; registro; armazenamento; organização; consulta; utilização; compartilhamento; atualização; eliminação."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Controlador"}),a.jsx("p",{children:"Pessoa jurÃdica responsável pelas decisões referentes ao tratamento dos dados pessoais. Nesta PolÃtica, o Controlador é a Record Certificação Naval Ltda."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Operador"}),a.jsx("p",{children:"Pessoa fÃsica ou jurÃdica que realiza o tratamento de dados pessoais em nome da Record. Exemplos: provedores de hospedagem; empresas de tecnologia; plataformas em nuvem; sistemas de gestão; fornecedores contratados."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"5. PrincÃpios adotados pela Record"}),a.jsx("p",{children:"Todo tratamento de dados realizado pela Record observa os princÃpios previstos na LGPD, especialmente:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Finalidade:"})," os dados pessoais são tratados para objetivos legÃtimos, especÃficos e informados ao titular;"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Adequação:"})," o tratamento é compatÃvel com a finalidade informada ao titular;"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Necessidade:"})," coletamos apenas os dados realmente necessários para cada atividade;"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Livre acesso:"})," os titulares podem solicitar informações sobre o tratamento de seus dados pessoais;"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Qualidade dos dados:"})," buscamos manter os dados corretos, completos e atualizados;"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Transparência:"})," prestamos informações claras sobre como utilizamos os dados pessoais;"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Segurança:"})," adotamos medidas técnicas e administrativas para proteger os dados pessoais contra acessos não autorizados, perda, destruição, alteração ou divulgação indevida;"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Prevenção:"})," mantemos processos internos destinados à prevenção de incidentes de segurança e proteção da privacidade;"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Não discriminação:"})," jamais utilizamos dados pessoais para fins discriminatórios, ilÃcitos ou abusivos;"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Responsabilização e prestação de contas:"})," mantemos controles internos para demonstrar a conformidade das nossas atividades com a LGPD e com as boas práticas de proteção de dados."]})]}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"6. Compromisso da Record com a Privacidade"}),a.jsx("p",{children:"A Record entende que a proteção de dados pessoais faz parte da qualidade dos serviços prestados. Por esse motivo, investimos continuamente em: melhoria dos processos internos; capacitação de colaboradores; segurança da informação; revisão periódica desta PolÃtica; conformidade com a legislação vigente; governança em privacidade."}),a.jsx("p",{children:"Nosso compromisso é tratar os dados pessoais com responsabilidade, transparência e respeito aos direitos dos t
715itulares, fortalecendo a confiança depositada em nossa organização por clientes, colaboradores, parceiros e pela sociedade."})]}),a.jsxs("section",{id:"dados-coletados",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"CapÃtulo 2 â Dados Pessoais Coletados, Finalidades do Tratamento e Bases Legais"}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3",children:"7. Dados Pessoais Tratados pela Record"}),a.jsx("p",{children:"A Record trata apenas os dados pessoais necessários para a execução de suas atividades institucionais, operacionais e comerciais, observando sempre os princÃpios da necessidade, adequação e finalidade previstos na LGPD. Os dados tratados podem variar conforme o relacionamento mantido com a Record."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"7.1 Dados de Clientes e Representantes"}),a.jsx("p",{children:"Durante a contratação e execução dos serviços, poderão ser coletados:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Dados de identificação:"})," nome completo; CPF; RG; cargo; empresa; CNPJ da empresa; assinatura; nacionalidade."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Dados de contato:"})," e-mail; telefones; WhatsApp; endereço comercial; endereço para correspondência."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Dados profissionais:"})," função exercida; responsabilidades junto à embarcação; informações sobre habilitações, quando aplicável."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Dados financeiros:"})," dados bancários; informações para emissão de notas fiscais; informações para cobrança."]})]}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"7.2 Dados relacionados à s embarcações"}),a.jsx("p",{children:"Embora a maioria das informações seja referente à embarcação e não constitua dado pessoal, alguns documentos podem conter dados identificáveis de pessoas fÃsicas, tais como: nome do proprietário; nome do comandante; nome dos tripulantes; responsáveis técnicos; assinaturas; fotografias contendo pessoas. Esses dados são tratados exclusivamente para execução dos serviços contratados e cumprimento das exigências regulatórias."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"7.3 Dados de Colaboradores"}),a.jsx("p",{children:"A Record trata dados pessoais de seus colaboradores para fins de gestão da relação de trabalho. Podem ser tratados: nome; CPF; RG; CNH; CTPS; endereço; estado civil; escolaridade; dados bancários; dependentes; dados necessários para folha de pagamento; dados previdenciários; dados trabalhistas; informações médicas exigidas pela legislação trabalhista. Os tratamentos seguem a legislação trabalhista, previdenciária e demais normas aplicáveis."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"7.4 Dados de Candidatos a Vagas"}),a.jsx("p",{children:"Durante processos seletivos poderão ser tratados: currÃculo; histórico profissional; formação acadêmica; cursos; certificações; dados de contato; pretensão salarial; informações fornecidas espontaneamente pelo candidato. Esses dados serão utilizados exclusivamente para recrutamento e seleção."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"7.5 Dados de Fornecedores e Prestadores de Serviços"}),a.jsx("p",{children:"Podem ser coletados: nome; CPF; dados bancários; contato; empresa; CNPJ; documentação fiscal; documentação trabalhista quando necessária."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"7.6 Dad
715os coletados automaticamente"}),a.jsx("p",{children:"Quando o usuário acessa nosso site ou utiliza nossos sistemas, poderão ser coletados automaticamente: endereço IP; data e hora de acesso; tipo de navegador; sistema operacional; idioma; identificadores do dispositivo; informações sobre páginas acessadas; logs de utilização; cookies; dados estatÃsticos de navegação. Esses dados auxiliam na segurança, estabilidade e melhoria dos serviços."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"7.7 Dados do Aplicativo Record de Vistoria"}),a.jsx("p",{children:"Durante a utilização do aplicativo poderão ser tratados: nome do usuário; e-mail; empresa; fotografias das vistorias; localização (quando autorizada); data e horário das inspeções; identificador do dispositivo; informações de sincronização; registros de utilização; logs técnicos; versão do aplicativo; sistema operacional utilizado. Esses dados são utilizados exclusivamente para execução das funcionalidades do aplicativo."})]}),a.jsxs("section",{id:"finalidades",className:"scroll-mt-28",children:[a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3",children:"8. Finalidades do Tratamento"}),a.jsx("p",{children:"Os dados pessoais poderão ser tratados para as seguintes finalidades:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Prestação dos serviços:"})," execução de contratos; realização de vistorias; emissão de certificados; elaboração de relatórios técnicos; controle documental; atendimento aos clientes."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Cumprimento de obrigações legais:"})," exigências da Marinha do Brasil; autoridades públicas; legislação trabalhista; legislação tributária; obrigações previdenciárias; obrigações fiscais."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Atendimento:"})," responder solicitações; prestar suporte; esclarecer dúvidas; acompanhar serviços."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Gestão contratual:"})," emissão de propostas; faturamento; cobrança; pagamentos; controle financeiro."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Recursos Humanos:"})," recrutamento; contratação; folha de pagamento; benefÃcios; gestão do vÃnculo empregatÃcio."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Segurança:"})," prevenção à fraude; controle de acessos; proteção dos sistemas; auditorias internas."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Comunicação:"})," envio de avisos; notificações; comunicados; informações sobre vencimentos de certificados; atualizações de serviços."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Marketing:"})," quando permitido pela legislação, divulgação de conteúdos técnicos; newsletters; eventos; treinamentos; campanhas institucionais. O titular poderá solicitar o cancelamento dessas comunicações a qualquer momento."]})]}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"9. Bases Legais Utilizadas"}),a.jsx("p",{children:"A Record realiza o tratamento de dados pessoais com fundamento nas bases legais previstas na LGPD."}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm border border-border mt-4",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"bg-surface",children:[a.jsx("th",{className:"text-left p-3 border-b border-border",children:"Finalidade"}),a.jsx("th",{className:"text-left p-3 border-b border-border",children:"Base Legal"})]})}),a.jsxs("tbody",{children:[a.jsxs("tr",{children:[a.jsx("td",{className:"p-3 border-b border-border",children:"Prestação de serviços"}),a.jsx("td",{className:"p-3 border-b border-border",children:"Execução de contrato"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"p-3 border-b border-border",children:"Emissão de certificados"}),a.jsx("td",{className:"p-3 border-b border-border",children:"Cumprimento de obrigação legal ou regulatória"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"p-3 border-b border-border",children:"Atendimento ao cliente"}),a.jsx("td",{className:"p-3 border-b border-border",children:"Execução de contrato e legÃtimo interesse"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"p-3 border-b border-border",children:"Recursos Humanos"}),a.jsx("td",{className:"p-3 border-b border-border",children:"Execução de contrato e obrigação legal"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"p-3 border-b border-border",children:"Recrutamento"}),a.jsx("td",{className:"p-3 border-b border-border",children:"Procedimentos preliminares relacionados ao contrato de trabalho"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"p-3 border-b border-border",children:"Cumprimento de determinações da Marinha"}),a.jsx("td",{className:"p-3 border-b border-border",children:"Obrigação legal e regulatória"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"p-3 border-b border-border",children:"Segurança da informação"}),a.jsx("td",{className:"p-3 border-b border-border",children:"LegÃtimo interesse"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"p-3 border-b border-border",children:"Auditorias"}),a.jsx("td",{className:"p-3 border-b border-border",children:"LegÃtimo interesse"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"p-3 border-b border-border",children:"Marketing institucional"}),a.jsx("td",{className:"p-3 border-b border-border",children:"Consentimento ou legÃtimo interesse, conforme aplicável"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"p-3",children:"Defesa em processos judiciais"}),a.jsx("td",{className:"p-3",children:"ExercÃcio regular de direitos"})]})]})]})})]}),a.jsxs("section",{id:"compartilhamento",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"CapÃtulo 3 â Compartilhamento de Dados, Retenção e Transferência Internacional"}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3",children:"10. Compartilhamento de Dados Pessoais"}),a.jsx("p",{children:"A Record compartilha dados pessoais apenas quando necessário para o desempenho de suas atividades ou quando houver obrigação legal ou regulatória. O compartilhamento ocorre sempre observando os princÃpios da necessidade, proporcionalidade e segurança."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Autoridades Públicas"}),a.jsx("p",{children:"Quando exigido por lei ou regulamento, incluindo:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"Marinha do Brasil;"}),a.jsx("li",{children:"Diretoria de Portos e Costas (DPC);"}),a.jsx("li",{children:"Receita Federal;"}),a.jsx("li",{children:"Poder Judiciário;"}),a.jsx("li",{children:"Ministério Público;"}),a.jsx("li",{children:"Autoridade Nacional de Proteção de Dados (ANPD);"}),a.jsx("li",{children:"demais órgãos competentes."})]}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Prestadores de Serviços"}),a.jsx("p",{children:"Para viabilizar nossas atividades, utilizamos empresas especializadas, tais como:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"provedores de hospedagem;"}),a.jsx("li",{children:"plataformas em nuvem;"}),a.jsx("li",{children:"sistemas de gestão;"}),a.jsx("li",{children:"provedores de e-mail;"}),a.jsx("li",{children:"serviços de autenticação;"}),a.jsx("li",{children:"empresas de tecnologia;"}),a.jsx("li",{children:"plataformas de videoconferência."})]}),a.jsx("p",{children:"Esses fornecedores tratam os dados apenas conforme nossas instruções e mediante obrigações contratuais de confidencialidade."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Operadoras de BenefÃcios"}),a.jsx("p",{children:"Quando aplicável: operadoras de plano de saúde; operadoras odontológicas; seguradoras; administradoras de benefÃcios."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Escritórios de Contabilidade e Assessoria"}),a.jsx("p",{children:"Para cumprimento de obrigações: fiscais; tributárias; trabalhistas; previdenciárias."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"Parceiros Comerciais"}),a.jsx("p",{children:"Quando necessário para execução dos serviços contratados. Sempre limitado ao mÃnimo necessário."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"11. Transferência Internacional de Dados"}),a.jsx("p",{children:"Alguns dos sistemas utilizados pela Record podem armazenar ou processar dados em servidores localizados fora do Brasil. Quando isso ocorrer, a Record adotará medidas para assegurar que o tratamento ocorra em conformidade com a LGPD, utilizando mecanismos legalmente admitidos e exigindo dos fornecedores padrões adequados de segurança e proteção de dados."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"12. Tempo de Retenção dos Dados"}),a.jsx("p",{children:"Os dados pessoais serão mantidos apenas pelo tempo necessário para atender à s finalidades para as quais foram coletados. Após esse perÃodo, poderão ser eliminados, anonimizados ou mantidos quando houver fundamento legal para sua conservação."}),a.jsx("p",{children:"Entre os principais motivos para retenção estão:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"cumprimento de obrigações legais;"}),a.jsx("li",{children:"cumprimento de obrigações regulatórias;"}),a.jsx("li",{children:"exercÃcio regular de direitos em processos administrativos ou judiciais;"}),a.jsx("li",{children:"auditorias;"}),a.jsx("li",{children:"obrigações fiscais;"}),a.jsx("li",{children:"exigências da Marinha do Brasil;"}),a.jsx("li",{children:"preservação de registros técnicos."})]}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"13. Eliminação dos Dados"}),a.jsx("p",{children:"Quando não houver mais necessidade de tratamento, e inexistindo obrigação legal para sua manutenção, os dados pessoais serão eliminados ou anonimizados de forma segura. A eliminação observará: polÃticas internas da Record; boas práticas de segurança da informação; legislação aplicável."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"14. Confidencialidade"}),a.jsx("p",{children:"Todos os colaboradores, parceiros e fornecedores que tenham acesso a dados pessoais tratados pela Record assumem compromisso de confidencialidade e somente poderão utilizar essas informações para as finalidades autorizadas. A quebra indevida de confidencialidade poderá sujeitar o responsável à s sanções legais e contratuais cabÃveis."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"15. Compromisso com a Minimização dos Dados"}
715),a.jsx("p",{children:"A Record busca coletar apenas os dados estritamente necessários para cada finalidade, evitando tratamentos excessivos ou incompatÃveis com os objetivos informados aos titulares. Sempre que possÃvel, serão utilizadas técnicas de anonimização, pseudonimização ou outras medidas que reduzam os riscos associados ao tratamento de dados pessoais."})]}),a.jsxs("section",{id:"cookies",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"CapÃtulo 4 â Cookies, Segurança da Informação e Incidentes de Segurança"}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3",children:"16. Utilização de Cookies"}),a.jsx("p",{children:"O site da Record utiliza cookies e tecnologias semelhantes para melhorar a experiência de navegação, aumentar a segurança, compreender o comportamento dos usuários e aperfeiçoar continuamente seus serviços. Cookies são pequenos arquivos armazenados no dispositivo do usuário durante a navegação. A utilização de cookies não permite acesso aos arquivos pessoais do usuário nem instalação de programas em seu dispositivo."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"16.1 Tipos de Cookies Utilizados"}),a.jsx("p",{className:"font-semibold text-ink mt-3",children:"Cookies Essenciais"}),a.jsx("p",{children:"São indispensáveis para o funcionamento do site. Permitem, por exemplo: autenticação de usuários; manutenção de sessões; segurança da navegação; funcionamento de formulários; prevenção de fraudes. Esses cookies não podem ser desativados sem comprometer o funcionamento do site."}),a.jsx("p",{className:"font-semibold text-ink mt-3",children:"Cookies de Desempenho"}),a.jsx("p",{children:"São utilizados para compreender como os usuários interagem com o site. Esses dados são tratados de forma agregada e ajudam a: melhorar páginas; identificar erros; medir desempenho; otimizar velocidade."}),a.jsx("p",{className:"font-semibold text-ink mt-3",children:"Cookies AnalÃticos"}),a.jsx("p",{children:"Quando utilizados, permitem avaliar: páginas mais acessadas; tempo de permanência; origem dos acessos; comportamento de navegação. Essas informações auxiliam na melhoria contÃnua dos serviços."}),a.jsx("p",{className:"font-semibold text-ink mt-3",children:"Cookies de Funcionalidade"}),a.jsx("p",{children:"Permitem lembrar preferências do usuário, tais como: idioma; região; preferências de navegação; configurações personalizadas."}),a.jsx("p",{className:"font-semibold text-ink mt-3",children:"Cookies de Terceiros"}),a.jsx("p",{children:"Alguns serviços utilizados pela Record poderão instalar cookies próprios. Exemplos: Google Analytics; Google Maps; YouTube; serviços de autenticação; plataformas de chat. Cada fornecedor possui sua própria PolÃtica de Privacidade."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"16.2 Gerenciamento de Cookies"}),a.jsx("p",{children:"O usuário poderá configurar seu navegador para: bloquear cookies; excluir cookies existentes; receber aviso antes da instalação. A desativação poderá comprometer algumas funcionalidades do site."})]}),a.jsxs("section",{id:"seguranca",className:"scroll-mt-28",children:[a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3",children:"17. Segurança da Informação"}),a.jsx("p",{children:"A proteção dos dados pessoais é prioridade para a Record. Adotamos medidas técnicas, administrativas e organizacionais destinadas a proteger os dados pessoais contra: acesso não autorizado; destruição; alteração; perda; divulgação indevida; tratamento ilÃcito."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"17.1 Medidas adotadas"}),a.jsx("p",{children:"Entre as medidas implementadas estão:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"controle de acesso por perfil de usuário;"}),a.jsx("li",{children:"autenticação de usuários;"}),a.jsx("li",{children:"utilização de conexões seguras (HTTPS);"}),a.jsx("li",{children:"criptografia quando tecnicamente aplicável;"}),a.jsx("li",{children:"backups periódicos;"}),a.jsx("li",{children:"monitoramento de sistemas;"}),a.jsx("li",{children:"registro de logs;"}),a.jsx("li",{children:"controle de permissões;"}),a.jsx("li",{children:"segregação de acessos;"}),a.jsx("li",{children:"atualização de sistemas;"}),a.jsx("li",{children:"treinamento de colaboradores;"}
715),a.jsx("li",{children:"cláusulas de confidencialidade com parceiros e fornecedores."})]}),a.jsx("p",{children:"Essas medidas são continuamente revisadas conforme evolução tecnológica e avaliação dos riscos."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"18. Confidencialidade"}),a.jsx("p",{children:"Todos os colaboradores, parceiros e fornecedores que tenham acesso a dados pessoais tratados pela Record assumem compromisso formal de confidencialidade. O acesso aos dados ocorre exclusivamente quando necessário para execução das respectivas atividades. O uso indevido das informações poderá resultar em medidas administrativas, contratuais e legais."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"19. Incidentes de Segurança"}),a.jsx("p",{children:"Apesar da adoção das melhores práticas de segurança, nenhum ambiente tecnológico é absolutamente imune a incidentes. Caso ocorra incidente que possa acarretar risco ou dano relevante aos titulares de dados pessoais, a Record adotará todas as medidas cabÃveis, incluindo, quando exigido pela legislação: investigação do incidente; mitigação dos impactos; registro interno; comunicação à Autoridade Nacional de Proteção de Dados (ANPD); comunicação aos titulares afetados, quando aplicável; implementação de medidas corretivas para evitar recorrências."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"20. Boas Práticas Esperadas dos Usuários"}),a.jsx("p",{children:"Os usuários também possuem papel importante na proteção de seus dados. Recomendamos:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"manter senhas protegidas;"}),a.jsx("li",{children:"utilizar dispositivos confiáveis;"}),a.jsx("li",{children:"não compartilhar credenciais;"}),a.jsx("li",{children:"manter aplicativos atualizados;"}),a.jsx("li",{children:"comunicar imediatamente qualquer suspeita de acesso indevido."})]})]}),a.jsxs("section",{id:"direitos",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"CapÃtulo 5 â Direitos dos Titulares, Aplicativo Record de Vistoria e Disposições Finais"}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3",children:"21. Direitos dos Titulares"}),a.jsx("p",{children:"Nos termos da LGPD, os titulares dos dados pessoais possuem diversos direitos relacionados à s suas informações. Entre eles:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"confirmação da existência de tratamento;"}),a.jsx("li",{children:"acesso aos dados;"}),a.jsx("li",{children:"correção de dados incompletos, inexatos ou desatualizados;"}),a.jsx("li",{children:"anonimização, bloqueio ou eliminação de dados quando cabÃvel;"}),a.jsx("li",{children:"portabilidade dos dados, quando aplicável;"}),a.jsx("li",{children:"informação sobre compartilhamentos realizados;"}),a.jsx("li",{children:"revogação do consentimento, quando esta for a base legal utilizada;"}),a.jsx("li",{children:"oposição ao tratamento nas hipóteses previstas em lei."})]}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"21.1 ExercÃcio dos Direitos"}),a.jsxs("p",{children:["As solicitações poderão ser encaminhadas para:"," ",a.jsx("strong",{children:"E-mail: [email protected]"})]}),a.jsx("p",{children:"A Record analisará cada solicitação observando:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"identidade do solicitante;"}),a.jsx("li",{children:"requisitos legais;"}),a.jsx("li",{children:"prazo previsto na legislação;"}),a.jsx("li",{children:"eventual obrigação legal que impeça a eliminação imediata dos dados."})]}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"22. Exclusão de Dados"}),a.jsx("p",{children:"O titular poderá solicitar a exclusão de seus dados pessoais quando aplicável. Entretanto, a Record poderá manter determinadas informações quando houver necessidade de: cumprimento de obrigação legal; cumprimento de obrigação regulatória; defesa em processos judiciais ou administrativos; atendimento à s normas da Autoridade MarÃtima Brasileira; preservação de registros fiscais, contábeis e trabalhistas."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"23. Aplicativo Record de Vistoria"}),a.jsx("p",{children:"O Aplicativo Record de Vistoria foi desenvolvido para apoiar as atividades técnicas de inspeção e certificação naval."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"23.1 Dados tratados"}),a.jsx("p",{children:"Durante sua utilização poderão ser tratados: nome; e-mail; empresa; fotografias das vistorias; informações técnicas da embarcação; localização, quando autorizada; data e horário das inspeções; identificador do dispositivo; versão do aplicativo; sistema operacional; registros de sincronização; logs técnicos."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"23.2 Permissões utilizadas"}),a.jsx("p",{children:"O aplicativo poderá solicitar acesso aos seguintes recursos do dispositivo:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Câmera:"})," para registro fotográfico das inspeções."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Armazenamento:"})," para salvar e enviar imagens e documentos."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Internet:"})," para sincronização das informações com os servidores da Record."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Localização:"})," quando necessária para identificação do local da vistoria. A localização somente será utilizada para finalidades relacionadas aos serviços prestados."]})]}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"23.3 Funcionamento Offline"}),a.jsx("p",{children:"Algumas funcionalidades poderão operar sem c
715onexão com a internet. Quando houver conectividade, os dados poderão ser sincronizados automaticamente."}),a.jsx("p",{className:"font-semibold text-ink mt-4",children:"23.4 Exclusão da Conta"}),a.jsx("p",{children:"O usuário poderá solicitar a exclusão de sua conta. A exclusão removerá os dados que não precisem ser mantidos por obrigação legal, regulatória ou para exercÃcio regular de direitos da Record."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"24. Crianças e Adolescentes"}),a.jsx("p",{children:"Os serviços da Record não são direcionados a crianças. Caso seja identificado tratamento indevido de dados pessoais de menores em desconformidade com a legislação, a Record adotará as medidas necessárias para sua regularização ou eliminação."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"25. Decisões Automatizadas"}),a.jsx("p",{children:"Atualmente a Record não realiza decisões exclusivamente automatizadas que produzam efeitos jurÃdicos relevantes sobre os titulares dos dados pessoais. Caso essa prática venha a ser adotada futuramente, esta PolÃtica será atualizada."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"26. Atualizações desta PolÃtica"}),a.jsx("p",{children:"Esta PolÃtica poderá ser atualizada periodicamente para refletir: alterações legislativas; mudanças regulatórias; evolução tecnológica; novos serviços; melhorias internas. Sempre que houver alterações relevantes, a nova versão será disponibilizada nos canais oficiais da Record."})]}),a.jsxs("section",{id:"contato",className:"scroll-mt-28",children:[a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3",children:"27. Contato com o Encarregado de Dados (DPO)"}),a.jsx("p",{children:"Em caso de dúvidas, solicitações ou exercÃcio de direitos relacionados aos dados pessoais, entre em contato com:"}),a.jsx("p",{className:"font-semibold text-ink",children:"Encarregado pelo Tratamento de Dados (DPO)"}),a.jsxs("p",{children:[a.jsx("strong",{children:"E-mail:"})," [email protected]"]}),a.jsx("p",{children:"Caso a Record designe formalmente um encarregado especÃfico, esta PolÃtica será atualizada com seus dados de contato."}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"28. Legislação Aplicável"}),a.jsx("p",{children:"Esta PolÃtica é regida pelas leis da República Federativa do Brasil, especialmente:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[a.jsx("li",{children:"Lei nº 13.709/2018 (Lei Geral de Proteção de Dados Pessoais â LGPD);"}),a.jsx("li",{children:"Marco Civil da Internet (Lei nº 12.965/2014);"}),a.jsx("li",{children:"demais normas aplicáveis à proteção de dados pessoais e segurança da informação."})]}),a.jsx("h3",{className:"font-display text-xl font-bold text-ink mb-3 mt-8",children:"29. Disposições Finais"}),a.jsx("p",{children:"Ao utilizar o site, os sistemas, o Aplicativo Record de Vistoria ou contratar os serviços da Record Certificação Naval, o usuário declara estar ciente desta PolÃtica de Privacidade."}),a.jsx("p",{children:"A Record reafirma seu compromisso com a ética, a transparência, a segurança da informação e a proteção dos dados pessoais, buscando continuamente aprimorar seus processos e fortalecer a confiança de clientes, colaboradores, parceiros e da sociedade."}),a.jsxs("div",{className:"mt-8 rounded-xl border border-border bg-surface/60 p-6 md:p-8",children:[a.jsxs("h3",{className:"font-display text-lg font-bold text-ink mb-5 flex items-center gap-2",children:[a.jsx(zy,{className:"h-5 w-5 text-primary"}),"Contato para assuntos relacionados à LGPD"]}),a.jsxs("div",{className:"grid sm:grid-cols-3 gap-6 text-sm",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1",children:"E-mail"}),a.jsx("p",{className:"text-ink font-medium",children:"[email protected]"})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1",children:"CNPJ"}),a.jsx("p",{className:"text-ink font-medium",children:"07.774.554/0001-95"})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1",children:"Endereço"}),a.jsx("p",{className:"text-ink font-medium",children:"Rua Prudente de Moraes, nº 1558, Vila Nova, Barra Bonita - SP, CEP 17347-010"})]})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-5 pt-5 border-t border-border",children:"Este canal foi criado para facilitar solicitações de titulares de dados e reforçar nossa conformidade institucional com a LGPD."})]})]})]}),a.jsx("div",{className:"flex flex-col sm:flex-row gap-3 mt-12 pt-8 border-t border-border",children:a.jsx(V,{asChild:!0,variant:"outline",children:a.jsxs(we,{to:"/",className:"inline-flex items-center gap-2",children:[a.jsx(Ln,{className:"h-4 w-4"}),"Voltar para página inicial"]})})})]})}),a.jsx(pr,{})]}),PB=["Atendimento à s normas marÃtimas","Melhoria contÃnua","Conformidade legal","Satisfação dos clientes"],TB=()=>a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(Mt,{title:"PolÃtica da Qualidade â Record Certificação Naval",description:"Conheça as diretrizes do Sistema de Gestão da Qualidade da Record: excelência em vistorias, análise de planos e conformidade com a Autoridade MarÃtima.",canonical:Dt("/politica-da-qualidade")}),a.jsx(As,{}),a.jsx("main",{className:"container-record py-24 md:py-28",children:a.jsxs("div",{className:"max-w-3xl",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-border bg-surface px-3 py-1 text-xs font-medium text-ink-soft mb-6",children:[a.jsx($t,{className:"h-3.5 w-3.5 text-primary"}),"Sistema de Gestão da Qualidade"]}
715),a.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold text-ink mb-3",children:"PolÃtica da Qualidade"}),a.jsx("p",{className:"text-muted-foreground mb-12",children:"Diretrizes que orientam nossas vistorias, análises técnicas e relacionamento com clientes."}),a.jsxs("section",{className:"mb-12",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"Compromisso da Record"}),a.jsx("blockquote",{className:"border-l-4 border-primary bg-surface/60 rounded-r-lg p-6 text-lg leading-relaxed text-foreground/90 italic",children:'"Comprometemo-nos com a excelência na certificação da conformidade das embarcações com as normas da Autoridade MarÃtima Brasileira, através da realização de vistorias e análise de planos, buscando a melhoria contÃnua dos nossos processos, o atendimento das legislações e requisitos legais e a satisfação dos clientes."'})]}),a.jsxs("section",{className:"mb-12",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-6",children:"Objetivos da polÃtica"}),a.jsx("ul",{className:"grid sm:grid-cols-2 gap-4",children:PB.map(e=>a.jsxs("li",{className:"flex items-start gap-3 rounded-lg border border-border bg-card p-4",children:[a.jsx("span",{className:"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:a.jsx(pl,{className:"h-4 w-4"})}),a.jsx("span",{className:"font-medium text-ink",children:e})]},e))})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-4 border-t border-border",children:[a.jsx(V,{asChild:!0,variant:"outline",children:a.jsxs(we,{to:"/",className:"inline-flex items-center gap-2",children:[a.jsx(Ln,{className:"h-4 w-4"}),"Voltar para página inicial"]})}),a.jsx(V,{asChild:!0,className:"bg-primary hover:bg-primary-deep text-primary-foreground",children:a.jsxs("a",{href:"/__l5e/assets-v1/2315d6cc-36b2-4b31-a562-ac90805e40e8/certificado-qualidade.pdf",target:"_blank",rel:"noopener",className:"inline-flex items-center gap-2",children:[a.jsx(Pn,{className:"h-4 w-4"}),"Baixar certificado"]})})]})]})}),a.jsx(pr,{})]}),AB=()=>{const[e,t]=m.useState(!1),r=n=>{n.preventDefault(),t(!0),setTimeout(()=>{t(!1),Ye.success("Mensagem enviada. Nossa ouvidoria responderá em breve."),n.target.reset()},600)};return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(Mt,{title:"Ouvidoria â Record Certificação Naval",description:"Canal de Ouvidoria da Record Certificação Naval: registre sugestões, elogios, dúvidas, reclamações e denúncias. Resposta em até 5 dias úteis.",canonical:Dt("/ouvidoria")}),a.jsx(As,{}),a.jsx("main",{className:"container-record py-24 md:py-28",children:a.jsxs("div",{className:"max-w-3xl",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-border bg-surface px-3 py-1 text-xs font-medium text-ink-soft mb-6",children:[a.jsx(Uy,{className:"h-3.5 w-3.5 text-primary"}),"Canal de relacionamento"]}),a.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold text-ink mb-3",children:"Ouvidoria"}),a.jsx("p",{className:"text-muted-foreground mb-10",children:"Canal direto para sugestões, elogios, dúvidas e reclamações. Respondemos em até 5 dias úteis."}),a.jsxs("article",{className:"prose prose-lg max-w-none text-foreground space-y-10",children:[a.jsxs("section",{className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"Sobre a Ouvidoria"}),a.jsx("p",{children:"A Ouvidoria da RECORD CERTIFICAÃÃO NAVAL LTDA. é um canal independente, criado para ouvir, registrar e tratar manifestações de clientes, colaboradores, parceiros e demais partes interessadas. Atua de forma imparcial, com sigilo e transparência, contribuindo para a melhoria contÃnua dos nossos processos e serviços."}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Sugestões:"})," ideias para aprimorar nossos serviços e processos."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Elogios:"})," reconhecimento ao atendimento, equipe ou serviço prestado."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Dúvidas:"})," esclarecimentos sobre vistorias, certificados e prazos."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Reclamações:"})," registro formal de insatisfação para tratativa."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Denúncias:"})," situações relacionadas à ética, conduta ou conformidade."]})]})]}),a.jsxs("section",{className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"Como funciona"}),a.jsxs("p",{children:["Após o envio da manifestação, você receberá um protocolo por e-mail. Nossa equipe analisa cada caso com confidencialidade e responde em até ",a.jsx("strong",{children:"5 dias úteis"}),". Demandas que envolvam apuração técnica mais complexa podem ter prazo estendido, sempre com retorno informando o andamento."]})]}),a.jsxs("section",{className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"Envie sua manifestação"}),a.jsxs("form",{onSubmit:r,className:"space-y-5 not-prose",children:[a.jsxs("div",{className:"grid sm:grid-cols-2 gap-5",children:[a.jsxs("div",{children:[a.jsx(X,{htmlFor:"nome",children:"Nome"}),a.jsx(ae,{id:"nome",required:!0,className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"email",children:"E-mail"}),a.jsx(ae,{id:"email",type:"email",required:!0,className:"mt-1.5"})]})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"assunto",children:"Assu
715nto"}),a.jsx(ae,{id:"assunto",required:!0,className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"mensagem",children:"Mensagem"}),a.jsx(ha,{id:"mensagem",rows:6,required:!0,className:"mt-1.5"})]}),a.jsx(V,{type:"submit",disabled:e,children:e?"Enviando...":"Enviar mensagem"})]})]}),a.jsxs("section",{className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"Outros canais de contato"}),a.jsxs("div",{className:"not-prose rounded-xl border border-border bg-surface/60 p-6 md:p-8",children:[a.jsxs("h3",{className:"font-display text-lg font-bold text-ink mb-5 flex items-center gap-2",children:[a.jsx(Uy,{className:"h-5 w-5 text-primary"}),"Fale com a Ouvidoria"]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-6 text-sm",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1 inline-flex items-center gap-1.5",children:[a.jsx(Lg,{className:"h-3.5 w-3.5"})," E-mail"]}),a.jsx("p",{className:"text-ink font-medium break-all",children:"[email protected]"})]}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1 inline-flex items-center gap-1.5",children:[a.jsx(Jo,{className:"h-3.5 w-3.5"})," Endereço"]}),a.jsx("p",{className:"text-ink font-medium",children:"Rua Prudente de Moraes, 1558 - Barra Bonita/SP"})]})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-5 pt-5 border-t border-border",children:"Todas as manifestações são tratadas com sigilo e em conformidade com a LGPD."})]})]})]}),a.jsx("div",{className:"flex flex-col sm:flex-row gap-3 mt-12 pt-8 border-t border-border",children:a.jsx(V,{asChild:!0,variant:"outline",children:a.jsxs(we,{to:"/",className:"inline-flex items-center gap-2",children:[a.jsx(Ln,{className:"h-4 w-4"}),"Voltar para página inicial"]})})})]})}),a.jsx(pr,{})]})},OB=[{id:"aceitacao",label:"Aceitação dos termos"},{id:"servicos",label:"Serviços oferecidos"},{id:"responsabilidades",label:"Responsabilidades do usuário"},{id:"propriedade",label:"Propriedade intelectual"},{id:"limitacao",label:"Limitação de responsabilidade"},{id:"privacidade",label:"Privacidade"},{id:"alteracoes",label:"Alterações dos termos"},{id:"legislacao",label:"Legislação aplicável"},{id:"contato",label:"Contato"}],LB=()=>a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(Mt,{title:"Termos de Uso â Record Certificação Naval",description:"Leia os Termos de Uso do site da Record Certificação Naval: regras de utilização, responsabilidades, propriedade intelectual e legislação aplicável.",canonical:Dt("/termos-de-uso")}),a.jsx(As,{}),a.jsx("main",{className:"container-record py-24 md:py-28",children:a.jsxs("div",{className:"max-w-3xl",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-border bg-surface px-3 py-1 text-xs font-medium text-ink-soft mb-6",children:[a.jsx(ya,{className:"h-3.5 w-3.5 text-primary"}),"Termos e condições de uso"]}),a.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold text-ink mb-3",children:"Termos de Uso"}),a.jsxs("p",{className:"text-muted-foreground mb-10",children:["Ãltima atualização: ",new Date().toLocaleDateString("pt-BR")]}),a.jsxs("nav",{"aria-label":"Ãndice",className:"mb-12 rounded-xl border border-border bg-surface/60 p-6",children:[a.jsx("p",{className:"text-sm font-semibold text-ink mb-3",children:"Nesta página"}),a.jsx("ol",{className:"grid sm:grid-cols-2 gap-x-6 gap-y-2 text-sm",children:OB.map((e,t)=>a.jsx("li",{children:a.jsxs("a",{href:`#${e.id}`,className:"text-ink-soft hover:text-primary transition-colors inline-flex items-baseline gap-2",children:[a.jsx("span",{className:"text-primary font-semibold tabular-nums",children:String(t+1).padStart(2,"0")}),e.label]})},e.id))})]}),a.jsxs("article",{className:"prose prose-lg max-w-none text-foreground space-y-10",children:[a.jsxs("section",{id:"aceitacao",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"1. Aceitação dos termos"}),a.jsx("p",{children:"Ao acessar e utilizar o site da RECORD CERTIFICAÃÃO NAVAL LTDA. (âRecordâ, ânósâ), VOCà concorda integralmente com estes Termos de Uso. Caso não concorde com qualquer disposição, recomendamos que não utilize o site."})]}),a.jsxs("section",{id:"servicos",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"2. Serviços oferecidos"}),a.jsx("p",{children:"A Record é uma entidade certificadora reconhecida pela Marinha do Brasil, atuando n
715a realização de vistorias e certificações navais conforme as Normas da Autoridade MarÃtima (NORMAM). Este site tem caráter informativo e institucional, apresentando nossos serviços, conteúdos técnicos e canais de contato."})]}),a.jsxs("section",{id:"responsabilidades",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"3. Responsabilidades do usuário"}),a.jsx("p",{children:"O usuário compromete-se a:"}),a.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[a.jsx("li",{children:"Fornecer informações verdadeiras nos formulários de contato e solicitação de orçamento;"}),a.jsx("li",{children:"Não utilizar o site para fins ilÃcitos ou que violem direitos de terceiros;"}),a.jsx("li",{children:"Não tentar acessar áreas restritas ou interferir no funcionamento do site;"}),a.jsx("li",{children:"Respeitar a propriedade intelectual dos conteúdos publicados."})]})]}),a.jsxs("section",{id:"propriedade",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"4. Propriedade intelectual"}),a.jsx("p",{children:"Todo o conteúdo deste site â incluindo textos, imagens, logotipos, marcas, layout e materiais técnicos â é de propriedade da Record Certificação Naval ou utilizado mediante autorização. à vedada a reprodução, distribuição ou utilização comercial sem prévia autorização por escrito."})]}),a.jsxs("section",{id:"limitacao",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"5. Limitação de responsabilidade"}),a.jsx("p",{children:"As informações disponibilizadas neste site têm caráter informativo e não substituem a contratação formal dos serviços de certificação. A Record envida seus melhores esforços para manter o conteúdo atualizado, mas não se responsabiliza por eventuais imprecisões, interrupções de acesso ou decisões tomadas exclusivamente com base no conteúdo aqui publicado."})]}),a.jsxs("section",{id:"privacidade",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"6. Privacidade"}),a.jsxs("p",{children:["O tratamento de dados pessoais coletados por meio deste site é regido pela nossa"," ",a.jsx(we,{to:"/politica-de-privacidade",className:"text-primary hover:underline",children:"PolÃtica de Privacidade"}),", em conformidade com a Lei Geral de Proteção de Dados (LGPD)."]})]}),a.jsxs("section",{id:"alteracoes",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"7. Alterações dos termos"}),a.jsx("p",{children:"A Record poderá atualizar estes Termos de Uso a qualquer momento, sem aviso prévio. A versão vigente estará sempre disponÃvel nesta página, identificada pela data da última atualização."})]}),a.jsxs("section",{id:"legislacao",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"8. Legislação aplicável"}),a.jsx("p",{children:"Estes Termos de Uso são regidos pela legislação brasileira. Fica eleito o foro da comarca da sede da Record Certificação Naval para dirimir quaisquer controvérsias, com renúncia a qualquer outro, por mais privilegiado que seja."})]}),a.jsxs("section",{id:"contato",className:"scroll-mt-28",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-ink mb-4",children:"9. Contato"}),a.jsxs("p",{children:["Em caso de dúvidas sobre estes Termos de Uso, entre em contato pelo nosso canal de"," ",a.jsx(we,{to:"/ouvidoria",className:"text-primary hover:underline",children:"Ouvidoria"})," ","ou pelos dados abaixo."]}),a.jsxs("div",{className:"mt-8 rounded-xl border border-border bg-surface/60 p-6 md:p-8",children:[a.jsxs("h3",{className:"font-display text-lg font-bold text-ink mb-5 flex items-center gap-2",children:[a.jsx(ya,{className:"h-5 w-5 text-primary"}),"Canais de contato"]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-6 text-sm",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1",children:"E-mail"}),a.jsx("p",{className:"text-ink font-medium",children:"[email protected]"})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1",children:"Endereço"}),a.jsx("p",{className:"text-ink font-medium",children:"Rua Prudente de Moraes, 1558 - Barra Bonita/SP"})]})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-5 pt-5 border-t border-border",children:"Este documento poderá ser revisado periodicamente. Recomendamos consultá-lo sempre que necessário."})]})]})]}),a.jsx("div",{className:"flex flex-col sm:flex-row gap-3 mt-12 pt-8 border-t border-border",children:a.jsx(V,{asChild:!0,variant:"outline",children:a.jsxs(we,{to:"/",className:"inline-flex items-center gap-2",children:[a.jsx(Ln,{className:"h-4 w-4"}),"Voltar para página inicial"]})})})]})}),a.jsx(pr,{})]}),IB=go.map(e=>({city:e.praca,state:e.estado,whatsapp:e.whatsapp})),$B=[{label:"Site oficial",to:"/",icon:XA,desc:"Vistorias e certificações n
715avais"},{label:"Conteúdo técnico",to:"/conteudo-tecnico",icon:ya,desc:"Artigos para armadores"},{label:"Escritórios",action:"offices",icon:Rg,desc:"Fale com a filial mais próxima"},{label:"Checklist gratuito de pré-vistoria",to:"/checklist-pre-vistoria",icon:Pg,desc:"PDF para baixar agora"}],DB=[{label:"Instagram",href:"https://www.instagram.com/certificadorarecord/",icon:vk},{label:"LinkedIn",href:"https://www.linkedin.com/company/recordnaval/",icon:bk},{label:"YouTube",href:"https://www.youtube.com/@recordcertificacaonaval9853",icon:Nk},{label:"Facebook",href:"https://www.facebook.com/certificadorarecord",icon:pk}];function E0(){const[e,t]=m.useState(!1),{openWhatsApp:r}=Ea(),[n]=wg(),s=n.get("destaque")??void 0,{data:o}=Gl(),{data:i}=A2(s),l=(s?i:null)??(o==null?void 0:o[0])??null,c=l?`/conteudo-tecnico/${l.category_slug}/${l.slug}`:"";return m.useEffect(()=>{document.title="Record Certificação Naval â Links oficiais";const d=document.querySelector('meta[name="description"]');d&&d.setAttribute("content","Fale com qualquer um dos 10 escritórios da Record, acesse nosso site, conteúdo técnico e redes sociais.")},[]),a.jsx("main",{className:"min-h-screen bg-gradient-to-b from-surface-soft via-background to-surface-soft py-10 px-4",children:a.jsxs("div",{className:"mx-auto w-full max-w-md",children:[a.jsxs("header",{className:"text-center mb-8",children:[a.jsx("div",{className:"mx-auto mb-5 inline-flex items-center justify-center h-24 w-24 rounded-2xl bg-background border-2 border-border shadow-[0_10px_30px_-12px_hsl(var(--ink)/0.25)] overflow-hidden",children:a.jsx("img",{src:Hl,alt:"Record Certificação Naval",className:"h-16 w-auto object-contain"})}),a.jsx("h1",{className:"font-display text-2xl font-extrabold text-ink leading-tight",children:"Record Certificação Naval"}),a.jsx("p",{className:"mt-2 text-sm text-muted-foreground px-2",children:"Vistorias, certificações e laudos navais com cobertura nacional. Escolha por onde quer falar com a gente."})]}),l&&a.jsxs(we,{to:c,onClick:()=>Hs(l.title,"destaque",c),className:"group block mb-8 rounded-2xl overflow-hidden bg-background border-2 border-primary/25 shadow-[0_16px_40px_-16px_hsl(var(--primary)/0.35)] hover:border-primary transition-all",children:[l.cover_url&&a.jsx("img",{src:l.cover_url,alt:l.cover_alt||l.title,loading:"lazy",className:"w-full h-40 object-cover"}),a.jsxs("div",{className:"p-5",children:[a.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-[0.18em] text-primary mb-2",children:[a.jsx(Su,{className:"h-3.5 w-3.5"}),"Em destaque"]}),a.jsx("h2",{className:"font-display text-lg font-extrabold text-ink leading-snug group-hover:text-primary transition-colors",children:l.title}),l.excerpt&&a.jsx("p",{className:"mt-1.5 text-sm text-muted-foreground leading-relaxed line-clamp-2",children:l.excerpt}),a.jsxs("span",{className:"mt-3 inline-flex items-center gap-1.5 text-sm font-display font-bold text-primary",children:["Ler artigo",a.jsx(bc,{className:"h-4 w-4"})]})]})]}),a.jsxs("button",{type:"button","aria-haspopup":"dialog",onClick:()=>{Hs("Falar com a Record no WhatsApp","whatsapp","seletor-praca"),r({source:"links-hub",origem:{tipo:"site"}})},className:"flex items-center justify-between gap-3 w-full px-5 py-4 rounded-2xl bg-primary text-primary-foreground font-display font-bold shadow-[0_10px_30px_-10px_hsl(var(--primary)/0.5)] hover:bg-primary-deep transition-all mb-3",children:[a.jsxs("span",{className:"flex items-center gap-3",children:[a.jsx(Dr,{className:"h-5 w-5"}),"Falar com a Record no WhatsApp"]}),a.jsx(bc,{className:"h-5 w-5 opacity-80"})]}),a.jsxs("a",{href:"mailto:[email protected]",onClick:()=>Hs("[email protected]","email","mailto:[email protected]"),className:"flex items-center justify-between gap-2 w-full px-4 py-4 rounded-2xl bg-background border-2 border-border text-ink font-display font-semibold hover:border-primary hover:bg-primary/5 transition-all mb-8",children:[a.jsxs("span",{className:"flex items-center gap-2 min-w-0 flex-1",children:[a.jsx(Lg,{className:"h-5 w-5 text-primary shrink-0"}),a.jsx("span",{className:"truncate text-sm sm:text-base",children:"[email protected]"})]}),a.jsx(bc,{className:"h-5 w-5 opacity-60 shrink-0"})]}),a.jsx(R0,{children:"Site e serviços"}),a.jsx("div",{className:"space-y-2 mb-8",children:$B.map(d=>{const u=a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"h-10 w-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center shrink-0",children:a.jsx(d.icon,{className:"h-5 w-5"})}),a.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[a.jsx("p",{className:"font-display font-bold text-ink text-sm leading-tight",children:d.label}),a.jsx("p",{className:"text-xs text-muted-foreground truncate",children:d.desc})]}
715),d.action==="offices"?a.jsx(Bl,{className:`h-4 w-4 text-muted-foreground shrink-0 transition-transform ${e?"rotate-180":""}`}):a.jsx(bc,{className:"h-4 w-4 text-muted-foreground shrink-0"})]});return d.action==="offices"?a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>{Hs(d.label,"interno","#escritorios"),t(h=>!h)},"aria-expanded":e,className:"flex items-center gap-4 w-full px-4 py-3 rounded-xl bg-background border border-border hover:border-primary hover:bg-primary/5 transition-all",children:u}),e&&a.jsx("div",{className:"mt-2 space-y-2 pl-3 border-l-2 border-primary/20",children:IB.map(h=>a.jsxs("a",{href:`https://wa.me/${h.whatsapp}?text=${encodeURIComponent(`Olá! Vim pelo link da Record e quero falar com o escritório de ${h.city}.`)}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>Hs(h.city,"whatsapp",`https://wa.me/${h.whatsapp}`),className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg bg-background border border-border hover:border-primary hover:bg-primary/5 transition-all",children:[a.jsx("div",{className:"h-8 w-8 rounded-md bg-primary/10 text-primary flex items-center justify-center shrink-0",children:a.jsx(Jo,{className:"h-4 w-4"})}),a.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[a.jsx("p",{className:"font-display font-bold text-ink text-sm leading-tight",children:h.city}),a.jsx("p",{className:"text-[11px] text-muted-foreground uppercase tracking-wider",children:h.state})]}),a.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-semibold text-primary shrink-0",children:[a.jsx(Dr,{className:"h-4 w-4"}),"WhatsApp"]})]},h.city))})]},d.label):a.jsx(we,{to:d.to,onClick:()=>Hs(d.label,"interno",d.to),className:"flex items-center gap-4 w-full px-4 py-3 rounded-xl bg-background border border-border hover:border-primary hover:bg-primary/5 transition-all",children:u},d.to)})}),a.jsx(R0,{children:"Redes sociais"}),a.jsx("div",{className:"grid grid-cols-4 gap-2 mb-10",children:DB.map(d=>a.jsxs("a",{href:d.href,target:"_blank",rel:"noopener noreferrer","aria-label":d.label,onClick:()=>Hs(d.label,"externo",d.href),className:"flex flex-col items-center justify-center gap-1 py-4 rounded-xl bg-background border border-border hover:border-primary hover:bg-primary/5 transition-all",children:[a.jsx(d.icon,{className:"h-5 w-5 text-primary"}),a.jsx("span",{className:"text-[11px] font-semibold text-ink",children:d.label})]},d.label))}),a.jsxs("footer",{className:"text-center text-[11px] text-muted-foreground pb-6",children:["© ",new Date().getFullYear()," Record Certificação Naval · Todos os direitos reservados"]})]})})}function R0({children:e}){return a.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[a.jsx("span",{className:"h-px flex-1 bg-border"}),a.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-muted-foreground",children:e}),a.jsx("span",{className:"h-px flex-1 bg-border"})]})}const MB={Administrativo:"from-primary/80 to-primary-deep",Manaus:"from-emerald-600 to-emerald-800",Belém:"from-amber-600 to-amber-800",Santarém:"from-cyan-600 to-cyan-800","São Paulo":"from-slate-700 to-slate-900","Porto Velho":"from-orange-600 to-orange-800"};function zB(e){return MB[e]??"from-primary/70 to-primary-deep"}const FB=()=>{const[e,t]=m.useState(null),[r,n]=m.useState(null),[s,o]=m.useState(!0);m.useEffect(()=>{let l=!0;return(async()=>{try{const{data:c,error:d}=await Le.functions.invoke("fetch-equipe");if(!l)return;d?n("Não foi possÃvel carregar a equipe agora."):t(c)}catch{l&&n("Não foi possÃvel carregar a equipe agora.")}finally{l&&o(!1)}})(),()=>{l=!1}},[]);const i=m.useMemo(()=>{if(!(e!=null&&e.equipe))return[];const l=new Map;for(const c of e.equipe){const d=c.escritorio||"Outros";l.has(d)||l.set(d,[]),l.get(d).push(c)}return Array.from(l.entries()).map(([c,d])=>({escritorio:c,membros:d})).sort((c,d)=>c.escritorio.localeCompare(d.escritorio,"pt-BR"))},[e]);return a.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[a.jsx(Mt,{title:"Nosso time | Record Certificação Naval",description:"Conheça a equipe da Record Certificação Naval â vistoriadores, lÃderes e especialistas que atuam em todo o Brasil garantindo conformidade e segurança na navegação.",canonical:Dt("/time")}),a.jsx(As,{}),a.jsx("main",{className:"flex-1 pt-32 pb-20",children:a.jsxs("div",{className:"container-record",children:[a.jsxs("header",{className:"max-w-3xl mb-12",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-xs font-semibold uppercase tracking-wider text-primary mb-4",children:[a.jsx(Cu,{className:"h-3.5 w-3.5"}),"Nosso time"]}),a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-ink leading-tight",children:"As pessoas por trás da certificação naval da Record."}),a.jsx("p",{className:"mt-4 text-lg text-ink-soft",children:"Vistoriadores, lÃderes de unidade e especialistas distribuÃdos por todo o Brasil â trabalhando para manter sua embarcação regular, segura e produtiva."})]}),s&&a.jsxs("div",{className:"flex items-center gap-3 text-ink-soft py-16",children:[a.jsx(_t,{className:"h-5 w-5 animate-spin"}),"Carregando equipeâ¦"]}),r&&!s&&a.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive",children:[a.jsx(qA,{className:"h-5 w-5 shrink-0 mt-0.5"}),a.jsx("p",{children:r})]}),!s&&!r&&e&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-sm text-ink-soft mb-8",children:[a.jsx("strong",{className:"text-ink",children:e.total})," ","colaboradores em ",a.jsx("strong",{className:"text-ink",children:i.length})," ","unidades."]}),a.jsx("div",{className:"space-y-14",children:i.map(({escritorio:l,membros:c})=>a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-3 mb-6 pb-3 border-b border-border",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 text-primary",children:a.jsx(Rg,{className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-xl font-bold text-ink",children:l}),a.jsxs("p",{className:"text-xs text-ink-soft",children:[c.length," ",c.length===1?"colaborador":"colaboradores"]})]})]}),a.jsx("ul",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:c.map(d=>
715a.jsxs("li",{className:"group flex items-center gap-4 rounded-xl border border-border bg-card p-4 transition-all hover:border-primary/40 hover:shadow-md",children:[a.jsx("div",{className:`flex h-14 w-14 shrink-0 items-center justify-center rounded-full bg-gradient-to-br ${zB(l)} text-white font-bold text-lg shadow-sm`,"aria-hidden":!0,children:d.iniciais}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"font-semibold text-ink leading-tight truncate",children:d.nome_completo}),a.jsx("p",{className:"text-sm text-ink-soft leading-tight mt-0.5",children:d.funcao})]})]},`${l}-${d.nome_completo}`))})]},l))}),a.jsxs("p",{className:"mt-16 text-xs text-ink-soft/70",children:["Atualizado em"," ",new Date(e.atualizado_em).toLocaleString("pt-BR",{dateStyle:"short",timeStyle:"short"})]})]})]})}),a.jsx(pr,{})]})},UB="https://app.certificadorarecord.com.br/index_autenticidade_manual",yf="https://app.certificadorarecord.com.br",P0=150,BB=2400,WS=e=>{if(typeof e=="string")try{return WS(JSON.parse(e))}catch{return null}if(!e||typeof e!="object")return null;const t=e;if(!new Set(["record:height","record:iframe-height","record:document-height","record:content-height"]).has(t.type))return null;const n=t.height??t.value,s=typeof n=="string"?Number(n):n;return typeof s=="number"&&Number.isFinite(s)?s:null},qB=()=>{const e=m.useRef(null),[t,r]=m.useState(P0);return m.useEffect(()=>{document.title="Verificação de documentos â Record Certificação Naval";const n=document.querySelector('meta[name="description"]'),s="Verifique a autenticidade de documentos emitidos pela Record Certificação Naval: TIE, TIEM, Certificado de Segurança da Navegação, RAP, REL e outros.";if(n)n.setAttribute("content",s);else{const o=document.createElement("meta");o.name="description",o.content=s,document.head.appendChild(o)}},[]),m.useEffect(()=>{const n=o=>{r(i=>{const l=Math.min(BB,Math.max(P0,Math.ceil(o)));return Math.abs(i-l)>2?l:i})},s=o=>{if(o.origin!==yf)return;const i=WS(o.data);i&&n(i)};return window.addEventListener("message",s),()=>window.removeEventListener("message",s)},[]),m.useEffect(()=>{const n=()=>{var i,l;(l=(i=e.current)==null?void 0:i.contentWindow)==null||l.postMessage({type:"record:request-height"},yf)},s=[300,1200,2500].map(i=>window.setTimeout(n,i)),o=window.setInterval(()=>{document.hidden||n()},1e3);return window.addEventListener("resize",n),()=>{s.forEach(window.clearTimeout),window.clearInterval(o),window.removeEventListener("resize",n)}},[]),a.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[a.jsx(As,{}),a.jsx("main",{className:"flex-1 pt-28 pb-16",children:a.jsxs("div",{className:"container-record",children:[a.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-10",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-primary/10 text-primary text-xs font-semibold uppercase tracking-wider mb-4",children:[a.jsx($t,{className:"h-4 w-4"}),"Verificação oficial"]}),a.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-ink mb-3",children:"Autenticidade de documentos"}),a.jsx("p",{className:"text-ink-soft text-base md:text-lg",children:"Consulte a validade de documentos emitidos pela Record informando o número, o tipo e a data de emissão."})]}),a.jsx("div",{className:"max-w-3xl mx-auto rounded-2xl border border-border bg-card shadow-card overflow-hidden",children:a.jsx("iframe",{ref:e,src:UB,title:"Verificação de autenticidade de documentos Record",className:"w-full block bg-white",style:{height:`${t}px`,border:0},loading:"lazy",onLoad:()=>{var n,s;(s=(n=e.current)==null?void 0:n.contentWindow)==null||s.postMessage({type:"record:request-height"},yf)},referrerPolicy:"no-referrer-when-downgrade"})}),a.jsxs("p",{className:"max-w-3xl mx-auto text-center text-sm text-muted-foreground mt-6",children:["Problemas para verificar? Fale com a gente pelo"," ",a.jsx("a",{href:"/ouvidoria",className:"text-primary font-semibold hover:underline",children:"canal de ouvidoria"}),"."]})]})}),a.jsx(pr,{})]})},VB=()=>{var p;const[e]=wg(),t=e.get("authorization_id")??"",[r,n]=m.useState(null),[s,o]=m.useState(null),[i,l]=m.useState(!1),[c,d]=m.useState(null);m.useEffect(()=>{let f=!0;return(async()=>
715{if(!t){o("Parâmetro authorization_id ausente.");return}const{data:y}=await Le.auth.getSession();if(!y.session){const b=window.location.pathname+window.location.search;window.location.href="/admin/login?next="+encodeURIComponent(b);return}d(y.session.user.email??null);const g=Le.auth.oauth,{data:w,error:v}=await g.getAuthorizationDetails(t);if(!f)return;if(v){o(v.message??"Não foi possÃvel carregar o pedido de autorização.");return}const x=(w==null?void 0:w.redirect_url)??(w==null?void 0:w.redirect_to);if(x&&!(w!=null&&w.client)){window.location.href=x;return}n(w)})(),()=>{f=!1}},[t]);async function u(f){l(!0);const y=Le.auth.oauth,{data:g,error:w}=f?await y.approveAuthorization(t):await y.denyAuthorization(t);if(w){l(!1),o(w.message??"Falha ao processar a autorização.");return}const v=(g==null?void 0:g.redirect_url)??(g==null?void 0:g.redirect_to);if(!v){l(!1),o("O servidor de autorização não retornou URL de redirecionamento.");return}window.location.href=v}if(s)return a.jsx("main",{className:"min-h-screen flex items-center justify-center p-6 bg-background",children:a.jsxs("div",{className:"max-w-md w-full bg-card border border-border rounded-2xl p-8 shadow-card",children:[a.jsx("h1",{className:"font-display text-xl font-bold text-ink mb-2",children:"Autorização indisponÃvel"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:s})]})});if(!r)return a.jsx("main",{className:"min-h-screen flex items-center justify-center p-6 bg-background",children:a.jsx(_t,{className:"h-6 w-6 animate-spin text-muted-foreground"})});const h=((p=r.client)==null?void 0:p.name)??"Aplicativo externo";return a.jsx("main",{className:"min-h-screen flex items-center justify-center p-6 bg-background",children:a.jsxs("div",{className:"max-w-md w-full bg-card border border-border rounded-2xl p-8 shadow-card",children:[a.jsxs("h1",{className:"font-display text-2xl font-bold text-ink mb-2",children:["Conectar ",h," à Certificadora Record"]}),c&&a.jsxs("p",{className:"text-xs text-muted-foreground mb-4",children:["Autenticado como ",c]}),a.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Isso permite que ",h," use as ferramentas habilitadas deste site enquanto você estiver conectado. Os controles de acesso e as polÃticas de dados continuam sendo aplicados normalmente."]}),a.jsxs("ul",{className:"text-sm text-ink space-y-1 mb-6 list-disc pl-5",children:[a.jsx("li",{children:"Compartilhar seu perfil básico e email"}),a.jsx("li",{children:"Executar as ferramentas MCP habilitadas em seu nome"})]}),a.jsxs("div",{className:"flex gap-3",children:[a.jsx(V,{onClick:()=>u(!0),disabled:i,className:"flex-1",children:i?a.jsx(_t,{className:"h-4 w-4 animate-spin"}):"Aprovar"}),a.jsx(V,{onClick:()=>u(!1),disabled:i,variant:"outline",className:"flex-1",children:"Cancelar conexão"})]})]})})},HB=()=>{const[e,t]=m.useState(void 0);return m.useEffect(()=>{t(n2())},[]),a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(Mt,{title:"Fale com a Record â escolha sua praça",description:"Fale por WhatsApp com a unidade Record mais próxima da sua operação: Norte, Nordeste, Sudeste e Sul. Atendimento técnico em vistorias e certificação naval.",canonical:Dt("/fale-conosco")}),a.jsx(As,{}),a.jsx("main",{className:"container-record py-24 md:py-28",children:a.jsxs("div",{className:"max-w-2xl",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-border bg-surface px-3 py-1 text-xs font-medium text-ink-soft mb-6",children:[a.jsx(Dr,{className:"h-3.5 w-3.5 text-primary"}),"Atendimento por WhatsApp"]}),a.jsx("h1",{className:"font-display text-3xl md:text-4xl font-extrabold text-ink leading-tight mb-3",children:"Onde sua embarcação opera?"}),a.jsx("p",{className:"text-muted-foreground mb-8",children:"Escolha a praça para falar direto com a unidade Record mais próxima, que conhece a sua região e a autoridade marÃtima local."}),e&&a.jsxs("div",{className:"mb-6 flex flex-wrap items-center gap-3 rounded-xl border border-border bg-surface px-4 py-3 text-sm",children:[a.jsxs("span",{className:"text-ink",children:["Sua praça salva: ",a.jsxs("strong",{children:[e.praca," (",e.estado,")"]})]}),a.jsxs("button",{type:"button",onClick:()=>{c6(),t(void 0)},className:"inline-flex items-center gap-1.5 font-semibold text-primary hover:underline",children:[a.jsx(f5,{className:"h-3.5 w-3.5"}),"Trocar praça"]})]}),a.jsx(s2,{origem:{tipo:"site"},source:"fale-conosco"})]})}),a.jsx(pr,{})]})};let Fc=null;function WB(){var e;return typeof window>"u"?Promise.reject(new Error("sem window")):(e=window.YT)!=null&&e.Player?Promise.resolve(window.YT):Fc||(Fc=new Promise((t,r)=>{const n=window.onYouTubeIframeAPIReady,s=window.setTimeout(()=>r(new Error("timeout")),8e3);window.onYouTubeIframeAPIReady=()=>{window.clearTimeout(s),n==null||n(),t(window.YT)};const o=document.createElement("script");o.src="https://www.youtube.com/iframe_api",o.async=!0,o.onerror=()=>{window.clearTimeout(s),r(new Error("falha ao carregar o player"))},document.head.appendChild(o)}),Fc)}const KB=({videoId:e,title:t,transcript:r,poster:n,label:s})=>{const[o,i]=m.useState(!1),[l,c]=m.useState(!1),[d,u]=m.useState(!1),h=m.useRef(null),p=m.useRef(null),f=m.useRef(null),y=m.useRef(new Set),g=`https://www.youtube.com/watch?v=${e}`,w=n??`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`,v=m.useCallback(j=>{y.current.has(j)||(y.current.add(j),rD(j,{video_id:e,video_title:t}))},[e,t]),x=()=>{f.current&&(window.clearInterval(f.current),f.current=null)};m.useEffect(()=>()=>x(),[]);const b=async()=>{i(!0);try{const j=await WB();if(!h.current)return;
715p.current=new j.Player(h.current,{videoId:e,playerVars:{autoplay:1,rel:0,modestbranding:1,playsinline:1},events:{onReady:k=>k.target.playVideo(),onError:()=>c(!0),onStateChange:k=>{k.data===j.PlayerState.PLAYING&&(v(0),x(),f.current=window.setInterval(()=>{const _=p.current;if(!(_!=null&&_.getDuration))return;const N=_.getDuration();if(!N)return;const C=_.getCurrentTime()/N*100;[25,50,75].forEach(R=>C>=R&&v(R))},1e3)),k.data===j.PlayerState.ENDED&&([25,50,75].forEach(v),v(100),x()),k.data===j.PlayerState.PAUSED&&x()}}})}catch{c(!0)}};return a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"relative w-full overflow-hidden rounded-xl bg-muted shadow-lg aspect-video",children:o&&!l?a.jsx("div",{className:"absolute inset-0",children:a.jsx("div",{ref:h,className:"h-full w-full"})}):a.jsxs("a",{href:g,target:"_blank",rel:"noopener noreferrer",onClick:j=>{l||(j.preventDefault(),b())},className:"group absolute inset-0 block","aria-label":l?`Assistir no YouTube: ${t}`:`Reproduzir vÃdeo: ${t}`,children:[a.jsx("img",{src:w,alt:s??t,loading:"lazy",className:"h-full w-full object-cover",onError:j=>{j.currentTarget.src=`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}}
715),a.jsx("span",{className:"absolute inset-0 bg-foreground/25 transition-colors group-hover:bg-foreground/35"}),a.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:a.jsx("span",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-xl transition-transform group-hover:scale-110",children:a.jsx(h5,{className:"ml-1 h-7 w-7 fill-current"})})}),l&&a.jsx("span",{className:"absolute bottom-0 left-0 right-0 bg-background/90 p-2 text-center text-sm",children:"Não foi possÃvel carregar o player. Toque para assistir no YouTube."})]})}),r&&a.jsxs("div",{className:"mt-3",children:[a.jsxs("button",{type:"button",onClick:()=>u(j=>!j),className:"flex items-center gap-1 text-sm font-medium text-muted-foreground hover:text-foreground","aria-expanded":d,children:[a.jsx(Bl,{className:`h-4 w-4 transition-transform ${d?"rotate-180":""}`}),d?"Ocultar transcrição":"Ler a transcrição"]}),d&&a.jsx("div",{className:"mt-2 whitespace-pre-line rounded-lg border border-border bg-card p-4 text-sm leading-relaxed text-muted-foreground",children:r})]})]})},GB=o2.url,ZB="5T-CWOvQwb8",JB=[{valor:"20 anos",label:"de mercado",icon:lk},{valor:"8.431",label:"vistorias nos últimos 12 meses",icon:Pg},{valor:"1.806",label:"embarcações vistoriadas no perÃodo",icon:Ca},{valor:"223",label:"cidades atendidas",icon:Jo,destaque:!0},{valor:"10",label:"unidades próprias",icon:Eg}],QB=[{q:"Vocês atendem na cidade onde eu opero?",a:"Nos últimos 12 meses atendemos 223 cidades, a partir de 10 unidades próprias no Norte, Nordeste, Sudeste e Sul. Diga no formulário onde a frota opera e respondemos com o prazo de deslocamento da unidade mais próxima."},{q:"O diagnóstico tem custo?",a:"Não. O levantamento dos vencimentos e das pendências da sua frota é gratuito e sem compromisso. Você recebe o panorama mesmo que decida não contratar."},{q:"Preciso parar a embarcação para isso?",a:"Não. O diagnóstico é documental: analisamos os certificados e prazos da frota. Só depois combinamos a vistoria, e ela é agendada para a janela que menos atrapalha a operação."},{q:"Já tenho quem cuide disso hoje.",a:"Ãtimo. Use o diagnóstico como segunda opinião: em quase toda frota que analisamos aparecem vencimentos fora do radar. Se estiver tudo em dia, você recebe a confirmação por escrito."},{q:"Minha frota é pequena, vale a pena?",a:"Sim. Atendemos desde uma embarcação até frotas com dezenas. Quanto menor a operação, mais pesa uma embarcação parada por documento vencido."},{q:"O que acontece depois que eu envio?",a:"Um especialista da Record entra em contato pelo WhatsApp ou e-mail informado, confirma alguns dados e devolve o panorama de vencimentos. Uma embarcação sai no mesmo dia; frota inteira, até uma semana."}],YB={nome:"",empresa:"",whatsapp:"",email:"",embarcacoes:"",cidade:"",estado:""},XB=["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO"],T0=()=>{var e;(e=document.getElementById("formulario"))==null||e.scrollIntoView({behavior:"smooth",block:"start"})},eq=()=>{const{openWhatsApp:e}=Ea(),[t,r]=m.useState(YB),[n,s]=m.useState(!1),[o,i]=m.useState(null),[l,c]=m.useState(!1),d=m.useRef(null),u=m.useMemo(()=>{if(typeof window>"u")return{};const f=new URLSearchParams(window.location.search);return{landing_url:window.location.href,campanha_origem:f.get("utm_source"),campanha_midia:f.get("utm_medium"),campanha_nome:f.get("utm_campaign"),campanha_termo:f.get("utm_term"),campanha_conteudo:f.get("utm_content"),fbclid:f.get("fbclid")}},[]);m.useEffect(()=>{var f;l&&((f=d.current)==null||f.scrollIntoView({behavior:"smooth",block:"center"}))},[l]);const h=f=>y=>r(g=>({...g,[f]:y})),p=async f=>{f.preventDefault(),i(null),s(!0);const y=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`lead-${Date.now()}-${Math.random().toString(36).slice(2)}`,g={...t,...u,event_id:y,user_agent:navigator.userAgent},{error:w}=await Le.from("leads_diagnostico").insert(g);if(w){console.error("[diagnostico] falha ao gravar lead:",w),i("Não conseguimos enviar agora. Tente novamente ou fale pelo WhatsApp."),s(!1);return}Le.functions.invoke("notificar-lead-diagnostico",{body:g}).catch(v=>console.error("[diagnostico] aviso ao comercial falhou:",v)),nD({eventId:y,email:t.email,phone:t.whatsapp,params:{embarcacoes:t.embarcacoes,cidade_lead:t.cidade,uf_lead:t.estado}}),s(!1),c(!0)};return a.jsxs("div",{className:"min-h-screen bg-background text-ink",children:[a.jsx(Mt,{title:"Diagnóstico gratuito da frota | Record",description:"Descubra quais certificados da sua frota estão vencidos ou por vencer. Diagnóstico gratuito com a Record: 20 anos e 223 cidades atendidas.",canonical:Dt("/diagnostico-de-frota"),noindex:!0}),a.jsxs("main",{children:[a.jsxs("section",{className:"relative overflow-hidden bg-ink px-5 pb-12 text-primary-foreground",children:[a.jsxs("div",{className:"absolute inset-0",children:[a.jsx("img",{src:GB,alt:"Embarcação navegando ao amanhecer",width:1920,height:1280,fetchPriority:"high",decoding:"async",className:"h-full w-full object-cover opacity-30"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-ink via-ink/90 to-ink/55"}),a.jsx("div",{className:"grid-tech absolute inset-0 opacity-40"})]}),a.jsxs("div",{className:"relative z-10 mx-auto max-w-3xl text-center",children:[a.jsx("header",{className:"flex items-center justify-center py-4",children:a.jsx("img",{src:Hl,alt:"Certificadora Record",width:255,height:200,className:"h-12 w-auto"})}),a.jsxs("div",{className:"pt-5",children:[a.jsx("p",{className:"mb-4 text-xs font-semibold uppercase tracking-[0.18em] text-accent",children:"Diagnóstico gratuito de frota"}),a.jsx("h1",{className:"font-display text-3xl font-extrabold leading-tight sm:text-5xl",children:"Mande a foto do certificado. A Record lê o verso e diz onde sua frota está."}),a.jsx("p",{className:"mx-auto mt-4 max-w-2xl text-lg leading-relaxed text-primary-foreground
715/85 sm:text-xl",children:"A gente lê as convalidações e mostra o ponto exato do ciclo â com pendência ou tudo em dia â e se a próxima vistoria exige docagem."}),a.jsx("div",{className:"mt-6 overflow-hidden rounded-xl border border-primary-foreground/15 shadow-elevated",children:a.jsx(KB,{videoId:ZB,title:"Diagnóstico de frota â Certificadora Record",label:"VÃdeo: como funciona o diagnóstico de frota da Record"})}),a.jsxs(V,{size:"lg",className:"mt-6 h-auto min-h-14 w-full flex-col gap-1 px-5 py-3 shadow-red sm:w-auto sm:flex-row sm:gap-3 sm:px-6",onClick:T0,children:[a.jsx("span",{className:"border-b border-primary-foreground/30 pb-1 font-display text-xs font-extrabold sm:border-b-0 sm:border-r sm:pb-0 sm:pr-3 sm:text-sm",children:"RECORD"}),a.jsx("span",{className:"whitespace-normal text-sm sm:text-base",children:"Quero o diagnóstico da minha frota"})]})]})]})]}),a.jsx("section",{className:"px-5 py-14",children:a.jsxs("div",{className:"mx-auto max-w-3xl",children:[a.jsx("h2",{className:"font-display text-2xl font-bold sm:text-3xl",children:"O problema não é a vistoria. à o dia em que ela deixou de valer."}),a.jsxs("div",{className:"mt-4 space-y-5 text-lg leading-relaxed text-ink-soft",children:[a.jsx("p",{children:"O certificado vence numa data que ninguém anotou. A embarcação segue operando até o dia em que a fiscalização sobe a bordo, o afretador pede o documento ou o seguro é acionado. Aà a conta chega inteira e de uma vez."}),a.jsx("p",{children:"Embarcação parada não cobra frete, mas continua pagando tripulação, arrendamento e compromisso com o cliente. E vistoria feita à s pressas custa mais caro que vistoria planejada â quando é possÃvel conseguir alguém na sua praça no mesmo dia."}),a.jsx("p",{className:"font-medium text-foreground",children:"Na prática, quase toda frota que analisamos tem pelo menos um documento fora do radar do armador."})]})]})}),a.jsx("section",{className:"bg-surface-soft px-5 py-14",children:a.jsxs("div",{className:"mx-auto max-w-3xl",children:[a.jsx("h2",{className:"font-display text-2xl font-bold sm:text-3xl",children:"O que a Record faz diferente"}),a.jsx("ul",{className:"mt-6 space-y-4",children:[{t:"Calendário no lugar de emergência",d:"Controlamos os vencimentos da sua frota e avisamos antes, com folga para agendar a vistoria na janela que você escolher."},{t:"Estrutura própria onde você opera",d:"Dez unidades e vistoriadores nossos. Não terceirizamos para um autônomo desconhecido na sua praça."},{t:"Reconhecimento para atuar em nome da Marinha",d:"Somos entidade reconhecida pela Marinha do Brasil e certificados ISO 9001. O documento emitido não é questionado."},{t:"Um interlocutor só para a frota inteira",d:"Uma pessoa responde por todas as suas embarcações, em todas as praças, com o histórico na mão."}].map(f=>a.jsxs("li",{className:"flex gap-3",children:[a.jsx(Ze,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-foreground",children:f.t}),a.jsx("p",{className:"text-lg leading-relaxed text-ink-soft",children:f.d})]})]},f.t))})]})}),a.jsx("section",{className:"px-5 py-14",children:a.jsxs("div",{className:"mx-auto max-w-5xl",children:[a.jsx("h2",{className:"font-display text-2xl font-bold sm:text-3xl",children:"Números apurados no ERP"}),a.jsx("p",{className:"mt-2 text-lg text-ink-soft",children:"Dados de operação da Record nos últimos 12 meses."}),a.jsx("div",{className:"mt-6 grid grid-cols-2 gap-3 sm:grid-cols-3",children:JB.map(f=>a.jsxs("div",{className:`rounded-xl border p-4 ${f.destaque?"col-span-2 border-primary bg-primary/5 sm:col-span-1":"border-border bg-card"}`,children:[a.jsx(f.icon,{className:"h-5 w-5 text-primary"}),a.jsx("p",{className:"mt-2 font-display text-2xl font-bold text-foreground",children:f.valor}),a.jsx("p",{className:"text-base text-ink-soft",children:f.label})]},f.label))}),a.jsx("div",{className:"mt-14 border-t border-border pt-12",children:a.jsx(R2,{})}),a.jsxs("div",{className:"mt-14 grid items-center gap-8 border-t border-border pt-12 lg:grid-cols-[minmax(0,0.8fr)_minmax(320px,1fr)]",children:[a.jsxs("div",{children:[a.jsx("div",{className:"eyebrow mb-4",children:"Cobertura operacional"}),a.jsx("h3",{className:"font-display text-2xl font-bold sm:text-3xl",children:"Onde a operação exigir, a Record está."}),a.jsx("p",{className:"mt-4 text-lg leading-relaxed text-ink-soft",children:"223 cidades no Brasil, e onde mais a operação exigir. No último ano fizemos vistoria também no Paraguai, na Argentina e no Uruguai."})]}),a.jsx(T2,{})]})]})}),a.jsx("section",{className:"bg-surface-soft px-5 py-14",children:a.jsxs("div",{className:"mx-auto max-w-3xl",children:[a.jsx("h2",{className:"font-display text-2xl font-bold sm:text-3xl",children:"Como funciona o diagnóstico"}),a.jsx("p",{className:"mt-3 text-lg leading-relaxed text-ink-soft",children:"Gratuito, sem c
715ondição. O insumo é uma foto: você manda a lista de embarcações e a foto do certificado, frente e verso. Sem planilha, sem levantar documento."}),a.jsx("ol",{className:"mt-6 space-y-5",children:[{t:"Você manda a foto",d:"Lista de embarcações e foto do certificado, frente e verso, pelo WhatsApp ou e-mail que você informar."},{t:"A Record lê o verso e cruza a frota",d:"Convalidações, vencimentos e ciclos de docagem, olhando a frota inteira de uma vez."},{t:"Você recebe o panorama e decide",d:"Para cada embarcação, o que está irregular e o que vence. Sem compromisso de contratar."}].map((f,y)=>a.jsxs("li",{className:"flex gap-4",children:[a.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary font-display font-bold text-primary-foreground",children:y+1}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-foreground",children:f.t}),a.jsx("p",{className:"text-lg leading-relaxed text-ink-soft",children:f.d})]})]},f.t))}),a.jsxs("div",{className:"mt-6 rounded-xl border border-border bg-card p-5",children:[a.jsx("p",{className:"font-semibold text-foreground",children:"Velocidade da resposta"}),a.jsx("p",{className:"mt-1 text-lg text-ink-soft",children:"Uma embarcação: resposta na hora. Frota inteira: até uma semana."})]}),a.jsx("p",{className:"mt-6 font-semibold text-foreground",children:"Para cada embarcação, você recebe:"}),a.jsx("ul",{className:"mt-3 space-y-2",children:["o que está irregular hoje","o que vence nos próximos 12 meses","quais desses vencimentos exigem tirar a embarcação da água","onde duas ou mais embarcações precisam de estaleiro no mesmo mês","se alguma docagem cai na época em que o rio impede a operação"].map(f=>a.jsxs("li",{className:"flex gap-3",children:[a.jsx(Ze,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary"}),a.jsx("span",{className:"text-lg text-ink-soft",children:f})]},f))}),a.jsx("p",{className:"mt-4 text-base leading-relaxed text-ink-soft",children:"Os três últimos você não consegue calcular sozinho: exigem olhar a frota inteira de uma vez. à isso que o diagnóstico entrega."})]})}),a.jsx("section",{id:"formulario",className:"scroll-mt-4 bg-background px-5 py-14",children:a.jsxs("div",{className:"mx-auto max-w-xl",children:[l?a.jsxs("div",{ref:d,className:"rounded-2xl border border-primary/40 bg-primary/5 p-8 text-center",children:[a.jsx($t,{className:"mx-auto h-12 w-12 text-primary"}),a.jsx("h2",{className:"mt-4 font-display text-2xl font-bold",children:"Pedido recebido"}),a.jsx("p",{className:"mt-3 text-muted-foreground",children:"Um especialista da Record entra em contato pelo WhatsApp ou e-mail que você informou. Se você mandou uma embarcação, a resposta sai no mesmo dia. Frota inteira leva até uma semana."}),a.jsx("p",{className:"mt-3 text-muted-foreground",children:"Se preferir adiantar, chame no WhatsApp."}),a.jsxs(V,{variant:"outline",className:"mt-5",onClick:()=>e({source:"lp-diagnostico-obrigado",origem:{tipo:"diagnostico"}}),children:[a.jsx(Dr,{className:"mr-2 h-4 w-4"}),"Falar no WhatsApp"]})]}):a.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 shadow-sm sm:p-8",children:[a.jsx("h2",{className:"font-display text-2xl font-bold sm:text-3xl",children:"Peça o diagnóstico gratuito"}),a.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Seis campos. Uma embarcação, resposta na hora."}),a.jsxs("form",{onSubmit:p,className:"mt-6 space-y-4",children:[a.jsxs("div",{children:[a.jsx(X,{htmlFor:"nome",children:"Nome"}),a.jsx(ae,{id:"nome",required:!0,autoComplete:"name",value:t.nome,onChange:f=>h("nome")(f.target.value)})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"empresa",children:"Empresa"}),a.jsx(ae,{id:"empresa",required:!0,autoComplete:"organization",value:t.empresa,onChange:f=>h("empresa")(f.target.value)})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"whatsapp",children:"WhatsApp"}),a.jsx(ae,{id:"whatsapp",required:!0,type:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"(00) 00000-0000",value:t.whatsapp,onChange:f=>h("whatsapp")(f.target.value)})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"email",children:"E-mail"}),a.jsx(ae,{id:"email",required:!0,type:"email",inputMode:"email",autoComplete:"email",value:t.email,onChange:f=>h("email")(f.target.value)})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"embarcacoes",children:"Quantas embarcações"}),a.jsxs(Rr,{value:t.embarcacoes,onValueChange:h("embarcacoes"),required:!0,children:[a.jsx(sr,{id:"embarcacoes",children:a.jsx(Pr,{placeholder:"Selecione"})}),a.jsx(ar,{children:["1","2 a 5","6 a 15","16 a 50","Mais de 50"].map(f=>a.jsx(je,{value:f,children:f},f))})]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[a.jsxs("div",{className:"col-span-2",children:[a.jsx(X,{htmlFor:"cidade",children:"Cidade"}),a.jsx(ae,{id:"cidade",required:!0,autoComplete:"address-level2",value:t.cidade,onChange:f=>h("cidade")(f.target.value)})]}),a.jsxs("div",{children:[a.jsx(X,{htmlFor:"estado",children:"Estado"}),a.jsxs(Rr,{value:t.estado,onValueChange:h("estado"),required:!0,children:[a.jsx(sr,{id:"estado",children:a.jsx(Pr,{placeholder:"UF"})}),a.jsx(ar,{className:"max-h-64",children:XB.map(f=>a.jsx(je,{value:f,children:f},f))})]})]})]}),o&&a.jsx("p",{className:"text-sm text-destructive",children:o}),a.jsx(V,{type:"submit",size:"lg",className:"w-full",disabled:n,children:n?"Enviando...":"Quero o diagnóstico da minha frota"}),a.jsx("p",{className:"text-center text-xs text-muted-foreground",children:"Seus dados são usados apenas para este contato."})]})]}),a.jsx("div",{className:"mt-6 text-center",children:a.jsx("button",{type:"button",onClick:()=>e({source:"lp-diagnostico-secundario",origem:{tipo:"diagnostico"}}),className:"text-sm font-medium text-muted-foreground underline underline-offset-4 hover:text-foreground",children:"Prefere não preencher? Fale direto no WhatsApp"})})]})}),a.jsx("section",{className:"bg-surface-soft px-5 py-14",children:a.jsxs("div",{className:"mx-auto max-w-3xl",children:[a.jsx("h2",{className:"font-display text-2xl font-bold sm:text-3xl",children:"Perguntas frequentes"}),a.jsx(Q2,{type:"single",collapsible:!0,className:"mt-4",children:QB.map(f=>a.jsxs(Sv,{value:f.q,children:[a.jsx(Cv,{className:"text-left",children:f.q}),a.jsx(Ev,{className:"text-base leading-relaxed text-ink-soft",children:f.a})]},f.q))})]})}),a.jsx("section",{className:"bg-background px-5 py-14",children:a.jsxs("div",{className:"mx-auto max-w-3xl text-center",children:[a.jsx("h2",{className:"font-display text-2xl font-bold sm:text-3xl",children:"Descubra hoje o que vence amanhã"}),a.jsx("p",{className:"mx-auto mt-3 max-w-xl text-lg text-ink-soft",children:"O diagnóstico é gratuito e não compromete nada. O documento vencido, sim."}),a.jsx(V,{size:"lg",className:"mt-6 w-full sm:w-auto",onClick:T0,children:"Quero o diagnóstico da minha frota"})]})})]}),a.jsx("footer",{className:"border-t border-border bg-secondary/40 px-5 py-8",children:a.jsxs("div",{className:"mx-auto max-w-3xl text-center text-sm text-muted-foreground",children:[a.jsx("p",{className:"font-medium text-foreground",children:"Certificadora Record"}),a.jsx("p",{className:"mt-1",children:"Unidades próprias no Norte, Nordeste, Sudeste e Sul do Brasil."}),a.jsxs("p",{className:"mt-3 text-xs leading-relaxed",children:["Record Certificação Naval Ltda. â CNPJ 07.774.554/0001-95",a.jsx("br",{}),"Rua Prudente de Moraes, nº 1558, Vila Nova, Barra Bonita - SP, CEP 17347-010"]}),a.jsx("p",{className:"mt-3",children:a.jsx("a",{href:"/politica-de-privacidade",className:"underline underline-offset-4 hover:text-foreground",children:"PolÃtica de privacidade"})})]})})]})},tq=new eP,rq=()=>a.jsx(tP,{client:tq,children:a.jsxs(IO,{children:[a.jsx(n3,{}),a.jsx(_4,{}),a.jsx(DT,{children:a.jsx(K$,{children:a.jsxs(d6,{children:[a.jsx(sD,{}),a.jsxs(hT,{children:[a.jsx(Ce,{path:"/",element:a.jsx(mz,{})}),a.jsx(Ce,{path:"/conteudo-tecnico",element:a.jsx(kz,{})}),a.jsx(Ce,{path:"/conteudo-tecnico/:categorySlug",element:a.jsx(_z,{})}),a.jsx(Ce,{path:"/conteudo-tecnico/:categorySlug/:slug",element:a.jsx(Kz,{})}),a.jsx(Ce,{path:"/checklist-pre-vistoria",element:a.jsx(mU,{})}),a.jsx(Ce,{path:"/politica-de-privacidade",element:a.jsx(RB,{})}),a.jsx(Ce,{path:"/politica-da-qualidade",element:a.jsx(TB,{})}),a.jsx(Ce,{path:"/ouvidoria",element:a.jsx(AB,{})}),a.jsx(Ce,{path:"/termos-de-uso",element:a.jsx(LB,{})}),a.jsx(Ce,{path:"/fale-conosco",element:a.jsx(HB,{})}),a.jsx(Ce,{path:"/diagnostico-de-frota",element:a.jsx(eq,{})}),a.jsx(Ce,{path:"/links",element:a.jsx(E0,{})}),a.jsx(Ce,{path:"/bio",element:a.jsx(E0,{})}),a.jsx(Ce,{path:"/time",element:a.jsx(FB,{})}),a.jsx(Ce,{path:"/autenticacao_certificados",element:a.jsx(Z$,{})}),a.jsx(Ce,{path:"/impressao_rel",element:a.jsx(Pc,{})}),a.jsx(Ce,{path:"/impressao_rap_responsivo",element:a.jsx(Pc,{})}),a.jsx(Ce,{path:"/impressao_rel_responsivo",element:a.jsx(Pc,{})}),a.jsx(Ce,{path:"/confirmar_assinatura",element:a.jsx(Pc,{})}),a.jsx(Ce,{path:"/index_autenticidade_manual",element:a.jsx(qB,{})}),a.jsx(Ce,{path:"/.lovable/oauth/consent",element:a.jsx(VB,{})}),a.jsx(Ce,{path:"/admin/login",element:a.jsx(vU,{})}),a.jsx(Ce,{path:"/admin/artigos",element:a.jsx(lf,{children:a.jsx(nB,{})})}),a.jsx(Ce,{path:"/admin/artigos/novo",element:a.jsx(lf,{children:a.jsx(C0,{})})}),a.jsx(Ce,{path:"/admin/artigos/:id",element:a.jsx(lf,{children:a.jsx(C0,{})})}),a.jsx(Ce,{path:"*",element:a.jsx(xv,{})})]})]})})})]})});tj(document.getElementById("root")).render(a.jsx(rq,{}));
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.