PageSourceSearch

https://summitinc.io/assets/index-BQWdLX4l.js

js summitinc.io collected 2026-10-02 01:58:06 UTC 2,491,998 bytes, 978 lines download raw bytes

vendor: 4,856 bytes, lines 1-9
1var G$=Object.defineProperty;var q4=e=>{throw TypeError(e)};var K$=(e,t,n)=>t in e?G$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Gn=(e,t,n)=>K$(e,typeof t!="symbol"?t+"":t,n),gb=(e,t,n)=>t.has(e)||q4("Cannot "+n);var Ke=(e,t,n)=>(gb(e,t,"read from private field"),n?n.call(e):t.get(e)),yn=(e,t,n)=>t.has(e)?q4("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),rn=(e,t,n,s)=>(gb(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),js=(e,t,n)=>(gb(e,t,"access private method"),n);var fg=(e,t,n,s)=>({set _(i){rn(e,t,i,n)},get _(){return Ke(e,t,s)}});function Y$(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(s,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function zm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xb={exports:{}},Up={},yb={exports:{}},xn={};/**
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 G4;function X$(){if(G4)return xn;G4=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),p=Symbol.iterator;function m(G){return G===null||typeof G!="object"?null:(G=p&&G[p]||G["@@iterator"],typeof G=="function"?G:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,y={};function v(G,M,z){this.props=G,this.context=M,this.refs=y,this.updater=z||x}v.prototype.isReactComponent={},v.prototype.setState=function(G,M){if(typeof G!="object"&&typeof G!="function"&&G!=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,G,M,"setState")},v.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function j(){}j.prototype=v.prototype;function k(G,M,z){this.props=G,this.context=M,this.refs=y,this.updater=z||x}var S=k.prototype=new j;S.constructor=k,w(S,v.prototype),S.isPureReactComponent=!0;var _=Array.isArray,F=Object.prototype.hasOwnProperty,A={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function D(G,M,z){var K,Y={},J=null,Q=null;if(M!=null)for(K in M.ref!==void 0&&(Q=M.ref),M.key!==void 0&&(J=""+M.key),M)F.call(M,K)&&!C.hasOwnProperty(K)&&(Y[K]=M[K]);var ie=arguments.length-2;if(ie===1)Y.children=z;else if(1<ie){for(var ae=Array(ie),re=0;re<ie;re++)ae[re]=arguments[re+2];Y.children=ae}if(G&&G.defaultProps)for(K in ie=G.defaultProps,ie)Y[K]===void 0&&(Y[K]=ie[K]);return{$$typeof:e,type:G,key:J,ref:Q,props:Y,_owner:A.current}}function P(G,M){return{$$typeof:e,type:G.type,key:M,ref:G.ref,props:G.props,_owner:G._owner}}function L(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function T(G){var M={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(z){return M[z]})}var R=/\/+/g;function U(G,M){return typeof G=="object"&&G!==null&&G.key!=null?T(""+G.key):M.toString(36)}function I(G,M,z,K,Y){var J=typeof G;(J==="undefined"||J==="boolean")&&(G=null);var Q=!1;if(G===null)Q=!0;else switch(J){case"string":case"number":Q=!0;break;case"object":switch(G.$$typeof){case e:case t:Q=!0}}if(Q)return Q=G,Y=Y(Q),G=K===""?"."+U(Q,0):K,_(Y)?(z="",G!=null&&(z=G.replace(R,"$&/")+"/"),I(Y,M,z,"",function(re){return re})):Y!=null&&(L(Y)&&(Y=P(Y,z+(!Y.key||Q&&Q.key===Y.key?"":(""+Y.key).replace(R,"$&/")+"/")+G)),M.push(Y)),1;if(Q=0,K=K===""?".":K+":",_(G))for(var ie=0;ie<G.length;ie++){J=G[ie];var ae=K+U(J,ie);Q+=I(J,M,z,ae,Y)}
vendor: 10,642 bytes, lines 9-33
9else if(ae=m(G),typeof ae=="function")for(G=ae.call(G),ie=0;!(J=G.next()).done;)J=J.value,ae=K+U(J,ie++),Q+=I(J,M,z,ae,Y);else if(J==="object")throw M=String(G),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.");return Q}function H(G,M,z){if(G==null)return G;var K=[],Y=0;return I(G,K,"","",function(J){return M.call(z,J,Y++)}),K}function V(G){if(G._status===-1){var M=G._result;M=M(),M.then(function(z){(G._status===0||G._status===-1)&&(G._status=1,G._result=z)},function(z){(G._status===0||G._status===-1)&&(G._status=2,G._result=z)}),G._status===-1&&(G._status=0,G._result=M)}if(G._status===1)return G._result.default;throw G._result}var X={current:null},N={transition:null},W={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:N,ReactCurrentOwner:A};function O(){throw Error("act(...) is not supported in production builds of React.")}return xn.Children={map:H,forEach:function(G,M,z){H(G,function(){M.apply(this,arguments)},z)},count:function(G){var M=0;return H(G,function(){M++}),M},toArray:function(G){return H(G,function(M){return M})||[]},only:function(G){if(!L(G))throw Error("React.Children.only expected to receive a single React element child.");return G}},xn.Component=v,xn.Fragment=n,xn.Profiler=i,xn.PureComponent=k,xn.StrictMode=s,xn.Suspense=c,xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W,xn.act=O,xn.cloneElement=function(G,M,z){if(G==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+G+".");var K=w({},G.props),Y=G.key,J=G.ref,Q=G._owner;if(M!=null){if(M.ref!==void 0&&(J=M.ref,Q=A.current),M.key!==void 0&&(Y=""+M.key),G.type&&G.type.defaultProps)var ie=G.type.defaultProps;for(ae in M)F.call(M,ae)&&!C.hasOwnProperty(ae)&&(K[ae]=M[ae]===void 0&&ie!==void 0?ie[ae]:M[ae])}var ae=arguments.length-2;if(ae===1)K.children=z;else if(1<ae){ie=Array(ae);for(var re=0;re<ae;re++)ie[re]=arguments[re+2];K.children=ie}return{$$typeof:e,type:G.type,key:Y,ref:J,props:K,_owner:Q}},xn.createContext=function(G){return G={$$typeof:o,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},G.Provider={$$typeof:a,_context:G},G.Consumer=G},xn.createElement=D,xn.createFactory=function(G){var M=D.bind(null,G);return M.type=G,M},xn.createRef=function(){return{current:null}},xn.forwardRef=function(G){return{$$typeof:l,render:G}},xn.isValidElement=L,xn.lazy=function(G){return{$$typeof:u,_payload:{_status:-1,_result:G},_init:V}},xn.memo=function(G,M){return{$$typeof:d,type:G,compare:M===void 0?null:M}},xn.startTransition=function(G){var M=N.transition;N.transition={};try{G()}finally{N.transition=M}},xn.unstable_act=O,xn.useCallback=function(G,M){return X.current.useCallback(G,M)},xn.useContext=function(G){return X.current.useContext(G)},xn.useDebugValue=function(){},xn.useDeferredValue=function(G){return X.current.useDeferredValue(G)},xn.useEffect=function(G,M){return X.current.useEffect(G,M)},xn.useId=function(){return X.current.useId()},xn.useImperativeHandle=function(G,M,z){return X.current.useImperativeHandle(G,M,z)},xn.useInsertionEffect=function(G,M){return X.current.useInsertionEffect(G,M)},xn.useLayoutEffect=function(G,M){return X.current.useLayoutEffect(G,M)},xn.useMemo=function(G,M){return X.current.useMemo(G,M)},xn.useReducer=function(G,M,z){return X.current.useReducer(G,M,z)},xn.useRef=function(G){return X.current.useRef(G)},xn.useState=function(G){return X.current.useState(G)},xn.useSyncExternalStore=function(G,M,z){return X.current.useSyncExternalStore(G,M,z)},xn.useTransition=function(){return X.current.useTransition()},xn.version="18.3.1",xn}var K4;function Oy(){return K4||(K4=1,yb.exports=X$()),yb.exports}/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Y4;function J$(){if(Y4)return Up;Y4=1;var e=Oy(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,d){var u,p={},m=null,x=null;d!==void 0&&(m=""+d),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(x=c.ref);for(u in c)s.call(c,u)&&!a.hasOwnProperty(u)&&(p[u]=c[u]);if(l&&l.defaultProps)for(u in c=l.defaultProps,c)p[u]===void 0&&(p[u]=c[u]);return{$$typeof:t,type:l,key:m,ref:x,props:p,_owner:i.current}}return Up.Fragment=n,Up.jsx=o,Up.jsxs=o,Up}var X4;function Q$(){return X4||(X4=1,xb.exports=J$()),xb.exports}var r=Q$(),g=Oy();const Rn=zm(g),My=Y$({__proto__:null,default:Rn},[g]);var pg={},vb={exports:{}},ai={},bb={exports:{}},wb={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var J4;function Z$(){return J4||(J4=1,(function(e){function t(N,W){var O=N.length;N.push(W);e:for(;0<O;){var G=O-1>>>1,M=N[G];if(0<i(M,W))N[G]=W,N[O]=M,O=G;else break e}}function n(N){return N.length===0?null:N[0]}function s(N){if(N.length===0)return null;var W=N[0],O=N.pop();if(O!==W){N[0]=O;e:for(var G=0,M=N.length,z=M>>>1;G<z;){var K=2*(G+1)-1,Y=N[K],J=K+1,Q=N[J];if(0>i(Y,O))J<M&&0>i(Q,Y)?(N[G]=Q,N[J]=O,G=J):(N[G]=Y,N[K]=O,G=K);else if(J<M&&0>i(Q,O))N[G]=Q,N[J]=O,G=J;else break e}}return W}function i(N,W){var O=N.sortIndex-W.sortIndex;return O!==0?O:N.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],d=[],u=1,p=null,m=3,x=!1,w=!1,y=!1,v=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(N){for(var W=n(d);W!==null;){if(W.callback===null)s(d);else if(W.startTime<=N)s(d),W.sortIndex=W.expirationTime,t(c,W);else break;W=n(d)}}function _(N){if(y=!1,S(N),!w)if(n(c)!==null)w=!0,V(F);else{var W=n(d);W!==null&&X(_,W.startTime-N)}}function F(N,W){w=!1,y&&(y=!1,j(D),D=-1),x=!0;var O=m;try{for(S(W),p=n(c);p!==null&&(!(p.expirationTime>W)||N&&!T());){var G=p.callback;if(typeof G=="function"){p.callback=null,m=p.priorityLevel;var M=G(p.expirationTime<=W);W=e.unstable_now(),typeof M=="function"?p.callback=M:p===n(c)&&s(c),S(W)}else s(c);p=n(c)}if(p!==null)var z=!0;else{var K=n(d);K!==null&&X(_,K.startTime-W),z=!1}return z}finally{p=null,m=O,x=!1}}var A=!1,C=null,D=-1,P=5,L=-1;function T(){return!(e.unstable_now()-L<P)}function R(){if(C!==null){var N=e.unstable_now();L=N;var W=!0;try{W=C(!0,N)}finally{W?U():(A=!1,C=null)}}else A=!1}var U;if(typeof k=="function")U=function(){k(R)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,H=I.port2;I.port1.onmessage=R,U=function(){H.postMessage(null)}}else U=function(){v(R,0)};function V(N){C=N,A||(A=!0,U())}function X(N,W){D=v(function(){N(e.unstable_now())},W)}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(N){N.callback=null},e.unstable_continueExecution=function(){w||x||(w=!0,V(F))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(N){switch(m){case 1:case 2:case 3:var W=3;break;default:W=m}var O=m;m=W;try{return N()}finally{m=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,W){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var O=m;m=N;try{return W()}finally{m=O}},e.unstable_scheduleCallback=function(N,W,O){var G=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?G+O:G):O=G,N){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=O+M,N={id:u++,callback:W,priorityLevel:N,startTime:O,expirationTime:M,sortIndex:-1},O>G?(N.sortIndex=O,t(d,N),n(c)===null&&N===n(d)&&(y?(j(D),D=-1):y=!0,X(_,O-G))):(N.sortIndex=M,t(c,N),w||x||(w=!0,V(F))),N},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(N){var W=m;return function(){var O=m;m=W;try{return N.apply(this,arguments)}finally{m=O}}}})(wb)),wb}var Q4;function eU(){return Q4||(Q4=1,bb.exports=Z$()),bb.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 Z4;function tU(){if(Z4)return ai;Z4=1;var e=Oy(),t=eU();function n(f){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+f,b=1;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b]);return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,i={};function a(f,h){o(f,h),o(f+"Capture",h)}function o(f,h){for(i[f]=h,f=0;f<h.length;f++)s.add(h[f])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,u={},p={};function m(f){return c.call(p,f)?!0:c.call(u,f)?!1:d.test(f)?p[f]=!0:(u[f]=!0,!1)}function x(f,h,b,E){if(b!==null&&b.type===0)return!1;switch(typeof h){case"function":case"symbol":return!0;case"boolean":return E?!1:b!==null?!b.acceptsBooleans:(f=f.toLowerCase().slice(0,5),f!=="data-"&&f!=="aria-");default:return!1}}function w(f,h,b,E){if(h===null||typeof h>"u"||x(f,h,b,E))return!0;
vendor: 36,087 bytes, lines 33-37
33if(E)return!1;if(b!==null)switch(b.type){case 3:return!h;case 4:return h===!1;case 5:return isNaN(h);case 6:return isNaN(h)||1>h}return!1}function y(f,h,b,E,B,q,se){this.acceptsBooleans=h===2||h===3||h===4,this.attributeName=E,this.attributeNamespace=B,this.mustUseProperty=b,this.propertyName=f,this.type=h,this.sanitizeURL=q,this.removeEmptyString=se}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(f){v[f]=new y(f,0,!1,f,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(f){var h=f[0];v[h]=new y(h,1,!1,f[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(f){v[f]=new y(f,2,!1,f.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(f){v[f]=new y(f,2,!1,f,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(f){v[f]=new y(f,3,!1,f.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(f){v[f]=new y(f,3,!0,f,null,!1,!1)}),["capture","download"].forEach(function(f){v[f]=new y(f,4,!1,f,null,!1,!1)}),["cols","rows","size","span"].forEach(function(f){v[f]=new y(f,6,!1,f,null,!1,!1)}),["rowSpan","start"].forEach(function(f){v[f]=new y(f,5,!1,f.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function k(f){return f[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(f){var h=f.replace(j,k);v[h]=new y(h,1,!1,f,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(f){var h=f.replace(j,k);v[h]=new y(h,1,!1,f,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(f){var h=f.replace(j,k);v[h]=new y(h,1,!1,f,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(f){v[f]=new y(f,1,!1,f.toLowerCase(),null,!1,!1)}),v.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(f){v[f]=new y(f,1,!1,f.toLowerCase(),null,!0,!0)});function S(f,h,b,E){var B=v.hasOwnProperty(h)?v[h]:null;(B!==null?B.type!==0:E||!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(w(h,b,B,E)&&(b=null),E||B===null?m(h)&&(b===null?f.removeAttribute(h):f.setAttribute(h,""+b)):B.mustUseProperty?f[B.propertyName]=b===null?B.type===3?!1:"":b:(h=B.attributeName,E=B.attributeNamespace,b===null?f.removeAttribute(h):(B=B.type,b=B===3||B===4&&b===!0?"":""+b,E?f.setAttributeNS(E,h,b):f.setAttribute(h,b))))}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F=Symbol.for("react.element"),A=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),N=Symbol.iterator;function W(f){return f===null||typeof f!="object"?null:(f=N&&f[N]||f["@@iterator"],typeof f=="function"?f:null)}var O=Object.assign,G;function M(f){if(G===void 0)try{throw Error()}catch(b){var h=b.stack.trim().match(/\n( *(at )?)/);G=h&&h[1]||""}return`
34`+G+f}var z=!1;function K(f,h){if(!f||z)return"";z=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(Le){var E=Le}Reflect.construct(f,[],h)}else{try{h.call()}catch(Le){E=Le}f.call(h.prototype)}else{try{throw Error()}catch(Le){E=Le}f()}}catch(Le){if(Le&&E&&typeof Le.stack=="string"){for(var B=Le.stack.split(`
35`),q=E.stack.split(`
36`),se=B.length-1,ve=q.length-1;1<=se&&0<=ve&&B[se]!==q[ve];)ve--;for(;1<=se&&0<=ve;se--,ve--)if(B[se]!==q[ve]){if(se!==1||ve!==1)do if(se--,ve--,0>ve||B[se]!==q[ve]){var je=`
37`+B[se].replace(" at new "," at ");return f.displayName&&je.includes("<anonymous>")&&(je=je.replace("<anonymous>",f.displayName)),je}while(1<=se&&0<=ve);break}}}finally{z=!1,Error.prepareStackTrace=b}return(f=f?f.displayName||f.name:"")?M(f):""}function Y(f){switch(f.tag){case 5:return M(f.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return f=K(f.type,!1),f;case 11:return f=K(f.type.render,!1),f;case 1:return f=K(f.type,!0),f;default:return""}}function J(f){if(f==null)return null;if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case C:return"Fragment";case A:return"Portal";case P:return"Profiler";case D:return"StrictMode";case U:return"Suspense";case I:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case T:return(f.displayName||"Context")+".Consumer";case L:return(f._context.displayName||"Context")+".Provider";case R:var h=f.render;return f=f.displayName,f||(f=h.displayName||h.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case H:return h=f.displayName||null,h!==null?h:J(f.type)||"Memo";case V:h=f._payload,f=f._init;try{return J(f(h))}catch{}}return null}function Q(f){var h=f.type;switch(f.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return f=h.render,f=f.displayName||f.name||"",h.displayName||(f!==""?"ForwardRef("+f+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(h);case 8:return h===D?"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 h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function ie(f){switch(typeof f){case"boolean":case"number":case"string":case"undefined":return f;case"object":return f;default:return""}}function ae(f){var h=f.type;return(f=f.nodeName)&&f.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function re(f){var h=ae(f)?"checked":"value",b=Object.getOwnPropertyDescriptor(f.constructor.prototype,h),E=""+f[h];if(!f.hasOwnProperty(h)&&typeof b<"u"&&typeof b.get=="function"&&typeof b.set=="function"){var B=b.get,q=b.set;return Object.defineProperty(f,h,{configurable:!0,get:function(){return B.call(this)},set:function(se){E=""+se,q.call(this,se)}}),Object.defineProperty(f,h,{enumerable:b.enumerable}),{getValue:function(){return E},setValue:function(se){E=""+se},stopTracking:function(){f._valueTracker=null,delete f[h]}}}}function pe(f){f._valueTracker||(f._valueTracker=re(f))}function Z(f){if(!f)return!1;var h=f._valueTracker;if(!h)return!0;var b=h.getValue(),E="";return f&&(E=ae(f)?f.checked?"true":"false":f.value),f=E,f!==b?(h.setValue(f),!0):!1}function Ne(f){if(f=f||(typeof document<"u"?document:void 0),typeof f>"u")return null;try{return f.activeElement||f.body}catch{return f.body}}function te(f,h){var b=h.checked;return O({},h,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:b??f._wrapperState.initialChecked})}function xe(f,h){var b=h.defaultValue==null?"":h.defaultValue,E=h.checked!=null?h.checked:h.defaultChecked;b=ie(h.value!=null?h.value:b),f._wrapperState={initialChecked:E,initialValue:b,controlled:h.type==="checkbox"||h.type==="radio"?h.checked!=null:h.value!=null}}function he(f,h){h=h.checked,h!=null&&S(f,"checked",h,!1)}function le(f,h){he(f,h);var b=ie(h.value),E=h.type;if(b!=null)E==="number"?(b===0&&f.value===""||f.value!=b)&&(f.value=""+b):f.value!==""+b&&(f.value=""+b);else if(E==="submit"||E==="reset"){f.removeAttribute("value");return}h.hasOwnProperty("value")?$e(f,h.type,b):h.hasOwnProperty("defaultValue")&&$e(f,h.type,ie(h.defaultValue)),h.checked==null&&h.defaultChecked!=null&&(f.defaultChecked=!!h.defaultChecked)}function ge(f,h,b){if(h.hasOwnProperty("value")||h.hasOwnProperty("defaultValue")){var E=h.type;if(!(E!=="submit"&&E!=="reset"||h.value!==void 0&&h.value!==null))return;h=""+f._wrapperState.initialValue,b||h===f.value||(f.value=h),f.defaultValue=h}b=f.name,b!==""&&(f.name=""),f.defaultChecked=!!f._wrapperState.initialChecked,b!==""&&(f.name=b)}function $e(f,h,b){(h!=="number"||Ne(f.ownerDocument)!==f)&&(b==null?f.defaultValue=""+f._wrapperState.initialValue:f.defaultValue!==""+b&&(f.defaultValue=""+b))}var ft=Array.isArray;function Qe(f,h,b,E){if(f=f.options,h){h={};for(var B=0;B<b.length;B++)h["$"+b[B]]=!0;for(b=0;b<f.length;b++)B=h.hasOwnProperty("$"+f[b].value),f[b].selected!==B&&(f[b].selected=B),B&&E&&(f[b].defaultSelected=!0)}else{for(b=""+ie(b),h=null,B=0;B<f.length;B++){if(f[B].value===b){f[B].selected=!0,E&&(f[B].defaultSelected=!0);return}h!==null||f[B].disabled||(h=f[B])}h!==null&&(h.selected=!0)}}function Ve(f,h){if(h.dangerouslySetInnerHTML!=null)throw Error(n(91));return O({},h,{value:void 0,defaultValue:void 0,children:""+f._wrapperState.initialValue})}function ze(f,h){var b=h.value;if(b==null){if(b=h.children,h=h.defaultValue,b!=null){if(h!=null)throw Error(n(92));if(ft(b)){if(1<b.length)throw Error(n(93));b=b[0]}h=b}h==null&&(h=""),b=h}f._wrapperState={initialValue:ie(b)}}function at(f,h){var b=ie(h.value),E=ie(h.defaultValue);b!=null&&(b=""+b,b!==f.value&&(f.value=b),h.defaultValue==null&&f.defaultValue!==b&&(f.defaultValue=b)),E!=null&&(f.defaultValue=""+E)}function Nt(f){var h=f.textContent;h===f._wrapperState.initialValue&&h!==""&&h!==null&&(f.value=h)}function _e(f){switch(f){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 be(f,h){return f==null||f==="http://www.w3.org/1999/xhtml"?_e(h):f==="http://www.w3.org/2000/svg"&&h==="foreignObject"?"http://www.w3.org/1999/xhtml":f}var Re,Xe=(function(f){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(h,b,E,B){MSApp.execUnsafeLocalFunction(function(){return f(h,b,E,B)})}:f})(function(f,h){if(f.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in f)f.innerHTML=h;else{for(Re=Re||document.createElement("div"),Re.innerHTML="<svg>"+h.valueOf().toString()+"</svg>",h=Re.firstChild;f.firstChild;)f.removeChild(f.firstChild);for(;h.firstChild;)f.appendChild(h.firstChild)}});function He(f,h){if(h){var b=f.firstChild;if(b&&b===f.lastChild&&b.nodeType===3){b.nodeValue=h;return}}f.textContent=h}var St={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},Ct=["Webkit","ms","Moz","O"];Object.keys(St).forEach(function(f){Ct.forEach(function(h){h=h+f.charAt(0).toUpperCase()+f.substring(1),St[h]=St[f]})});function Se(f,h,b){return h==null||typeof h=="boolean"||h===""?"":b||typeof h!="number"||h===0||St.hasOwnProperty(f)&&St[f]?(""+h).trim():h+"px"}function et(f,h){f=f.style;for(var b in h)if(h.hasOwnProperty(b)){var E=b.indexOf("--")===0,B=Se(b,h[b],E);b==="float"&&(b="cssFloat"),E?f.setProperty(b,B):f[b]=B}}var bt=O({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 Ot(f,h){if(h){if(bt[f]&&(h.children!=null||h.dangerouslySetInnerHTML!=null))throw Error(n(137,f));if(h.dangerouslySetInnerHTML!=null){if(h.children!=null)throw Error(n(60));if(typeof h.dangerouslySetInnerHTML!="object"||!("__html"in h.dangerouslySetInnerHTML))throw Error(n(61))}if(h.style!=null&&typeof h.style!="object")throw Error(n(62))}}function sn(f,h){if(f.indexOf("-")===-1)return typeof h.is=="string";switch(f){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 Vt=null;function Un(f){return f=f.target||f.srcElement||window,f.correspondingUseElement&&(f=f.correspondingUseElement),f.nodeType===3?f.parentNode:f}var nr=null,xr=null,dr=null;function hs(f){if(f=Fp(f)){if(typeof nr!="function")throw Error(n(280));var h=f.stateNode;h&&(h=E0(h),nr(f.stateNode,f.type,h))}}function mi(f){xr?dr?dr.push(f):dr=[f]:xr=f}function Ur(){if(xr){var f=xr,h=dr;if(dr=xr=null,hs(f),h)for(f=0;f<h.length;f++)hs(h[f])}}function Ue(f,h){return f(h)}function Et(){}var mt=!1;function Ht(f,h,b){if(mt)return f(h,b);mt=!0;try{return Ue(f,h,b)}finally{mt=!1,(xr!==null||dr!==null)&&(Et(),Ur())}}function ke(f,h){var b=f.stateNode;if(b===null)return null;var E=E0(b);if(E===null)return null;b=E[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(E=!E.disabled)||(f=f.type,E=!(f==="button"||f==="input"||f==="select"||f==="textarea")),f=!E;break e;default:f=!1}if(f)return null;if(b&&typeof b!="function")throw Error(n(231,h,typeof b));return b}var Ze=!1;if(l)try{var Be={};Object.defineProperty(Be,"passive",{get:function(){Ze=!0}}),window.addEventListener("test",Be,Be),window.removeEventListener("test",Be,Be)}catch{Ze=!1}function xt(f,h,b,E,B,q,se,ve,je){var Le=Array.prototype.slice.call(arguments,3);try{h.apply(b,Le)}catch(it){this.onError(it)}}var yt=!1,dt=null,ee=!1,fe=null,ce={onError:function(f){yt=!0,dt=f}};function ue(f,h,b,E,B,q,se,ve,je){yt=!1,dt=null,xt.apply(ce,arguments)}function de(f,h,b,E,B,q,se,ve,je){if(ue.apply(this,arguments),yt){if(yt){var Le=dt;yt=!1,dt=null}else throw Error(n(198));ee||(ee=!0,fe=Le)}}function me(f){var h=f,b=f;if(f.alternate)for(;h.return;)h=h.return;else{f=h;do h=f,(h.flags&4098)!==0&&(b=h.return),f=h.return;while(f)}return h.tag===3?b:null}function De(f){if(f.tag===13){var h=f.memoizedState;if(h===null&&(f=f.alternate,f!==null&&(h=f.memoizedState)),h!==null)return h.dehydrated}return null}function Me(f){if(me(f)!==f)throw Error(n(188))}function Fe(f){var h=f.alternate;if(!h){if(h=me(f),h===null)throw Error(n(188));return h!==f?null:f}for(var b=f,E=h;;){var B=b.return;if(B===null)break;var q=B.alternate;if(q===null){if(E=B.return,E!==null){b=E;continue}break}if(B.child===q.child){for(q=B.child;q;){if(q===b)return Me(B),f;if(q===E)return Me(B),h;q=q.sibling}throw Error(n(188))}if(b.return!==E.return)b=B,E=q;else{for(var se=!1,ve=B.child;ve;){if(ve===b){se=!0,b=B,E=q;break}if(ve===E){se=!0,E=B,b=q;break}ve=ve.sibling}if(!se){for(ve=q.child;ve;){if(ve===b){se=!0,b=q,E=B;break}if(ve===E){se=!0,E=q,b=B;break}ve=ve.sibling}if(!se)throw Error(n(189))}}if(b.alternate!==E)throw Error(n(190))}if(b.tag!==3)throw Error(n(188));return b.stateNode.current===b?f:h}function Ie(f){return f=Fe(f),f!==null?Pe(f):null}function Pe(f){if(f.tag===5||f.tag===6)return f;for(f=f.child;f!==null;){var h=Pe(f);if(h!==null)return h;f=f.sibling}return null}var tt=t.unstable_scheduleCallback,pt=t.unstable_cancelCallback,_t=t.unstable_shouldYield,lt=t.unstable_requestPaint,ot=t.unstable_now,Yt=t.unstable_getCurrentPriorityLevel,An=t.unstable_ImmediatePriority,hn=t.unstable_UserBlockingPriority,Wn=t.unstable_NormalPriority,ms=t.unstable_LowPriority,Dr=t.unstable_IdlePriority,gs=null,Vn=null;function Wi(f){if(Vn&&typeof Vn.onCommitFiberRoot=="function")try{Vn.onCommitFiberRoot(gs,f,void 0,(f.current.flags&128)===128)}catch{}}var Hn=Math.clz32?Math.clz32:Sr,gi=Math.log,Hc=Math.LN2;function Sr(f){return f>>>=0,f===0?32:31-(gi(f)/Hc|0)|0}var xa=64,xs=4194304;function ei(f){switch(f&-f){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 f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function xi(f,h){var b=f.pendingLanes;if(b===0)return 0;var E=0,B=f.suspendedLanes,q=f.pingedLanes,se=b&268435455;if(se!==0){var ve=se&~B;ve!==0?E=ei(ve):(q&=se,q!==0&&(E=ei(q)))}else se=b&~B,se!==0?E=ei(se):q!==0&&(E=ei(q));if(E===0)return 0;if(h!==0&&h!==E&&(h&B)===0&&(B=E&-E,q=h&-h,B>=q||B===16&&(q&4194240)!==0))return h;if((E&4)!==0&&(E|=b&16),h=f.entangledLanes,h!==0)for(f=f.entanglements,h&=E;0<h;)b=31-Hn(h),B=1<<b,E|=f[b],h&=~B;return E}function Ls(f,h){switch(f){case 1:case 2:case 4:return h+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 h+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 du(f,h){for(var b=f.suspendedLanes,E=f.pingedLanes,B=f.expirationTimes,q=f.pendingLanes;0<q;){var se=31-Hn(q),ve=1<<se,je=B[se];je===-1?((ve&b)===0||(ve&E)!==0)&&(B[se]=Ls(ve,h)):je<=h&&(f.expiredLanes|=ve),q&=~ve}}function ya(f){return f=f.pendingLanes&-1073741825,f!==0?f:f&1073741824?1073741824:0}function qc(){var f=xa;return xa<<=1,(xa&4194240)===0&&(xa=64),f}function Mo(f){for(var h=[],b=0;31>b;b++)h.push(f);return h}function zs(f,h,b){f.pendingLanes|=h,h!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,h=31-Hn(h),f[h]=b}function Gc(f,h){var b=f.pendingLanes&~h;f.pendingLanes=h,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=h,f.mutableReadLanes&=h,f.entangledLanes&=h,h=f.entanglements;var E=f.eventTimes;for(f=f.expirationTimes;0<b;){var B=31-Hn(b),q=1<<B;h[B]=0,E[B]=-1,f[B]=-1,b&=~q}}function Ae(f,h){var b=f.entangledLanes|=h;for(f=f.entanglements;b;){var E=31-Hn(b),B=1<<E;B&h|f[E]&h&&(f[E]|=h),b&=~B}}var Ge=0;function ht(f){return f&=-f,1<f?4<f?(f&268435455)!==0?16:536870912:4:1}var Tt,wt,It,en,wn,Je=!1,oe=[],we=null,qe=null,st=null,At=new Map,qt=new Map,ln=[],rr="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 Ws(f,h){switch(f){case"focusin":case"focusout":we=null;break;case"dragenter":case"dragleave":qe=null;break;case"mouseover":case"mouseout":st=null;break;case"pointerover":case"pointerout":At.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":qt.delete(h.pointerId)}}function Ir(f,h,b,E,B,q){return f===null||f.nativeEvent!==q?(f={blockedOn:h,domEventName:b,eventSystemFlags:E,nativeEvent:q,targetContainers:[B]},h!==null&&(h=Fp(h),h!==null&&wt(h)),f):(f.eventSystemFlags|=E,h=f.targetContainers,B!==null&&h.indexOf(B)===-1&&h.push(B),f)}function Fl(f,h,b,E,B){switch(h){case"focusin":return we=Ir(we,f,h,b,E,B),!0;case"dragenter":return qe=Ir(qe,f,h,b,E,B),!0;case"mouseover":return st=Ir(st,f,h,b,E,B),!0;case"pointerover":var q=B.pointerId;return At.set(q,Ir(At.get(q)||null,f,h,b,E,B)),!0;case"gotpointercapture":return q=B.pointerId,qt.set(q,Ir(qt.get(q)||null,f,h,b,E,B)),!0}return!1}function uu(f){var h=Kc(f.target);if(h!==null){var b=me(h);if(b!==null){if(h=b.tag,h===13){if(h=De(b),h!==null){f.blockedOn=h,wn(f.priority,function(){It(b)});return}}else if(h===3&&b.stateNode.current.memoizedState.isDehydrated){f.blockedOn=b.tag===3?b.stateNode.containerInfo:null;return}}}f.blockedOn=null}function kr(f){if(f.blockedOn!==null)return!1;for(var h=f.targetContainers;0<h.length;){var b=U1(f.domEventName,f.eventSystemFlags,h[0],f.nativeEvent);if(b===null){b=f.nativeEvent;var E=new b.constructor(b.type,b);Vt=E,b.target.dispatchEvent(E),Vt=null}else return h=Fp(b),h!==null&&wt(h),f.blockedOn=b,!1;h.shift()}return!0}function hp(f,h,b){kr(f)&&b.delete(h)}function xW(){Je=!1,we!==null&&kr(we)&&(we=null),qe!==null&&kr(qe)&&(qe=null),st!==null&&kr(st)&&(st=null),At.forEach(hp),qt.forEach(hp)}function mp(f,h){f.blockedOn===h&&(f.blockedOn=null,Je||(Je=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,xW)))}function gp(f){function h(B){return mp(B,f)}if(0<oe.length){mp(oe[0],f);for(var b=1;b<oe.length;b++){var E=oe[b];E.blockedOn===f&&(E.blockedOn=null)}}for(we!==null&&mp(we,f),qe!==null&&mp(qe,f),st!==null&&mp(st,f),At.forEach(h),qt.forEach(h),b=0;b<ln.length;b++)E=ln[b],E.blockedOn===f&&(E.blockedOn=null);for(;0<ln.length&&(b=ln[0],b.blockedOn===null);)uu(b),b.blockedOn===null&&ln.shift()}var fu=_.ReactCurrentBatchConfig,h0=!0;function yW(f,h,b,E){var B=Ge,q=fu.transition;fu.transition=null;try{Ge=1,$1(f,h,b,E)}finally{Ge=B,fu.transition=q}}function vW(f,h,b,E){var B=Ge,q=fu.transition;fu.transition=null;try{Ge=4,$1(f,h,b,E)}finally{Ge=B,fu.transition=q}}function $1(f,h,b,E){if(h0){var B=U1(f,h,b,E);if(B===null)av(f,h,E,m0,b),Ws(f,E);else if(Fl(B,f,h,b,E))E.stopPropagation();else if(Ws(f,E),h&4&&-1<rr.indexOf(f)){for(;B!==null;){var q=Fp(B);if(q!==null&&Tt(q),q=U1(f,h,b,E),q===null&&av(f,h,E,m0,b),q===B)break;B=q}B!==null&&E.stopPropagation()}else av(f,h,E,null,b)}}var m0=null;function U1(f,h,b,E){if(m0=null,f=Un(E),f=Kc(f),f!==null)if(h=me(f),h===null)f=null;else if(b=h.tag,b===13){if(f=De(h),f!==null)return f;f=null}else if(b===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;f=null}else h!==f&&(f=null);return m0=f,null}function RC(f){switch(f){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(Yt()){case An:return 1;case hn:return 4;case Wn:case ms:return 16;case Dr:return 536870912;default:return 16}default:return 16}}var Al=null,V1=null,g0=null;function DC(){if(g0)return g0;var f,h=V1,b=h.length,E,B="value"in Al?Al.value:Al.textContent,q=B.length;for(f=0;f<b&&h[f]===B[f];f++);var se=b-f;for(E=1;E<=se&&h[b-E]===B[q-E];E++);return g0=B.slice(f,1<E?1-E:void 0)}function x0(f){var h=f.keyCode;return"charCode"in f?(f=f.charCode,f===0&&h===13&&(f=13)):f=h,f===10&&(f=13),32<=f||f===13?f:0}function y0(){return!0}function IC(){return!1}function yi(f){function h(b,E,B,q,se){this._reactName=b,this._targetInst=B,this.type=E,this.nativeEvent=q,this.target=se,this.currentTarget=null;for(var ve in f)f.hasOwnProperty(ve)&&(b=f[ve],this[ve]=b?b(q):q[ve]);return this.isDefaultPrevented=(q.defaultPrevented!=null?q.defaultPrevented:q.returnValue===!1)?y0:IC,this.isPropagationStopped=IC,this}return O(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var b=this.nativeEvent;b&&(b.preventDefault?b.preventDefault():typeof b.returnValue!="unknown"&&(b.returnValue=!1),this.isDefaultPrevented=y0)},stopPropagation:function(){var b=this.nativeEvent;b&&(b.stopPropagation?b.stopPropagation():typeof b.cancelBubble!="unknown"&&(b.cancelBubble=!0),this.isPropagationStopped=y0)},persist:function(){},isPersistent:y0}),h}var pu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(f){return f.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},H1=yi(pu),xp=O({},pu,{view:0,detail:0}),bW=yi(xp),q1,G1,yp,v0=O({},xp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Y1,button:0,buttons:0,relatedTarget:function(f){return f.relatedTarget===void 0?f.fromElement===f.srcElement?f.toElement:f.fromElement:f.relatedTarget},movementX:function(f){return"movementX"in f?f.movementX:(f!==yp&&(yp&&f.type==="mousemove"?(q1=f.screenX-yp.screenX,G1=f.screenY-yp.screenY):G1=q1=0,yp=f),q1)},movementY:function(f){return"movementY"in f?f.movementY:G1}}),PC=yi(v0),wW=O({},v0,{dataTransfer:0}),jW=yi(wW),SW=O({},xp,{relatedTarget:0}),K1=yi(SW),kW=O({},pu,{animationName:0,elapsedTime:0,pseudoElement:0}),_W=yi(kW),CW=O({},pu,{clipboardData:function(f){return"clipboardData"in f?f.clipboardData:window.clipboardData}}),EW=yi(CW),FW=O({},pu,{data:0}),BC=yi(FW),AW={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TW={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"},NW={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RW(f){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(f):(f=NW[f])?!!h[f]:!1}function Y1(){return RW}var DW=O({},xp,{key:function(f){if(f.key){var h=AW[f.key]||f.key;if(h!=="Unidentified")return h}return f.type==="keypress"?(f=x0(f),f===13?"Enter":String.fromCharCode(f)):f.type==="keydown"||f.type==="keyup"?TW[f.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Y1,charCode:function(f){return f.type==="keypress"?x0(f):0},keyCode:function(f){return f.type==="keydown"||f.type==="keyup"?f.keyCode:0},which:function(f){return f.type==="keypress"?x0(f):f.type==="keydown"||f.type==="keyup"?f.keyCode:0}}),IW=yi(DW),PW=O({},v0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),OC=yi(PW),BW=O({},xp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Y1}),OW=yi(BW),MW=O({},pu,{propertyName:0,elapsedTime:0,pseudoElement:0}),LW=yi(MW),zW=O({},v0,{deltaX:function(f){return"deltaX"in f?f.deltaX:"wheelDeltaX"in f?-f.wheelDeltaX:0},deltaY:function(f){return"deltaY"in f?f.deltaY:"wheelDeltaY"in f?-f.wheelDeltaY:"wheelDelta"in f?-f.wheelDelta:0},deltaZ:0,deltaMode:0}),WW=yi(zW),$W=[9,13,27,32],X1=l&&"CompositionEvent"in window,vp=null;l&&"documentMode"in document&&(vp=document.documentMode);var UW=l&&"TextEvent"in window&&!vp,MC=l&&(!X1||vp&&8<vp&&11>=vp),LC=" ",zC=!1;function WC(f,h){switch(f){case"keyup":return $W.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $C(f){return f=f.detail,typeof f=="object"&&"data"in f?f.data:null}var hu=!1;function VW(f,h){switch(f){case"compositionend":return $C(h);case"keypress":return h.which!==32?null:(zC=!0,LC);case"textInput":return f=h.data,f===LC&&zC?null:f;default:return null}}function HW(f,h){if(hu)return f==="compositionend"||!X1&&WC(f,h)?(f=DC(),g0=V1=Al=null,hu=!1,f):null;switch(f){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return MC&&h.locale!=="ko"?null:h.data;default:return null}}var qW={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 UC(f){var h=f&&f.nodeName&&f.nodeName.toLowerCase();return h==="input"?!!qW[f.type]:h==="textarea"}function VC(f,h,b,E){mi(E),h=k0(h,"onChange"),0<h.length&&(b=new H1("onChange","change",null,b,E),f.push({event:b,listeners:h}))}var bp=null,wp=null;function GW(f){lE(f,0)}function b0(f){var h=vu(f);if(Z(h))return f}function KW(f,h){if(f==="change")return h}var HC=!1;if(l){var J1;if(l){var Q1="oninput"in document;if(!Q1){var qC=document.createElement("div");qC.setAttribute("oninput","return;"),Q1=typeof qC.oninput=="function"}J1=Q1}else J1=!1;HC=J1&&(!document.documentMode||9<document.documentMode)}function GC(){bp&&(bp.detachEvent("onpropertychange",KC),wp=bp=null)}function KC(f){if(f.propertyName==="value"&&b0(wp)){var h=[];VC(h,wp,f,Un(f)),Ht(GW,h)}}function YW(f,h,b){f==="focusin"?(GC(),bp=h,wp=b,bp.attachEvent("onpropertychange",KC)):f==="focusout"&&GC()}function XW(f){if(f==="selectionchange"||f==="keyup"||f==="keydown")return b0(wp)}function JW(f,h){if(f==="click")return b0(h)}function QW(f,h){if(f==="input"||f==="change")return b0(h)}function ZW(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var va=typeof Object.is=="function"?Object.is:ZW;function jp(f,h){if(va(f,h))return!0;if(typeof f!="object"||f===null||typeof h!="object"||h===null)return!1;var b=Object.keys(f),E=Object.keys(h);if(b.length!==E.length)return!1;for(E=0;E<b.length;E++){var B=b[E];if(!c.call(h,B)||!va(f[B],h[B]))return!1}return!0}function YC(f){for(;f&&f.firstChild;)f=f.firstChild;return f}function XC(f,h){var b=YC(f);f=0;for(var E;b;){if(b.nodeType===3){if(E=f+b.textContent.length,f<=h&&E>=h)return{node:b,offset:h-f};f=E}e:{for(;b;){if(b.nextSibling){b=b.nextSibling;break e}b=b.parentNode}b=void 0}b=YC(b)}}function JC(f,h){return f&&h?f===h?!0:f&&f.nodeType===3?!1:h&&h.nodeType===3?JC(f,h.parentNode):"contains"in f?f.contains(h):f.compareDocumentPosition?!!(f.compareDocumentPosition(h)&16):!1:!1}function QC(){for(var f=window,h=Ne();h instanceof f.HTMLIFrameElement;){try{var b=typeof h.contentWindow.location.href=="string"}catch{b=!1}if(b)f=h.contentWindow;else break;h=Ne(f.document)}return h}function Z1(f){var h=f&&f.nodeName&&f.nodeName.toLowerCase();return h&&(h==="input"&&(f.type==="text"||f.type==="search"||f.type==="tel"||f.type==="url"||f.type==="password")||h==="textarea"||f.contentEditable==="true")}function e$(f){var h=QC(),b=f.focusedElem,E=f.selectionRange;if(h!==b&&b&&b.ownerDocument&&JC(b.ownerDocument.documentElement,b)){if(E!==null&&Z1(b)){if(h=E.start,f=E.end,f===void 0&&(f=h),"selectionStart"in b)b.selectionStart=h,b.selectionEnd=Math.min(f,b.value.length);else if(f=(h=b.ownerDocument||document)&&h.defaultView||window,f.getSelection){f=f.getSelection();var B=b.textContent.length,q=Math.min(E.start,B);E=E.end===void 0?q:Math.min(E.end,B),!f.extend&&q>E&&(B=E,E=q,q=B),B=XC(b,q);var se=XC(b,E);B&&se&&(f.rangeCount!==1||f.anchorNode!==B.node||f.anchorOffset!==B.offset||f.focusNode!==se.node||f.focusOffset!==se.offset)&&(h=h.createRange(),h.setStart(B.node,B.offset),f.removeAllRanges(),q>E?(f.addRange(h),f.extend(se.node,se.offset)):(h.setEnd(se.node,se.offset),f.addRange(h)))}}for(h=[],f=b;f=f.parentNode;)f.nodeType===1&&h.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<h.length;b++)f=h[b],f.element.scrollLeft=f.left,f.element.scrollTop=f.top}}var t$=l&&"documentMode"in document&&11>=document.documentMode,mu=null,ev=null,Sp=null,tv=!1;function ZC(f,h,b){var E=b.window===b?b.document:b.nodeType===9?b:b.ownerDocument;tv||mu==null||mu!==Ne(E)||(E=mu,"selectionStart"in E&&Z1(E)?E={start:E.selectionStart,end:E.selectionEnd}:(E=(E.ownerDocument&&E.ownerDocument.defaultView||window).getSelection(),E={anchorNode:E.anchorNode,anchorOffset:E.anchorOffset,focusNode:E.focusNode,focusOffset:E.focusOffset}),Sp&&jp(Sp,E)||(Sp=E,E=k0(ev,"onSelect"),0<E.length&&(h=new H1("onSelect","select",null,h,b),f.push({event:h,listeners:E}),h.target=mu)))}function w0(f,h){var b={};return b[f.toLowerCase()]=h.toLowerCase(),b["Webkit"+f]="webkit"+h,b["Moz"+f]="moz"+h,b}var gu={animationend:w0("Animation","AnimationEnd"),animationiteration:w0("Animation","AnimationIteration"),animationstart:w0("Animation","AnimationStart"),transitionend:w0("Transition","TransitionEnd")},nv={},eE={};l&&(eE=document.createElement("div").style,"AnimationEvent"in window||(delete gu.animationend.animation,delete gu.animationiteration.animation,delete gu.animationstart.animation),"TransitionEvent"in window||delete gu.transitionend.transition);function j0(f){if(nv[f])return nv[f];if(!gu[f])return f;var h=gu[f],b;for(b in h)if(h.hasOwnProperty(b)&&b in eE)return nv[f]=h[b];return f}var tE=j0("animationend"),nE=j0("animationiteration"),rE=j0("animationstart"),sE=j0("transitionend"),iE=new Map,aE="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 Tl(f,h){iE.set(f,h),a(h,[f])}for(var rv=0;rv<aE.length;rv++){var sv=aE[rv],n$=sv.toLowerCase(),r$=sv[0].toUpperCase()+sv.slice(1);Tl(n$,"on"+r$)}Tl(tE,"onAnimationEnd"),Tl(nE,"onAnimationIteration"),Tl(rE,"onAnimationStart"),Tl("dblclick","onDoubleClick"),Tl("focusin","onFocus"),Tl("focusout","onBlur"),Tl(sE,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focu
37sin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kp="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(" "),s$=new Set("cancel close invalid load scroll toggle".split(" ").concat(kp));function oE(f,h,b){var E=f.type||"unknown-event";f.currentTarget=b,de(E,h,void 0,f),f.currentTarget=null}function lE(f,h){h=(h&4)!==0;for(var b=0;b<f.length;b++){var E=f[b],B=E.event;E=E.listeners;e:{var q=void 0;if(h)for(var se=E.length-1;0<=se;se--){var ve=E[se],je=ve.instance,Le=ve.currentTarget;if(ve=ve.listener,je!==q&&B.isPropagationStopped())break e;oE(B,ve,Le),q=je}else for(se=0;se<E.length;se++){if(ve=E[se],je=ve.instance,Le=ve.currentTarget,ve=ve.listener,je!==q&&B.isPropagationStopped())break e;oE(B,ve,Le),q=je}}}if(ee)throw f=fe,ee=!1,fe=null,f}function Qn(f,h){var b=h[fv];b===void 0&&(b=h[fv]=new Set);var E=f+"__bubble";b.has(E)||(cE(h,f,2,!1),b.add(E))}function iv(f,h,b){var E=0;h&&(E|=4),cE(b,f,E,h)}var S0="_reactListening"+Math.random().toString(36).slice(2);function _p(f){if(!f[S0]){f[S0]=!0,s.forEach(function(b){b!=="selectionchange"&&(s$.has(b)||iv(b,!1,f),iv(b,!0,f))});var h=f.nodeType===9?f:f.ownerDocument;h===null||h[S0]||(h[S0]=!0,iv("selectionchange",!1,h))}}function cE(f,h,b,E){switch(RC(h)){case 1:var B=yW;break;case 4:B=vW;break;default:B=$1}b=B.bind(null,h,b,f),B=void 0,!Ze||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(B=!0),E?B!==void 0?f.addEventListener(h,b,{capture:!0,passive:B}):f.addEventListener(h,b,!0):B!==void 0?f.addEventListener(h,b,{passive:B}):f.addEventListener(h,b,!1)}function av(f,h,b,E,B){var q=E;if((h&1)===0&&(h&2)===0&&E!==null)e:for(;;){if(E===null)return;var se=E.tag;if(se===3||se===4){var ve=E.stateNode.containerInfo;if(ve===B||ve.nodeType===8&&ve.parentNode===B)break;if(se===4)for(se=E.return;se!==null;){var je=se.tag;if((je===3||je===4)&&(je=se.stateNode.containerInfo,je===B||je.nodeType===8&&je.parentNode===B))return;se=se.return}for(;ve!==null;){if(se=Kc(ve),se===null)return;if(je=se.tag,je===5||je===6){E=q=se;continue e}ve=ve.parentNode}}E=E.return}Ht(function(){var Le=q,it=Un(b),ct=[];e:{var nt=iE.get(f);if(nt!==void 0){var Rt=H1,Pt=f;switch(f){case"keypress":if(x0(b)===0)break e;case"keydown":case"keyup":Rt=IW;break;case"focusin":Pt="focus",Rt=K1;break;case"focusout":Pt="blur",Rt=K1;break;case"beforeblur":case"afterblur":Rt=K1;break;case"click":if(b.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Rt=PC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Rt=jW;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Rt=OW;break;case tE:case nE:case rE:Rt=_W;break;case sE:Rt=LW;break;case"scroll":Rt=bW;break;case"wheel":Rt=WW;break;case"copy":case"cut":case"paste":Rt=EW;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Rt=OC}var Lt=(h&4)!==0,yr=!Lt&&f==="scroll",Te=Lt?nt!==null?nt+"Capture":null:nt;Lt=[];for(var Ce=Le,Oe;Ce!==null;){Oe=Ce;var vt=Oe.stateNode;if(Oe.tag===5&&vt!==null&&(Oe=vt,Te!==null&&(vt=ke(Ce,Te),vt!=null&&Lt.push(Cp(Ce,vt,Oe)))),yr)break;Ce=Ce.return}0<Lt.length&&(nt=new Rt(nt,Pt,null,b,it),ct.push({event:nt,listeners:Lt}))}}if((h&7)===0){e:{if(nt=f==="mouseover"||f==="pointerover",Rt=f==="mouseout"||f==="pointerout",nt&&b!==Vt&&(Pt=b.relatedTarget||b.fromElement)&&(Kc(Pt)||Pt[Lo]))break e;if((Rt||nt)&&(nt=it.window===it?it:(nt=it.ownerDocument)?nt.defaultView||nt.parentWindow:window,Rt?(Pt=b.relatedTarget||b.toElement,Rt=Le,Pt=Pt?Kc(Pt):null,Pt!==null&&(yr=me(Pt),Pt!==yr||Pt.tag!==5&&Pt.tag!==6)&&(Pt=null)):(Rt=null,Pt=Le),Rt!==Pt)){if(Lt=PC,vt="onMouseLeave",Te="onMouseEnter",Ce="mouse",(f==="pointerout"||f==="pointerover")&&(Lt=OC,vt="onPointerLeave",Te="onPointerEnter",Ce="pointer"),yr=Rt==null?nt:vu(Rt),Oe=Pt==null?nt:vu(Pt),nt=new Lt(vt,Ce+"leave",Rt,b,it),nt.target=yr,nt.relatedTarget=Oe,vt=null,Kc(it)===Le&&(Lt=new Lt(Te,Ce+"enter",Pt,b,it),Lt.target=Oe,Lt.relatedTarget=yr,vt=Lt),yr=vt,Rt&&Pt)t:{for(Lt=Rt,Te=Pt,Ce=0,Oe=Lt;Oe;Oe=xu(Oe))Ce++;for(Oe=0,vt=Te;vt;vt=xu(vt))Oe++;for(;0<Ce-Oe;)Lt=xu(Lt),Ce--;for(;0<Oe-Ce;)Te=xu(Te),Oe--;for(;Ce--;){if(Lt===Te||Te!==null&&Lt===Te.alternate)break t;Lt=xu(Lt),Te=xu(Te)}Lt=null}else Lt=null;Rt!==null&&dE(ct,nt,Rt,Lt,!1),Pt!==null&&yr!==null&&dE(ct,yr,Pt,Lt,!0)}}
vendor: 7,067 bytes, lines 37-38
37e:{if(nt=Le?vu(Le):window,Rt=nt.nodeName&&nt.nodeName.toLowerCase(),Rt==="select"||Rt==="input"&&nt.type==="file")var Wt=KW;else if(UC(nt))if(HC)Wt=QW;else{Wt=XW;var Gt=YW}else(Rt=nt.nodeName)&&Rt.toLowerCase()==="input"&&(nt.type==="checkbox"||nt.type==="radio")&&(Wt=JW);if(Wt&&(Wt=Wt(f,Le))){VC(ct,Wt,b,it);break e}Gt&&Gt(f,nt,Le),f==="focusout"&&(Gt=nt._wrapperState)&&Gt.controlled&&nt.type==="number"&&$e(nt,"number",nt.value)}switch(Gt=Le?vu(Le):window,f){case"focusin":(UC(Gt)||Gt.contentEditable==="true")&&(mu=Gt,ev=Le,Sp=null);break;case"focusout":Sp=ev=mu=null;break;case"mousedown":tv=!0;break;case"contextmenu":case"mouseup":case"dragend":tv=!1,ZC(ct,b,it);break;case"selectionchange":if(t$)break;case"keydown":case"keyup":ZC(ct,b,it)}var Kt;if(X1)e:{switch(f){case"compositionstart":var tn="onCompositionStart";break e;case"compositionend":tn="onCompositionEnd";break e;case"compositionupdate":tn="onCompositionUpdate";break e}tn=void 0}else hu?WC(f,b)&&(tn="onCompositionEnd"):f==="keydown"&&b.keyCode===229&&(tn="onCompositionStart");tn&&(MC&&b.locale!=="ko"&&(hu||tn!=="onCompositionStart"?tn==="onCompositionEnd"&&hu&&(Kt=DC()):(Al=it,V1="value"in Al?Al.value:Al.textContent,hu=!0)),Gt=k0(Le,tn),0<Gt.length&&(tn=new BC(tn,f,null,b,it),ct.push({event:tn,listeners:Gt}),Kt?tn.data=Kt:(Kt=$C(b),Kt!==null&&(tn.data=Kt)))),(Kt=UW?VW(f,b):HW(f,b))&&(Le=k0(Le,"onBeforeInput"),0<Le.length&&(it=new BC("onBeforeInput","beforeinput",null,b,it),ct.push({event:it,listeners:Le}),it.data=Kt))}lE(ct,h)})}function Cp(f,h,b){return{instance:f,listener:h,currentTarget:b}}function k0(f,h){for(var b=h+"Capture",E=[];f!==null;){var B=f,q=B.stateNode;B.tag===5&&q!==null&&(B=q,q=ke(f,b),q!=null&&E.unshift(Cp(f,q,B)),q=ke(f,h),q!=null&&E.push(Cp(f,q,B))),f=f.return}return E}function xu(f){if(f===null)return null;do f=f.return;while(f&&f.tag!==5);return f||null}function dE(f,h,b,E,B){for(var q=h._reactName,se=[];b!==null&&b!==E;){var ve=b,je=ve.alternate,Le=ve.stateNode;if(je!==null&&je===E)break;ve.tag===5&&Le!==null&&(ve=Le,B?(je=ke(b,q),je!=null&&se.unshift(Cp(b,je,ve))):B||(je=ke(b,q),je!=null&&se.push(Cp(b,je,ve)))),b=b.return}se.length!==0&&f.push({event:h,listeners:se})}var i$=/\r\n?/g,a$=/\u0000|\uFFFD/g;function uE(f){return(typeof f=="string"?f:""+f).replace(i$,`
38`).replace(a$,"")}function _0(f,h,b){if(h=uE(h),uE(f)!==h&&b)throw Error(n(425))}function C0(){}var ov=null,lv=null;function cv(f,h){return f==="textarea"||f==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var dv=typeof setTimeout=="function"?setTimeout:void 0,o$=typeof clearTimeout=="function"?clearTimeout:void 0,fE=typeof Promise=="function"?Promise:void 0,l$=typeof queueMicrotask=="function"?queueMicrotask:typeof fE<"u"?function(f){return fE.resolve(null).then(f).catch(c$)}:dv;function c$(f){setTimeout(function(){throw f})}function uv(f,h){var b=h,E=0;do{var B=b.nextSibling;if(f.removeChild(b),B&&B.nodeType===8)if(b=B.data,b==="/$"){if(E===0){f.removeChild(B),gp(h);return}E--}else b!=="$"&&b!=="$?"&&b!=="$!"||E++;b=B}while(b);gp(h)}function Nl(f){for(;f!=null;f=f.nextSibling){var h=f.nodeType;if(h===1||h===3)break;if(h===8){if(h=f.data,h==="$"||h==="$!"||h==="$?")break;if(h==="/$")return null}}return f}function pE(f){f=f.previousSibling;for(var h=0;f;){if(f.nodeType===8){var b=f.data;if(b==="$"||b==="$!"||b==="$?"){if(h===0)return f;h--}else b==="/$"&&h++}f=f.previousSibling}return null}var yu=Math.random().toString(36).slice(2),Qa="__reactFiber$"+yu,Ep="__reactProps$"+yu,Lo="__reactContainer$"+yu,fv="__reactEvents$"+yu,d$="__reactListeners$"+yu,u$="__reactHandles$"+yu;function Kc(f){var h=f[Qa];if(h)return h;for(var b=f.parentNode;b;){if(h=b[Lo]||b[Qa]){if(b=h.alternate,h.child!==null||b!==null&&b.child!==null)for(f=pE(f);f!==null;){if(b=f[Qa])return b;f=pE(f)}return h}f=b,b=f.parentNode}return null}function Fp(f){return f=f[Qa]||f[Lo],!f||f.tag!==5&&f.tag!==6&&f.tag!==13&&f.tag!==3?null:f}function vu(f){if(f.tag===5||f.tag===6)return f.stateNode;throw Error(n(33))}function E0(f){return f[Ep]||null}var pv=[],bu=-1;function Rl(f){return{current:f}}function Zn(f){0>bu||(f.current=pv[bu],pv[bu]=null,bu--)}function qn(f,h){bu++,pv[bu]=f.current,f.current=h}var Dl={},ys=Rl(Dl),ti=Rl(!1),Yc=Dl;function wu(f,h){var b=f.type.contextTypes;if(!b)return Dl;var E=f.stateNode;if(E&&E.__reactInternalMemoizedUnmaskedChildContext===h)return E.__reactInternalMemoizedMaskedChildContext;var B={},q;for(q in b)B[q]=h[q];return E&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=h,f.__reactInternalMemoizedMaskedChildContext=B),B}function ni(f){return f=f.childContextTypes,f!=null}function F0(){Zn(ti),Zn(ys)}function hE(f,h,b){if(ys.current!==Dl)throw Error(n(168));qn(ys,h),qn(ti,b)}function mE(f,h,b){var E=f.stateNode;if(h=h.childContextTypes,typeof E.getChildContext!="function")return b;E=E.getChildContext();for(var B in E)if(!(B in h))throw Error(n(108,Q(f)||"Unknown",B));return O({},b,E)}function A0(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||Dl,Yc=ys.current,qn(ys,f),qn(ti,ti.current),!0}function gE(f,h,b){var E=f.stateNode;if(!E)throw Error(n(169));b?(f=mE(f,h,Yc),E.__reactInternalMemoizedMergedChildContext=f,Zn(ti),Zn(ys),qn(ys,f)):Zn(ti),qn(ti,b)}var zo=null,T0=!1,hv=!1;function xE(f){zo===null?zo=[f]:zo.push(f)}function f$(f){T0=!0,xE(f)}function Il(){if(!hv&&zo!==null){hv=!0;var f=0,h=Ge;try{var b=zo;for(Ge=1;f<b.length;f++){var E=b[f];do E=E(!0);while(E!==null)}zo=null,T0=!1}catch(B){throw zo!==null&&(zo=zo.slice(f+1)),tt(An,Il),B}finally{Ge=h,hv=!1}}return null}var ju=[],Su=0,N0=null,R0=0,$i=[],Ui=0,Xc=null,Wo=1,$o="";function Jc(f,h){ju[Su++]=R0,ju[Su++]=N0,N0=f,R0=h}function yE(f,h,b){$i[Ui++]=Wo,$i[Ui++]=$o,$i[Ui++]=Xc,Xc=f;var E=Wo;f=$o;var B=32-Hn(E)-1;E&=~(1<<B),b+=1;var q=32-Hn(h)+B;if(30<q){var se=B-B%5;q=(E&(1<<se)-1).toString(32),E>>=se,B-=se,Wo=1<<32-Hn(h)+B|b<<B|E,$o=q+f}else Wo=1<<q|b<<B|E,$o=f}function mv(f){f.return!==null&&(Jc(f,1),yE(f,1,0))}function gv(f){for(;f===N0;)N0=ju[--Su],ju[Su]=null,R0=ju[--Su],ju[Su]=null;for(;f===Xc;)Xc=$i[--Ui],$i[Ui]=null,$o=$i[--Ui],$i[Ui]=null,Wo=$i[--Ui],$i[Ui]=null}var vi=null,bi=null,sr=!1,ba=null;function vE(f,h){var b=Gi(5,null,null,0);b.elementType="DELETED",b.stateNode=h,b.return=f,h=f.deletions,h===null?(f.deletions=[b],f.flags|=16):h.push(b)}function bE(f,h){switch(f.tag){case 5:var b=f.type;return h=h.nodeType!==1||b.toLowerCase()!==h.nodeName.toLowerCase()?null:h,h!==null?(f.stateNode=h,vi=f,bi=Nl(h.firstChild),!0):!1;case 6:return h=f.pendingProps===""||h.nodeType!==3?null:h,h!==null?(f.stateNode=h,vi=f,bi=null,!0):!1;case 13:return h=h.nodeType!==8?null:h,h!==null?(b=Xc!==null?{id:Wo,overflow:$o}:null,f.memoizedState={dehydrated:h,treeContext:b,retryLane:1073741824},b=Gi(18,null,null,0),b.stateNode=h,b.return=f,f.child=b,vi=f,bi=null,!0):!1;default:return!1}}function xv(f){return(f.mode&1)!==0&&(f.flags&128)===0}function yv(f){if(sr){var h=bi;if(h){var b=h;
vendor: 4,647 bytes, line 38
38if(!bE(f,h)){if(xv(f))throw Error(n(418));h=Nl(b.nextSibling);var E=vi;h&&bE(f,h)?vE(E,b):(f.flags=f.flags&-4097|2,sr=!1,vi=f)}}else{if(xv(f))throw Error(n(418));f.flags=f.flags&-4097|2,sr=!1,vi=f}}}function wE(f){for(f=f.return;f!==null&&f.tag!==5&&f.tag!==3&&f.tag!==13;)f=f.return;vi=f}function D0(f){if(f!==vi)return!1;if(!sr)return wE(f),sr=!0,!1;var h;if((h=f.tag!==3)&&!(h=f.tag!==5)&&(h=f.type,h=h!=="head"&&h!=="body"&&!cv(f.type,f.memoizedProps)),h&&(h=bi)){if(xv(f))throw jE(),Error(n(418));for(;h;)vE(f,h),h=Nl(h.nextSibling)}if(wE(f),f.tag===13){if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(n(317));e:{for(f=f.nextSibling,h=0;f;){if(f.nodeType===8){var b=f.data;if(b==="/$"){if(h===0){bi=Nl(f.nextSibling);break e}h--}else b!=="$"&&b!=="$!"&&b!=="$?"||h++}f=f.nextSibling}bi=null}}else bi=vi?Nl(f.stateNode.nextSibling):null;return!0}function jE(){for(var f=bi;f;)f=Nl(f.nextSibling)}function ku(){bi=vi=null,sr=!1}function vv(f){ba===null?ba=[f]:ba.push(f)}var p$=_.ReactCurrentBatchConfig;function Ap(f,h,b){if(f=b.ref,f!==null&&typeof f!="function"&&typeof f!="object"){if(b._owner){if(b=b._owner,b){if(b.tag!==1)throw Error(n(309));var E=b.stateNode}if(!E)throw Error(n(147,f));var B=E,q=""+f;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===q?h.ref:(h=function(se){var ve=B.refs;se===null?delete ve[q]:ve[q]=se},h._stringRef=q,h)}if(typeof f!="string")throw Error(n(284));if(!b._owner)throw Error(n(290,f))}return f}function I0(f,h){throw f=Object.prototype.toString.call(h),Error(n(31,f==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":f))}function SE(f){var h=f._init;return h(f._payload)}function kE(f){function h(Te,Ce){if(f){var Oe=Te.deletions;Oe===null?(Te.deletions=[Ce],Te.flags|=16):Oe.push(Ce)}}function b(Te,Ce){if(!f)return null;for(;Ce!==null;)h(Te,Ce),Ce=Ce.sibling;return null}function E(Te,Ce){for(Te=new Map;Ce!==null;)Ce.key!==null?Te.set(Ce.key,Ce):Te.set(Ce.index,Ce),Ce=Ce.sibling;return Te}function B(Te,Ce){return Te=$l(Te,Ce),Te.index=0,Te.sibling=null,Te}function q(Te,Ce,Oe){return Te.index=Oe,f?(Oe=Te.alternate,Oe!==null?(Oe=Oe.index,Oe<Ce?(Te.flags|=2,Ce):Oe):(Te.flags|=2,Ce)):(Te.flags|=1048576,Ce)}function se(Te){return f&&Te.alternate===null&&(Te.flags|=2),Te}function ve(Te,Ce,Oe,vt){return Ce===null||Ce.tag!==6?(Ce=db(Oe,Te.mode,vt),Ce.return=Te,Ce):(Ce=B(Ce,Oe),Ce.return=Te,Ce)}function je(Te,Ce,Oe,vt){var Wt=Oe.type;return Wt===C?it(Te,Ce,Oe.props.children,vt,Oe.key):Ce!==null&&(Ce.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===V&&SE(Wt)===Ce.type)?(vt=B(Ce,Oe.props),vt.ref=Ap(Te,Ce,Oe),vt.return=Te,vt):(vt=sg(Oe.type,Oe.key,Oe.props,null,Te.mode,vt),vt.ref=Ap(Te,Ce,Oe),vt.return=Te,vt)}function Le(Te,Ce,Oe,vt){return Ce===null||Ce.tag!==4||Ce.stateNode.containerInfo!==Oe.containerInfo||Ce.stateNode.implementation!==Oe.implementation?(Ce=ub(Oe,Te.mode,vt),Ce.return=Te,Ce):(Ce=B(Ce,Oe.children||[]),Ce.return=Te,Ce)}function it(Te,Ce,Oe,vt,Wt){return Ce===null||Ce.tag!==7?(Ce=id(Oe,Te.mode,vt,Wt),Ce.return=Te,Ce):(Ce=B(Ce,Oe),Ce.return=Te,Ce)}function ct(Te,Ce,Oe){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number")return Ce=db(""+Ce,Te.mode,Oe),Ce.return=Te,Ce;if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case F:return Oe=sg(Ce.type,Ce.key,Ce.props,null,Te.mode,Oe),Oe.ref=Ap(Te,null,Ce),Oe.return=Te,Oe;case A:return Ce=ub(Ce,Te.mode,Oe),Ce.return=Te,Ce;case V:var vt=Ce._init;return ct(Te,vt(Ce._payload),Oe)}if(ft(Ce)||W(Ce))return Ce=id(Ce,Te.mode,Oe,null),Ce.return=Te,Ce;I0(Te,Ce)}return null}function nt(Te,Ce,Oe,vt){var Wt=Ce!==null?Ce.key:null;if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number")return Wt!==null?null:ve(Te,Ce,""+Oe,vt);if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case F:return Oe.key===Wt?je(Te,Ce,Oe,vt):null;case A:return Oe.key===Wt?Le(Te,Ce,Oe,vt):null;case V:return Wt=Oe._init,nt(Te,Ce,Wt(Oe._payload),vt)}if(ft(Oe)||W(Oe))return Wt!==null?null:it(Te,Ce,Oe,vt,null);I0(Te,Oe)}return null}function Rt(Te,Ce,Oe,vt,Wt){if(typeof vt=="string"&&vt!==""||typeof vt=="number")return Te=Te.get(Oe)||null,ve(Ce,Te,""+vt,Wt);if(typeof vt=="object"&&vt!==null){switch(vt.$$typeof){case F:return Te=Te.get(vt.key===null?Oe:vt.key)||null,je(Ce,Te,vt,Wt);case A:return Te=Te.get(vt.key===null?Oe:vt.key)||null,Le(Ce,Te,vt,Wt);case V:var Gt=vt._init;return Rt(Te,Ce,Oe,Gt(vt._payload),Wt)}if(ft(vt)||W(vt))return Te=Te.get(Oe)||null,it(Ce,Te,vt,Wt,null);I0(Ce,vt)}return null}function Pt(Te,Ce,Oe,vt){for(var Wt=null,Gt=null,Kt=Ce,tn=Ce=0,qr=null;Kt!==null&&tn<Oe.length;tn++){Kt.index>tn?(qr=Kt,Kt=null):qr=Kt.sibling;var Tn=nt(Te,Kt,Oe[tn],vt);
vendor: 9,380 bytes, line 38
38if(Tn===null){Kt===null&&(Kt=qr);break}f&&Kt&&Tn.alternate===null&&h(Te,Kt),Ce=q(Tn,Ce,tn),Gt===null?Wt=Tn:Gt.sibling=Tn,Gt=Tn,Kt=qr}if(tn===Oe.length)return b(Te,Kt),sr&&Jc(Te,tn),Wt;if(Kt===null){for(;tn<Oe.length;tn++)Kt=ct(Te,Oe[tn],vt),Kt!==null&&(Ce=q(Kt,Ce,tn),Gt===null?Wt=Kt:Gt.sibling=Kt,Gt=Kt);return sr&&Jc(Te,tn),Wt}for(Kt=E(Te,Kt);tn<Oe.length;tn++)qr=Rt(Kt,Te,tn,Oe[tn],vt),qr!==null&&(f&&qr.alternate!==null&&Kt.delete(qr.key===null?tn:qr.key),Ce=q(qr,Ce,tn),Gt===null?Wt=qr:Gt.sibling=qr,Gt=qr);return f&&Kt.forEach(function(Ul){return h(Te,Ul)}),sr&&Jc(Te,tn),Wt}function Lt(Te,Ce,Oe,vt){var Wt=W(Oe);if(typeof Wt!="function")throw Error(n(150));if(Oe=Wt.call(Oe),Oe==null)throw Error(n(151));for(var Gt=Wt=null,Kt=Ce,tn=Ce=0,qr=null,Tn=Oe.next();Kt!==null&&!Tn.done;tn++,Tn=Oe.next()){Kt.index>tn?(qr=Kt,Kt=null):qr=Kt.sibling;var Ul=nt(Te,Kt,Tn.value,vt);if(Ul===null){Kt===null&&(Kt=qr);break}f&&Kt&&Ul.alternate===null&&h(Te,Kt),Ce=q(Ul,Ce,tn),Gt===null?Wt=Ul:Gt.sibling=Ul,Gt=Ul,Kt=qr}if(Tn.done)return b(Te,Kt),sr&&Jc(Te,tn),Wt;if(Kt===null){for(;!Tn.done;tn++,Tn=Oe.next())Tn=ct(Te,Tn.value,vt),Tn!==null&&(Ce=q(Tn,Ce,tn),Gt===null?Wt=Tn:Gt.sibling=Tn,Gt=Tn);return sr&&Jc(Te,tn),Wt}for(Kt=E(Te,Kt);!Tn.done;tn++,Tn=Oe.next())Tn=Rt(Kt,Te,tn,Tn.value,vt),Tn!==null&&(f&&Tn.alternate!==null&&Kt.delete(Tn.key===null?tn:Tn.key),Ce=q(Tn,Ce,tn),Gt===null?Wt=Tn:Gt.sibling=Tn,Gt=Tn);return f&&Kt.forEach(function(q$){return h(Te,q$)}),sr&&Jc(Te,tn),Wt}function yr(Te,Ce,Oe,vt){if(typeof Oe=="object"&&Oe!==null&&Oe.type===C&&Oe.key===null&&(Oe=Oe.props.children),typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case F:e:{for(var Wt=Oe.key,Gt=Ce;Gt!==null;){if(Gt.key===Wt){if(Wt=Oe.type,Wt===C){if(Gt.tag===7){b(Te,Gt.sibling),Ce=B(Gt,Oe.props.children),Ce.return=Te,Te=Ce;break e}}else if(Gt.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===V&&SE(Wt)===Gt.type){b(Te,Gt.sibling),Ce=B(Gt,Oe.props),Ce.ref=Ap(Te,Gt,Oe),Ce.return=Te,Te=Ce;break e}b(Te,Gt);break}else h(Te,Gt);Gt=Gt.sibling}Oe.type===C?(Ce=id(Oe.props.children,Te.mode,vt,Oe.key),Ce.return=Te,Te=Ce):(vt=sg(Oe.type,Oe.key,Oe.props,null,Te.mode,vt),vt.ref=Ap(Te,Ce,Oe),vt.return=Te,Te=vt)}return se(Te);case A:e:{for(Gt=Oe.key;Ce!==null;){if(Ce.key===Gt)if(Ce.tag===4&&Ce.stateNode.containerInfo===Oe.containerInfo&&Ce.stateNode.implementation===Oe.implementation){b(Te,Ce.sibling),Ce=B(Ce,Oe.children||[]),Ce.return=Te,Te=Ce;break e}else{b(Te,Ce);break}else h(Te,Ce);Ce=Ce.sibling}Ce=ub(Oe,Te.mode,vt),Ce.return=Te,Te=Ce}return se(Te);case V:return Gt=Oe._init,yr(Te,Ce,Gt(Oe._payload),vt)}if(ft(Oe))return Pt(Te,Ce,Oe,vt);if(W(Oe))return Lt(Te,Ce,Oe,vt);I0(Te,Oe)}return typeof Oe=="string"&&Oe!==""||typeof Oe=="number"?(Oe=""+Oe,Ce!==null&&Ce.tag===6?(b(Te,Ce.sibling),Ce=B(Ce,Oe),Ce.return=Te,Te=Ce):(b(Te,Ce),Ce=db(Oe,Te.mode,vt),Ce.return=Te,Te=Ce),se(Te)):b(Te,Ce)}return yr}var _u=kE(!0),_E=kE(!1),P0=Rl(null),B0=null,Cu=null,bv=null;function wv(){bv=Cu=B0=null}function jv(f){var h=P0.current;Zn(P0),f._currentValue=h}function Sv(f,h,b){for(;f!==null;){var E=f.alternate;if((f.childLanes&h)!==h?(f.childLanes|=h,E!==null&&(E.childLanes|=h)):E!==null&&(E.childLanes&h)!==h&&(E.childLanes|=h),f===b)break;f=f.return}}function Eu(f,h){B0=f,bv=Cu=null,f=f.dependencies,f!==null&&f.firstContext!==null&&((f.lanes&h)!==0&&(ri=!0),f.firstContext=null)}function Vi(f){var h=f._currentValue;if(bv!==f)if(f={context:f,memoizedValue:h,next:null},Cu===null){if(B0===null)throw Error(n(308));Cu=f,B0.dependencies={lanes:0,firstContext:f}}else Cu=Cu.next=f;return h}var Qc=null;function kv(f){Qc===null?Qc=[f]:Qc.push(f)}function CE(f,h,b,E){var B=h.interleaved;return B===null?(b.next=b,kv(h)):(b.next=B.next,B.next=b),h.interleaved=b,Uo(f,E)}function Uo(f,h){f.lanes|=h;var b=f.alternate;for(b!==null&&(b.lanes|=h),b=f,f=f.return;f!==null;)f.childLanes|=h,b=f.alternate,b!==null&&(b.childLanes|=h),b=f,f=f.return;return b.tag===3?b.stateNode:null}var Pl=!1;function _v(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function EE(f,h){f=f.updateQueue,h.updateQueue===f&&(h.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,effects:f.effects})}function Vo(f,h){return{eventTime:f,lane:h,tag:0,payload:null,callback:null,next:null}}function Bl(f,h,b){var E=f.updateQueue;if(E===null)return null;if(E=E.shared,(_n&2)!==0){var B=E.pending;return B===null?h.next=h:(h.next=B.next,B.next=h),E.pending=h,Uo(f,b)}return B=E.interleaved,B===null?(h.next=h,kv(E)):(h.next=B.next,B.next=h),E.interleaved=h,Uo(f,b)}function O0(f,h,b){if(h=h.updateQueue,h!==null&&(h=h.shared,(b&4194240)!==0)){var E=h.lanes;E&=f.pendingLanes,b|=E,h.lanes=b,Ae(f,b)}}function FE(f,h){var b=f.updateQueue,E=f.alternate;if(E!==null&&(E=E.updateQueue,b===E)){var B=null,q=null;if(b=b.firstBaseUpdate,b!==null){do{var se={eventTime:b.eventTime,lane:b.lane,tag:b.tag,payload:b.payload,callback:b.callback,next:null};q===null?B=q=se:q=q.next=se,b=b.next}while(b!==null);q===null?B=q=h:q=q.next=h}else B=q=h;b={baseState:E.baseState,firstBaseUpdate:B,lastBaseUpdate:q,shared:E.shared,effects:E.effects},f.updateQueue=b;return}f=b.lastBaseUpdate,f===null?b.firstBaseUpdate=h:f.next=h,b.lastBaseUpdate=h}function M0(f,h,b,E){var B=f.updateQueue;Pl=!1;var q=B.firstBaseUpdate,se=B.lastBaseUpdate,ve=B.shared.pending;if(ve!==null){B.shared.pending=null;var je=ve,Le=je.next;je.next=null,se===null?q=Le:se.next=Le,se=je;var it=f.alternate;it!==null&&(it=it.updateQueue,ve=it.lastBaseUpdate,ve!==se&&(ve===null?it.firstBaseUpdate=Le:ve.next=Le,it.lastBaseUpdate=je))}if(q!==null){var ct=B.baseState;se=0,it=Le=je=null,ve=q;do{var nt=ve.lane,Rt=ve.eventTime;if((E&nt)===nt){it!==null&&(it=it.next={eventTime:Rt,lane:0,tag:ve.tag,payload:ve.payload,callback:ve.callback,next:null});e:{var Pt=f,Lt=ve;switch(nt=h,Rt=b,Lt.tag){case 1:if(Pt=Lt.payload,typeof Pt=="function"){ct=Pt.call(Rt,ct,nt);break e}ct=Pt;break e;case 3:Pt.flags=Pt.flags&-65537|128;case 0:if(Pt=Lt.payload,nt=typeof Pt=="function"?Pt.call(Rt,ct,nt):Pt,nt==null)break e;ct=O({},ct,nt);break e;case 2:Pl=!0}}ve.callback!==null&&ve.lane!==0&&(f.flags|=64,nt=B.effects,nt===null?B.effects=[ve]:nt.push(ve))}else Rt={eventTime:Rt,lane:nt,tag:ve.tag,payload:ve.payload,callback:ve.callback,next:null},it===null?(Le=it=Rt,je=ct):it=it.next=Rt,se|=nt;if(ve=ve.next,ve===null){if(ve=B.shared.pending,ve===null)break;nt=ve,ve=nt.next,nt.next=null,B.lastBaseUpdate=nt,B.shared.pending=null}}while(!0);if(it===null&&(je=ct),B.baseState=je,B.firstBaseUpdate=Le,B.lastBaseUpdate=it,h=B.shared.interleaved,h!==null){B=h;do se|=B.lane,B=B.next;while(B!==h)}else q===null&&(B.shared.lanes=0);td|=se,f.lanes=se,f.memoizedState=ct}}function AE(f,h,b){if(f=h.effects,h.effects=null,f!==null)for(h=0;h<f.length;h++){var E=f[h],B=E.callback;if(B!==null){if(E.callback=null,E=b,typeof B!="function")throw Error(n(191,B));B.call(E)}}}var Tp={},Za=Rl(Tp),Np=Rl(Tp),Rp=Rl(Tp);function Zc(f){if(f===Tp)throw Error(n(174));return f}function Cv(f,h){switch(qn(Rp,h),qn(Np,f),qn(Za,Tp),f=h.nodeType,f){case 9:case 11:h=(h=h.documentElement)?h.namespaceURI:be(null,"");break;default:f=f===8?h.parentNode:h,h=f.namespaceURI||null,f=f.tagName,h=be(h,f)}Zn(Za),qn(Za,h)}function Fu(){Zn(Za),Zn(Np),Zn(Rp)}function TE(f){Zc(Rp.current);var h=Zc(Za.current),b=be(h,f.type);h!==b&&(qn(Np,f),qn(Za,b))}function Ev(f){Np.current===f&&(Zn(Za),Zn(Np))}var or=Rl(0);function L0(f){for(var h=f;h!==null;){if(h.tag===13){var b=h.memoizedState;if(b!==null&&(b=b.dehydrated,b===null||b.data==="$?"||b.data==="$!"))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===f)break;for(;h.sibling===null;){if(h.return===null||h.return===f)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Fv=[];function Av(){for(var f=0;f<Fv.length;f++)Fv[f]._workInProgressVersionPrimary=null;Fv.length=0}var z0=_.ReactCurrentDispatcher,Tv=_.ReactCurrentBatchConfig,ed=0,lr=null,Pr=null,Vr=null,W0=!1,Dp=!1,Ip=0,h$=0;function vs(){throw Error(n(321))}function Nv(f,h){if(h===null)return!1;for(var b=0;b<h.length&&b<f.length;b++)if(!va(f[b],h[b]))return!1;return!0}function Rv(f,h,b,E,B,q){if(ed=q,lr=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,z0.current=f===null||f.memoizedState===null?y$:v$,f=b(E,B),Dp){q=0;do{if(Dp=!1,Ip=0,25<=q)throw Error(n(301));q+=1,Vr=Pr=null,h.updateQueue=null,z0.current=b$,f=b(E,B)}while(Dp)}if(z0.current=V0,h=Pr!==null&&Pr.next!==null,ed=0,Vr=Pr=lr=null,W0=!1,h)throw Error(n(300));return f}function Dv(){var f=Ip!==0;return Ip=0,f}function eo(){var f={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vr===null?lr.memoizedState=Vr=f:Vr=Vr.next=f,Vr}function Hi(){if(Pr===null){var f=lr.alternate;f=f!==null?f.memoizedState:null}else f=Pr.next;var h=Vr===null?lr.memoizedState:Vr.next;if(h!==null)Vr=h,Pr=f;else{if(f===null)throw Error(n(310));Pr=f,f={memoizedState:Pr.memoizedState,baseState:Pr.baseState,baseQueue:Pr.baseQueue,queue:Pr.queue,next:null},Vr===null?lr.memoizedState=Vr=f:Vr=Vr.next=f}return Vr}function Pp(f,h){return typeof h=="function"?h(f):h}function Iv(f){var h=Hi(),b=h.queue;if(b===null)throw Error(n(311));b.lastRenderedReducer=f;
vendor: 4,930 bytes, line 38
38var E=Pr,B=E.baseQueue,q=b.pending;if(q!==null){if(B!==null){var se=B.next;B.next=q.next,q.next=se}E.baseQueue=B=q,b.pending=null}if(B!==null){q=B.next,E=E.baseState;var ve=se=null,je=null,Le=q;do{var it=Le.lane;if((ed&it)===it)je!==null&&(je=je.next={lane:0,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null}),E=Le.hasEagerState?Le.eagerState:f(E,Le.action);else{var ct={lane:it,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null};je===null?(ve=je=ct,se=E):je=je.next=ct,lr.lanes|=it,td|=it}Le=Le.next}while(Le!==null&&Le!==q);je===null?se=E:je.next=ve,va(E,h.memoizedState)||(ri=!0),h.memoizedState=E,h.baseState=se,h.baseQueue=je,b.lastRenderedState=E}if(f=b.interleaved,f!==null){B=f;do q=B.lane,lr.lanes|=q,td|=q,B=B.next;while(B!==f)}else B===null&&(b.lanes=0);return[h.memoizedState,b.dispatch]}function Pv(f){var h=Hi(),b=h.queue;if(b===null)throw Error(n(311));b.lastRenderedReducer=f;var E=b.dispatch,B=b.pending,q=h.memoizedState;if(B!==null){b.pending=null;var se=B=B.next;do q=f(q,se.action),se=se.next;while(se!==B);va(q,h.memoizedState)||(ri=!0),h.memoizedState=q,h.baseQueue===null&&(h.baseState=q),b.lastRenderedState=q}return[q,E]}function NE(){}function RE(f,h){var b=lr,E=Hi(),B=h(),q=!va(E.memoizedState,B);if(q&&(E.memoizedState=B,ri=!0),E=E.queue,Bv(PE.bind(null,b,E,f),[f]),E.getSnapshot!==h||q||Vr!==null&&Vr.memoizedState.tag&1){if(b.flags|=2048,Bp(9,IE.bind(null,b,E,B,h),void 0,null),Hr===null)throw Error(n(349));(ed&30)!==0||DE(b,h,B)}return B}function DE(f,h,b){f.flags|=16384,f={getSnapshot:h,value:b},h=lr.updateQueue,h===null?(h={lastEffect:null,stores:null},lr.updateQueue=h,h.stores=[f]):(b=h.stores,b===null?h.stores=[f]:b.push(f))}function IE(f,h,b,E){h.value=b,h.getSnapshot=E,BE(h)&&OE(f)}function PE(f,h,b){return b(function(){BE(h)&&OE(f)})}function BE(f){var h=f.getSnapshot;f=f.value;try{var b=h();return!va(f,b)}catch{return!0}}function OE(f){var h=Uo(f,1);h!==null&&ka(h,f,1,-1)}function ME(f){var h=eo();return typeof f=="function"&&(f=f()),h.memoizedState=h.baseState=f,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pp,lastRenderedState:f},h.queue=f,f=f.dispatch=x$.bind(null,lr,f),[h.memoizedState,f]}function Bp(f,h,b,E){return f={tag:f,create:h,destroy:b,deps:E,next:null},h=lr.updateQueue,h===null?(h={lastEffect:null,stores:null},lr.updateQueue=h,h.lastEffect=f.next=f):(b=h.lastEffect,b===null?h.lastEffect=f.next=f:(E=b.next,b.next=f,f.next=E,h.lastEffect=f)),f}function LE(){return Hi().memoizedState}function $0(f,h,b,E){var B=eo();lr.flags|=f,B.memoizedState=Bp(1|h,b,void 0,E===void 0?null:E)}function U0(f,h,b,E){var B=Hi();E=E===void 0?null:E;var q=void 0;if(Pr!==null){var se=Pr.memoizedState;if(q=se.destroy,E!==null&&Nv(E,se.deps)){B.memoizedState=Bp(h,b,q,E);return}}lr.flags|=f,B.memoizedState=Bp(1|h,b,q,E)}function zE(f,h){return $0(8390656,8,f,h)}function Bv(f,h){return U0(2048,8,f,h)}function WE(f,h){return U0(4,2,f,h)}function $E(f,h){return U0(4,4,f,h)}function UE(f,h){if(typeof h=="function")return f=f(),h(f),function(){h(null)};if(h!=null)return f=f(),h.current=f,function(){h.current=null}}function VE(f,h,b){return b=b!=null?b.concat([f]):null,U0(4,4,UE.bind(null,h,f),b)}function Ov(){}function HE(f,h){var b=Hi();h=h===void 0?null:h;var E=b.memoizedState;return E!==null&&h!==null&&Nv(h,E[1])?E[0]:(b.memoizedState=[f,h],f)}function qE(f,h){var b=Hi();h=h===void 0?null:h;var E=b.memoizedState;return E!==null&&h!==null&&Nv(h,E[1])?E[0]:(f=f(),b.memoizedState=[f,h],f)}function GE(f,h,b){return(ed&21)===0?(f.baseState&&(f.baseState=!1,ri=!0),f.memoizedState=b):(va(b,h)||(b=qc(),lr.lanes|=b,td|=b,f.baseState=!0),h)}function m$(f,h){var b=Ge;Ge=b!==0&&4>b?b:4,f(!0);var E=Tv.transition;Tv.transition={};try{f(!1),h()}finally{Ge=b,Tv.transition=E}}function KE(){return Hi().memoizedState}function g$(f,h,b){var E=zl(f);if(b={lane:E,action:b,hasEagerState:!1,eagerState:null,next:null},YE(f))XE(h,b);else if(b=CE(f,h,b,E),b!==null){var B=Us();ka(b,f,E,B),JE(b,h,E)}}function x$(f,h,b){var E=zl(f),B={lane:E,action:b,hasEagerState:!1,eagerState:null,next:null};if(YE(f))XE(h,B);else{var q=f.alternate;if(f.lanes===0&&(q===null||q.lanes===0)&&(q=h.lastRenderedReducer,q!==null))try{var se=h.lastRenderedState,ve=q(se,b);if(B.hasEagerState=!0,B.eagerState=ve,va(ve,se)){var je=h.interleaved;je===null?(B.next=B,kv(h)):(B.next=je.next,je.next=B),h.interleaved=B;return}}catch{}finally{}b=CE(f,h,B,E),b!==null&&(B=Us(),ka(b,f,E,B),JE(b,h,E))}}function YE(f){var h=f.alternate;return f===lr||h!==null&&h===lr}function XE(f,h){Dp=W0=!0;var b=f.pending;b===null?h.next=h:(h.next=b.next,b.next=h),f.pending=h}function JE(f,h,b){if((b&4194240)!==0){var E=h.lanes;E&=f.pendingLanes,b|=E,h.lanes=b,Ae(f,b)}}var V0={readContext:Vi,useCallback:vs,useContext:vs,useEffect:vs,useImperativeHandle:vs,useInsertionEffect:vs,useLayoutEffect:vs,useMemo:vs,useReducer:vs,useRef
vendor: 7,244 bytes, lines 38-40
38:vs,useState:vs,useDebugValue:vs,useDeferredValue:vs,useTransition:vs,useMutableSource:vs,useSyncExternalStore:vs,useId:vs,unstable_isNewReconciler:!1},y$={readContext:Vi,useCallback:function(f,h){return eo().memoizedState=[f,h===void 0?null:h],f},useContext:Vi,useEffect:zE,useImperativeHandle:function(f,h,b){return b=b!=null?b.concat([f]):null,$0(4194308,4,UE.bind(null,h,f),b)},useLayoutEffect:function(f,h){return $0(4194308,4,f,h)},useInsertionEffect:function(f,h){return $0(4,2,f,h)},useMemo:function(f,h){var b=eo();return h=h===void 0?null:h,f=f(),b.memoizedState=[f,h],f},useReducer:function(f,h,b){var E=eo();return h=b!==void 0?b(h):h,E.memoizedState=E.baseState=h,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:h},E.queue=f,f=f.dispatch=g$.bind(null,lr,f),[E.memoizedState,f]},useRef:function(f){var h=eo();return f={current:f},h.memoizedState=f},useState:ME,useDebugValue:Ov,useDeferredValue:function(f){return eo().memoizedState=f},useTransition:function(){var f=ME(!1),h=f[0];return f=m$.bind(null,f[1]),eo().memoizedState=f,[h,f]},useMutableSource:function(){},useSyncExternalStore:function(f,h,b){var E=lr,B=eo();if(sr){if(b===void 0)throw Error(n(407));b=b()}else{if(b=h(),Hr===null)throw Error(n(349));(ed&30)!==0||DE(E,h,b)}B.memoizedState=b;var q={value:b,getSnapshot:h};return B.queue=q,zE(PE.bind(null,E,q,f),[f]),E.flags|=2048,Bp(9,IE.bind(null,E,q,b,h),void 0,null),b},useId:function(){var f=eo(),h=Hr.identifierPrefix;if(sr){var b=$o,E=Wo;b=(E&~(1<<32-Hn(E)-1)).toString(32)+b,h=":"+h+"R"+b,b=Ip++,0<b&&(h+="H"+b.toString(32)),h+=":"}else b=h$++,h=":"+h+"r"+b.toString(32)+":";return f.memoizedState=h},unstable_isNewReconciler:!1},v$={readContext:Vi,useCallback:HE,useContext:Vi,useEffect:Bv,useImperativeHandle:VE,useInsertionEffect:WE,useLayoutEffect:$E,useMemo:qE,useReducer:Iv,useRef:LE,useState:function(){return Iv(Pp)},useDebugValue:Ov,useDeferredValue:function(f){var h=Hi();return GE(h,Pr.memoizedState,f)},useTransition:function(){var f=Iv(Pp)[0],h=Hi().memoizedState;return[f,h]},useMutableSource:NE,useSyncExternalStore:RE,useId:KE,unstable_isNewReconciler:!1},b$={readContext:Vi,useCallback:HE,useContext:Vi,useEffect:Bv,useImperativeHandle:VE,useInsertionEffect:WE,useLayoutEffect:$E,useMemo:qE,useReducer:Pv,useRef:LE,useState:function(){return Pv(Pp)},useDebugValue:Ov,useDeferredValue:function(f){var h=Hi();return Pr===null?h.memoizedState=f:GE(h,Pr.memoizedState,f)},useTransition:function(){var f=Pv(Pp)[0],h=Hi().memoizedState;return[f,h]},useMutableSource:NE,useSyncExternalStore:RE,useId:KE,unstable_isNewReconciler:!1};function wa(f,h){if(f&&f.defaultProps){h=O({},h),f=f.defaultProps;for(var b in f)h[b]===void 0&&(h[b]=f[b]);return h}return h}function Mv(f,h,b,E){h=f.memoizedState,b=b(E,h),b=b==null?h:O({},h,b),f.memoizedState=b,f.lanes===0&&(f.updateQueue.baseState=b)}var H0={isMounted:function(f){return(f=f._reactInternals)?me(f)===f:!1},enqueueSetState:function(f,h,b){f=f._reactInternals;var E=Us(),B=zl(f),q=Vo(E,B);q.payload=h,b!=null&&(q.callback=b),h=Bl(f,q,B),h!==null&&(ka(h,f,B,E),O0(h,f,B))},enqueueReplaceState:function(f,h,b){f=f._reactInternals;var E=Us(),B=zl(f),q=Vo(E,B);q.tag=1,q.payload=h,b!=null&&(q.callback=b),h=Bl(f,q,B),h!==null&&(ka(h,f,B,E),O0(h,f,B))},enqueueForceUpdate:function(f,h){f=f._reactInternals;var b=Us(),E=zl(f),B=Vo(b,E);B.tag=2,h!=null&&(B.callback=h),h=Bl(f,B,E),h!==null&&(ka(h,f,E,b),O0(h,f,E))}};function QE(f,h,b,E,B,q,se){return f=f.stateNode,typeof f.shouldComponentUpdate=="function"?f.shouldComponentUpdate(E,q,se):h.prototype&&h.prototype.isPureReactComponent?!jp(b,E)||!jp(B,q):!0}function ZE(f,h,b){var E=!1,B=Dl,q=h.contextType;return typeof q=="object"&&q!==null?q=Vi(q):(B=ni(h)?Yc:ys.current,E=h.contextTypes,q=(E=E!=null)?wu(f,B):Dl),h=new h(b,q),f.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=H0,f.stateNode=h,h._reactInternals=f,E&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=B,f.__reactInternalMemoizedMaskedChildContext=q),h}function e4(f,h,b,E){f=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(b,E),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(b,E),h.state!==f&&H0.enqueueReplaceState(h,h.state,null)}function Lv(f,h,b,E){var B=f.stateNode;B.props=b,B.state=f.memoizedState,B.refs={},_v(f);var q=h.contextType;typeof q=="object"&&q!==null?B.context=Vi(q):(q=ni(h)?Yc:ys.current,B.context=wu(f,q)),B.state=f.memoizedState,q=h.getDerivedStateFromProps,typeof q=="function"&&(Mv(f,h,q,b),B.state=f.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof B.getSnapshotBeforeUpdate=="function"||typeof B.UNSAFE_componentWillMount!="function"&&typeof B.componentWillMount!="function"||(h=B.state,typeof B.componentWillMount=="function"&&B.componentWillMount(),typeof B.UNSAFE_componentWillMount=="function"&&B.UNSAFE_componentWillMount(),h!==B.state&&H0.enqueueReplaceState(B,B.state,null),M0(f,b,B,E),B.state=f.memoizedState),typeof B.componentDidMount=="function"&&(f.flags|=4194308)}function Au(f,h){try{var b="",E=h;do b+=Y(E),E=E.return;while(E);var B=b}catch(q){B=`
39Error generating stack: `+q.message+`
40`+q.stack}return{value:f,source:h,stack:B,digest:null}}function zv(f,h,b){return{value:f,source:null,stack:b??null,digest:h??null}}function Wv(f,h){try{console.error(h.value)}catch(b){setTimeout(function(){throw b})}}var w$=typeof WeakMap=="function"?WeakMap:Map;function t4(f,h,b){b=Vo(-1,b),b.tag=3,b.payload={element:null};var E=h.value;return b.callback=function(){Q0||(Q0=!0,nb=E),Wv(f,h)},b}function n4(f,h,b){b=Vo(-1,b),b.tag=3;var E=f.type.getDerivedStateFromError;if(typeof E=="function"){var B=h.value;b.payload=function(){return E(B)},b.callback=function(){Wv(f,h)}}var q=f.stateNode;return q!==null&&typeof q.componentDidCatch=="function"&&(b.callback=function(){Wv(f,h),typeof E!="function"&&(Ml===null?Ml=new Set([this]):Ml.add(this));var se=h.stack;this.componentDidCatch(h.value,{componentStack:se!==null?se:""})}),b}function r4(f,h,b){var E=f.pingCache;if(E===null){E=f.pingCache=new w$;var B=new Set;E.set(h,B)}else B=E.get(h),B===void 0&&(B=new Set,E.set(h,B));B.has(b)||(B.add(b),f=P$.bind(null,f,h,b),h.then(f,f))}function s4(f){do{var h;if((h=f.tag===13)&&(h=f.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return f;f=f.return}while(f!==null);return null}function i4(f,h,b,E,B){return(f.mode&1)===0?(f===h?f.flags|=65536:(f.flags|=128,b.flags|=131072,b.flags&=-52805,b.tag===1&&(b.alternate===null?b.tag=17:(h=Vo(-1,1),h.tag=2,Bl(b,h,1))),b.lanes|=1),f):(f.flags|=65536,f.lanes=B,f)}var j$=_.ReactCurrentOwner,ri=!1;function $s(f,h,b,E){h.child=f===null?_E(h,null,b,E):_u(h,f.child,b,E)}function a4(f,h,b,E,B){b=b.render;var q=h.ref;return Eu(h,B),E=Rv(f,h,b,E,q,B),b=Dv(),f!==null&&!ri?(h.updateQueue=f.updateQueue,h.flags&=-2053,f.lanes&=~B,Ho(f,h,B)):(sr&&b&&mv(h),h.flags|=1,$s(f,h,E,B),h.child)}function o4(f,h,b,E,B){if(f===null){var q=b.type;return typeof q=="function"&&!cb(q)&&q.defaultProps===void 0&&b.compare===null&&b.defaultProps===void 0?(h.tag=15,h.type=q,l4(f,h,q,E,B)):(f=sg(b.type,null,E,h,h.mode,B),f.ref=h.ref,f.return=h,h.child=f)}if(q=f.child,(f.lanes&B)===0){var se=q.memoizedProps;
vendor: 15,034 bytes, line 40
40if(b=b.compare,b=b!==null?b:jp,b(se,E)&&f.ref===h.ref)return Ho(f,h,B)}return h.flags|=1,f=$l(q,E),f.ref=h.ref,f.return=h,h.child=f}function l4(f,h,b,E,B){if(f!==null){var q=f.memoizedProps;if(jp(q,E)&&f.ref===h.ref)if(ri=!1,h.pendingProps=E=q,(f.lanes&B)!==0)(f.flags&131072)!==0&&(ri=!0);else return h.lanes=f.lanes,Ho(f,h,B)}return $v(f,h,b,E,B)}function c4(f,h,b){var E=h.pendingProps,B=E.children,q=f!==null?f.memoizedState:null;if(E.mode==="hidden")if((h.mode&1)===0)h.memoizedState={baseLanes:0,cachePool:null,transitions:null},qn(Nu,wi),wi|=b;else{if((b&1073741824)===0)return f=q!==null?q.baseLanes|b:b,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:f,cachePool:null,transitions:null},h.updateQueue=null,qn(Nu,wi),wi|=f,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},E=q!==null?q.baseLanes:b,qn(Nu,wi),wi|=E}else q!==null?(E=q.baseLanes|b,h.memoizedState=null):E=b,qn(Nu,wi),wi|=E;return $s(f,h,B,b),h.child}function d4(f,h){var b=h.ref;(f===null&&b!==null||f!==null&&f.ref!==b)&&(h.flags|=512,h.flags|=2097152)}function $v(f,h,b,E,B){var q=ni(b)?Yc:ys.current;return q=wu(h,q),Eu(h,B),b=Rv(f,h,b,E,q,B),E=Dv(),f!==null&&!ri?(h.updateQueue=f.updateQueue,h.flags&=-2053,f.lanes&=~B,Ho(f,h,B)):(sr&&E&&mv(h),h.flags|=1,$s(f,h,b,B),h.child)}function u4(f,h,b,E,B){if(ni(b)){var q=!0;A0(h)}else q=!1;if(Eu(h,B),h.stateNode===null)G0(f,h),ZE(h,b,E),Lv(h,b,E,B),E=!0;else if(f===null){var se=h.stateNode,ve=h.memoizedProps;se.props=ve;var je=se.context,Le=b.contextType;typeof Le=="object"&&Le!==null?Le=Vi(Le):(Le=ni(b)?Yc:ys.current,Le=wu(h,Le));var it=b.getDerivedStateFromProps,ct=typeof it=="function"||typeof se.getSnapshotBeforeUpdate=="function";ct||typeof se.UNSAFE_componentWillReceiveProps!="function"&&typeof se.componentWillReceiveProps!="function"||(ve!==E||je!==Le)&&e4(h,se,E,Le),Pl=!1;var nt=h.memoizedState;se.state=nt,M0(h,E,se,B),je=h.memoizedState,ve!==E||nt!==je||ti.current||Pl?(typeof it=="function"&&(Mv(h,b,it,E),je=h.memoizedState),(ve=Pl||QE(h,b,ve,E,nt,je,Le))?(ct||typeof se.UNSAFE_componentWillMount!="function"&&typeof se.componentWillMount!="function"||(typeof se.componentWillMount=="function"&&se.componentWillMount(),typeof se.UNSAFE_componentWillMount=="function"&&se.UNSAFE_componentWillMount()),typeof se.componentDidMount=="function"&&(h.flags|=4194308)):(typeof se.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=E,h.memoizedState=je),se.props=E,se.state=je,se.context=Le,E=ve):(typeof se.componentDidMount=="function"&&(h.flags|=4194308),E=!1)}else{se=h.stateNode,EE(f,h),ve=h.memoizedProps,Le=h.type===h.elementType?ve:wa(h.type,ve),se.props=Le,ct=h.pendingProps,nt=se.context,je=b.contextType,typeof je=="object"&&je!==null?je=Vi(je):(je=ni(b)?Yc:ys.current,je=wu(h,je));var Rt=b.getDerivedStateFromProps;(it=typeof Rt=="function"||typeof se.getSnapshotBeforeUpdate=="function")||typeof se.UNSAFE_componentWillReceiveProps!="function"&&typeof se.componentWillReceiveProps!="function"||(ve!==ct||nt!==je)&&e4(h,se,E,je),Pl=!1,nt=h.memoizedState,se.state=nt,M0(h,E,se,B);var Pt=h.memoizedState;ve!==ct||nt!==Pt||ti.current||Pl?(typeof Rt=="function"&&(Mv(h,b,Rt,E),Pt=h.memoizedState),(Le=Pl||QE(h,b,Le,E,nt,Pt,je)||!1)?(it||typeof se.UNSAFE_componentWillUpdate!="function"&&typeof se.componentWillUpdate!="function"||(typeof se.componentWillUpdate=="function"&&se.componentWillUpdate(E,Pt,je),typeof se.UNSAFE_componentWillUpdate=="function"&&se.UNSAFE_componentWillUpdate(E,Pt,je)),typeof se.componentDidUpdate=="function"&&(h.flags|=4),typeof se.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof se.componentDidUpdate!="function"||ve===f.memoizedProps&&nt===f.memoizedState||(h.flags|=4),typeof se.getSnapshotBeforeUpdate!="function"||ve===f.memoizedProps&&nt===f.memoizedState||(h.flags|=1024),h.memoizedProps=E,h.memoizedState=Pt),se.props=E,se.state=Pt,se.context=je,E=Le):(typeof se.componentDidUpdate!="function"||ve===f.memoizedProps&&nt===f.memoizedState||(h.flags|=4),typeof se.getSnapshotBeforeUpdate!="function"||ve===f.memoizedProps&&nt===f.memoizedState||(h.flags|=1024),E=!1)}return Uv(f,h,b,E,q,B)}function Uv(f,h,b,E,B,q){d4(f,h);var se=(h.flags&128)!==0;if(!E&&!se)return B&&gE(h,b,!1),Ho(f,h,q);E=h.stateNode,j$.current=h;var ve=se&&typeof b.getDerivedStateFromError!="function"?null:E.render();return h.flags|=1,f!==null&&se?(h.child=_u(h,f.child,null,q),h.child=_u(h,null,ve,q)):$s(f,h,ve,q),h.memoizedState=E.state,B&&gE(h,b,!0),h.child}function f4(f){var h=f.stateNode;h.pendingContext?hE(f,h.pendingContext,h.pendingContext!==h.context):h.context&&hE(f,h.context,!1),Cv(f,h.containerInfo)}function p4(f,h,b,E,B){return ku(),vv(B),h.flags|=256,$s(f,h,b,E),h.child}var Vv={dehydrated:null,treeContext:null,retryLane:0};function Hv(f){return{baseLanes:f,cachePool:null,transitions:null}}function h4(f,h,b){var E=h.pendingProps,B=or.current,q=!1,se=(h.flags&128)!==0,ve;if((ve=se)||(ve=f!==null&&f.memoizedState===null?!1:(B&2)!==0),ve?(q=!0,h.flags&=-129):(f===null||f.memoizedState!==null)&&(B|=1),qn(or,B&1),f===null)return yv(h),f=h.memoizedState,f!==null&&(f=f.dehydrated,f!==null)?((h.mode&1)===0?h.lanes=1:f.data==="$!"?h.lanes=8:h.lanes=1073741824,null):(se=E.children,f=E.fallback,q?(E=h.mode,q=h.child,se={mode:"hidden",children:se},(E&1)===0&&q!==null?(q.childLanes=0,q.pendingProps=se):q=ig(se,E,0,null),f=id(f,E,b,null),q.return=h,f.return=h,q.sibling=f,h.child=q,h.child.memoizedState=Hv(b),h.memoizedState=Vv,f):qv(h,se));if(B=f.memoizedState,B!==null&&(ve=B.dehydrated,ve!==null))return S$(f,h,se,E,ve,B,b);if(q){q=E.fallback,se=h.mode,B=f.child,ve=B.sibling;var je={mode:"hidden",children:E.children};return(se&1)===0&&h.child!==B?(E=h.child,E.childLanes=0,E.pendingProps=je,h.deletions=null):(E=$l(B,je),E.subtreeFlags=B.subtreeFlags&14680064),ve!==null?q=$l(ve,q):(q=id(q,se,b,null),q.flags|=2),q.return=h,E.return=h,E.sibling=q,h.child=E,E=q,q=h.child,se=f.child.memoizedState,se=se===null?Hv(b):{baseLanes:se.baseLanes|b,cachePool:null,transitions:se.transitions},q.memoizedState=se,q.childLanes=f.childLanes&~b,h.memoizedState=Vv,E}return q=f.child,f=q.sibling,E=$l(q,{mode:"visible",children:E.children}),(h.mode&1)===0&&(E.lanes=b),E.return=h,E.sibling=null,f!==null&&(b=h.deletions,b===null?(h.deletions=[f],h.flags|=16):b.push(f)),h.child=E,h.memoizedState=null,E}function qv(f,h){return h=ig({mode:"visible",children:h},f.mode,0,null),h.return=f,f.child=h}function q0(f,h,b,E){return E!==null&&vv(E),_u(h,f.child,null,b),f=qv(h,h.pendingProps.children),f.flags|=2,h.memoizedState=null,f}function S$(f,h,b,E,B,q,se){if(b)return h.flags&256?(h.flags&=-257,E=zv(Error(n(422))),q0(f,h,se,E)):h.memoizedState!==null?(h.child=f.child,h.flags|=128,null):(q=E.fallback,B=h.mode,E=ig({mode:"visible",children:E.children},B,0,null),q=id(q,B,se,null),q.flags|=2,E.return=h,q.return=h,E.sibling=q,h.child=E,(h.mode&1)!==0&&_u(h,f.child,null,se),h.child.memoizedState=Hv(se),h.memoizedState=Vv,q);if((h.mode&1)===0)return q0(f,h,se,null);if(B.data==="$!"){if(E=B.nextSibling&&B.nextSibling.dataset,E)var ve=E.dgst;return E=ve,q=Error(n(419)),E=zv(q,E,void 0),q0(f,h,se,E)}if(ve=(se&f.childLanes)!==0,ri||ve){if(E=Hr,E!==null){switch(se&-se){case 4:B=2;break;case 16:B=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:B=32;break;case 536870912:B=268435456;break;default:B=0}B=(B&(E.suspendedLanes|se))!==0?0:B,B!==0&&B!==q.retryLane&&(q.retryLane=B,Uo(f,B),ka(E,f,B,-1))}return lb(),E=zv(Error(n(421))),q0(f,h,se,E)}return B.data==="$?"?(h.flags|=128,h.child=f.child,h=B$.bind(null,f),B._reactRetry=h,null):(f=q.treeContext,bi=Nl(B.nextSibling),vi=h,sr=!0,ba=null,f!==null&&($i[Ui++]=Wo,$i[Ui++]=$o,$i[Ui++]=Xc,Wo=f.id,$o=f.overflow,Xc=h),h=qv(h,E.children),h.flags|=4096,h)}function m4(f,h,b){f.lanes|=h;var E=f.alternate;E!==null&&(E.lanes|=h),Sv(f.return,h,b)}function Gv(f,h,b,E,B){var q=f.memoizedState;q===null?f.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:E,tail:b,tailMode:B}:(q.isBackwards=h,q.rendering=null,q.renderingStartTime=0,q.last=E,q.tail=b,q.tailMode=B)}function g4(f,h,b){var E=h.pendingProps,B=E.revealOrder,q=E.tail;if($s(f,h,E.children,b),E=or.current,(E&2)!==0)E=E&1|2,h.flags|=128;else{if(f!==null&&(f.flags&128)!==0)e:for(f=h.child;f!==null;){if(f.tag===13)f.memoizedState!==null&&m4(f,b,h);else if(f.tag===19)m4(f,b,h);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===h)break e;for(;f.sibling===null;){if(f.return===null||f.return===h)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}E&=1}if(qn(or,E),(h.mode&1)===0)h.memoizedState=null;else switch(B){case"forwards":for(b=h.child,B=null;b!==null;)f=b.alternate,f!==null&&L0(f)===null&&(B=b),b=b.sibling;b=B,b===null?(B=h.child,h.child=null):(B=b.sibling,b.sibling=null),Gv(h,!1,B,b,q);break;case"backwards":for(b=null,B=h.child,h.child=null;B!==null;){if(f=B.alternate,f!==null&&L0(f)===null){h.child=B;break}f=B.sibling,B.sibling=b,b=B,B=f}Gv(h,!0,b,null,q);break;case"together":Gv(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function G0(f,h){(h.mode&1)===0&&f!==null&&(f.alternate=null,h.alternate=null,h.flags|=2)}function Ho(f,h,b){if(f!==null&&(h.dependencies=f.dependencies),td|=h.lanes,(b&h.childLanes)===0)return null;if(f!==null&&h.child!==f.child)throw Error(n(153));if(h.child!==null){for(f=h.child,b=$l(f,f.pendingProps),h.child=b,b.return=h;f.sibling!==null;)f=f.sibling,b=b.sibling=$l(f,f.pendingProps),b.return=h;b.sibling=null}return h.child}function k$(f,h,b){switch(h.tag){case 3:f4(h),ku();break;case 5:TE(h);break;case 1:ni(h.type)&&A0(h);break;case 4:Cv(h,h.stateNode.containerInfo);break;case 10:var E=h.type._context,B=h.memoizedProps.value;qn(P0,E._currentValue),E._currentValue=B;break;case 13:if(E=h.memoizedState,E!==null)return E.dehydrated!==null?(qn(or,or.current&1),h.flags|=128,null):(b&h.child.childLanes)!==0?h4(f,h,b):(qn(or,or.current&1),f=Ho(f,h,b),f!==null?f.sibling:null);qn(or,or.current&1);break;case 19:if(E=(b&h.childLanes)!==0,(f.flags&128)!==0){if(E)return g4(f,h,b);h.flags|=128}if(B=h.memoizedState,B!==null&&(B.rendering=null,B.tail=null,B.lastEffect=null),qn(or,or.current),E)break;return null;case 22:case 23:return h.lanes=0,c4(f,h,b)}return Ho(f,h,b)}var x4,Kv,y4,v4;x4=function(f,h){for(var b=h.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===h)break;for(;b.sibling===null;){if(b.return===null||b.return===h)return;b=b.return}b.sibling.return=b.return,b=b.sibling}},Kv=function(){},y4=function(f,h,b,E){var B=f.memoizedProps;if(B!==E){f=h.stateNode,Zc(Za.current);var q=null;switch(b){case"input":B=te(f,B),E=te(f,E),q=[];break;case"select":B=O({},B,{value:void 0}),E=O({},E,{value:void 0}),q=[];break;case"textarea":B=Ve(f,B),E=Ve(f,E),q=[];break;default:typeof B.onClick!="function"&&typeof E.onClick=="function"&&(f.onclick=C0)}Ot(b,E);var se;b=null;for(Le in B)if(!E.hasOwnProperty(Le)&&B.hasOwnProperty(Le)&&B[Le]!=null)if(Le==="style"){var ve=B[Le];for(se in ve)ve.hasOwnProperty(se)&&(b||(b={}),b[se]="")}else Le!=="dangerouslySetInnerHTML"&&Le!=="children"&&Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&Le!=="autoFocus"&&(i.hasOwnProperty(Le)?q||(q=[]):(q=q||[]).push(Le,null));for(Le in E){var je=E[Le];if(ve=B!=null?B[Le]:void 0,E.hasOwnProperty(Le)&&je!==ve&&(je!=null||ve!=null))if(Le==="style")if(ve){for(se in ve)!ve.hasOwnProperty(se)||je&&je.hasOwnProperty(se)||(b||(b={}),b[se]="");for(se in je)je.hasOwnProperty(se)&&ve[se]!==je[se]&&(b||(b={}),b[se]=je[se])}else b||(q||(q=[]),q.push(Le,b)),b=je;else Le==="dangerouslySetInnerHTML"?(je=je?je.__html:void 0,ve=ve?ve.__html:void 0,je!=null&&ve!==je&&(q=q||[]).push(Le,je)):Le==="children"?typeof je!="string"&&typeof je!="number"||(q=q||[]).push(Le,""+je):Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&(i.hasOwnProperty(Le)?(je!=null&&Le==="onScroll"&&Qn("scroll",f),q||ve===je||(q=[])):(q=q||[]).push(Le,je))}b&&(q=q||[]).push("style",b);var Le=q;(h.updateQueue=Le)&&(h.flags|=4)}},v4=function(f,h,b,E){b!==E&&(h.flags|=4)};function Op(f,h){if(!sr)switch(f.tailMode){case"hidden":h=f.tail;for(var b=null;h!==null;)h.alternate!==null&&(b=h),h=h.sibling;b===null?f.tail=null:b.sibling=null;break;case"collapsed":b=f.tail;for(var E=null;b!==null;)b.alternate!==null&&(E=b),b=b.sibling;E===null?h||f.tail===null?f.tail=null:f.tail.sibling=null:E.sibling=null}}function bs(f){var h=f.alternate!==null&&f.alternate.child===f.child,b=0,E=0;if(h)for(var B=f.child;B!==null;)b|=B.lanes|B.childLanes,E|=B.subtreeFlags&14680064,E|=B.flags&14680064,B.return=f,B=B.sibling;else for(B=f.child;B!==null;)b|=B.lanes|B.childLanes,E|=B.subtreeFlags,E|=B.flags,B.return=f,B=B.sibling;return f.subtreeFlags|=E,f.childLanes=b,h}function _$(f,h,b){var E=h.pendingProps;switch(gv(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bs(h),null;case 1:return ni(h.type)&&F0(),bs(h),null;case 3:return E=h.stateNode,Fu(),Zn(ti),Zn(ys),Av(),E.pendingContext&&(E.context=E.pendingContext,E.pendingContext=null),(f===null||f.child===null)&&(D0(h)?h.flags|=4:f===null||f.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,ba!==null&&(ib(ba),ba=null))),Kv(f,h),bs(h),null;case 5:Ev(h);var B=Zc(Rp.current);if(b=h.type,f!==null&&h.stateNode!=null)y4(f,h,b,E,B),f.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!E){if(h.stateNode===null)throw Error(n(166));return bs(h),null}if(f=Zc(Za.current),D0(h)){E=h.stateNode,b=h.type;var q=h.memoizedProps;switch(E[Qa]=h,E[Ep]=q,f=(h.mode&1)!==0,b){case"dialog":Qn("cancel",E),Qn("close",E);break;case"iframe":case"object":case"embed":Qn("load",E);break;case"video":case"audio":for(B=0;B<kp.length;B++)Qn(kp[B],E);break;case"source":Qn("error",E);break;case"img":case"image":case"link":Qn("error",E),Qn("load",E);break;case"details":Qn("toggle",E);break;case"input":xe(E,q),Qn("invalid",E);break;case"select":E._wrapperState={wasMultiple:!!q.multiple},Qn("invalid",E);break;case"textarea":ze(E,q),Qn("invalid",E)}Ot(b,q),B=null;for(var se in q)if(q.hasOwnProperty(se)){var ve=q[se];se==="children"?typeof ve=="string"?E.textContent!==ve&&(q.suppressHydrationWarning!==!0&&_0(E.textContent,ve,f),B=["children",ve]):typeof ve=="number"&&E.textContent!==""+ve&&(q.suppressHydrationWarning!==!0&&_0(E.textContent,ve,f),B=["children",""+ve]):i.hasOwnProperty(se)&&ve!=null&&se==="onScroll"&&Qn("scroll",E)}switch(b){case"input":pe(E),ge(E,q,!0);break;case"textarea":pe(E),Nt(E);break;case"select":case"option":break;default:typeof q.onClick=="function"&&(E.onclick=C0)}E=B,h.updateQueue=E,E!==null&&(h.flags|=4)}else{se=B.nodeType===9?B:B.ownerDocument,f==="http://www.w3.org/1999/xhtml"&&(f=_e(b)),f==="http://www.w3.org/1999/xhtml"?b==="script"?(f=se.createElement("div"),f.innerHTML="<script><\/script>
40",f=f.removeChild(f.firstChild)):typeof E.is=="string"?f=se.createElement(b,{is:E.is}):(f=se.createElement(b),b==="select"&&(se=f,E.multiple?se.multiple=!0:E.size&&(se.size=E.size))):f=se.createElementNS(f,b),f[Qa]=h,f[Ep]=E,x4(f,h,!1,!1),h.stateNode=f;e:{switch(se=sn(b,E),b){case"dialog":Qn("cancel",f),Qn("close",f),B=E;break;case"iframe":case"object":case"embed":Qn("load",f),B=E;break;case"video":case"audio":for(B=0;B<kp.length;B++)Qn(kp[B],f);B=E;break;case"source":Qn("error",f),B=E;break;case"img":case"image":case"link":Qn("error",f),Qn("load",f),B=E;break;case"details":Qn("toggle",f),B=E;break;case"input":xe(f,E),B=te(f,E),Qn("invalid",f);break;case"option":B=E;break;case"select":f._wrapperState={wasMultiple:!!E.multiple},B=O({},E,{value:void 0}),Qn("invalid",f);break;case"textarea":ze(f,E),B=Ve(f,E),Qn("invalid",f);break;default:B=E}Ot(b,B),ve=B;for(q in ve)if(ve.hasOwnProperty(q)){var je=ve[q];q==="style"?et(f,je):q==="dangerouslySetInnerHTML"?(je=je?je.__html:void 0,je!=null&&Xe(f,je)):q==="children"?typeof je=="string"?(b!=="textarea"||je!=="")&&He(f,je):typeof je=="number"&&He(f,""+je):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(i.hasOwnProperty(q)?je!=null&&q==="onScroll"&&Qn("scroll",f):je!=null&&S(f,q,je,se))}switch(b){case"input":pe(f),ge(f,E,!1);break;case"textarea":pe(f),Nt(f);break;case"option":E.value!=null&&f.setAttribute("value",""+ie(E.value));break;case"select":f.multiple=!!E.multiple,q=E.value,q!=null?Qe(f,!!E.multiple,q,!1):E.defaultValue!=null&&Qe(f,!!E.multiple,E.defaultValue,!0);break;default:typeof B.onClick=="function"&&(f.onclick=C0)}switch(b){case"button":case"input":case"select":case"textarea":E=!!E.autoFocus;break e;case"img":E=!0;break e;default:E=!1}}E&&(h.flags|=4)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return bs(h),null;case 6:if(f&&h.stateNode!=null)v4(f,h,f.memoizedProps,E);else{if(typeof E!="string"&&h.stateNode===null)throw Error(n(166));if(b=Zc(Rp.current),Zc(Za.current),D0(h)){if(E=h.stateNode,b=h.memoizedProps,E[Qa]=h,(q=E.nodeValue!==b)&&(f=vi,f!==null))switch(f.tag){case 3:_0(E.nodeValue,b,(f.mode&1)!==0);break;case 5:f.memoizedProps.suppressHydrationWarning!==!0&&_0(E.nodeValue,b,(f.mode&1)!==0)}q&&(h.flags|=4)}else E=(b.nodeType===9?b:b.ownerDocument).createTextNode(E),E[Qa]=h,h.stateNode=E}return bs(h),null;case 13:if(Zn(or),E=h.memoizedState,f===null||f.memoizedState!==null&&f.memoizedState.dehydrated!==null){if(sr&&bi!==null&&(h.mode&1)!==0&&(h.flags&128)===0)jE(),ku(),h.flags|=98560,q=!1;else if(q=D0(h),E!==null&&E.dehydrated!==null){if(f===null){if(!q)throw Error(n(318));if(q=h.memoizedState,q=q!==null?q.dehydrated:null,!q)throw Error(n(317));q[Qa]=h}else ku(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;bs(h),q=!1}else ba!==null&&(ib(ba),ba=null),q=!0;if(!q)return h.flags&65536?h:null}return(h.flags&128)!==0?(h.lanes=b,h):(E=E!==null,E!==(f!==null&&f.memoizedState!==null)&&E&&(h.child.flags|=8192,(h.mode&1)!==0&&(f===null||(or.current&1)!==0?Br===0&&(Br=3):lb())),h.updateQueue!==null&&(h.flags|=4),bs(h),null);case 4:return Fu(),Kv(f,h),f===null&&_p(h.stateNode.containerInfo),bs(h),null;case 10:return jv(h.type._context),bs(h),null;case 17:return ni(h.type)&&F0(),bs(h),null;case 19:if(Zn(or),q=h.memoizedState,q===null)return bs(h),null;if(E=(h.flags&128)!==0,se=q.rendering,se===null)if(E)Op(q,!1);else{if(Br!==0||f!==null&&(f.flags&128)!==0)for(f=h.child;f!==null;){if(se=L0(f),se!==null){for(h.flags|=128,Op(q,!1),E=se.updateQueue,E!==null&&(h.updateQueue=E,h.flags|=4),h.subtreeFlags=0,E=b,b=h.child;b!==null;)q=b,f=E,q.flags&=14680066,se=q.alternate,se===null?(q.childLanes=0,q.lanes=f,q.child=null,q.subtreeFlags=0,q.memoizedProps=null,q.memoizedState=null,q.updateQueue=null,q.dependencies=null,q.stateNode=null):(q.childLanes=se.childLanes,q.lanes=se.lanes,q.child=se.child,q.subtreeFlags=0,q.deletions=null,q.memoizedProps=se.memoizedProps,q.memoizedState=se.memoizedState,q.updateQueue=se.updateQueue,q.type=se.type,f=se.dependencies,q.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),b=b.sibling;return qn(or,or.current&1|2),h.child}f=f.sibling}q.tail!==null&&ot()>Ru&&(h.flags|=128,E=!0,Op(q,!1),h.lanes=4194304)}else{if(!E)if(f=L0(se),f!==null){if(h.flags|=128,E=!0,b=f.updateQueue,b!==null&&(h.updateQueue=b,h.flags|=4),Op(q,!0),q.tail===null&&q.tailMode==="hidden"&&!se.alternate&&!sr)return bs(h),null}else 2*ot()-q.renderingStartTime>Ru&&b!==1073741824&&(h.flags|=128,E=!0,Op(q,!1),h.lanes=4194304);q.isBackwards?(se.sibling=h.child,h.child=se):(b=q.last,b!==null?b.sibling=se:h.child=se,q.last=se)}return q.tail!==null?(h=q.tail,q.rendering=h,q.tail=h.sibling,q.renderingStartTime=ot(),h.sibling=null,b=or.current,qn(or,E?b&1|2:b&1),h):(bs(h),null);case 22:case 23:return ob(),E=h.memoizedState!==null,f!==null&&f.memoizedState!==null!==E&&(h.flags|=8192),E&&(h.mode&1)!==0?(wi&1073741824)!==0&&(bs(h),h.subtreeFlags&6&&(h.flags|=8192)):bs(h),null;case 24:return null;case 25:return null}throw Error(n(156,h.tag))}function C$(f,h){switch(gv(h),h.tag){case 1:return ni(h.type)&&F0(),f=h.flags,f&65536?(h.flags=f&-65537|128,h):null;case 3:return Fu(),Zn(ti),Zn(ys),Av(),f=h.flags,(f&65536)!==0&&(f&128)===0?(h.flags=f&-65537|128,h):null;case 5:return Ev(h),null;case 13:if(Zn(or),f=h.memoizedState,f!==null&&f.dehydrated!==null){if(h.alternate===null)throw Error(n(340));ku()}return f=h.flags,f&65536?(h.flags=f&-65537|128,h):null;case 19:return Zn(or),null;case 4:return Fu(),null;case 10:return jv(h.type._context),null;case 22:case 23:return ob(),null;case 24:return null;default:return null}}var K0=!1,ws=!1,E$=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function Tu(f,h){var b=f.ref;if(b!==null)if(typeof b=="function")try{b(null)}catch(E){ur(f,h,E)}else b.current=null}function Yv(f,h,b){try{b()}catch(E){ur(f,h,E)}}var b4=!1;function F$(f,h){if(ov=h0,f=QC(),Z1(f)){if("selectionStart"in f)var b={start:f.selectionStart,end:f.selectionEnd};else e:{b=(b=f.ownerDocument)&&b.defaultView||window;var E=b.getSelection&&b.getSelection();if(E&&E.rangeCount!==0){b=E.anchorNode;var B=E.anchorOffset,q=E.focusNode;E=E.focusOffset;try{b.nodeType,q.nodeType}catch{b=null;break e}var se=0,ve=-1,je=-1,Le=0,it=0,ct=f,nt=null;t:for(;;){for(var Rt;
vendor: 21,258 bytes, line 40
40ct!==b||B!==0&&ct.nodeType!==3||(ve=se+B),ct!==q||E!==0&&ct.nodeType!==3||(je=se+E),ct.nodeType===3&&(se+=ct.nodeValue.length),(Rt=ct.firstChild)!==null;)nt=ct,ct=Rt;for(;;){if(ct===f)break t;if(nt===b&&++Le===B&&(ve=se),nt===q&&++it===E&&(je=se),(Rt=ct.nextSibling)!==null)break;ct=nt,nt=ct.parentNode}ct=Rt}b=ve===-1||je===-1?null:{start:ve,end:je}}else b=null}b=b||{start:0,end:0}}else b=null;for(lv={focusedElem:f,selectionRange:b},h0=!1,Dt=h;Dt!==null;)if(h=Dt,f=h.child,(h.subtreeFlags&1028)!==0&&f!==null)f.return=h,Dt=f;else for(;Dt!==null;){h=Dt;try{var Pt=h.alternate;if((h.flags&1024)!==0)switch(h.tag){case 0:case 11:case 15:break;case 1:if(Pt!==null){var Lt=Pt.memoizedProps,yr=Pt.memoizedState,Te=h.stateNode,Ce=Te.getSnapshotBeforeUpdate(h.elementType===h.type?Lt:wa(h.type,Lt),yr);Te.__reactInternalSnapshotBeforeUpdate=Ce}break;case 3:var Oe=h.stateNode.containerInfo;Oe.nodeType===1?Oe.textContent="":Oe.nodeType===9&&Oe.documentElement&&Oe.removeChild(Oe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(vt){ur(h,h.return,vt)}if(f=h.sibling,f!==null){f.return=h.return,Dt=f;break}Dt=h.return}return Pt=b4,b4=!1,Pt}function Mp(f,h,b){var E=h.updateQueue;if(E=E!==null?E.lastEffect:null,E!==null){var B=E=E.next;do{if((B.tag&f)===f){var q=B.destroy;B.destroy=void 0,q!==void 0&&Yv(h,b,q)}B=B.next}while(B!==E)}}function Y0(f,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var b=h=h.next;do{if((b.tag&f)===f){var E=b.create;b.destroy=E()}b=b.next}while(b!==h)}}function Xv(f){var h=f.ref;if(h!==null){var b=f.stateNode;switch(f.tag){case 5:f=b;break;default:f=b}typeof h=="function"?h(f):h.current=f}}function w4(f){var h=f.alternate;h!==null&&(f.alternate=null,w4(h)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(h=f.stateNode,h!==null&&(delete h[Qa],delete h[Ep],delete h[fv],delete h[d$],delete h[u$])),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function j4(f){return f.tag===5||f.tag===3||f.tag===4}function S4(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||j4(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function Jv(f,h,b){var E=f.tag;if(E===5||E===6)f=f.stateNode,h?b.nodeType===8?b.parentNode.insertBefore(f,h):b.insertBefore(f,h):(b.nodeType===8?(h=b.parentNode,h.insertBefore(f,b)):(h=b,h.appendChild(f)),b=b._reactRootContainer,b!=null||h.onclick!==null||(h.onclick=C0));else if(E!==4&&(f=f.child,f!==null))for(Jv(f,h,b),f=f.sibling;f!==null;)Jv(f,h,b),f=f.sibling}function Qv(f,h,b){var E=f.tag;if(E===5||E===6)f=f.stateNode,h?b.insertBefore(f,h):b.appendChild(f);else if(E!==4&&(f=f.child,f!==null))for(Qv(f,h,b),f=f.sibling;f!==null;)Qv(f,h,b),f=f.sibling}var ss=null,ja=!1;function Ol(f,h,b){for(b=b.child;b!==null;)k4(f,h,b),b=b.sibling}function k4(f,h,b){if(Vn&&typeof Vn.onCommitFiberUnmount=="function")try{Vn.onCommitFiberUnmount(gs,b)}catch{}switch(b.tag){case 5:ws||Tu(b,h);case 6:var E=ss,B=ja;ss=null,Ol(f,h,b),ss=E,ja=B,ss!==null&&(ja?(f=ss,b=b.stateNode,f.nodeType===8?f.parentNode.removeChild(b):f.removeChild(b)):ss.removeChild(b.stateNode));break;case 18:ss!==null&&(ja?(f=ss,b=b.stateNode,f.nodeType===8?uv(f.parentNode,b):f.nodeType===1&&uv(f,b),gp(f)):uv(ss,b.stateNode));break;case 4:E=ss,B=ja,ss=b.stateNode.containerInfo,ja=!0,Ol(f,h,b),ss=E,ja=B;break;case 0:case 11:case 14:case 15:if(!ws&&(E=b.updateQueue,E!==null&&(E=E.lastEffect,E!==null))){B=E=E.next;do{var q=B,se=q.destroy;q=q.tag,se!==void 0&&((q&2)!==0||(q&4)!==0)&&Yv(b,h,se),B=B.next}while(B!==E)}Ol(f,h,b);break;case 1:if(!ws&&(Tu(b,h),E=b.stateNode,typeof E.componentWillUnmount=="function"))try{E.props=b.memoizedProps,E.state=b.memoizedState,E.componentWillUnmount()}catch(ve){ur(b,h,ve)}Ol(f,h,b);break;case 21:Ol(f,h,b);break;case 22:b.mode&1?(ws=(E=ws)||b.memoizedState!==null,Ol(f,h,b),ws=E):Ol(f,h,b);break;default:Ol(f,h,b)}}function _4(f){var h=f.updateQueue;if(h!==null){f.updateQueue=null;var b=f.stateNode;b===null&&(b=f.stateNode=new E$),h.forEach(function(E){var B=O$.bind(null,f,E);b.has(E)||(b.add(E),E.then(B,B))})}}function Sa(f,h){var b=h.deletions;if(b!==null)for(var E=0;E<b.length;E++){var B=b[E];try{var q=f,se=h,ve=se;e:for(;ve!==null;){switch(ve.tag){case 5:ss=ve.stateNode,ja=!1;break e;case 3:ss=ve.stateNode.containerInfo,ja=!0;break e;case 4:ss=ve.stateNode.containerInfo,ja=!0;break e}ve=ve.return}if(ss===null)throw Error(n(160));k4(q,se,B),ss=null,ja=!1;var je=B.alternate;je!==null&&(je.return=null),B.return=null}catch(Le){ur(B,h,Le)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)C4(h,f),h=h.sibling}function C4(f,h){var b=f.alternate,E=f.flags;switch(f.tag){case 0:case 11:case 14:case 15:if(Sa(h,f),to(f),E&4){try{Mp(3,f,f.return),Y0(3,f)}catch(Lt){ur(f,f.return,Lt)}try{Mp(5,f,f.return)}catch(Lt){ur(f,f.return,Lt)}}break;case 1:Sa(h,f),to(f),E&512&&b!==null&&Tu(b,b.return);break;case 5:if(Sa(h,f),to(f),E&512&&b!==null&&Tu(b,b.return),f.flags&32){var B=f.stateNode;try{He(B,"")}catch(Lt){ur(f,f.return,Lt)}}if(E&4&&(B=f.stateNode,B!=null)){var q=f.memoizedProps,se=b!==null?b.memoizedProps:q,ve=f.type,je=f.updateQueue;if(f.updateQueue=null,je!==null)try{ve==="input"&&q.type==="radio"&&q.name!=null&&he(B,q),sn(ve,se);var Le=sn(ve,q);for(se=0;se<je.length;se+=2){var it=je[se],ct=je[se+1];it==="style"?et(B,ct):it==="dangerouslySetInnerHTML"?Xe(B,ct):it==="children"?He(B,ct):S(B,it,ct,Le)}switch(ve){case"input":le(B,q);break;case"textarea":at(B,q);break;case"select":var nt=B._wrapperState.wasMultiple;B._wrapperState.wasMultiple=!!q.multiple;var Rt=q.value;Rt!=null?Qe(B,!!q.multiple,Rt,!1):nt!==!!q.multiple&&(q.defaultValue!=null?Qe(B,!!q.multiple,q.defaultValue,!0):Qe(B,!!q.multiple,q.multiple?[]:"",!1))}B[Ep]=q}catch(Lt){ur(f,f.return,Lt)}}break;case 6:if(Sa(h,f),to(f),E&4){if(f.stateNode===null)throw Error(n(162));B=f.stateNode,q=f.memoizedProps;try{B.nodeValue=q}catch(Lt){ur(f,f.return,Lt)}}break;case 3:if(Sa(h,f),to(f),E&4&&b!==null&&b.memoizedState.isDehydrated)try{gp(h.containerInfo)}catch(Lt){ur(f,f.return,Lt)}break;case 4:Sa(h,f),to(f);break;case 13:Sa(h,f),to(f),B=f.child,B.flags&8192&&(q=B.memoizedState!==null,B.stateNode.isHidden=q,!q||B.alternate!==null&&B.alternate.memoizedState!==null||(tb=ot())),E&4&&_4(f);break;case 22:if(it=b!==null&&b.memoizedState!==null,f.mode&1?(ws=(Le=ws)||it,Sa(h,f),ws=Le):Sa(h,f),to(f),E&8192){if(Le=f.memoizedState!==null,(f.stateNode.isHidden=Le)&&!it&&(f.mode&1)!==0)for(Dt=f,it=f.child;it!==null;){for(ct=Dt=it;Dt!==null;){switch(nt=Dt,Rt=nt.child,nt.tag){case 0:case 11:case 14:case 15:Mp(4,nt,nt.return);break;case 1:Tu(nt,nt.return);var Pt=nt.stateNode;if(typeof Pt.componentWillUnmount=="function"){E=nt,b=nt.return;try{h=E,Pt.props=h.memoizedProps,Pt.state=h.memoizedState,Pt.componentWillUnmount()}catch(Lt){ur(E,b,Lt)}}break;case 5:Tu(nt,nt.return);break;case 22:if(nt.memoizedState!==null){A4(ct);continue}}Rt!==null?(Rt.return=nt,Dt=Rt):A4(ct)}it=it.sibling}e:for(it=null,ct=f;;){if(ct.tag===5){if(it===null){it=ct;try{B=ct.stateNode,Le?(q=B.style,typeof q.setProperty=="function"?q.setProperty("display","none","important"):q.display="none"):(ve=ct.stateNode,je=ct.memoizedProps.style,se=je!=null&&je.hasOwnProperty("display")?je.display:null,ve.style.display=Se("display",se))}catch(Lt){ur(f,f.return,Lt)}}}else if(ct.tag===6){if(it===null)try{ct.stateNode.nodeValue=Le?"":ct.memoizedProps}catch(Lt){ur(f,f.return,Lt)}}else if((ct.tag!==22&&ct.tag!==23||ct.memoizedState===null||ct===f)&&ct.child!==null){ct.child.return=ct,ct=ct.child;continue}if(ct===f)break e;for(;ct.sibling===null;){if(ct.return===null||ct.return===f)break e;it===ct&&(it=null),ct=ct.return}it===ct&&(it=null),ct.sibling.return=ct.return,ct=ct.sibling}}break;case 19:Sa(h,f),to(f),E&4&&_4(f);break;case 21:break;default:Sa(h,f),to(f)}}function to(f){var h=f.flags;if(h&2){try{e:{for(var b=f.return;b!==null;){if(j4(b)){var E=b;break e}b=b.return}throw Error(n(160))}switch(E.tag){case 5:var B=E.stateNode;E.flags&32&&(He(B,""),E.flags&=-33);var q=S4(f);Qv(f,q,B);break;case 3:case 4:var se=E.stateNode.containerInfo,ve=S4(f);Jv(f,ve,se);break;default:throw Error(n(161))}}catch(je){ur(f,f.return,je)}f.flags&=-3}h&4096&&(f.flags&=-4097)}function A$(f,h,b){Dt=f,E4(f)}function E4(f,h,b){for(var E=(f.mode&1)!==0;Dt!==null;){var B=Dt,q=B.child;if(B.tag===22&&E){var se=B.memoizedState!==null||K0;if(!se){var ve=B.alternate,je=ve!==null&&ve.memoizedState!==null||ws;ve=K0;var Le=ws;if(K0=se,(ws=je)&&!Le)for(Dt=B;Dt!==null;)se=Dt,je=se.child,se.tag===22&&se.memoizedState!==null?T4(B):je!==null?(je.return=se,Dt=je):T4(B);for(;q!==null;)Dt=q,E4(q),q=q.sibling;Dt=B,K0=ve,ws=Le}F4(f)}else(B.subtreeFlags&8772)!==0&&q!==null?(q.return=B,Dt=q):F4(f)}}function F4(f){for(;Dt!==null;){var h=Dt;if((h.flags&8772)!==0){var b=h.alternate;try{if((h.flags&8772)!==0)switch(h.tag){case 0:case 11:case 15:ws||Y0(5,h);break;case 1:var E=h.stateNode;if(h.flags&4&&!ws)if(b===null)E.componentDidMount();else{var B=h.elementType===h.type?b.memoizedProps:wa(h.type,b.memoizedProps);E.componentDidUpdate(B,b.memoizedState,E.__reactInternalSnapshotBeforeUpdate)}var q=h.updateQueue;q!==null&&AE(h,q,E);break;case 3:var se=h.updateQueue;if(se!==null){if(b=null,h.child!==null)switch(h.child.tag){case 5:b=h.child.stateNode;break;case 1:b=h.child.stateNode}AE(h,se,b)}break;case 5:var ve=h.stateNode;if(b===null&&h.flags&4){b=ve;var je=h.memoizedProps;switch(h.type){case"button":case"input":case"select":case"textarea":je.autoFocus&&b.focus();break;case"img":je.src&&(b.src=je.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(h.memoizedState===null){var Le=h.alternate;if(Le!==null){var it=Le.memoizedState;if(it!==null){var ct=it.dehydrated;ct!==null&&gp(ct)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}ws||h.flags&512&&Xv(h)}catch(nt){ur(h,h.return,nt)}}if(h===f){Dt=null;break}if(b=h.sibling,b!==null){b.return=h.return,Dt=b;break}Dt=h.return}}function A4(f){for(;Dt!==null;){var h=Dt;if(h===f){Dt=null;break}var b=h.sibling;if(b!==null){b.return=h.return,Dt=b;break}Dt=h.return}}function T4(f){for(;Dt!==null;){var h=Dt;try{switch(h.tag){case 0:case 11:case 15:var b=h.return;try{Y0(4,h)}catch(je){ur(h,b,je)}break;case 1:var E=h.stateNode;if(typeof E.componentDidMount=="function"){var B=h.return;try{E.componentDidMount()}catch(je){ur(h,B,je)}}var q=h.return;try{Xv(h)}catch(je){ur(h,q,je)}break;case 5:var se=h.return;try{Xv(h)}catch(je){ur(h,se,je)}}}catch(je){ur(h,h.return,je)}if(h===f){Dt=null;break}var ve=h.sibling;if(ve!==null){ve.return=h.return,Dt=ve;break}Dt=h.return}}var T$=Math.ceil,X0=_.ReactCurrentDispatcher,Zv=_.ReactCurrentOwner,qi=_.ReactCurrentBatchConfig,_n=0,Hr=null,_r=null,is=0,wi=0,Nu=Rl(0),Br=0,Lp=null,td=0,J0=0,eb=0,zp=null,si=null,tb=0,Ru=1/0,qo=null,Q0=!1,nb=null,Ml=null,Z0=!1,Ll=null,eg=0,Wp=0,rb=null,tg=-1,ng=0;function Us(){return(_n&6)!==0?ot():tg!==-1?tg:tg=ot()}function zl(f){return(f.mode&1)===0?1:(_n&2)!==0&&is!==0?is&-is:p$.transition!==null?(ng===0&&(ng=qc()),ng):(f=Ge,f!==0||(f=window.event,f=f===void 0?16:RC(f.type)),f)}function ka(f,h,b,E){if(50<Wp)throw Wp=0,rb=null,Error(n(185));zs(f,b,E),((_n&2)===0||f!==Hr)&&(f===Hr&&((_n&2)===0&&(J0|=b),Br===4&&Wl(f,is)),ii(f,E),b===1&&_n===0&&(h.mode&1)===0&&(Ru=ot()+500,T0&&Il()))}function ii(f,h){var b=f.callbackNode;du(f,h);var E=xi(f,f===Hr?is:0);if(E===0)b!==null&&pt(b),f.callbackNode=null,f.callbackPriority=0;else if(h=E&-E,f.callbackPriority!==h){if(b!=null&&pt(b),h===1)f.tag===0?f$(R4.bind(null,f)):xE(R4.bind(null,f)),l$(function(){(_n&6)===0&&Il()}),b=null;else{switch(ht(E)){case 1:b=An;break;case 4:b=hn;break;case 16:b=Wn;break;case 536870912:b=Dr;break;default:b=Wn}b=z4(b,N4.bind(null,f))}f.callbackPriority=h,f.callbackNode=b}}function N4(f,h){if(tg=-1,ng=0,(_n&6)!==0)throw Error(n(327));var b=f.callbackNode;if(Du()&&f.callbackNode!==b)return null;var E=xi(f,f===Hr?is:0);if(E===0)return null;if((E&30)!==0||(E&f.expiredLanes)!==0||h)h=rg(f,E);else{h=E;var B=_n;_n|=2;var q=I4();(Hr!==f||is!==h)&&(qo=null,Ru=ot()+500,rd(f,h));do try{D$();break}catch(ve){D4(f,ve)}while(!0);wv(),X0.current=q,_n=B,_r!==null?h=0:(Hr=null,is=0,h=Br)}if(h!==0){if(h===2&&(B=ya(f),B!==0&&(E=B,h=sb(f,B))),h===1)throw b=Lp,rd(f,0),Wl(f,E),ii(f,ot()),b;if(h===6)Wl(f,E);else{if(B=f.current.alternate,(E&30)===0&&!N$(B)&&(h=rg(f,E),h===2&&(q=ya(f),q!==0&&(E=q,h=sb(f,q))),h===1))throw b=Lp,rd(f,0),Wl(f,E),ii(f,ot()),b;switch(f.finishedWork=B,f.finishedLanes=E,h){case 0:case 1:throw Error(n(345));case 2:sd(f,si,qo);break;case 3:if(Wl(f,E),(E&130023424)===E&&(h=tb+500-ot(),10<h)){if(xi(f,0)!==0)break;if(B=f.suspendedLanes,(B&E)!==E){Us(),f.pingedLanes|=f.suspendedLanes&B;break}f.timeoutHandle=dv(sd.bind(null,f,si,qo),h);break}sd(f,si,qo);break;case 4:if(Wl(f,E),(E&4194240)===E)break;for(h=f.eventTimes,B=-1;0<E;){var se=31-Hn(E);q=1<<se,se=h[se],se>B&&(B=se),E&=~q}if(E=B,E=ot()-E,E=(120>E?120:480>E?480:1080>E?1080:1920>E?1920:3e3>E?3e3:4320>E?4320:1960*T$(E/1960))-E,10<E){f.timeoutHandle=dv(sd.bind(null,f,si,qo),E);break}sd(f,si,qo);break;case 5:sd(f,si,qo);break;default:throw Error(n(329))}}}return ii(f,ot()),f.callbackNode===b?N4.bind(null,f):null}function sb(f,h){var b=zp;return f.current.memoizedState.isDehydrated&&(rd(f,h).flags|=256),f=rg(f,h),f!==2&&(h=si,si=b,h!==null&&ib(h)),f}function ib(f){si===null?si=f:si.push.apply(si,f)}function N$(f){for(var h=f;;){if(h.flags&16384){var b=h.updateQueue;if(b!==null&&(b=b.stores,b!==null))for(var E=0;E<b.length;E++){var B=b[E],q=B.getSnapshot;B=B.value;try{if(!va(q(),B))return!1}catch{return!1}}}if(b=h.child,h.subtreeFlags&16384&&b!==null)b.return=h,h=b;else{if(h===f)break;for(;h.sibling===null;){if(h.return===null||h.return===f)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Wl(f,h){for(h&=~eb,h&=~J0,f.suspendedLanes|=h,f.pingedLanes&=~h,f=f.expirationTimes;0<h;){var b=31-Hn(h),E=1<<b;f[b]=-1,h&=~E}}function R4(f){if((_n&6)!==0)throw Error(n(327));Du();var h=xi(f,0);if((h&1)===0)return ii(f,ot()),null;var b=rg(f,h);if(f.tag!==0&&b===2){var E=ya(f);E!==0&&(h=E,b=sb(f,E))}if(b===1)throw b=Lp,rd(f,0),Wl(f,h),ii(f,ot()),b;if(b===6)throw Error(n(345));return f.finishedWork=f.current.alternate,f.finishedLanes=h,sd(f,si,qo),ii(f,ot()),null}function ab(f,h){var b=_n;_n|=1;try{return f(h)}finally{_n=b,_n===0&&(Ru=ot()+500,T0&&Il())}}function nd(f){Ll!==null&&Ll.tag===0&&(_n&6)===0&&Du();var h=_n;_n|=1;var b=qi.transition,E=Ge;try{if(qi.transition=null,Ge=1,f)return f()}finally{Ge=E,qi.transition=b,_n=h,(_n&6)===0&&Il()}}function ob(){wi=Nu.current,Zn(Nu)}function rd(f,h){f.finishedWork=null,f.finishedLanes=0;var b=f.timeoutHandle;if(b!==-1&&(f.timeoutHandle=-1,o$(b)),_r!==null)for(b=_r.return;b!==null;){var E=b;switch(gv(E),E.tag){case 1:E=E.type.childContextTypes,E!=null&&F0();break;case 3:Fu(),Zn(ti),Zn(ys),Av();break;case 5:Ev(E);break;case 4:Fu();break;case 13:Zn(or);break;case 19:Zn(or);break;case 10:jv(E.type._context);break;case 22:case 23:ob()}b=b.return}if(Hr=f,_r=f=$l(f.current,null),is=wi=h,Br=0,Lp=null,eb=J0=td=0,si=zp=null,Qc!==null){for(h=0;h<Qc.length;h++)if(b=Qc[h],E=b.interleaved,E!==null){b.interleaved=null;var B=E.next,q=b.pending;if(q!==null){var se=q.next;q.next=B,E.next=se}b.pending=E}Qc=null}return f}function D4(f,h){do{var b=_r;try{if(wv(),z0.current=V0,W0){for(var E=lr.memoizedState;E!==null;){var B=E.queue;B!==null&&(B.pending=null),E=E.next}W0=!1}if(ed=0,Vr=Pr=lr=null,Dp=!1,Ip=0,Zv.current=null,b===null||b.return===null){Br=1,Lp=h,_r=null;break}e:{var q=f,se=b.return,ve=b,je=h;if(h=is,ve.flags|=32768,je!==null&&typeof je=="object"&&typeof je.then=="function"){var Le=je,it=ve,ct=it.tag;if((it.mode&1)===0&&(ct===0||ct===11||ct===15)){var nt=it.alternate;nt?(it.updateQueue=nt.updateQueue,it.memoizedState=nt.memoizedState,it.lanes=nt.lanes):(it.updateQueue=null,it.memoizedState=null)}var Rt=s4(se);if(Rt!==null){Rt.flags&=-257,i4(Rt,se,ve,q,h),Rt.mode&1&&r4(q,Le,h),h=Rt,je=Le;var Pt=h.updateQueue;if(Pt===null){var Lt=new Set;Lt.add(je),h.updateQueue=Lt}else Pt.add(je);break e}else{if((h&1)===0){r4(q,Le,h),lb();break e}je=Error(n(426))}}else if(sr&&ve.mode&1){var yr=s4(se);if(yr!==null){(yr.flags&65536)===0&&(yr.flags|=256),i4(yr,se,ve,q,h),vv(Au(je,ve));break e}}q=je=Au(je,ve),Br!==4&&(Br=2),zp===null?zp=[q]:zp.push(q),q=se;do{switch(q.tag){case 3:q.flags|=65536,h&=-h,q.lanes|=h;var Te=t4(q,je,h);FE(q,Te);break e;case 1:ve=je;var Ce=q.type,Oe=q.stateNode;if((q.flags&128)===0&&(typeof Ce.getDerivedStateFromError=="function"||Oe!==null&&typeof Oe.componentDidCatch=="function"&&(Ml===null||!Ml.has(Oe)))){q.flags|=65536,h&=-h,q.lanes|=h;var vt=n4(q,ve,h);FE(q,vt);break e}}q=q.return}while(q!==null)}B4(b)}catch(Wt){h=Wt,_r===b&&b!==null&&(_r=b=b.return);continue}break}while(!0)}function I4(){var f=X0.current;return X0.current=V0,f===null?V0:f}function lb(){(Br===0||Br===3||Br===2)&&(Br=4),Hr===null||(td&268435455)===0&&(J0&268435455)===0||Wl(Hr,is)}function rg(f,h){var b=_n;_n|=2;var E=I4();(Hr!==f||is!==h)&&(qo=null,rd(f,h));do try{R$();break}catch(B){D4(f,B)}while(!0);if(wv(),_n=b,X0.current=E,_r!==null)throw Error(n(261));return Hr=null,is=0,Br}function R$(){for(;_r!==null;)P4(_r)}function D$(){for(;_r!==null&&!_t();)P4(_r)}function P4(f){var h=L4(f.alternate,f,wi);f.memoizedProps=f.pendingProps,h===null?B4(f):_r=h,Zv.current=null}function B4(f){var h=f;do{var b=h.alternate;if(f=h.return,(h.flags&32768)===0){if(b=_$(b,h,wi),b!==null){_r=b;return}}else{if(b=C$(b,h),b!==null){b.flags&=32767,_r=b;return}if(f!==null)f.flags|=32768,f.subtreeFlags=0,f.deletions=null;else{Br=6,_r=null;return}}if(h=h.sibling,h!==null){_r=h;return}_r=h=f}while(h!==null);Br===0&&(Br=5)}function sd(f,h,b){var E=Ge,B=qi.transition;try{qi.transition=null,Ge=1,I$(f,h,b,E)}finally{qi.transition=B,Ge=E}return null}function I$(f,h,b,E){do Du();while(Ll!==null);if((_n&6)!==0)throw Error(n(327));b=f.finishedWork;var B=f.finishedLanes;if(b===null)return null;if(f.finishedWork=null,f.finishedLanes=0,b===f.current)throw Error(n(177));f.callbackNode=null,f.callbackPriority=0;var q=b.lanes|b.childLanes;if(Gc(f,q),f===Hr&&(_r=Hr=null,is=0),(b.subtreeFlags&2064)===0&&(b.flags&2064)===0||Z0||(Z0=!0,z4(Wn,function(){return Du(),null})),q=(b.flags&15990)!==0,(b.subtreeFlags&15990)!==0||q){q=qi.transition,qi.transition=null;var se=Ge;Ge=1;var ve=_n;_n|=4,Zv.current=null,F$(f,b),C4(b,f),e$(lv),h0=!!ov,lv=ov=null,f.current=b,A$(b),lt(),_n=ve,Ge=se,qi.transition=q}else f.current=b;if(Z0&&(Z0=!1,Ll=f,eg=B),q=f.pendingLanes,q===0&&(Ml=null),Wi(b.stateNode),ii(f,ot()),h!==null)for(E=f.onRecoverableError,b=0;b<h.length;b++)B=h[b],E(B.value,{componentStack:B.stack,digest:B.digest});if(Q0)throw Q0=!1,f=nb,nb=null,f;return(eg&1)!==0&&f.tag!==0&&Du(),q=f.pendingLanes,(q&1)!==0?f===rb?Wp++:(Wp=0,rb=f):Wp=0,Il(),null}function Du(){if(Ll!==null){var f=ht(eg),h=qi.transition,b=Ge;try{if(qi.transition=null,Ge=16>f?16:f,Ll===null)var E=!1;else{if(f=Ll,Ll=null,eg=0,(_n&6)!==0)throw Error(n(331));var B=_n;for(_n|=4,Dt=f.current;Dt!==null;){var q=Dt,se=q.child;if((Dt.flags&16)!==0){var ve=q.deletions;if(ve!==null){for(var je=0;je<ve.length;je++){var Le=ve[je];for(Dt=Le;Dt!==null;){var it=Dt;switch(it.tag){case 0:case 11:case 15:Mp(8,it,q)}var ct=it.child;if(ct!==null)ct.return=it,Dt=ct;else for(;Dt!==null;){it=Dt;var nt=it.sibling,Rt=it.return;if(w4(it),it===Le){Dt=null;break}if(nt!==null){nt.return=Rt,Dt=nt;break}Dt=Rt}}}var Pt=q.alternate;if(Pt!==null){var Lt=Pt.child;if(Lt!==null){Pt.child=null;do{var yr=Lt.sibling;Lt.sibling=null,Lt=yr}while(Lt!==null)}}Dt=q}}if((q.subtreeFlags&2064)!==0&&se!==null)se.return=q,Dt=se;else e:for(;Dt!==null;){if(q=Dt,(q.flags&2048)!==0)switch(q.tag){case 0:case 11:case 15:Mp(9,q,q.return)}var Te=q.sibling;if(Te!==null){Te.return=q.return,Dt=Te;break e}Dt=q.return}}var Ce=f.current;for(Dt=Ce;Dt!==null;){se=Dt;var Oe=se.child;if((se.subtreeFlags&2064)!==0&&Oe!==null)Oe.return=se,Dt=Oe;else e:for(se=Ce;Dt!==null;){if(ve=Dt,(ve.flags&2048)!==0)try{switch(ve.tag){case 0:case 11:case 15:Y0(9,ve)}}catch(Wt){ur(ve,ve.return,Wt)}if(ve===se){Dt=null;break e}var vt=ve.sibling;if(vt!==null){vt.return=ve.return,Dt=vt;break e}Dt=ve.return}}if(_n=B,Il(),Vn&&typeof Vn.onPostCommitFiberRoot=="function")try{Vn.onPostCommitFiberRoot(gs,f)}catch{}E=!0}return E}finally{Ge=b,qi.transition=h}}return!1}function O4(f,h,b){h=Au(b,h),h=t4(f,h,1),f=Bl(f,h,1),h=Us(),f!==null&&(zs(f,1,h),ii(f,h))}function ur(f,h,b){if(f.tag===3)O4(f,f,b);else for(;h!==null;){if(h.tag===3){O4(h,f,b);break}else if(h.tag===1){var E=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof E.componentDidCatch=="function"&&(Ml===null||!Ml.has(E))){f=Au(b,f),f=n4(h,f,1),h=Bl(h,f,1),f=Us(),h!==null&&(zs(h,1,f),ii(h,f));break}}h=h.return}}function P$(f,h,b){var E=f.pingCache;E!==null&&E.delete(h),h=Us(),f.pingedLanes|=f.suspendedLanes&b,Hr===f&&(is&b)===b&&(Br===4||Br===3&&(is&130023424)===is&&500>ot()-tb?rd(f,0):eb|=b),ii(f,h)}function M4(f,h){h===0&&((f.mode&1)===0?h=1:(h=xs,xs<<=1,(xs&130023424)===0&&(xs=4194304)));var b=Us();f=Uo(f,h),f!==null&&(zs(f,h,b),ii(f,b))}
vendor: 4,398 bytes, line 40
40function B$(f){var h=f.memoizedState,b=0;h!==null&&(b=h.retryLane),M4(f,b)}function O$(f,h){var b=0;switch(f.tag){case 13:var E=f.stateNode,B=f.memoizedState;B!==null&&(b=B.retryLane);break;case 19:E=f.stateNode;break;default:throw Error(n(314))}E!==null&&E.delete(h),M4(f,b)}var L4;L4=function(f,h,b){if(f!==null)if(f.memoizedProps!==h.pendingProps||ti.current)ri=!0;else{if((f.lanes&b)===0&&(h.flags&128)===0)return ri=!1,k$(f,h,b);ri=(f.flags&131072)!==0}else ri=!1,sr&&(h.flags&1048576)!==0&&yE(h,R0,h.index);switch(h.lanes=0,h.tag){case 2:var E=h.type;G0(f,h),f=h.pendingProps;var B=wu(h,ys.current);Eu(h,b),B=Rv(null,h,E,f,B,b);var q=Dv();return h.flags|=1,typeof B=="object"&&B!==null&&typeof B.render=="function"&&B.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,ni(E)?(q=!0,A0(h)):q=!1,h.memoizedState=B.state!==null&&B.state!==void 0?B.state:null,_v(h),B.updater=H0,h.stateNode=B,B._reactInternals=h,Lv(h,E,f,b),h=Uv(null,h,E,!0,q,b)):(h.tag=0,sr&&q&&mv(h),$s(null,h,B,b),h=h.child),h;case 16:E=h.elementType;e:{switch(G0(f,h),f=h.pendingProps,B=E._init,E=B(E._payload),h.type=E,B=h.tag=L$(E),f=wa(E,f),B){case 0:h=$v(null,h,E,f,b);break e;case 1:h=u4(null,h,E,f,b);break e;case 11:h=a4(null,h,E,f,b);break e;case 14:h=o4(null,h,E,wa(E.type,f),b);break e}throw Error(n(306,E,""))}return h;case 0:return E=h.type,B=h.pendingProps,B=h.elementType===E?B:wa(E,B),$v(f,h,E,B,b);case 1:return E=h.type,B=h.pendingProps,B=h.elementType===E?B:wa(E,B),u4(f,h,E,B,b);case 3:e:{if(f4(h),f===null)throw Error(n(387));E=h.pendingProps,q=h.memoizedState,B=q.element,EE(f,h),M0(h,E,null,b);var se=h.memoizedState;if(E=se.element,q.isDehydrated)if(q={element:E,isDehydrated:!1,cache:se.cache,pendingSuspenseBoundaries:se.pendingSuspenseBoundaries,transitions:se.transitions},h.updateQueue.baseState=q,h.memoizedState=q,h.flags&256){B=Au(Error(n(423)),h),h=p4(f,h,E,b,B);break e}else if(E!==B){B=Au(Error(n(424)),h),h=p4(f,h,E,b,B);break e}else for(bi=Nl(h.stateNode.containerInfo.firstChild),vi=h,sr=!0,ba=null,b=_E(h,null,E,b),h.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling;else{if(ku(),E===B){h=Ho(f,h,b);break e}$s(f,h,E,b)}h=h.child}return h;case 5:return TE(h),f===null&&yv(h),E=h.type,B=h.pendingProps,q=f!==null?f.memoizedProps:null,se=B.children,cv(E,B)?se=null:q!==null&&cv(E,q)&&(h.flags|=32),d4(f,h),$s(f,h,se,b),h.child;case 6:return f===null&&yv(h),null;case 13:return h4(f,h,b);case 4:return Cv(h,h.stateNode.containerInfo),E=h.pendingProps,f===null?h.child=_u(h,null,E,b):$s(f,h,E,b),h.child;case 11:return E=h.type,B=h.pendingProps,B=h.elementType===E?B:wa(E,B),a4(f,h,E,B,b);case 7:return $s(f,h,h.pendingProps,b),h.child;case 8:return $s(f,h,h.pendingProps.children,b),h.child;case 12:return $s(f,h,h.pendingProps.children,b),h.child;case 10:e:{if(E=h.type._context,B=h.pendingProps,q=h.memoizedProps,se=B.value,qn(P0,E._currentValue),E._currentValue=se,q!==null)if(va(q.value,se)){if(q.children===B.children&&!ti.current){h=Ho(f,h,b);break e}}else for(q=h.child,q!==null&&(q.return=h);q!==null;){var ve=q.dependencies;if(ve!==null){se=q.child;for(var je=ve.firstContext;je!==null;){if(je.context===E){if(q.tag===1){je=Vo(-1,b&-b),je.tag=2;var Le=q.updateQueue;if(Le!==null){Le=Le.shared;var it=Le.pending;it===null?je.next=je:(je.next=it.next,it.next=je),Le.pending=je}}q.lanes|=b,je=q.alternate,je!==null&&(je.lanes|=b),Sv(q.return,b,h),ve.lanes|=b;break}je=je.next}}else if(q.tag===10)se=q.type===h.type?null:q.child;else if(q.tag===18){if(se=q.return,se===null)throw Error(n(341));se.lanes|=b,ve=se.alternate,ve!==null&&(ve.lanes|=b),Sv(se,b,h),se=q.sibling}else se=q.child;if(se!==null)se.return=q;else for(se=q;se!==null;){if(se===h){se=null;break}if(q=se.sibling,q!==null){q.return=se.return,se=q;break}se=se.return}q=se}$s(f,h,B.children,b),h=h.child}return h;case 9:return B=h.type,E=h.pendingProps.children,Eu(h,b),B=Vi(B),E=E(B),h.flags|=1,$s(f,h,E,b),h.child;case 14:return E=h.type,B=wa(E,h.pendingProps),B=wa(E.type,B),o4(f,h,E,B,b);case 15:return l4(f,h,h.type,h.pendingProps,b);case 17:return E=h.type,B=h.pendingProps,B=h.elementType===E?B:wa(E,B),G0(f,h),h.tag=1,ni(E)?(f=!0,A0(h)):f=!1,Eu(h,b),ZE(h,E,B),Lv(h,E,B,b),Uv(null,h,E,!0,f,b);case 19:return g4(f,h,b);case 22:return c4(f,h,b)}throw Error(n(156,h.tag))};function z4(f,h){return tt(f,h)}function M$(f,h,b,E){this.tag=f,this.key=b,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 9,976 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=E,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gi(f,h,b,E){return new M$(f,h,b,E)}function cb(f){return f=f.prototype,!(!f||!f.isReactComponent)}function L$(f){if(typeof f=="function")return cb(f)?1:0;if(f!=null){if(f=f.$$typeof,f===R)return 11;if(f===H)return 14}return 2}function $l(f,h){var b=f.alternate;return b===null?(b=Gi(f.tag,h,f.key,f.mode),b.elementType=f.elementType,b.type=f.type,b.stateNode=f.stateNode,b.alternate=f,f.alternate=b):(b.pendingProps=h,b.type=f.type,b.flags=0,b.subtreeFlags=0,b.deletions=null),b.flags=f.flags&14680064,b.childLanes=f.childLanes,b.lanes=f.lanes,b.child=f.child,b.memoizedProps=f.memoizedProps,b.memoizedState=f.memoizedState,b.updateQueue=f.updateQueue,h=f.dependencies,b.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},b.sibling=f.sibling,b.index=f.index,b.ref=f.ref,b}function sg(f,h,b,E,B,q){var se=2;if(E=f,typeof f=="function")cb(f)&&(se=1);else if(typeof f=="string")se=5;else e:switch(f){case C:return id(b.children,B,q,h);case D:se=8,B|=8;break;case P:return f=Gi(12,b,h,B|2),f.elementType=P,f.lanes=q,f;case U:return f=Gi(13,b,h,B),f.elementType=U,f.lanes=q,f;case I:return f=Gi(19,b,h,B),f.elementType=I,f.lanes=q,f;case X:return ig(b,B,q,h);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case L:se=10;break e;case T:se=9;break e;case R:se=11;break e;case H:se=14;break e;case V:se=16,E=null;break e}throw Error(n(130,f==null?f:typeof f,""))}return h=Gi(se,b,h,B),h.elementType=f,h.type=E,h.lanes=q,h}function id(f,h,b,E){return f=Gi(7,f,E,h),f.lanes=b,f}function ig(f,h,b,E){return f=Gi(22,f,E,h),f.elementType=X,f.lanes=b,f.stateNode={isHidden:!1},f}function db(f,h,b){return f=Gi(6,f,null,h),f.lanes=b,f}function ub(f,h,b){return h=Gi(4,f.children!==null?f.children:[],f.key,h),h.lanes=b,h.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},h}function z$(f,h,b,E,B){this.tag=h,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mo(0),this.expirationTimes=Mo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mo(0),this.identifierPrefix=E,this.onRecoverableError=B,this.mutableSourceEagerHydrationData=null}function fb(f,h,b,E,B,q,se,ve,je){return f=new z$(f,h,b,ve,je),h===1?(h=1,q===!0&&(h|=8)):h=0,q=Gi(3,null,null,h),f.current=q,q.stateNode=f,q.memoizedState={element:E,isDehydrated:b,cache:null,transitions:null,pendingSuspenseBoundaries:null},_v(q),f}function W$(f,h,b){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:E==null?null:""+E,children:f,containerInfo:h,implementation:b}}function W4(f){if(!f)return Dl;f=f._reactInternals;e:{if(me(f)!==f||f.tag!==1)throw Error(n(170));var h=f;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(ni(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(n(171))}if(f.tag===1){var b=f.type;if(ni(b))return mE(f,b,h)}return h}function $4(f,h,b,E,B,q,se,ve,je){return f=fb(b,E,!0,f,B,q,se,ve,je),f.context=W4(null),b=f.current,E=Us(),B=zl(b),q=Vo(E,B),q.callback=h??null,Bl(b,q,B),f.current.lanes=B,zs(f,B,E),ii(f,E),f}function ag(f,h,b,E){var B=h.current,q=Us(),se=zl(B);return b=W4(b),h.context===null?h.context=b:h.pendingContext=b,h=Vo(q,se),h.payload={element:f},E=E===void 0?null:E,E!==null&&(h.callback=E),f=Bl(B,h,se),f!==null&&(ka(f,B,se,q),O0(f,B,se)),se}function og(f){if(f=f.current,!f.child)return null;switch(f.child.tag){case 5:return f.child.stateNode;default:return f.child.stateNode}}function U4(f,h){if(f=f.memoizedState,f!==null&&f.dehydrated!==null){var b=f.retryLane;f.retryLane=b!==0&&b<h?b:h}}function pb(f,h){U4(f,h),(f=f.alternate)&&U4(f,h)}function $$(){return null}var V4=typeof reportError=="function"?reportError:function(f){console.error(f)};function hb(f){this._internalRoot=f}lg.prototype.render=hb.prototype.render=function(f){var h=this._internalRoot;if(h===null)throw Error(n(409));ag(f,h,null,null)},lg.prototype.unmount=hb.prototype.unmount=function(){var f=this._internalRoot;if(f!==null){this._internalRoot=null;var h=f.containerInfo;nd(function(){ag(null,f,null,null)}),h[Lo]=null}};function lg(f){this._internalRoot=f}lg.prototype.unstable_scheduleHydration=function(f){if(f){var h=en();f={blockedOn:null,target:f,priority:h};for(var b=0;b<ln.length&&h!==0&&h<ln[b].priority;b++);ln.splice(b,0,f),b===0&&uu(f)}};function mb(f){return!(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)}function cg(f){return!(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11&&(f.nodeType!==8||f.nodeValue!==" react-mount-point-unstable "))}function H4(){}function U$(f,h,b,E,B){if(B){if(typeof E=="function"){var q=E;E=function(){var Le=og(se);q.call(Le)}}var se=$4(h,E,f,0,null,!1,!1,"",H4);return f._reactRootContainer=se,f[Lo]=se.current,_p(f.nodeType===8?f.parentNode:f),nd(),se}for(;B=f.lastChild;)f.removeChild(B);if(typeof E=="function"){var ve=E;E=function(){var Le=og(je);ve.call(Le)}}var je=fb(f,0,!1,null,null,!1,!1,"",H4);return f._reactRootContainer=je,f[Lo]=je.current,_p(f.nodeType===8?f.parentNode:f),nd(function(){ag(h,je,b,E)}),je}function dg(f,h,b,E,B){var q=b._reactRootContainer;if(q){var se=q;if(typeof B=="function"){var ve=B;B=function(){var je=og(se);ve.call(je)}}ag(h,se,f,B)}else se=U$(b,h,f,B,E);return og(se)}Tt=function(f){switch(f.tag){case 3:var h=f.stateNode;if(h.current.memoizedState.isDehydrated){var b=ei(h.pendingLanes);b!==0&&(Ae(h,b|1),ii(h,ot()),(_n&6)===0&&(Ru=ot()+500,Il()))}break;case 13:nd(function(){var E=Uo(f,1);if(E!==null){var B=Us();ka(E,f,1,B)}}),pb(f,1)}},wt=function(f){if(f.tag===13){var h=Uo(f,134217728);if(h!==null){var b=Us();ka(h,f,134217728,b)}pb(f,134217728)}},It=function(f){if(f.tag===13){var h=zl(f),b=Uo(f,h);if(b!==null){var E=Us();ka(b,f,h,E)}pb(f,h)}},en=function(){return Ge},wn=function(f,h){var b=Ge;try{return Ge=f,h()}finally{Ge=b}},nr=function(f,h,b){switch(h){case"input":if(le(f,b),h=b.name,b.type==="radio"&&h!=null){for(b=f;b.parentNode;)b=b.parentNode;for(b=b.querySelectorAll("input[name="+JSON.stringify(""+h)+'][type="radio"]'),h=0;h<b.length;h++){var E=b[h];if(E!==f&&E.form===f.form){var B=E0(E);if(!B)throw Error(n(90));Z(E),le(E,B)}}}break;case"textarea":at(f,b);break;case"select":h=b.value,h!=null&&Qe(f,!!b.multiple,h,!1)}},Ue=ab,Et=nd;var V$={usingClientEntryPoint:!1,Events:[Fp,vu,E0,mi,Ur,ab]},$p={findFiberByHostInstance:Kc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},H$={bundleType:$p.bundleType,version:$p.version,rendererPackageName:$p.rendererPackageName,rendererConfig:$p.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(f){return f=Ie(f),f===null?null:f.stateNode},findFiberByHostInstance:$p.findFiberByHostInstance||$$,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ug=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ug.isDisabled&&ug.supportsFiber)try{gs=ug.inject(H$),Vn=ug}catch{}}return ai.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V$,ai.createPortal=function(f,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mb(h))throw Error(n(200));return W$(f,h,null,b)},ai.createRoot=function(f,h){if(!mb(f))throw Error(n(299));var b=!1,E="",B=V4;return h!=null&&(h.unstable_strictMode===!0&&(b=!0),h.identifierPrefix!==void 0&&(E=h.identifierPrefix),h.onRecoverableError!==void 0&&(B=h.onRecoverableError)),h=fb(f,1,!1,null,null,b,!1,E,B),f[Lo]=h.current,_p(f.nodeType===8?f.parentNode:f),new hb(h)},ai.findDOMNode=function(f){if(f==null)return null;if(f.nodeType===1)return f;var h=f._reactInternals;if(h===void 0)throw typeof f.render=="function"?Error(n(188)):(f=Object.keys(f).join(","),Error(n(268,f)));return f=Ie(h),f=f===null?null:f.stateNode,f},ai.flushSync=function(f){return nd(f)},ai.hydrate=function(f,h,b){if(!cg(h))throw Error(n(200));return dg(null,f,h,!0,b)},ai.hydrateRoot=function(f,h,b){if(!mb(f))throw Error(n(405));var E=b!=null&&b.hydratedSources||null,B=!1,q="",se=V4;if(b!=null&&(b.unstable_strictMode===!0&&(B=!0),b.identifierPrefix!==void 0&&(q=b.identifierPrefix),b.onRecoverableError!==void 0&&(se=b.onRecoverableError)),h=$4(h,null,f,1,b??null,B,!1,q,se),f[Lo]=h.current,_p(f),E)for(f=0;f<E.length;f++)b=E[f],B=b._getVersion,B=B(b._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[b,B]:h.mutableSourceEagerHydrationData.push(b,B);return new lg(h)},ai.render=function(f,h,b){if(!cg(h))throw Error(n(200));return dg(null,f,h,!1,b)},ai.unmountComponentAtNode=function(f){if(!cg(f))throw Error(n(40));return f._reactRootContainer?(nd(function(){dg(null,null,f,!1,function(){f._reactRootContainer=null,f[Lo]=null})}),!0):!1},ai.unstable_batchedUpdates=ab,ai.unstable_renderSubtreeIntoContainer=function(f,h,b,E){if(!cg(b))throw Error(n(200));if(f==null||f._reactInternals===void 0)throw Error(n(38));return dg(f,h,b,!1,E)},ai.version="18.3.1-next-f1338f8080-20240426",ai}var eF;function JR(){if(eF)return vb.exports;eF=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}
40return e(),vb.exports=tU(),vb.exports}var tF;function nU(){if(tF)return pg;tF=1;var e=JR();return pg.createRoot=e.createRoot,pg.hydrateRoot=e.hydrateRoot,pg}var rU=nU();const sU=zm(rU),iU=20,aU=1e3,go={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let jb=0;function oU(){return jb=(jb+1)%Number.MAX_VALUE,jb.toString()}const Sb=new Map,nF=e=>{if(Sb.has(e))return;const t=setTimeout(()=>{Sb.delete(e),tf({type:go.REMOVE_TOAST,toastId:e})},aU);Sb.set(e,t)},lU=(e,t)=>{switch(t.type){case go.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,iU)};case go.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case go.DISMISS_TOAST:{const{toastId:n}=t;return n?nF(n):e.toasts.forEach(s=>{nF(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case go.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},vx=[];let bx={toasts:[]};function tf(e){bx=lU(bx,e),vx.forEach(t=>{t(bx)})}function cU({...e}){const t=oU(),n=i=>tf({type:go.UPDATE_TOAST,toast:{...i,id:t}}),s=()=>tf({type:go.DISMISS_TOAST,toastId:t});return tf({type:go.ADD_TOAST,toast:{...e,id:t,open:!0}}),setTimeout(()=>{tf({type:go.DISMISS_TOAST,toastId:t})},e.duration??3e3),{id:t,dismiss:s,update:n}}function Wm(){const[e,t]=g.useState(bx);return g.useEffect(()=>(vx.push(t),()=>{const n=vx.indexOf(t);n>-1&&vx.splice(n,1)}),[e]),{...e,toast:cU,dismiss:n=>tf({type:go.DISMISS_TOAST,toastId:n})}}function QR(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=QR(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function ZR(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=QR(e))&&(s&&(s+=" "),s+=t);return s}const rF=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sF=ZR,lS=(e,t)=>n=>{var s;if((t==null?void 0:t.variants)==null)return sF(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(d=>{const u=n==null?void 0:n[d],p=a==null?void 0:a[d];if(u===null)return null;const m=rF(u)||rF(p);return i[d][m]}),l=n&&Object.entries(n).reduce((d,u)=>{let[p,m]=u;return m===void 0||(d[p]=m),d},{}),c=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,u)=>{let{class:p,className:m,...x}=u;return Object.entries(x).every(w=>{let[y,v]=w;return Array.isArray(v)?v.includes({...a,...l}[y]):{...a,...l}[y]===v})?[...d,p,m]:d},[]);return sF(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.475.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const dU=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),e8=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.475.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var uU={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.475.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const fU=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:a,iconNode:o,...l},c)=>g.createElement("svg",{ref:c,...uU,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:e8("lucide",i),...l},[...o.map(([d,u])=>g.createElement(d,u)),...Array.isArray(a)?a:[a]]));/**
56 * @license lucide-react v0.475.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const Ye=(e,t)=>{const n=g.forwardRef(({className:s,...i},a)=>g.createElement(fU,{ref:a,iconNode:t,className:e8(`lucide-${dU(e)}`,s),...i}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.475.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const pU=[["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
65-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],t8=Ye("Activity",pU);/**
66 * @license lucide-react v0.475.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const hU=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],mU=Ye("Archive",hU);/**
71 * @license lucide-react v0.475.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const gU=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],xU=Ye("ArrowDown",gU);/**
76 * @license lucide-react v0.475.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const yU=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],vU=Ye("ArrowLeftRight",yU);/**
81 * @license lucide-react v0.475.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const bU=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],bo=Ye("ArrowLeft",bU);/**
86 * @license lucide-react v0.475.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const wU=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],jU=Ye("ArrowRightLeft",wU);/**
91 * @license lucide-react v0.475.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const SU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Rc=Ye("ArrowRight",SU);/**
96 * @license lucide-react v0.475.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const kU=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],_U=Ye("ArrowUp",kU);/**
101 * @license lucide-react v0.475.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const CU=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],n8=Ye("Bell",CU);/**
106 * @license lucide-react v0.475.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const EU=[["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"}]],FU=Ye("Bold",EU);/**
111 * @license lucide-react v0.475.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const AU=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],TU=Ye("BookOpen",AU);/**
116 * @license lucide-react v0.475.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const NU=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],RU=Ye("Boxes",NU);/**
121 * @license lucide-react v0.475.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const DU=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],qf=Ye("Brain",DU);/**
126 * @license lucide-react v0.475.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const IU=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],On=Ye("Briefcase",IU);/**
131 * @license lucide-react v0.475.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const PU=[["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"}
135],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],jc=Ye("Building2",PU);/**
136 * @license lucide-react v0.475.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const BU=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],OU=Ye("Building",BU);/**
141 * @license lucide-react v0.475.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const MU=[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],LU=Ye("CalendarClock",MU);/**
146 * @license lucide-react v0.475.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const zU=[["path",{d:"M4.2 4.2A2 2 0 0 0 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 1.82-1.18",key:"16swn3"}],["path",{d:"M21 15.5V6a2 2 0 0 0-2-2H9.5",key:"yhw86o"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h7",key:"1wap6i"}],["path",{d:"M21 10h-5.5",key:"quycpq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],WU=Ye("CalendarOff",zU);/**
151 * @license lucide-react v0.475.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const $U=[["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"}]],r8=Ye("CalendarX",$U);/**
156 * @license lucide-react v0.475.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const UU=[["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"}]],kl=Ye("Calendar",UU);/**
161 * @license lucide-react v0.475.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const VU=[["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"}]],HU=Ye("Camera",VU);/**
166 * @license lucide-react v0.475.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const qU=[["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"}]],ts=Ye("ChartColumn",qU);/**
171 * @license lucide-react v0.475.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const GU=[["line",{x1:"12",x2:"12",y1:"20",y2:"10",key:"1vz5eb"}],["line",{x1:"18",x2:"18",y1:"20",y2:"4",key:"cun8e5"}
175],["line",{x1:"6",x2:"6",y1:"20",y2:"16",key:"hq0ia6"}]],KU=Ye("ChartNoAxesColumnIncreasing",GU);/**
176 * @license lucide-react v0.475.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const YU=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],XU=Ye("ChartNoAxesColumn",YU);/**
181 * @license lucide-react v0.475.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const JU=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fn=Ye("Check",JU);/**
186 * @license lucide-react v0.475.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const QU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ar=Ye("ChevronDown",QU);/**
191 * @license lucide-react v0.475.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const ZU=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Sc=Ye("ChevronLeft",ZU);/**
196 * @license lucide-react v0.475.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const eV=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Qr=Ye("ChevronRight",eV);/**
201 * @license lucide-react v0.475.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const tV=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Dc=Ye("ChevronUp",tV);/**
206 * @license lucide-react v0.475.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const nV=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],rV=Ye("ChevronsUpDown",nV);/**
211 * @license lucide-react v0.475.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const sV=[["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"}]],xl=Ye("CircleAlert",sV);/**
216 * @license lucide-react v0.475.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const iV=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],s8=Ye("CircleCheckBig",iV);/**
221 * @license lucide-react v0.475.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const aV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Mi=Ye("CircleCheck",aV);/**
226 * @license lucide-react v0.475.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const oV=[["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"}]],i8=Ye("CircleHelp",oV);/**
231 * @license lucide-react v0.475.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const lV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],Sh=Ye("CircleUser",lV);/**
236 * @license lucide-react v0.475.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const cV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],yl=Ye("CircleX",cV);/**
241 * @license lucide-react v0.475.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const dV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],uV=Ye("Circle",dV);/**
246 * @license lucide-react v0.475.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const fV=[["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"}]],za=Ye("ClipboardCheck",fV);/**
251 * @license lucide-react v0.475.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const pV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Di=Ye("Clock",pV);/**
256 * @license lucide-react v0.475.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const hV=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],a8=Ye("Columns3",hV);/**
261 * @license lucide-react v0.475.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const mV=[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]],gV=Ye("Cookie",mV);/**
266 * @license lucide-react v0.475.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const xV=[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["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"}]],yV=Ye("CopyPlus",xV);/**
271 * @license lucide-react v0.475.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const vV=[["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"}]],Js=Ye("Copy",vV);/**
276 * @license lucide-react v0.475.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const bV=[["polyline",{points:"9 14 4 9 9 4",key:"881910"}],["path",{d:"M20 20v-7a4 4 0 0 0-4-4H4",key:"1nkjon"}]],wV=Ye("CornerUpLeft",bV);/**
281 * @license lucide-react v0.475.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const jV=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Ly=Ye("CreditCard",jV);/**
286 * @license lucide-react v0.475.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const SV=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],kV=Ye("Database",SV);/**
291 * @license lucide-react v0.475.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const _V=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],o8=Ye("DollarSign",_V);/**
296 * @license lucide-react v0.475.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const CV=[["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"}]],Wa=Ye("Download",CV);/**
301 * @license lucide-react v0.475.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const EV=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],No=Ye("EllipsisVertical",EV);/**
306 * @license lucide-react v0.475.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const FV=[["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"}]],$a=Ye("ExternalLink",FV);/**
311 * @license lucide-react v0.475.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const AV=[["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"}]],l8=Ye("EyeOff",AV);/**
316 * @license lucide-react v0.475.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const TV=[["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"}]],cS=Ye("Eye",TV);/**
321 * @license lucide-react v0.475.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const NV=[["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:"m9 15 2 2 4-4",key:"1grp1n"}]],RV=Ye("FileCheck",NV);/**
326 * @license lucide-react v0.475.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const DV=[["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:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],c8=Ye("FileSpreadsheet",DV);/**
331 * @license lucide-react v0.475.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const IV=[["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"}]],ui=Ye("FileText",IV);/**
336 * @license lucide-react v0.475.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const PV=[["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"}]],d8=Ye("File",PV);/**
341 * @license lucide-react v0.475.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const BV=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],OV=Ye("Filter",BV);/**
346 * @license lucide-react v0.475.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const MV=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],LV=Ye("Flame",MV);/**
351 * @license lucide-react v0.475.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const zV=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],u8=Ye("FlaskConical",zV);/**
356 * @license lucide-react v0.475.0 - ISC
357 *
358 * This source code is licensed under the ISC license.
359 * See the LICENSE file in the root directory of this source tree.
360 */const WV=[["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"}]],vl=Ye("Globe",WV);/**
361 * @license lucide-react v0.475.0 - ISC
362 *
363 * This source code is licensed under the ISC license.
364 * See the LICENSE file in the root directory of this source tree.
365 */const $V=[["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"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],UV=Ye("Grid3x3",$V);/**
366 * @license lucide-react v0.475.0 - ISC
367 *
368 * This source code is licensed under the ISC license.
369 * See the LICENSE file in the root directory of this source tree.
370 */const VV=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],dS=Ye("GripVertical",VV);/**
371 * @license lucide-react v0.475.0 - ISC
372 *
373 * This source code is licensed under the ISC license.
374 * See the LICENSE file in the root directory of this source tree.
375 */const HV=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],uS=Ye("Heart",HV);/**
376 * @license lucide-react v0.475.0 - ISC
377 *
378 * This source code is licensed under the ISC license.
379 * See the LICENSE file in the root directory of this source tree.
380 */const qV=[["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"}]],GV=Ye("History",qV);/**
381 * @license lucide-react v0.475.0 - ISC
382 *
383 * This source code is licensed under the ISC license.
384 * See the LICENSE file in the root directory of this source tree.
385 */const KV=[["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"}]],fS=Ye("Image",KV);/**
386 * @license lucide-react v0.475.0 - ISC
387 *
388 * This source code is licensed under the ISC license.
389 * See the LICENSE file in the root directory of this source tree.
390 */const YV=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],XV=Ye("Info",YV);/**
391 * @license lucide-react v0.475.0 - ISC
392 *
393 * This source code is licensed under the ISC license.
394 * See the LICENSE file in the root directory of this source tree.
395 */const JV=[["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"}]],QV=Ye("Italic",JV);/**
396 * @license lucide-react v0.475.0 - ISC
397 *
398 * This source code is licensed under the ISC license.
399 * See the LICENSE file in the root directory of this source tree.
400 */const ZV=[["path",{d:"M6 5v11",key:"mdvv1e"}],["path",{d:"M12 5v6",key:"14ar3b"}],["path",{d:"M18 5v14",key:"7ji314"}]],eH=Ye("Kanban",ZV);/**
401 * @license lucide-react v0.475.0 - ISC
402 *
403 * This source code is licensed under the ISC license.
404 * See the LICENSE file in the root directory of this source tree.
405 */const tH=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],zy=Ye("Languages",tH);/**
406 * @license lucide-react v0.475.0 - ISC
407 *
408 * This source code is licensed under the ISC license.
409 * See the LICENSE file in the root directory of this source tree.
410 */const nH=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],pS=Ye("LayoutGrid",nH);/**
411 * @license lucide-react v0.475.0 - ISC
412 *
413 * This source code is licensed under the ISC license.
414 * See the LICENSE file in the root directory of this source tree.
415 */const rH=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],Wy=Ye("Lightbulb",rH);/**
416 * @license lucide-react v0.475.0 - ISC
417 *
418 * This source code is licensed under the ISC license.
419 * See the LICENSE file in the root directory of this source tree.
420 */const sH=[["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"}]],f8=Ye("Link2",sH);/**
421 * @license lucide-react v0.475.0 - ISC
422 *
423 * This source code is licensed under the ISC license.
424 * See the LICENSE file in the root directory of this source tree.
425 */const iH=[["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"}]],aH=Ye("Link",iH);/**
426 * @license lucide-react v0.475.0 - ISC
427 *
428 * This source code is licensed under the ISC license.
429 * See the LICENSE file in the root directory of this source tree.
430 */const oH=[["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"}]],lH=Ye("Linkedin",oH);/**
431 * @license lucide-react v0.475.0 - ISC
432 *
433 * This source code is licensed under the ISC license.
434 * See the LICENSE file in the root directory of this source tree.
435 */const cH=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],rt=Ye("LoaderCircle",cH);/**
436 * @license lucide-react v0.475.0 - ISC
437 *
438 * This source code is licensed under the ISC license.
439 * See the LICENSE file in the root directory of this source tree.
440 */const dH=[["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"}]],hS=Ye("Lock",dH);/**
441 * @license lucide-react v0.475.0 - ISC
442 *
443 * This source code is licensed under the ISC license.
444 * See the LICENSE file in the root directory of this source tree.
445 */const uH=[["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"}]],p8=Ye("LogOut",uH);/**
446 * @license lucide-react v0.475.0 - ISC
447 *
448 * This source code is licensed under the ISC license.
449 * See the LICENSE file in the root directory of this source tree.
450 */const fH=[["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"}]],mr=Ye("Mail",fH);/**
451 * @license lucide-react v0.475.0 - ISC
452 *
453 * This source code is licensed under the ISC license.
454 * See the LICENSE file in the root directory of this source tree.
455 */const pH=[["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"}]],ma=Ye("MapPin",pH);/**
456 * @license lucide-react v0.475.0 - ISC
457 *
458 * This source code is licensed under the ISC license.
459 * See the LICENSE file in the root directory of this source tree.
460 */const hH=[["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"}]],mH=Ye("Megaphone",hH);/**
461 * @license lucide-react v0.475.0 - ISC
462 *
463 * This source code is licensed under the ISC license.
464 * See the LICENSE file in the root directory of this source tree.
465 */const gH=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],h8=Ye("MessageCircle",gH);/**
466 * @license lucide-react v0.475.0 - ISC
467 *
468 * This source code is licensed under the ISC license.
469 * See the LICENSE file in the root directory of this source tree.
470 */const xH=[["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"}]],mS=Ye("MessageSquare",xH);/**
471 * @license lucide-react v0.475.0 - ISC
472 *
473 * This source code is licensed under the ISC license.
474 * See the LICENSE file in the root directory of this source tree.
475 */const yH=[["path",{d:"M5 12h14",key:"1ays0h"}]],vH=Ye("Minus",yH);/**
476 * @license lucide-react v0.475.0 - ISC
477 *
478 * This source code is licensed under the ISC license.
479 * See the LICENSE file in the root directory of this source tree.
480 */const bH=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.48
4806",key:"1pkts6"}]],wH=Ye("Paperclip",bH);/**
481 * @license lucide-react v0.475.0 - ISC
482 *
483 * This source code is licensed under the ISC license.
484 * See the LICENSE file in the root directory of this source tree.
485 */const jH=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],gS=Ye("Pause",jH);/**
486 * @license lucide-react v0.475.0 - ISC
487 *
488 * This source code is licensed under the ISC license.
489 * See the LICENSE file in the root directory of this source tree.
490 */const SH=[["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"}]],m8=Ye("PenLine",SH);/**
491 * @license lucide-react v0.475.0 - ISC
492 *
493 * This source code is licensed under the ISC license.
494 * See the LICENSE file in the root directory of this source tree.
495 */const kH=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],$r=Ye("Pencil",kH);/**
496 * @license lucide-react v0.475.0 - ISC
497 *
498 * This source code is licensed under the ISC license.
499 * See the LICENSE file in the root directory of this source tree.
500 */const _H=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],xS=Ye("Phone",_H);/**
501 * @license lucide-react v0.475.0 - ISC
502 *
503 * This source code is licensed under the ISC license.
504 * See the LICENSE file in the root directory of this source tree.
505 */const CH=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],g8=Ye("Play",CH);/**
506 * @license lucide-react v0.475.0 - ISC
507 *
508 * This source code is licensed under the ISC license.
509 * See the LICENSE file in the root directory of this source tree.
510 */const EH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ln=Ye("Plus",EH);/**
511 * @license lucide-react v0.475.0 - ISC
512 *
513 * This source code is licensed under the ISC license.
514 * See the LICENSE file in the root directory of this source tree.
515 */const FH=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],iF=Ye("Printer",FH);/**
516 * @license lucide-react v0.475.0 - ISC
517 *
518 * This source code is licensed under the ISC license.
519 * See the LICENSE file in the root directory of this source tree.
520 */const AH=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],TH=Ye("Radio",AH);/**
521 * @license lucide-react v0.475.0 - ISC
522 *
523 * This source code is licensed under the ISC license.
524 * See the LICENSE file in the root directory of this source tree.
525 */const NH=[["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"}]],$y=Ye("RefreshCw",NH);/**
526 * @license lucide-react v0.475.0 - ISC
527 *
528 * This source code is licensed under the ISC license.
529 * See the LICENSE file in the root directory of this source tree.
530 */const RH=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],kb=Ye("Save",RH);/**
531 * @license lucide-react v0.475.0 - ISC
532 *
533 * This source code is licensed under the ISC license.
534 * See the LICENSE file in the root directory of this source tree.
535 */const DH=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ua=Ye("Search",DH);/**
536 * @license lucide-react v0.475.0 - ISC
537 *
538 * This source code is licensed under the ISC license.
539 * See the LICENSE file in the root directory of this source tree.
540 */const IH=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],pa=Ye("Send",IH);/**
541 * @license lucide-react v0.475.0 - ISC
542 *
543 * This source code is licensed under the ISC license.
544 * See the LICENSE file in the root directory of this source tree.
545 */const PH=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],aF=Ye("Settings2",PH);/**
546 * @license lucide-react v0.475.0 - ISC
547 *
548 * This source code is licensed under the ISC license.
549 * See the LICENSE file in the root directory of this source tree.
550 */const BH=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Gf=Ye("Settings",BH);/**
551 * @license lucide-react v0.475.0 - ISC
552 *
553 * This source code is licensed under the ISC license.
554 * See the LICENSE file in the root directory of this source tree.
555 */const OH=[["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"}]],MH=Ye("Share2",OH);/**
556 * @license lucide-react v0.475.0 - ISC
557 *
558 * This source code is licensed under the ISC license.
559 * See the LICENSE file in the root directory of this source tree.
560 */const LH=[["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
560y:"oel41y"}]],zH=Ye("Shield",LH);/**
561 * @license lucide-react v0.475.0 - ISC
562 *
563 * This source code is licensed under the ISC license.
564 * See the LICENSE file in the root directory of this source tree.
565 */const WH=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],$H=Ye("SlidersHorizontal",WH);/**
566 * @license lucide-react v0.475.0 - ISC
567 *
568 * This source code is licensed under the ISC license.
569 * See the LICENSE file in the root directory of this source tree.
570 */const UH=[["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"}]],Va=Ye("Sparkles",UH);/**
571 * @license lucide-react v0.475.0 - ISC
572 *
573 * This source code is licensed under the ISC license.
574 * See the LICENSE file in the root directory of this source tree.
575 */const VH=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],HH=Ye("Star",VH);/**
576 * @license lucide-react v0.475.0 - ISC
577 *
578 * This source code is licensed under the ISC license.
579 * See the LICENSE file in the root directory of this source tree.
580 */const qH=[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]],GH=Ye("StickyNote",qH);/**
581 * @license lucide-react v0.475.0 - ISC
582 *
583 * This source code is licensed under the ISC license.
584 * See the LICENSE file in the root directory of this source tree.
585 */const KH=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],YH=Ye("Tag",KH);/**
586 * @license lucide-react v0.475.0 - ISC
587 *
588 * This source code is licensed under the ISC license.
589 * See the LICENSE file in the root directory of this source tree.
590 */const XH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],x8=Ye("Target",XH);/**
591 * @license lucide-react v0.475.0 - ISC
592 *
593 * This source code is licensed under the ISC license.
594 * See the LICENSE file in the root directory of this source tree.
595 */const JH=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],y8=Ye("Timer",JH);/**
596 * @license lucide-react v0.475.0 - ISC
597 *
598 * This source code is licensed under the ISC license.
599 * See the LICENSE file in the root directory of this source tree.
600 */const QH=[["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"}]],zn=Ye("Trash2",QH);/**
601 * @license lucide-react v0.475.0 - ISC
602 *
603 * This source code is licensed under the ISC license.
604 * See the LICENSE file in the root directory of this source tree.
605 */const ZH=[["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"}]],Uy=Ye("TrendingUp",ZH);/**
606 * @license lucide-react v0.475.0 - ISC
607 *
608 * This source code is licensed under the ISC license.
609 * See the LICENSE file in the root directory of this source tree.
610 */const eq=[["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"}]],_o=Ye("TriangleAlert",eq);/**
611 * @license lucide-react v0.475.0 - ISC
612 *
613 * This source code is licensed under the ISC license.
614 * See the LICENSE file in the root directory of this source tree.
615 */const tq=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],nq=Ye("Unplug",tq);/**
616 * @license lucide-react v0.475.0 - ISC
617 *
618 * This source code is licensed under the ISC license.
619 * See the LICENSE file in the root directory of this source tree.
620 */const rq=[["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"}]],Ha=Ye("Upload",rq);/**
621 * @license lucide-react v0.475.0 - ISC
622 *
623 * This source code is licensed under the ISC license.
624 * See the LICENSE file in the root directory of this source tree.
625 */const sq=[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],v8=Ye("UserPlus",sq);/**
626 * @license lucide-react v0.475.0 - ISC
627 *
628 * This source code is licensed under the ISC license.
629 * See the LICENSE file in the root directory of this source tree.
630 */const iq=[["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}],["path",{d:"M10.3 15H7a4 4 0 0 0-4 4v2",key:"3bnktk"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}]],aq=Ye("UserSearch",iq);/**
631 * @license lucide-react v0.475.0 - ISC
632 *
633 * This source code is licensed under the ISC license.
634 * See the LICENSE file in the root directory of this source tree.
635 */const oq=[["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"}]],$m=Ye("User",oq);/**
636 * @license lucide-react v0.475.0 - ISC
637 *
638 * This source code is licensed under the ISC license.
639 * See the LICENSE file in the root directory of this source tree.
640 */const lq=[["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"}]],Nr=Ye("Users",lq);/**
641 * @license lucide-react v0.475.0 - ISC
642 *
643 * This source code is licensed under the ISC license.
644 * See the LICENSE file in the root directory of this source tree.
645 */const cq=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],b8=Ye("Video",cq);/**
646 * @license lucide-react v0.475.0 - ISC
647 *
648 * This source code is licensed under the ISC license.
649 * See the LICENSE file in the root directory of this source tree.
650 */const dq=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],w8=Ye("WandSparkles",dq);/**
651 * @license lucide-react v0.475.0 - ISC
652 *
653 * This source code is licensed under the ISC license.
654 * See the LICENSE file in the root directory of this source tree.
655 */const uq=[["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"}]],j8=Ye("Wrench",uq);/**
656 * @license lucide-react v0.475.0 - ISC
657 *
658 * This source code is licensed under the ISC license.
659 * See the LICENSE file in the root directory of this source tree.
660 */const fq=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,568 bytes, lines 660-665
660],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Jt=Ye("X",fq);/**
661 * @license lucide-react v0.475.0 - ISC
662 *
663 * This source code is licensed under the ISC license.
664 * See the LICENSE file in the root directory of this source tree.
665 */const pq=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Wx=Ye("Zap",pq),hq=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},mq=(e,t)=>({classGroupId:e,validator:t}),S8=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),$x="-",oF=[],gq="arbitrary..",xq=e=>{const t=vq(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return yq(o);const l=o.split($x),c=l[0]===""&&l.length>1?1:0;return k8(l,c,t)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=s[o],d=n[o];return c?d?hq(d,c):c:d||oF}return n[o]||oF}}},k8=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const d=k8(e,t+1,a);if(d)return d}const o=n.validators;if(o===null)return;const l=t===0?e.join($x):e.slice(t).join($x),c=o.length;for(let d=0;d<c;d++){const u=o[d];if(u.validator(l))return u.classGroupId}},yq=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?gq+s:void 0})(),vq=e=>{const{theme:t,classGroups:n}=e;return bq(n,t)},bq=(e,t)=>{const n=S8();for(const s in e){const i=e[s];yS(i,n,s,t)}return n},yS=(e,t,n,s)=>{const i=e.length;for(let a=0;a<i;a++){const o=e[a];wq(o,t,n,s)}},wq=(e,t,n,s)=>{if(typeof e=="string"){jq(e,t,n);return}if(typeof e=="function"){Sq(e,t,n,s);return}kq(e,t,n,s)},jq=(e,t,n)=>{const s=e===""?t:_8(t,e);s.classGroupId=n},Sq=(e,t,n,s)=>{if(_q(e)){yS(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(mq(n,e))},kq=(e,t,n,s)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[l,c]=i[o];yS(c,_8(t,l),n,s)}},_8=(e,t)=>{let n=e;const s=t.split($x),i=s.length;for(let a=0;a<i;a++){const o=s[a];let l=n.nextPart.get(o);l||(l=S8(),n.nextPart.set(o,l)),n=l}return n},_q=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Cq=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const i=(a,o)=>{n[a]=o,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(a){let o=n[a];if(o!==void 0)return o;if((o=s[a])!==void 0)return i(a,o),o},set(a,o){a in n?n[a]=o:i(a,o)}}},_w="!",lF=":",Eq=[],cF=(e,t,n,s,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),Fq=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=i=>{const a=[];let o=0,l=0,c=0,d;const u=i.length;for(let y=0;y<u;y++){const v=i[y];if(o===0&&l===0){if(v===lF){a.push(i.slice(c,y)),c=y+1;continue}if(v==="/"){d=y;continue}}v==="["?o++:v==="]"?o--:v==="("?l++:v===")"&&l--}const p=a.length===0?i:i.slice(c);let m=p,x=!1;p.endsWith(_w)?(m=p.slice(0,-1),x=!0):p.startsWith(_w)&&(m=p.slice(1),x=!0);const w=d&&d>c?d-c:void 0;return cF(a,x,m,w)};if(t){const i=t+lF,a=s;s=o=>o.startsWith(i)?a(o.slice(i.length)):cF(Eq,!1,o,void 0,!0)}if(n){const i=s;s=a=>n({className:a,parseClassName:i})}return s},Aq=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let a=0;a<n.length;a++){const o=n[a],l=o[0]==="[",c=t.has(o);l||c?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(o)):i.push(o)}return i.length>0&&(i.sort(),s.push(...i)),s}},Tq=e=>({cache:Cq(e.cacheSize),parseClassName:Fq(e),sortModifiers:Aq(e),...xq(e)}),Nq=/\s+/,Rq=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],l=e.trim().split(Nq);let c="";for(let d=l.length-1;d>=0;d-=1){const u=l[d],{isExternal:p,modifiers:m,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:y}=n(u);if(p){c=u+(c.length>0?" "+c:c);continue}let v=!!y,j=s(v?w.substring(0,y):w);if(!j){if(!v){c=u+(c.length>0?" "+c:c);continue}if(j=s(w),!j){c=u+(c.length>0?" "+c:c);continue}v=!1}const k=m.length===0?"":m.length===1?m[0]:a(m).join(":"),S=x?k+_w:k,_=S+j;if(o.indexOf(_)>-1)continue;o.push(_);const F=i(j,v);for(let A=0;A<F.length;++A){const C=F[A];o.push(S+C)}c=u+(c.length>0?" "+c:c)}return c},Dq=(...e)=>{let t=0,n,s,i="";for(;t<e.length;)(n=e[t++])&&(s=C8(n))&&(i&&(i+=" "),i+=s);return i},C8=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=C8(e[s]))&&(n&&(n+=" "),n+=t);return n},Iq=(e,...t)=>{let n,s,i,a;const o=c=>{const d=t.reduce((u,p)=>p(u),e());return n=Tq(d),s=n.cache.get,i=n.cache.set,a=l,l(c)},l=c=>{const d=s(c);if(d)return d;const u=Rq(c,n);return i(c,u),u};return a=o,(...c)=>a(Dq(...c))},Pq=[],Or=e=>{const t=n=>n[e]||Pq;return t.isThemeGetter=!0,t},E8=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,F8=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bq=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Oq=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mq=/\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$/,Lq=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wq=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vl=e=>Bq.test(e),mn=e=>!!e&&!Number.isNaN(Number(e)),Hl=e=>!!e&&Number.isInteger(Number(e)),_b=e=>e.endsWith("%")&&mn(e.slice(0,-1)),Go=e=>Oq.test(e),A8=()=>!0,$q=e=>Mq.test(e)&&!Lq.test(e),vS=()=>!1,Uq=e=>
vendor: 4,557 bytes, line 665
665zq.test(e),Vq=e=>Wq.test(e),Hq=e=>!Bt(e)&&!Mt(e),qq=e=>Ic(e,R8,vS),Bt=e=>E8.test(e),ad=e=>Ic(e,D8,$q),dF=e=>Ic(e,eG,mn),Gq=e=>Ic(e,P8,A8),Kq=e=>Ic(e,I8,vS),uF=e=>Ic(e,T8,vS),Yq=e=>Ic(e,N8,Vq),hg=e=>Ic(e,B8,Uq),Mt=e=>F8.test(e),Vp=e=>Zd(e,D8),Xq=e=>Zd(e,I8),fF=e=>Zd(e,T8),Jq=e=>Zd(e,R8),Qq=e=>Zd(e,N8),mg=e=>Zd(e,B8,!0),Zq=e=>Zd(e,P8,!0),Ic=(e,t,n)=>{const s=E8.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Zd=(e,t,n=!1)=>{const s=F8.exec(e);return s?s[1]?t(s[1]):n:!1},T8=e=>e==="position"||e==="percentage",N8=e=>e==="image"||e==="url",R8=e=>e==="length"||e==="size"||e==="bg-size",D8=e=>e==="length",eG=e=>e==="number",I8=e=>e==="family-name",P8=e=>e==="number"||e==="weight",B8=e=>e==="shadow",tG=()=>{const e=Or("color"),t=Or("font"),n=Or("text"),s=Or("font-weight"),i=Or("tracking"),a=Or("leading"),o=Or("breakpoint"),l=Or("container"),c=Or("spacing"),d=Or("radius"),u=Or("shadow"),p=Or("inset-shadow"),m=Or("text-shadow"),x=Or("drop-shadow"),w=Or("blur"),y=Or("perspective"),v=Or("aspect"),j=Or("ease"),k=Or("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[..._(),Mt,Bt],A=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],D=()=>[Mt,Bt,c],P=()=>[Vl,"full","auto",...D()],L=()=>[Hl,"none","subgrid",Mt,Bt],T=()=>["auto",{span:["full",Hl,Mt,Bt]},Hl,Mt,Bt],R=()=>[Hl,"auto",Mt,Bt],U=()=>["auto","min","max","fr",Mt,Bt],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...D()],X=()=>[Vl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],N=()=>[Vl,"screen","full","dvw","lvw","svw","min","max","fit",...D()],W=()=>[Vl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],O=()=>[e,Mt,Bt],G=()=>[..._(),fF,uF,{position:[Mt,Bt]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",Jq,qq,{size:[Mt,Bt]}],K=()=>[_b,Vp,ad],Y=()=>["","none","full",d,Mt,Bt],J=()=>["",mn,Vp,ad],Q=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[mn,_b,fF,uF],re=()=>["","none",w,Mt,Bt],pe=()=>["none",mn,Mt,Bt],Z=()=>["none",mn,Mt,Bt],Ne=()=>[mn,Mt,Bt],te=()=>[Vl,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Go],breakpoint:[Go],color:[A8],container:[Go],"drop-shadow":[Go],ease:["in","out","in-out"],font:[Hq],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Go],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Go],shadow:[Go],spacing:["px",mn],text:[Go],"text-shadow":[Go],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vl,Bt,Mt,v]}],container:["container"],columns:[{columns:[mn,Bt,Mt,l]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}
vendor: 4,741 bytes, line 665
665],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Hl,"auto",Mt,Bt]}],basis:[{basis:[Vl,"full","auto",l,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[mn,Vl,"auto","initial","none",Bt]}],grow:[{grow:["",mn,Mt,Bt]}],shrink:[{shrink:["",mn,Mt,Bt]}],order:[{order:[Hl,"first","last","none",Mt,Bt]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...N()]}],"min-inline-size":[{"min-inline":["auto",...N()]}],"max-inline-size":[{"max-inline":["none",...N()]}],"block-size":[{block:["auto",...W()]}],"min-block-size":[{"min-block":["auto",...W()]}],"max-block-size":[{"max-block":["none",...W()]}],w:[{w:[l,"screen",...X()]}],"min-w":[{"min-w":[l,"screen","none",...X()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,Vp,ad]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Zq,Gq]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_b,Bt]}],"font-family":[{font:[Xq,Kq,t]}],"font-features":[{"font-features":[Bt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Mt,Bt]}],"line-clamp":[{"line-clamp":[mn,"none",Mt,dF]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",Mt,Bt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Mt,Bt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[mn,"from-font","auto",Mt,ad]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[mn,"auto",Mt,Bt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Mt,Bt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Mt,Bt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Hl,Mt,Bt],radial:["",Mt,Bt],conic:[Hl,Mt,Bt]},Qq,Yq]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:K()}
vendor: 7,363 bytes, line 665
665],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[mn,Mt,Bt]}],"outline-w":[{outline:["",mn,Vp,ad]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",u,mg,hg]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",p,mg,hg]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[mn,ad]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",m,mg,hg]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[mn,Mt,Bt]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[mn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Mt,Bt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[mn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Mt,Bt]}],filter:[{filter:["","none",Mt,Bt]}],blur:[{blur:re()}],brightness:[{brightness:[mn,Mt,Bt]}],contrast:[{contrast:[mn,Mt,Bt]}],"drop-shadow":[{"drop-shadow":["","none",x,mg,hg]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",mn,Mt,Bt]}],"hue-rotate":[{"hue-rotate":[mn,Mt,Bt]}],invert:[{invert:["",mn,Mt,Bt]}],saturate:[{saturate:[mn,Mt,Bt]}],sepia:[{sepia:["",mn,Mt,Bt]}],"backdrop-filter":[{"backdrop-filter":["","none",Mt,Bt]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[mn,Mt,Bt]}],"backdrop-contrast":[{"backdrop-contrast":[mn,Mt,Bt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",mn,Mt,Bt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[mn,Mt,Bt]}],"backdrop-invert":[{"backdrop-invert":["",mn,Mt,Bt]}],"backdrop-opacity":[{"backdrop-opacity":[mn,Mt,Bt]}],"backdrop-saturate":[{"backdrop-saturate":[mn,Mt,Bt]}],"backdrop-sepia":[{"backdrop-sepia":["",mn,Mt,Bt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Mt,Bt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[mn,"initial",Mt,Bt]}],ease:[{ease:["linear","initial",j,Mt,Bt]}],delay:[{delay:[mn,Mt,Bt]}],animate:[{animate:["none",k,Mt,Bt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Mt,Bt]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[Mt,Bt,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}
vendor: 5,002 bytes, line 665
665],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Mt,Bt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Mt,Bt]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[mn,Vp,ad,dF]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},nG=Iq(tG);function pn(...e){return nG(ZR(e))}const O8=g.forwardRef(({...e},t)=>r.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));O8.displayName="ToastProvider";
665const M8=g.forwardRef(({...e},t)=>r.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));M8.displayName="ToastViewport";const rG=lS("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"}}),L8=g.forwardRef(({className:e,variant:t,...n},s)=>r.jsx("div",{ref:s,className:pn(rG({variant:t}),e),...n}));L8.displayName="Toast";const sG=g.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:pn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));sG.displayName="ToastAction";const z8=g.forwardRef(({className:e,...t},n)=>r.jsx("button",{ref:n,className:pn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:r.jsx(Jt,{className:"h-4 w-4"})}));z8.displayName="ToastClose";const W8=g.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:pn("text-sm font-semibold",e),...t}));W8.displayName="ToastTitle";const $8=g.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:pn("text-sm opacity-90",e),...t}));$8.displayName="ToastDescription";function iG(){const{toasts:e,dismiss:t}=Wm();return r.jsxs(O8,{children:[e.map(function({id:n,title:s,description:i,action:a,...o}){return r.jsxs(L8,{...o,children:[r.jsxs("div",{className:"grid gap-1",children:[s&&r.jsx(W8,{children:s}),i&&r.jsx($8,{children:i})]}),a,r.jsx(z8,{onClick:()=>t(n)})]},n)}),r.jsx(M8,{})]})}var Vy=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(){}},aG={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},rc,oS,LR,oG=(LR=class{constructor(){yn(this,rc,aG);yn(this,oS,!1)}setTimeoutProvider(e){rn(this,rc,e)}setTimeout(e,t){return Ke(this,rc).setTimeout(e,t)}clearTimeout(e){Ke(this,rc).clearTimeout(e)}setInterval(e,t){return Ke(this,rc).setInterval(e,t)}clearInterval(e){Ke(this,rc).clearInterval(e)}},rc=new WeakMap,oS=new WeakMap,LR),Cw=new oG;function lG(e){setTimeout(e,0)}var Hy=typeof window>"u"||"Deno"in globalThis;function Ta(){}function cG(e,t){return typeof e=="function"?e(t):e}function dG(e){return typeof e=="number"&&e>=0&&e!==1/0}function uG(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ew(e,t){return typeof e=="function"?e(t):e}function fG(e,t){return typeof e=="function"?e(t):e}function pF(e,t){const{type:n="all",exact:s,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(s){if(t.queryHash!==bS(o,t.options))return!1}else if(!sm(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||a&&!a(t))}function hF(e,t){const{exact:n,status:s,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(rm(t.options.mutationKey)!==rm(a))return!1}else if(!sm(t.options.mutationKey,a))return!1}return!(s&&t.state.status!==s||i&&!i(t))}function bS(e,t){return((t==null?void 0:t.queryKeyHashFn)||rm)(e)}function rm(e){return JSON.stringify(e,(t,n)=>Fw(n)?Object.keys(n).sort().reduce((s,i)=>(s[i]=n[i],s),{}):n)}function sm(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>sm(e[n],t[n])):!1}var pG=Object.prototype.hasOwnProperty;function U8(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=mF(e)&&mF(t);if(!s&&!(Fw(e)&&Fw(t)))return t;const a=(s?e:Object.keys(e)).length,o=s?t:Object.keys(t),l=o.length,c=s?new Array(l):{};let d=0;for(let u=0;u<l;u++){const p=s?u:o[u],m=e[p],x=t[p];if(m===x){c[p]=m,(s?u<a:pG.call(e,p))&&d++;continue}if(m===null||x===null||typeof m!="object"||typeof x!="object"){c[p]=x;continue}const w=U8(m,x,n+1);c[p]=w,w===m&&d++}return a===l&&d===a?e:c}function mF(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Fw(e){if(!gF(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;
665return!(!gF(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function gF(e){return Object.prototype.toString.call(e)==="[object Object]"}function hG(e){return new Promise(t=>{Cw.setTimeout(t,e)})}function mG(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?U8(e,t):t}function gG(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function xG(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var wS=Symbol();function V8(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===wS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function yG(e,t,n){let s=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),s||(s=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Td,sc,Ef,zR,vG=(zR=class extends Vy{constructor(){super();yn(this,Td);yn(this,sc);yn(this,Ef);rn(this,Ef,t=>{if(!Hy&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Ke(this,sc)||this.setEventListener(Ke(this,Ef))}onUnsubscribe(){var t;this.hasListeners()||((t=Ke(this,sc))==null||t.call(this),rn(this,sc,void 0))}setEventListener(t){var n;rn(this,Ef,t),(n=Ke(this,sc))==null||n.call(this),rn(this,sc,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){Ke(this,Td)!==t&&(rn(this,Td,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Ke(this,Td)=="boolean"?Ke(this,Td):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Td=new WeakMap,sc=new WeakMap,Ef=new WeakMap,zR),H8=new vG;function bG(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function s(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{s({status:"fulfilled",value:i}),e(i)},n.reject=i=>{s({status:"rejected",reason:i}),t(i)},n}var wG=lG;function jG(){let e=[],t=0,n=l=>{l()},s=l=>{l()},i=wG;const a=l=>{t?e.push(l):i(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{s(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{s=l},setScheduler:l=>{i=l}}}var Gs=jG(),Ff,ic,Af,WR,SG=(WR=class extends Vy{constructor(){super();yn(this,Ff,!0);yn(this,ic);yn(this,Af);rn(this,Af,t=>{if(!Hy&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){Ke(this,ic)||this.setEventListener(Ke(this,Af))}onUnsubscribe(){var t;this.hasListeners()||((t=Ke(this,ic))==null||t.call(this),rn(this,ic,void 0))}setEventListener(t){var n;rn(this,Af,t),(n=Ke(this,ic))==null||n.call(this),rn(this,ic,t(this.setOnline.bind(this)))}setOnline(t){Ke(this,Ff)!==t&&(rn(this,Ff,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return Ke(this,Ff)}},Ff=new WeakMap,ic=new WeakMap,Af=new WeakMap,WR),Ux=new SG;function kG(e){return Math.min(1e3*2**e,3e4)}function q8(e){return(e??"online")==="online"?Ux.isOnline():!0}var Aw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function G8(e){let t=!1,n=0,s;const i=bG(),a=()=>i.status!=="pending",o=y=>{var v;if(!a()){const j=new Aw(y);m(j),(v=e.onCancel)==null||v.call(e,j)}},l=()=>{t=!0},c=()=>{t=!1},d=()=>H8.isFocused()&&(e.networkMode==="always"||Ux.isOnline())&&e.canRun(),u=()=>q8(e.networkMode)&&e.canRun(),p=y=>{a()||(s==null||s(),i.resolve(y))},m=y=>{a()||(s==null||s(),i.reject(y))},x=()=>new Promise(y=>{var v;s=j=>{(a()||d())&&y(j)},(v=e.onPause)==null||v.call(e)}).then(()=>{var y;s=void 0,a()||(y=e.onContinue)==null||y.call(e)}),w=()=>
vendor: 4,381 bytes, line 665
665{if(a())return;let y;const v=n===0?e.initialPromise:void 0;try{y=v??e.fn()}catch(j){y=Promise.reject(j)}Promise.resolve(y).then(p).catch(j=>{var A;if(a())return;const k=e.retry??(Hy?0:3),S=e.retryDelay??kG,_=typeof S=="function"?S(n,j):S,F=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,j);if(t||!F){m(j);return}n++,(A=e.onFail)==null||A.call(e,n,j),hG(_).then(()=>d()?void 0:x()).then(()=>{t?m(j):w()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:l,continueRetry:c,canStart:u,start:()=>(u()?w():x().then(w),i)}}var Nd,$R,K8=($R=class{constructor(){yn(this,Nd)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dG(this.gcTime)&&rn(this,Nd,Cw.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Hy?1/0:300*1e3))}clearGcTimeout(){Ke(this,Nd)&&(Cw.clearTimeout(Ke(this,Nd)),rn(this,Nd,void 0))}},Nd=new WeakMap,$R),Rd,Tf,sa,Dd,Gr,Om,Id,Na,nl,UR,_G=(UR=class extends K8{constructor(t){super();yn(this,Na);yn(this,Rd);yn(this,Tf);yn(this,sa);yn(this,Dd);yn(this,Gr);yn(this,Om);yn(this,Id);rn(this,Id,!1),rn(this,Om,t.defaultOptions),this.setOptions(t.options),this.observers=[],rn(this,Dd,t.client),rn(this,sa,Ke(this,Dd).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,rn(this,Rd,yF(this.options)),this.state=t.state??Ke(this,Rd),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Ke(this,Gr))==null?void 0:t.promise}setOptions(t){if(this.options={...Ke(this,Om),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=yF(this.options);n.data!==void 0&&(this.setState(xF(n.data,n.dataUpdatedAt)),rn(this,Rd,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Ke(this,sa).remove(this)}setData(t,n){const s=mG(this.state.data,t,this.options);return js(this,Na,nl).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){js(this,Na,nl).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,i;const n=(s=Ke(this,Gr))==null?void 0:s.promise;return(i=Ke(this,Gr))==null||i.cancel(t),n?n.then(Ta).catch(Ta):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Ke(this,Rd))}isActive(){return this.observers.some(t=>fG(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wS||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ew(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:!uG(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Ke(this,Gr))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Ke(this,Gr))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Ke(this,sa).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Ke(this,Gr)&&(Ke(this,Id)?Ke(this,Gr).cancel({revert:!0}):Ke(this,Gr).cancelRetry()),this.scheduleGc()),Ke(this,sa).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||js(this,Na,nl).call(this,{type:"invalidate"})}async fetch(t,n){var c,d,u,p,m,x,w,y,v,j,k,S;if(this.state.fetchStatus!=="idle"&&((c=Ke(this,Gr))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Ke(this,Gr))return Ke(this,Gr).continueRetry(),Ke(this,Gr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const _=this.observers.find(F=>F.options.queryFn);_&&this.setOptions(_.options)}const s=new AbortController,i=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(rn(this,Id,!0),s.signal)}
665)},a=()=>{const _=V8(this.options,n),A=(()=>{const C={client:Ke(this,Dd),queryKey:this.queryKey,meta:this.meta};return i(C),C})();return rn(this,Id,!1),this.options.persister?this.options.persister(_,A,this):_(A)},l=(()=>{const _={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Ke(this,Dd),state:this.state,fetchFn:a};return i(_),_})();(d=this.options.behavior)==null||d.onFetch(l,this),rn(this,Tf,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=l.fetchOptions)==null?void 0:u.meta))&&js(this,Na,nl).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),rn(this,Gr,G8({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:_=>{_ instanceof Aw&&_.revert&&this.setState({...Ke(this,Tf),fetchStatus:"idle"}),s.abort()},onFail:(_,F)=>{js(this,Na,nl).call(this,{type:"failed",failureCount:_,error:F})},onPause:()=>{js(this,Na,nl).call(this,{type:"pause"})},onContinue:()=>{js(this,Na,nl).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const _=await Ke(this,Gr).start();if(_===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(_),(x=(m=Ke(this,sa).config).onSuccess)==null||x.call(m,_,this),(y=(w=Ke(this,sa).config).onSettled)==null||y.call(w,_,this.state.error,this),_}catch(_){if(_ instanceof Aw){if(_.silent)return Ke(this,Gr).promise;if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw js(this,Na,nl).call(this,{type:"error",error:_}),(j=(v=Ke(this,sa).config).onError)==null||j.call(v,_,this),(S=(k=Ke(this,sa).config).onSettled)==null||S.call(k,this.state.data,_,this),_}finally{this.scheduleGc()}}},Rd=new WeakMap,Tf=new WeakMap,sa=new WeakMap,Dd=new WeakMap,Gr=new WeakMap,Om=new WeakMap,Id=new WeakMap,Na=new WeakSet,nl=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...CG(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,...xF(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return rn(this,Tf,t.manual?i:void 0),i;case"error":const a=t.error;return{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),Gs.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),Ke(this,sa).notify({query:this,type:"updated",action:t})})},UR);function CG(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:q8(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xF(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function yF(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function vF(e){return{onFetch:(t,n)=>{var u,p,m,x,w;const s=t.options,i=(m=(p=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,a=((x=t.state.data)==null?void 0:x.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let y=!1;const v=S=>{yG(S,()=>t.signal,()=>y=!0)},j=V8(t.options,t.fetchOptions),k=async(S,_,F)=>{if(y)return Promise.reject();if(_==null&&S.pages.length)return Promise.resolve(S);const C=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:_,direction:F?"backward":"forward",meta:t.options.meta};return v(T),T})(),D=await j(C),{maxPages:P}=t.options,L=F?xG:gG;return{pages:L(S.pages,D,P),pageParams:L(S.pageParams,_,P)}};if(i&&a.length){const S=i==="backward",_=S?EG:bF,F={pages:a,pageParams:o},A=_(s,F);l=await k(F,A,S)}else{const S=e??a.length;do{const _=c===0?o[0]??s.initialPageParam:bF(s,l);if(c>0&&_==null)break;l=await k(l,_),c++}while(c<S)}return l};t.options.persister?t.fetchFn=()=>{var y,v;return(v=(y=t.options).persister)==null?void 0:v.call(y,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function bF(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function EG(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var Mm,uo,Cs,Pd,fo,Ql,VR,FG=(VR=class extends K8{constructor(t){super();yn(this,fo);yn(this,Mm);yn(this,uo);yn(this,Cs);yn(this,Pd);rn(this,Mm,t.client),this.mutationId=t.mutationId,rn(this,Cs,t.mutationCache),rn(this,uo,[]),this.state=t.state||AG(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Ke(this,uo).includes(t)||(Ke(this,uo).push(t),this.clearGcTimeout(),Ke(this,Cs).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){rn(this,uo,Ke(this,uo).filter(n=>n!==t)),this.scheduleGc(),Ke(this,Cs).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Ke(this,uo).length||(this.state.status==="pending"?this.scheduleGc():Ke(this,Cs).remove(this))}continue(){var t;return((t=Ke(this,Pd))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,d,u,p,m,x,w,y,v,j,k,S,_,F,A,C;const n=()=>{js(this,fo,Ql).call(this,{type:"continue"})},s={client:Ke(this,Mm),meta:this.options.meta,mutationKey:this.options.mutationKey};rn(this,Pd,G8({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(D,P)=>{js(this,fo,Ql).call(this,{type:"failed",failureCount:D,error:P})},onPause:()=>{js(this,fo,Ql).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Ke(this,Cs).canRun(this)}));const i=this.state.status==="pending",a=!Ke(this,Pd).canStart();try{if(i)n();else{js(this,fo,Ql).call(this,{type:"pending",variables:t,isPaused:a}),Ke(this,Cs).config.onMutate&&await Ke(this,Cs).config.onMutate(t,this,s);
665const P=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,s));P!==this.state.context&&js(this,fo,Ql).call(this,{type:"pending",context:P,variables:t,isPaused:a})}const D=await Ke(this,Pd).start();return await((d=(c=Ke(this,Cs).config).onSuccess)==null?void 0:d.call(c,D,t,this.state.context,this,s)),await((p=(u=this.options).onSuccess)==null?void 0:p.call(u,D,t,this.state.context,s)),await((x=(m=Ke(this,Cs).config).onSettled)==null?void 0:x.call(m,D,null,this.state.variables,this.state.context,this,s)),await((y=(w=this.options).onSettled)==null?void 0:y.call(w,D,null,t,this.state.context,s)),js(this,fo,Ql).call(this,{type:"success",data:D}),D}catch(D){try{await((j=(v=Ke(this,Cs).config).onError)==null?void 0:j.call(v,D,t,this.state.context,this,s))}catch(P){Promise.reject(P)}try{await((S=(k=this.options).onError)==null?void 0:S.call(k,D,t,this.state.context,s))}catch(P){Promise.reject(P)}try{await((F=(_=Ke(this,Cs).config).onSettled)==null?void 0:F.call(_,void 0,D,this.state.variables,this.state.context,this,s))}catch(P){Promise.reject(P)}try{await((C=(A=this.options).onSettled)==null?void 0:C.call(A,void 0,D,t,this.state.context,s))}catch(P){Promise.reject(P)}throw js(this,fo,Ql).call(this,{type:"error",error:D}),D}finally{Ke(this,Cs).runNext(this)}}},Mm=new WeakMap,uo=new WeakMap,Cs=new WeakMap,Pd=new WeakMap,fo=new WeakSet,Ql=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Gs.batch(()=>{Ke(this,uo).forEach(s=>{s.onMutationUpdate(t)}),Ke(this,Cs).notify({mutation:this,type:"updated",action:t})})},VR);function AG(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rl,Ra,Lm,HR,TG=(HR=class extends Vy{constructor(t={}){super();yn(this,rl);yn(this,Ra);yn(this,Lm);this.config=t,rn(this,rl,new Set),rn(this,Ra,new Map),rn(this,Lm,0)}build(t,n,s){const i=new FG({client:t,mutationCache:this,mutationId:++fg(this,Lm)._,options:t.defaultMutationOptions(n),state:s});return this.add(i),i}add(t){Ke(this,rl).add(t);const n=gg(t);if(typeof n=="string"){const s=Ke(this,Ra).get(n);s?s.push(t):Ke(this,Ra).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Ke(this,rl).delete(t)){const n=gg(t);if(typeof n=="string"){const s=Ke(this,Ra).get(n);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[0]===t&&Ke(this,Ra).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=gg(t);if(typeof n=="string"){const s=Ke(this,Ra).get(n),i=s==null?void 0:s.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var s;const n=gg(t);if(typeof n=="string"){const i=(s=Ke(this,Ra).get(n))==null?void 0:s.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Gs.batch(()=>{Ke(this,rl).forEach(t=>{this.notify({type:"removed",mutation:t})}),Ke(this,rl).clear(),Ke(this,Ra).clear()})}getAll(){return Array.from(Ke(this,rl))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>hF(n,s))}findAll(t={}){return this.getAll().filter(n=>hF(t,n))}notify(t){Gs.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Gs.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ta))))}},rl=new WeakMap,Ra=new WeakMap,Lm=new WeakMap,HR);function gg(e){var t;return(t=e.options.scope)==null?void 0:t.id}var po,qR,NG=(qR=class extends Vy{constructor(t={}){super();yn(this,po);this.config=t,rn(this,po,new Map)}build(t,n,s){const i=n.queryKey,a=n.queryHash??bS(i,n);let o=this.get(a);return o||(o=new _G({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){Ke(this,po).has(t.queryHash)||(Ke(this,po).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Ke(this,po).get(t.queryHash);n&&(t.destroy(),n===t&&Ke(this,po).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Gs.batch(()=>
vendor: 7,300 bytes, lines 665-674
665{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Ke(this,po).get(t)}getAll(){return[...Ke(this,po).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>pF(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>pF(t,s)):n}notify(t){Gs.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Gs.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Gs.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},po=new WeakMap,qR),fr,ac,oc,Nf,Rf,lc,Df,If,GR,RG=(GR=class{constructor(e={}){yn(this,fr);yn(this,ac);yn(this,oc);yn(this,Nf);yn(this,Rf);yn(this,lc);yn(this,Df);yn(this,If);rn(this,fr,e.queryCache||new NG),rn(this,ac,e.mutationCache||new TG),rn(this,oc,e.defaultOptions||{}),rn(this,Nf,new Map),rn(this,Rf,new Map),rn(this,lc,0)}mount(){fg(this,lc)._++,Ke(this,lc)===1&&(rn(this,Df,H8.subscribe(async e=>{e&&(await this.resumePausedMutations(),Ke(this,fr).onFocus())})),rn(this,If,Ux.subscribe(async e=>{e&&(await this.resumePausedMutations(),Ke(this,fr).onOnline())})))}unmount(){var e,t;fg(this,lc)._--,Ke(this,lc)===0&&((e=Ke(this,Df))==null||e.call(this),rn(this,Df,void 0),(t=Ke(this,If))==null||t.call(this),rn(this,If,void 0))}isFetching(e){return Ke(this,fr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Ke(this,ac).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Ke(this,fr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Ke(this,fr).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ew(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return Ke(this,fr).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),i=Ke(this,fr).get(s.queryHash),a=i==null?void 0:i.state.data,o=cG(t,a);if(o!==void 0)return Ke(this,fr).build(this,s).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Gs.batch(()=>Ke(this,fr).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Ke(this,fr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Ke(this,fr);Gs.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Ke(this,fr);return Gs.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=Gs.batch(()=>Ke(this,fr).findAll(e).map(i=>i.cancel(n)));return Promise.all(s).then(Ta).catch(Ta)}invalidateQueries(e,t={}){return Gs.batch(()=>(Ke(this,fr).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=Gs.batch(()=>Ke(this,fr).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Ta)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(s).then(Ta)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Ke(this,fr).build(this,t);return n.isStaleByTime(Ew(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ta).catch(Ta)}fetchInfiniteQuery(e){return e.behavior=vF(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ta).catch(Ta)}ensureInfiniteQueryData(e){return e.behavior=vF(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ux.isOnline()?Ke(this,ac).resumePausedMutations():Promise.resolve()}getQueryCache(){return Ke(this,fr)}getMutationCache(){return Ke(this,ac)}getDefaultOptions(){return Ke(this,oc)}setDefaultOptions(e){rn(this,oc,e)}setQueryDefaults(e,t){Ke(this,Nf).set(rm(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Ke(this,Nf).values()],n={};return t.forEach(s=>{sm(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){Ke(this,Rf).set(rm(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Ke(this,Rf).values()],n={};return t.forEach(s=>{sm(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Ke(this,oc).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=bS(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===wS&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Ke(this,oc).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Ke(this,fr).clear(),Ke(this,ac).clear()}},fr=new WeakMap,ac=new WeakMap,oc=new WeakMap,Nf=new WeakMap,Rf=new WeakMap,lc=new WeakMap,Df=new WeakMap,If=new WeakMap,GR),DG=g.createContext(void 0),IG=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),r.jsx(DG.Provider,{value:e,children:t}));const PG=new RG({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var Ka=JR();const Y8=zm(Ka);/**
666 * @remix-run/router v1.23.2
667 *
668 * Copyright (c) Remix Software Inc.
669 *
670 * This source code is licensed under the MIT license found in the
671 * LICENSE.md file in the root directory of this source tree.
672 *
673 * @license MIT
674 */function im(){return im=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},im.apply(this,arguments)}var cc;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(cc||(cc={}));const wF="popstate";function BG(e){e===void 0&&(e={});function t(s,i){let{pathname:a,search:o,hash:l}=s.location;return Tw("",{pathname:a,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(s,i){return typeof i=="string"?i:Vx(i)}return MG(t,n,null,e)}function wr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function OG(){return Math.random().toString(36).substr(2,8)}function jF(e,t){return{usr:e.state,key:e.key,idx:t}}function Tw(e,t,n,s){return n===void 0&&(n=null),im({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Kf(t):t,{state:n,key:t&&t.key||s||OG()})}function Vx(e){let{pathname:t="/",search:n="",hash:s=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function Kf(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function MG(e,t,n,s){s===void 0&&(s={});let{window:i=document.defaultView,v5Compat:a=!1}=s,o=i.history,l=cc.Pop,c=null,d=u();d==null&&(d=0,o.replaceState(im({},o.state,{idx:d}),""));function u(){return(o.state||{idx:null}).idx}function p(){l=cc.Pop;
vendor: 8,276 bytes, lines 674-683
674let v=u(),j=v==null?null:v-d;d=v,c&&c({action:l,location:y.location,delta:j})}function m(v,j){l=cc.Push;let k=Tw(y.location,v,j);d=u()+1;let S=jF(k,d),_=y.createHref(k);try{o.pushState(S,"",_)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;i.location.assign(_)}a&&c&&c({action:l,location:y.location,delta:1})}function x(v,j){l=cc.Replace;let k=Tw(y.location,v,j);d=u();let S=jF(k,d),_=y.createHref(k);o.replaceState(S,"",_),a&&c&&c({action:l,location:y.location,delta:0})}function w(v){let j=i.location.origin!=="null"?i.location.origin:i.location.href,k=typeof v=="string"?v:Vx(v);return k=k.replace(/ $/,"%20"),wr(j,"No window.location.(origin|href) available to create URL for href: "+k),new URL(k,j)}let y={get action(){return l},get location(){return e(i,o)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(wF,p),c=v,()=>{i.removeEventListener(wF,p),c=null}},createHref(v){return t(i,v)},createURL:w,encodeLocation(v){let j=w(v);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:m,replace:x,go(v){return o.go(v)}};return y}var SF;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(SF||(SF={}));function LG(e,t,n){return n===void 0&&(n="/"),zG(e,t,n)}function zG(e,t,n,s){let i=typeof t=="string"?Kf(t):t,a=SS(i.pathname||"/",n);if(a==null)return null;let o=X8(e);WG(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let d=ZG(a);l=XG(o[c],d)}return l}function X8(e,t,n,s){t===void 0&&(t=[]),n===void 0&&(n=[]),s===void 0&&(s="");let i=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(wr(c.relativePath.startsWith(s),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(s.length));let d=gc([s,c.relativePath]),u=n.concat(c);a.children&&a.children.length>0&&(wr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),X8(a.children,t,u,d)),!(a.path==null&&!a.index)&&t.push({path:d,score:KG(d,a.index),routesMeta:u})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))i(a,o);else for(let c of J8(a.path))i(a,o,c)}),t}function J8(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(s.length===0)return i?[a,""]:[a];let o=J8(s.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function WG(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:YG(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const $G=/^:[\w-]+$/,UG=3,VG=2,HG=1,qG=10,GG=-2,kF=e=>e==="*";function KG(e,t){let n=e.split("/"),s=n.length;return n.some(kF)&&(s+=GG),t&&(s+=VG),n.filter(i=>!kF(i)).reduce((i,a)=>i+($G.test(a)?UG:a===""?HG:qG),s)}function YG(e,t){return e.length===t.length&&e.slice(0,-1).every((s,i)=>s===t[i])?e[e.length-1]-t[t.length-1]:0}function XG(e,t,n){let{routesMeta:s}=e,i={},a="/",o=[];for(let l=0;l<s.length;++l){let c=s[l],d=l===s.length-1,u=a==="/"?t:t.slice(a.length)||"/",p=JG({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},u),m=c.route;if(!p)return null;Object.assign(i,p.params),o.push({params:i,pathname:gc([a,p.pathname]),pathnameBase:sK(gc([a,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(a=gc([a,p.pathnameBase]))}return o}function JG(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=QG(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:s.reduce((d,u,p)=>{let{paramName:m,isOptional:x}=u;if(m==="*"){let y=l[p]||"";o=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const w=l[p];return x&&!w?d[m]=void 0:d[m]=(w||"").replace(/%2F/g,"/"),d},{}),pathname:a,pathnameBase:o,pattern:e}}function QG(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jS(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 s=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(s.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),s]}function ZG(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function SS(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}const eK=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tK=e=>eK.test(e);function nK(e,t){t===void 0&&(t="/");let{pathname:n,search:s="",hash:i=""}=typeof e=="string"?Kf(e):e,a;if(n)if(tK(n))a=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),jS(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?a=_F(n.substring(1),"/"):a=_F(n,t)}else a=t;return{pathname:a,search:iK(s),hash:aK(i)}}function _F(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Cb(e,t,n,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(s)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function rK(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function kS(e,t){let n=rK(e);return t?n.map((s,i)=>i===n.length-1?s.pathname:s.pathnameBase):n.map(s=>s.pathnameBase)}function _S(e,t,n,s){s===void 0&&(s=!1);let i;typeof e=="string"?i=Kf(e):(i=im({},e),wr(!i.pathname||!i.pathname.includes("?"),Cb("?","pathname","search",i)),wr(!i.pathname||!i.pathname.includes("#"),Cb("#","pathname","hash",i)),wr(!i.search||!i.search.includes("#"),Cb("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,l;if(o==null)l=n;else{let p=t.length-1;if(!s&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}l=p>=0?t[p]:"/"}let c=nK(i,l),d=o&&o!=="/"&&o.endsWith("/"),u=(a||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||u)&&(c.pathname+="/"),c}const gc=e=>e.join("/").replace(/\/\/+/g,"/"),sK=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iK=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,aK=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function oK(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Q8=["post","put","patch","delete"];new Set(Q8);const lK=["get",...Q8];new Set(lK);/**
675 * React Router v6.30.3
676 *
677 * Copyright (c) Remix Software Inc.
678 *
679 * This source code is licensed under the MIT license found in the
680 * LICENSE.md file in the root directory of this source tree.
681 *
682 * @license MIT
683 */function am(){return am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},am.apply(this,arguments)}const CS=g.createContext(null),cK=g.createContext(null),Pc=g.createContext(null),qy=g.createContext(null),Ro=g.createContext({outlet:null,matches:[],isDataRoute:!1}),Z8=g.createContext(null);function dK(e,t){let{relative:n}=t===void 0?{}:t;Yf()||wr(!1);let{basename:s,navigator:i}=g.useContext(Pc),{hash:a,pathname:o,search:l}=tD(e,{relative:n}),c=o;return s!=="/"&&(c=o==="/"?s:gc([s,o])),i.createHref({pathname:c,search:l,hash:a})}
vendor: 4,793 bytes, line 683
683function Yf(){return g.useContext(qy)!=null}function Bs(){return Yf()||wr(!1),g.useContext(qy).location}function eD(e){g.useContext(Pc).static||g.useLayoutEffect(e)}function In(){let{isDataRoute:e}=g.useContext(Ro);return e?_K():uK()}function uK(){Yf()||wr(!1);let e=g.useContext(CS),{basename:t,future:n,navigator:s}=g.useContext(Pc),{matches:i}=g.useContext(Ro),{pathname:a}=Bs(),o=JSON.stringify(kS(i,n.v7_relativeSplatPath)),l=g.useRef(!1);return eD(()=>{l.current=!0}),g.useCallback(function(d,u){if(u===void 0&&(u={}),!l.current)return;if(typeof d=="number"){s.go(d);return}let p=_S(d,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:gc([t,p.pathname])),(u.replace?s.replace:s.push)(p,u.state,u)},[t,s,o,a,e])}const fK=g.createContext(null);function pK(e){let t=g.useContext(Ro).outlet;return t&&g.createElement(fK.Provider,{value:e},t)}function Do(){let{matches:e}=g.useContext(Ro),t=e[e.length-1];return t?t.params:{}}function tD(e,t){let{relative:n}=t===void 0?{}:t,{future:s}=g.useContext(Pc),{matches:i}=g.useContext(Ro),{pathname:a}=Bs(),o=JSON.stringify(kS(i,s.v7_relativeSplatPath));return g.useMemo(()=>_S(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function hK(e,t){return mK(e,t)}function mK(e,t,n,s){Yf()||wr(!1);let{navigator:i}=g.useContext(Pc),{matches:a}=g.useContext(Ro),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let d=Bs(),u;if(t){var p;let v=typeof t=="string"?Kf(t):t;c==="/"||(p=v.pathname)!=null&&p.startsWith(c)||wr(!1),u=v}else u=d;let m=u.pathname||"/",x=m;if(c!=="/"){let v=c.replace(/^\//,"").split("/");x="/"+m.replace(/^\//,"").split("/").slice(v.length).join("/")}let w=LG(e,{pathname:x}),y=bK(w&&w.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:gc([c,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:gc([c,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,n,s);return t&&y?g.createElement(qy.Provider,{value:{location:am({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:cc.Pop}},y):y}function gK(){let e=kK(),t=oK(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,null)}const xK=g.createElement(gK,null);class yK extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(Ro.Provider,{value:this.props.routeContext},g.createElement(Z8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function vK(e){let{routeContext:t,match:n,children:s}=e,i=g.useContext(CS);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Ro.Provider,{value:t},s)}function bK(e,t,n,s){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),s===void 0&&(s=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=s)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let u=o.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);u>=0||wr(!1),o=o.slice(0,Math.min(o.length,u+1))}let c=!1,d=-1;if(n&&s&&s.v7_partialHydration)for(let u=0;u<o.length;u++){let p=o[u];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=u),p.route.id){let{loaderData:m,errors:x}=n,w=p.route.loader&&m[p.route.id]===void 0&&(!x||x[p.route.id]===void 0);if(p.route.lazy||w){c=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((u,p,m)=>{let x,w=!1,y=null,v=null;n&&(x=l&&p.route.id?l[p.route.id]:void 0,y=p.route.errorElement||xK,c&&(d<0&&m===0?(CK("route-fallback"),w=!0,v=null):d===m&&(w=!0,v=p.route.hydrateFallbackElement||null)));let j=t.concat(o.slice(0,m+1)),k=()=>{let S;return x?S=y:w?S=v:p.route.Component?S=g.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=u,g.createElement(vK,{match:p,routeC
683ontext:{outlet:u,matches:j,isDataRoute:n!=null},children:S})};return n&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?g.createElement(yK,{location:n.location,revalidation:n.revalidation,component:y,error:x,children:k(),routeContext:{outlet:null,matches:j,isDataRoute:!0}}):k()},null)}var nD=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(nD||{}),rD=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(rD||{});function wK(e){let t=g.useContext(CS);return t||wr(!1),t}function jK(e){let t=g.useContext(cK);return t||wr(!1),t}function SK(e){let t=g.useContext(Ro);return t||wr(!1),t}function sD(e){let t=SK(),n=t.matches[t.matches.length-1];return n.route.id||wr(!1),n.route.id}function kK(){var e;let t=g.useContext(Z8),n=jK(),s=sD();return t!==void 0?t:(e=n.errors)==null?void 0:e[s]}function _K(){let{router:e}=wK(nD.UseNavigateStable),t=sD(rD.UseNavigateStable),n=g.useRef(!1);return eD(()=>{n.current=!0}),g.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,am({fromRouteId:t},a)))},[e,t])}const CF={};function CK(e,t,n){CF[e]||(CF[e]=!0)}function EK(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function wx(e){let{to:t,replace:n,state:s,relative:i}=e;Yf()||wr(!1);let{future:a,static:o}=g.useContext(Pc),{matches:l}=g.useContext(Ro),{pathname:c}=Bs(),d=In(),u=_S(t,kS(l,a.v7_relativeSplatPath),c,i==="path"),p=JSON.stringify(u);return g.useEffect(()=>d(JSON.parse(p),{replace:n,state:s,relative:i}),[d,p,i,n,s]),null}function Gy(e){return pK(e.context)}function Qt(e){wr(!1)}function FK(e){let{basename:t="/",children:n=null,location:s,navigationType:i=cc.Pop,navigator:a,static:o=!1,future:l}=e;Yf()&&wr(!1);let c=t.replace(/^\/*/,"/"),d=g.useMemo(()=>({basename:c,navigator:a,static:o,future:am({v7_relativeSplatPath:!1},l)}),[c,l,a,o]);typeof s=="string"&&(s=Kf(s));let{pathname:u="/",search:p="",hash:m="",state:x=null,key:w="default"}=s,y=g.useMemo(()=>{let v=SS(u,c);return v==null?null:{location:{pathname:v,search:p,hash:m,state:x,key:w},navigationType:i}},[c,u,p,m,x,w,i]);return y==null?null:g.createElement(Pc.Provider,{value:d},g.createElement(qy.Provider,{children:n,value:y}))}function AK(e){let{children:t,location:n}=e;return hK(Nw(t),n)}new Promise(()=>{});function Nw(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(s,i)=>{if(!g.isValidElement(s))return;let a=[...t,i];if(s.type===g.Fragment){n.push.apply(n,Nw(s.props.children,a));return}s.type!==Qt&&wr(!1),!s.props.index||!s.props.children||wr(!1);let o={id:s.props.id||a.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(o.children=Nw(s.props.children,a)),n.push(o)}),n}/**
684 * React Router DOM v6.30.3
685 *
686 * Copyright (c) Remix Software Inc.
687 *
688 * This source code is licensed under the MIT license found in the
689 * LICENSE.md file in the root directory of this source tree.
690 *
691 * @license MIT
692 */function Rw(){return Rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Rw.apply(this,arguments)}function TK(e,t){if(e==null)return{};var n={},s=Object.keys(e),i,a;for(a=0;a<s.length;a++)i=s[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function NK(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function RK(e,t){return e.button===0&&(!t||t==="_self")&&!NK(e)}function Dw(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let s=e[n];return t.concat(Array.isArray(s)?s.map(i=>[n,i]):[[n,s]])},[]))}function DK(e,t){let n=Dw(e);return t&&t.forEach((s,i)=>
692{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}const IK=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],PK="6";try{window.__reactRouterVersion=PK}catch{}const BK="startTransition",EF=My[BK];function OK(e){let{basename:t,children:n,future:s,window:i}=e,a=g.useRef();a.current==null&&(a.current=BG({window:i,v5Compat:!0}));let o=a.current,[l,c]=g.useState({action:o.action,location:o.location}),{v7_startTransition:d}=s||{},u=g.useCallback(p=>{d&&EF?EF(()=>c(p)):c(p)},[c,d]);return g.useLayoutEffect(()=>o.listen(u),[o,u]),g.useEffect(()=>EK(s),[s]),g.createElement(FK,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:s})}const MK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",LK=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ut=g.forwardRef(function(t,n){let{onClick:s,relative:i,reloadDocument:a,replace:o,state:l,target:c,to:d,preventScrollReset:u,viewTransition:p}=t,m=TK(t,IK),{basename:x}=g.useContext(Pc),w,y=!1;if(typeof d=="string"&&LK.test(d)&&(w=d,MK))try{let S=new URL(window.location.href),_=d.startsWith("//")?new URL(S.protocol+d):new URL(d),F=SS(_.pathname,x);_.origin===S.origin&&F!=null?d=F+_.search+_.hash:y=!0}catch{}let v=dK(d,{relative:i}),j=zK(d,{replace:o,state:l,target:c,preventScrollReset:u,relative:i,viewTransition:p});function k(S){s&&s(S),S.defaultPrevented||j(S)}return g.createElement("a",Rw({},m,{href:w||v,onClick:y||a?s:k,ref:n,target:c}))});var FF;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(FF||(FF={}));var AF;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(AF||(AF={}));function zK(e,t){let{target:n,replace:s,state:i,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,c=In(),d=Bs(),u=tD(e,{relative:o});return g.useCallback(p=>{if(RK(p,n)){p.preventDefault();let m=s!==void 0?s:Vx(d)===Vx(u);c(e,{replace:m,state:i,preventScrollReset:a,relative:o,viewTransition:l})}},[d,c,u,s,i,n,e,a,o,l])}function Um(e){let t=g.useRef(Dw(e)),n=g.useRef(!1),s=Bs(),i=g.useMemo(()=>DK(s.search,n.current?null:t.current),[s.search]),a=In(),o=g.useCallback((l,c)=>{const d=Dw(typeof l=="function"?l(i):l);n.current=!0,a("?"+d,c)},[a,i]);return[i,o]}function iD(e,t){return function(){return e.apply(t,arguments)}}const{toString:WK}=Object.prototype,{getPrototypeOf:Pf}=Object,{iterator:Vm,toStringTag:aD}=Symbol,Hx=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),om=(e,t)=>{let n=e;const s=[];for(;n!=null&&n!==Object.prototype;){if(s.indexOf(n)!==-1)return!1;if(s.push(n),Hx(n,t))return!0;n=Pf(n)}return!1},$K=(e,t)=>e!=null&&om(e,t)?e[t]:void 0,ES=(e=>t=>{const n=WK.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ya=e=>(e=e.toLowerCase(),t=>ES(t)===e),Ky=e=>t=>typeof t===e,{isArray:$d}=Array,Bf=Ky("undefined");function Xf(e){return e!==null&&!Bf(e)&&e.constructor!==null&&!Bf(e.constructor)&&fi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const oD=Ya("ArrayBuffer");function UK(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&oD(e.buffer),t}const VK=Ky("string"),fi=Ky("function"),lD=Ky("number"),Jf=e=>e!==null&&typeof e=="object",HK=e=>e===!0||e===!1,jx=e=>{if(!Jf(e))return!1;const t=Pf(e);return(t===null||t===Object.prototype||Pf(t)===null)&&!om(e,aD)&&!om(e,Vm)},qK=e=>{if(!Jf(e)||Xf(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},GK=Ya("Date"),KK=Ya("File"),YK=e=>!!(e&&typeof e.uri<"u"),XK=e=>e&&typeof e.getParts<"u",JK=Ya("Blob"),QK=Ya("FileList"),ZK=e=>Jf(e)&&fi(e.pipe);function eY(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const TF=eY(),NF=typeof TF.FormData<"u"?TF.FormData:void 0,tY=e=>{if(!e)return!1;if(NF&&e instanceof NF)return!0;const t=Pf(e);if(!t||t===Object.prototype||!fi(e.append))return!1;const n=ES(e);return n==="formdata"||n==="object"&&fi(e.toString)&&e.toString()==="[object FormData]"},nY=Ya("URLSearchParams"),[rY,sY,iY,aY]=["ReadableStream","Request","Response","Headers"].map(Ya),oY=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hm(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,i;if(typeof e!="object"&&(e=[e]),$d(e))for(s=0,i=e.length;s<i;s++)t.call(null,e[s],s,e);else{if(Xf(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let l;for(s=0;s<o;s++)l=a[s],t.call(null,e[l],l,e)}}function cD(e,t){if(Xf(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,i;for(;s-- >0;)if(i=n[s],t===i.toLowerCase())return i;return null}const Sd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dD=e=>!Bf(e)&&e!==Sd;function Iw(...e){const{caseless:t,skipUndefined:n}=dD(this)&&this||{},s={},i=(a,o)=>
vendor: 8,139 bytes, lines 692-694
692{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const l=t&&typeof o=="string"&&cD(s,o)||o,c=Hx(s,l)?s[l]:void 0;jx(c)&&jx(a)?s[l]=Iw(c,a):jx(a)?s[l]=Iw({},a):$d(a)?s[l]=a.slice():(!n||!Bf(a))&&(s[l]=a)};for(let a=0,o=e.length;a<o;a++){const l=e[a];if(!l||Xf(l)||(Hm(l,i),typeof l!="object"||$d(l)))continue;const c=Object.getOwnPropertySymbols(l);for(let d=0;d<c.length;d++){const u=c[d];vY.call(l,u)&&i(l[u],u)}}return s}const lY=(e,t,n,{allOwnKeys:s}={})=>(Hm(t,(i,a)=>{n&&fi(i)?Object.defineProperty(e,a,{__proto__:null,value:iD(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),cY=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),dY=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},uY=(e,t,n,s)=>{let i,a,o;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!s||s(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&Pf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},fY=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},pY=e=>{if(!e)return null;if($d(e))return e;let t=e.length;if(!lD(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},hY=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pf(Uint8Array)),mY=(e,t)=>{const s=(e&&e[Vm]).call(e);let i;for(;(i=s.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},gY=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},xY=Ya("HTMLFormElement"),yY=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,i){return s.toUpperCase()+i}),{propertyIsEnumerable:vY}=Object.prototype,bY=Ya("RegExp"),uD=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Hm(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(s[a]=o||i)}),Object.defineProperties(e,s)},wY=e=>{uD(e,(t,n)=>{if(fi(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];if(fi(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},jY=(e,t)=>{const n={},s=i=>{i.forEach(a=>{n[a]=!0})};return $d(e)?s(e):s(String(e).split(t)),n},SY=()=>{},kY=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _Y(e){return!!(e&&fi(e.append)&&e[aD]==="FormData"&&e[Vm])}const CY=e=>{const t=new WeakSet,n=s=>{if(Jf(s)){if(t.has(s))return;if(Xf(s))return s;if(!("toJSON"in s)){t.add(s);const i=$d(s)?[]:{};return Hm(s,(a,o)=>{const l=n(a);!Bf(l)&&(i[o]=l)}),t.delete(s),i}}return s};return n(e)},EY=Ya("AsyncFunction"),FY=e=>e&&(Jf(e)||fi(e))&&fi(e.then)&&fi(e.catch),fD=((e,t)=>e?setImmediate:t?((n,s)=>(Sd.addEventListener("message",({source:i,data:a})=>{i===Sd&&a===n&&s.length&&s.shift()()},!1),i=>{s.push(i),Sd.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",fi(Sd.postMessage)),AY=typeof queueMicrotask<"u"?queueMicrotask.bind(Sd):typeof process<"u"&&process.nextTick||fD,pD=e=>e!=null&&fi(e[Vm]),TY=e=>e!=null&&om(e,Vm)&&pD(e),Ee={isArray:$d,isArrayBuffer:oD,isBuffer:Xf,isFormData:tY,isArrayBufferView:UK,isString:VK,isNumber:lD,isBoolean:HK,isObject:Jf,isPlainObject:jx,isEmptyObject:qK,isReadableStream:rY,isRequest:sY,isResponse:iY,isHeaders:aY,isUndefined:Bf,isDate:GK,isFile:KK,isReactNativeBlob:YK,isReactNative:XK,isBlob:JK,isRegExp:bY,isFunction:fi,isStream:ZK,isURLSearchParams:nY,isTypedArray:hY,isFileList:QK,forEach:Hm,merge:Iw,extend:lY,trim:oY,stripBOM:cY,inherits:dY,toFlatObject:uY,kindOf:ES,kindOfTest:Ya,endsWith:fY,toArray:pY,forEachEntry:mY,matchAll:gY,isHTMLForm:xY,hasOwnProperty:Hx,hasOwnProp:Hx,hasOwnInPrototypeChain:om,getSafeProp:$K,reduceDescriptors:uD,freezeMethods:wY,toObjectSet:jY,toCamelCase:yY,noop:SY,toFiniteNumber:kY,findKey:cD,global:Sd,isContextDefined:dD,isSpecCompliantForm:_Y,toJSONObject:CY,isAsyncFn:EY,isThenable:FY,setImmediate:fD,asap:AY,isIterable:pD,isSafeIterable:TY},NY=Ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),RY=e=>{const t={};let n,s,i;return e&&e.split(`
693`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),s=o.substring(i+1).trim(),!(!n||t[n]&&NY[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t};function DY(e){let t=0,n=e.length;for(;t<n;){const s=e.charCodeAt(t);if(s!==9&&s!==32)break;t+=1}for(;n>t;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const IY=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),PY=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function FS(e,t){return Ee.isArray(e)?e.map(n=>FS(n,t)):DY(String(e).replace(t,""))}const BY=e=>FS(e,IY),OY=e=>FS(e,PY);function hD(e){const t=Object.create(null);return Ee.forEach(e.toJSON(),(n,s)=>{t[s]=OY(n)}),t}const RF=Symbol("internals");function Hp(e){return e&&String(e).trim().toLowerCase()}function Sx(e){return e===!1||e==null?e:Ee.isArray(e)?e.map(Sx):BY(String(e))}function MY(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const LY=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Eb(e,t,n,s,i){if(Ee.isFunction(s))return s.call(this,t,n);if(i&&(t=n),!!Ee.isString(t)){if(Ee.isString(s))return t.indexOf(s)!==-1;if(Ee.isRegExp(s))return s.test(t)}}function zY(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function WY(e,t){const n=Ee.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(i,a,o){return this[s].call(this,t,i,a,o)},configurable:!0})})}let Rs=class{constructor(t){t&&this.set(t)}set(t,n,s){const i=this;function a(l,c,d){const u=Hp(c);if(!u)return;const p=Ee.findKey(i,u);(!p||i[p]===void 0||d===!0||d===void 0&&i[p]!==!1)&&(i[p||c]=Sx(l))}const o=(l,c)=>Ee.forEach(l,(d,u)=>a(d,u,c));if(Ee.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(Ee.isString(t)&&(t=t.trim())&&!LY(t))o(RY(t),n);else if(Ee.isObject(t)&&Ee.isSafeIterable(t)){let l=Object.create(null),c,d;for(const u of t){if(!Ee.isArray(u))throw new TypeError("Object iterator must return a key-value pair");d=u[0],Ee.hasOwnProp(l,d)?(c=l[d],l[d]=Ee.isArray(c)?[...c,u[1]]:[c,u[1]]):l[d]=u[1]}o(l,n)}else t!=null&&a(n,t,s);return this}get(t,n){if(t=Hp(t),t){const s=Ee.findKey(this,t);if(s){const i=this[s];if(!n)return i;if(n===!0)return MY(i);if(Ee.isFunction(n))return n.call(this,i,s);if(Ee.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Hp(t),t){const s=Ee.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Eb(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let i=!1;function a(o){if(o=Hp(o),o){const l=Ee.findKey(s,o);l&&(!n||Eb(s,s[l],l,n))&&(delete s[l],i=!0)}}return Ee.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let s=n.length,i=!1;for(;s--;){const a=n[s];(!t||Eb(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,s={};return Ee.forEach(this,(i,a)=>{const o=Ee.findKey(s,a);if(o){n[o]=Sx(i),delete n[a];return}const l=t?zY(a):String(a).trim();l!==a&&delete n[a],n[l]=Sx(i),s[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Ee.forEach(this,(s,i)=>{s!=null&&s!==!1&&(n[i]=t&&Ee.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
694`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);
vendor: 5,118 bytes, line 694
694return n.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[RF]=this[RF]={accessors:{}}).accessors,i=this.prototype;function a(o){const l=Hp(o);s[l]||(WY(i,o),s[l]=!0)}return Ee.isArray(t)?t.forEach(a):a(t),this}};Rs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ee.reduceDescriptors(Rs.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});Ee.freezeMethods(Rs);const $Y="[REDACTED ****]";function UY(e){if(Ee.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Ee.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function VY(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),s=[],i=a=>{if(a===null||typeof a!="object"||Ee.isBuffer(a))return a;if(s.indexOf(a)!==-1)return;a instanceof Rs&&(a=a.toJSON()),s.push(a);let o;if(Ee.isArray(a))o=[],a.forEach((l,c)=>{const d=i(l);Ee.isUndefined(d)||(o[c]=d)});else{if(!Ee.isPlainObject(a)&&UY(a))return s.pop(),a;o=Object.create(null);for(const[l,c]of Object.entries(a)){const d=n.has(l.toLowerCase())?$Y:i(c);Ee.isUndefined(d)||(o[l]=d)}}return s.pop(),o};return i(e)}let Ft=class mD extends Error{static from(t,n,s,i,a,o){const l=new mD(t.message,n||t.code,s,i,a);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),o&&Object.assign(l,o),l}constructor(t,n,s,i,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&Ee.hasOwnProp(t,"redact")?t.redact:void 0,s=Ee.isArray(n)&&n.length>0?VY(t,n):Ee.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};Ft.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ft.ERR_BAD_OPTION="ERR_BAD_OPTION";Ft.ECONNABORTED="ECONNABORTED";Ft.ETIMEDOUT="ETIMEDOUT";Ft.ECONNREFUSED="ECONNREFUSED";Ft.ERR_NETWORK="ERR_NETWORK";Ft.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ft.ERR_DEPRECATED="ERR_DEPRECATED";Ft.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ft.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ft.ERR_CANCELED="ERR_CANCELED";Ft.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ft.ERR_INVALID_URL="ERR_INVALID_URL";Ft.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const HY=null,gD=100;function Pw(e){return Ee.isPlainObject(e)||Ee.isArray(e)}function xD(e){return Ee.endsWith(e,"[]")?e.slice(0,-2):e}function Fb(e,t,n){return e?e.concat(t).map(function(i,a){return i=xD(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function qY(e){return Ee.isArray(e)&&!e.some(Pw)}const GY=Ee.toFlatObject(Ee,{},null,function(t){return/^is[A-Z]/.test(t)});function Yy(e,t,n){if(!Ee.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Ee.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,S){return!Ee.isUndefined(S[k])});const s=n.metaTokens,i=n.visitor||w,a=n.dots,o=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?gD:n.maxDepth,d=l&&Ee.isSpecCompliantForm(t),u=[];if(!Ee.isFunction(i))throw new TypeError("visitor must be a function");function p(j){if(j===null)return"";if(Ee.isDate(j))return j.toISOString();if(Ee.isBoolean(j))return j.toString();if(!d&&Ee.isBlob(j))throw new Ft("Blob is not supported. Use a Buffer instead.");if(Ee.isArrayBuffer(j)||Ee.isTypedArray(j)){if(d&&typeof l=="function")return new l([j]);if(typeof Buffer<"u")return Buffer.from(j);throw new Ft("Blob is not supported. Use a Buffer instead.",Ft.ERR_NOT_SUPPORT)}return j}function m(j){if(j>c)throw new Ft("Object is too deeply nested ("+j+" levels). Max depth: "+c,Ft.ERR_FORM_DATA_DEPTH_EXCEEDED)}function x(j,k){if(c===1/0)return JSON.stringify(j);const S=[];return JSON.stringify(j,function(F,A){if(!Ee.isObject(A))return A;for(;S.length&&S[S.length-1]!==this;)S.pop();return S.push(A),m(k+S.length-1),A})}function w(j,k,S){let _=j;if(Ee.isReactNative(t)&&Ee.isReactNativeBlob(j))return t.append(Fb(S,k,a),p(j)),!1;if(j&&!S&&typeof j=="object"){if(Ee.endsWith(k,"{}"))k=s?k:k.slice(0,-2),j=x(j,1);else if(Ee.isArray(j)&&qY(j)||(Ee.isFileList(j)||Ee.endsWith(k,"[]"))&&(_=Ee.toArray(j)))return k=xD(k),_.forEach(function(A,C){!(Ee.isUndefined(A)||A===null)&&t.append(o===!0?Fb([k],C,a):o===null?k:k+"[]",p(A))}),!1}return Pw(j)?!0:(t.append(Fb(S,k,a),p(j)),!1)}const y=Object.assign(GY,{defaultVisitor:w,convertValue:p,isVisitable:Pw});function v(j,k,S=0){if(!Ee.isUndefined(j)){if(m(S),u.indexOf(j)!==-1)throw new Error("Circular reference detected in "+k.join("."));u.push(j),Ee.forEach(j,function(F,A){(!(Ee.isUndefined(F)||F===null)&&i.call(t,F,Ee.isString(A)?A.trim():A,k,y))===!0&&v(F,k?k.concat(A):[A],S+1)}),u.pop()}}if(!Ee.isObject(e))throw new TypeError("data must be an object");return v(e),t}
vendor: 3,980 bytes, line 694
694function DF(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(s){return t[s]})}function AS(e,t){this._pairs=[],e&&Yy(e,this,t)}const yD=AS.prototype;yD.append=function(t,n){this._pairs.push([t,n])};yD.toString=function(t){const n=t?s=>t.call(this,s,DF):DF;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function KY(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vD(e,t,n){if(!t)return e;e=e||"";const s=Ee.isFunction(n)?{serialize:n}:n,i=Ee.getSafeProp(s,"encode")||KY,a=Ee.getSafeProp(s,"serialize");let o;if(a?o=a(t,s):o=Ee.isURLSearchParams(t)?t.toString():new AS(t,s).toString(i),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class IF{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ee.forEach(this.handlers,function(s){s!==null&&t(s)})}}const TS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},YY=typeof URLSearchParams<"u"?URLSearchParams:AS,XY=typeof FormData<"u"?FormData:null,JY=typeof Blob<"u"?Blob:null,QY={isBrowser:!0,classes:{URLSearchParams:YY,FormData:XY,Blob:JY},protocols:["http","https","file","blob","url","data"]},NS=typeof window<"u"&&typeof document<"u",Bw=typeof navigator=="object"&&navigator||void 0,ZY=NS&&(!Bw||["ReactNative","NativeScript","NS"].indexOf(Bw.product)<0),eX=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tX=NS&&window.location.href||"http://localhost",nX=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:NS,hasStandardBrowserEnv:ZY,hasStandardBrowserWebWorkerEnv:eX,navigator:Bw,origin:tX},Symbol.toStringTag,{value:"Module"})),ds={...nX,...QY};function rX(e,t){return Yy(e,new ds.classes.URLSearchParams,{visitor:function(n,s,i,a){return ds.isNode&&Ee.isBuffer(n)?(this.append(s,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}const PF=gD;function bD(e){if(e>PF)throw new Ft("FormData field is too deeply nested ("+e+" levels). Max depth: "+PF,Ft.ERR_FORM_DATA_DEPTH_EXCEEDED)}function sX(e){const t=[],n=/\w+|\[(\w*)]/g;let s;for(;(s=n.exec(e))!==null;)bD(t.length),t.push(s[0]==="[]"?"":s[1]||s[0]);return t}function iX(e){const t={},n=Object.keys(e);let s;const i=n.length;let a;for(s=0;s<i;s++)a=n[s],t[a]=e[a];return t}function wD(e){function t(n,s,i,a){bD(a);let o=n[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=a>=n.length;return o=!o&&Ee.isArray(i)?i.length:o,c?(Ee.hasOwnProp(i,o)?i[o]=Ee.isArray(i[o])?i[o].concat(s):[i[o],s]:i[o]=s,!l):((!Ee.hasOwnProp(i,o)||!Ee.isObject(i[o]))&&(i[o]=[]),t(n,s,i[o],a)&&Ee.isArray(i[o])&&(i[o]=iX(i[o])),!l)}if(Ee.isFormData(e)&&Ee.isFunction(e.entries)){const n={};return Ee.forEachEntry(e,(s,i)=>{t(sX(s),i,n,0)}),n}return null}const Iu=(e,t)=>e!=null&&Ee.hasOwnProp(e,t)?e[t]:void 0;function aX(e,t,n){if(Ee.isString(e))try{return(t||JSON.parse)(e),Ee.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const qm={transitional:TS,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",i=s.indexOf("application/json")>-1,a=Ee.isObject(t);if(a&&Ee.isHTMLForm(t)&&(t=new FormData(t)),Ee.isFormData(t))return i?JSON.stringify(wD(t)):t;if(Ee.isArrayBuffer(t)||Ee.isBuffer(t)||Ee.isStream(t)||Ee.isFile(t)||Ee.isBlob(t)||Ee.isReadableStream(t))return t;if(Ee.isArrayBufferView(t))return t.buffer;if(Ee.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;
vendor: 11,289 bytes, line 694
694if(a){const c=Iu(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return rX(t,c).toString();if((l=Ee.isFileList(t))||s.indexOf("multipart/form-data")>-1){const d=Iu(this,"env"),u=d&&d.FormData;return Yy(l?{"files[]":t}:t,u&&new u,c)}}return a||i?(n.setContentType("application/json",!1),aX(t)):t}],transformResponse:[function(t){const n=Iu(this,"transitional")||qm.transitional,s=n&&n.forcedJSONParsing,i=Iu(this,"responseType"),a=i==="json";if(Ee.isResponse(t)||Ee.isReadableStream(t))return t;if(t&&Ee.isString(t)&&(s&&!i||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Iu(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?Ft.from(c,Ft.ERR_BAD_RESPONSE,this,null,Iu(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ds.classes.FormData,Blob:ds.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ee.forEach(["delete","get","head","post","put","patch","query"],e=>{qm.headers[e]={}});function Ab(e,t){const n=this||qm,s=t||n,i=Rs.from(s.headers);let a=s.data;return Ee.forEach(e,function(l){a=l.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function jD(e){return!!(e&&e.__CANCEL__)}let Gm=class extends Ft{constructor(t,n,s){super(t??"canceled",Ft.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function SD(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new Ft("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ft.ERR_BAD_REQUEST:Ft.ERR_BAD_RESPONSE,n.config,n.request,n))}function oX(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function lX(e,t){e=e||10;const n=new Array(e),s=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=s[a];o||(o=d),n[i]=c,s[i]=d;let p=a,m=0;for(;p!==i;)m+=n[p++],p=p%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),d-o<t)return;const x=u&&d-u;return x?Math.round(m*1e3/x):void 0}}function cX(e,t){let n=0,s=1e3/t,i,a;const o=(d,u=Date.now())=>{n=u,i=null,a&&(clearTimeout(a),a=null),e(...d)};return[(...d)=>{const u=Date.now(),p=u-n;p>=s?o(d,u):(i=d,a||(a=setTimeout(()=>{a=null,o(i)},s-p)))},()=>i&&o(i)]}const qx=(e,t,n=3)=>{let s=0;const i=lX(50,250);return cX(a=>{if(!a||typeof a.loaded!="number")return;const o=a.loaded,l=a.lengthComputable?a.total:void 0,c=l!=null?Math.min(o,l):o,d=Math.max(0,c-s),u=i(d);s=Math.max(s,c);const p={loaded:c,total:l,progress:l?c/l:void 0,bytes:d,rate:u||void 0,estimated:u&&l?(l-c)/u:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},BF=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},OF=e=>(...t)=>Ee.asap(()=>e(...t)),dX=ds.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ds.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ds.origin),ds.navigator&&/(msie|trident)/i.test(ds.navigator.userAgent)):()=>!0,uX=ds.hasStandardBrowserEnv?{write(e,t,n,s,i,a,o){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];Ee.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),Ee.isString(s)&&l.push(`path=${s}`),Ee.isString(i)&&l.push(`domain=${i}`),a===!0&&l.push("secure"),Ee.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const s=t[n].replace(/^\s+/,""),i=s.indexOf("=");if(i!==-1&&s.slice(0,i)===e)try{return decodeURIComponent(s.slice(i+1))}catch{return s.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function fX(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pX(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const hX=/^https?:(?!\/\/)/i,mX=/[\t\n\r]/g;function gX(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function xX(e){return gX(e).replace(mX,"")}function MF(e,t){if(typeof e=="string"&&hX.test(xX(e)))throw new Ft('Invalid URL: missing "//" after protocol',Ft.ERR_INVALID_URL,t)}function kD(e,t,n,s){MF(t,s);let i=!fX(t);return e&&(i||n===!1)?(MF(e,s),pX(e,t)):t}const LF=e=>e instanceof Rs?{...e}:e;function Ud(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(u,p,m,x){return Ee.isPlainObject(u)&&Ee.isPlainObject(p)?Ee.merge.call({caseless:x},u,p):Ee.isPlainObject(p)?Ee.merge({},p):Ee.isArray(p)?p.slice():p}function i(u,p,m,x){if(Ee.isUndefined(p)){if(!Ee.isUndefined(u))return s(void 0,u,m,x)}else return s(u,p,m,x)}function a(u,p){if(!Ee.isUndefined(p))return s(void 0,p)}function o(u,p){if(Ee.isUndefined(p)){if(!Ee.isUndefined(u))return s(void 0,u)}else return s(void 0,p)}function l(u){const p=Ee.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Ee.isUndefined(p))if(Ee.isPlainObject(p)){if(Ee.hasOwnProp(p,u))return p[u]}else return;const m=Ee.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Ee.isPlainObject(m)&&Ee.hasOwnProp(m,u))return m[u]}function c(u,p,m){if(Ee.hasOwnProp(t,m))return s(u,p);if(Ee.hasOwnProp(e,m))return s(void 0,u)}const d={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(u,p,m)=>i(LF(u),LF(p),m,!0)};return Ee.forEach(Object.keys({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const m=Ee.hasOwnProp(d,p)?d[p]:i,x=Ee.hasOwnProp(e,p)?e[p]:void 0,w=Ee.hasOwnProp(t,p)?t[p]:void 0,y=m(x,w,p);Ee.isUndefined(y)&&m!==c||(n[p]=y)}),Ee.hasOwnProp(t,"validateStatus")&&Ee.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(Ee.hasOwnProp(e,"validateStatus")?n.validateStatus=s(void 0,e.validateStatus):delete n.validateStatus),n}const yX=["content-type","content-length"];function vX(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([s,i])=>{yX.includes(s.toLowerCase())&&e.set(s,i)})}const bX=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function _D(e){const t=Ud({},e),n=m=>Ee.hasOwnProp(t,m)?t[m]:void 0,s=n("data");let i=n("withXSRFToken");const a=n("xsrfHeaderName"),o=n("xsrfCookieName");let l=n("headers");const c=n("auth"),d=n("baseURL"),u=n("allowAbsoluteUrls"),p=n("url");if(t.headers=l=Rs.from(l),t.url=vD(kD(d,p,u,t),n("params"),n("paramsSerializer")),c){const m=Ee.getSafeProp(c,"username")||"",x=Ee.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(m+":"+(x?bX(x):"")))}catch(w){throw Ft.from(w,Ft.ERR_BAD_OPTION_VALUE,e)}}if(Ee.isFormData(s)&&(ds.hasStandardBrowserEnv||ds.hasStandardBrowserWebWorkerEnv||Ee.isReactNative(s)?l.setContentType(void 0):Ee.isFunction(s.getHeaders)&&vX(l,s.getHeaders(),n("formDataHeaderPolicy"))),ds.hasStandardBrowserEnv&&(Ee.isFunction(i)&&(i=i(t)),i===!0||i==null&&dX(t.url))){const x=a&&o&&uX.read(o);x&&l.set(a,x)}return t}const wX=typeof XMLHttpRequest<"u",jX=wX&&function(e){return new Promise(function(n,s){const i=_D(e);let a=i.data;const o=Rs.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=i,u,p,m,x,w;function y(){x&&x(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function j(){if(!v)return;const S=Rs.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),F={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:S,config:e,request:v};SD(function(C){n(C),y()},function(C){s(C),y()},F),v=null}"onloadend"in v?v.onloadend=j:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(j)},v.onabort=function(){v&&(s(new Ft("Request aborted",Ft.ECONNABORTED,e,v)),y(),v=null)},v.onerror=function(_){const F=_&&_.message?_.message:"Network Error",A=new Ft(F,Ft.ERR_NETWORK,e,v);A.event=_||null,s(A),y(),v=null},v.ontimeout=function(){let _=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const F=i.transitional||TS;i.timeoutErrorMessage&&(_=i.timeoutErrorMessage),s(new Ft(_,F.clarifyTimeoutError?Ft.ETIMEDOUT:Ft.ECONNABORTED,e,v)),y(),v=null},a===void 0&&o.setContentType(null),"setRequestHeader"in v&&Ee.forEach(hD(o),function(_,F){v.setRequestHeader(F,_)}),Ee.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),l&&l!=="json"&&(v.responseType=i.responseType),d&&([m,w]=qx(d,!0),v.addEventListener("progress",m)),c&&v.upload&&([p,x]=qx(c),v.upload.addEventListener("progress",p),v.upload.addEventListener("loadend",x)),(i.cancelToken||i.signal)&&(u=S=>{v&&(s(!S||S.type?new Gm(null,e,v):S),v.abort(),y(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const k=oX(i.url);if(k&&!ds.protocols.includes(k)){s(new Ft("Unsupported protocol "+k+":",Ft.ERR_BAD_REQUEST,e)),y();return}v.send(a||null)})},SX=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let s=!1;const i=function(c){if(!s){s=!0,o();const d=c instanceof Error?c:this.reason;n.abort(d instanceof Ft?d:new Gm(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new Ft(`timeout of ${t}ms exceeded`,Ft.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i,{once:!0}));const{signal:l}=n;return l.unsubscribe=()=>Ee.asap(o),l},kX=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,i;for(;s<n;)i=s+t,yield e.slice(s,i),s=i},_X=async function*(e,t){for await(const n of CX(e))yield*kX(n,t)},CX=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},zF=(e,t,n,s)=>{const i=_X(e,t);let a=0,o,l=c=>{o||(o=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await i.next();if(d){l(),c.close();return}let p=u.byteLength;if(n){let m=a+=p;n(m)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},Gx=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,EX=(e,t,n)=>t+2<n&&Gx(e.charCodeAt(t+1))&&Gx(e.charCodeAt(t+2));function FX(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),s=e.slice(t+1);if(/;base64/i.test(n)){let o=s.length;const l=s.length;for(let x=0;x<l;x++)if(s.charCodeAt(x)===37&&x+2<l){const w=s.charCodeAt(x+1),y=s.charCodeAt(x+2);Gx(w)&&Gx(y)&&(o-=2,x+=2)}let c=0,d=l-1;const u=x=>x>
vendor: 3,451 bytes, line 694
694=2&&s.charCodeAt(x-2)===37&&s.charCodeAt(x-1)===51&&(s.charCodeAt(x)===68||s.charCodeAt(x)===100);d>=0&&(s.charCodeAt(d)===61?(c++,d--):u(d)&&(c++,d-=3)),c===1&&d>=0&&(s.charCodeAt(d)===61||u(d))&&c++;const m=Math.floor(o/4)*3-(c||0);return m>0?m:0}let a=0;for(let o=0,l=s.length;o<l;o++){const c=s.charCodeAt(o);if(c===37&&EX(s,o,l))a+=1,o+=2;else if(c<128)a+=1;else if(c<2048)a+=2;else if(c>=55296&&c<=56319&&o+1<l){const d=s.charCodeAt(o+1);d>=56320&&d<=57343?(a+=4,o++):a+=3}else a+=3}return a}const RS="1.18.1",WF=64*1024,{isFunction:xg}=Ee,AX=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),$F=e=>{if(!Ee.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},UF=(e,...t)=>{try{return!!e(...t)}catch{return!1}},TX=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},NX=e=>{const t=Ee.global!==void 0&&Ee.global!==null?Ee.global:globalThis,{ReadableStream:n,TextEncoder:s}=t;e=Ee.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:a,Response:o}=e,l=i?xg(i):typeof fetch=="function",c=xg(a),d=xg(o);if(!l)return!1;const u=l&&xg(n),p=l&&(typeof s=="function"?(j=>k=>j.encode(k))(new s):async j=>new Uint8Array(await new a(j).arrayBuffer())),m=c&&u&&UF(()=>{let j=!1;const k=new a(ds.origin,{body:new n,method:"POST",get duplex(){return j=!0,"half"}}),S=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),j&&!S}),x=d&&u&&UF(()=>Ee.isReadableStream(new o("").body)),w={stream:x&&(j=>j.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(j=>{!w[j]&&(w[j]=(k,S)=>{let _=k&&k[j];if(_)return _.call(k);throw new Ft(`Response type '${j}' is not supported`,Ft.ERR_NOT_SUPPORT,S)})});const y=async j=>{if(j==null)return 0;if(Ee.isBlob(j))return j.size;if(Ee.isSpecCompliantForm(j))return(await new a(ds.origin,{method:"POST",body:j}).arrayBuffer()).byteLength;if(Ee.isArrayBufferView(j)||Ee.isArrayBuffer(j))return j.byteLength;if(Ee.isURLSearchParams(j)&&(j=j+""),Ee.isString(j))return(await p(j)).byteLength},v=async(j,k)=>{const S=Ee.toFiniteNumber(j.getContentLength());return S??y(k)};return async j=>{let{url:k,method:S,data:_,signal:F,cancelToken:A,timeout:C,onDownloadProgress:D,onUploadProgress:P,responseType:L,headers:T,withCredentials:R="same-origin",fetchOptions:U,maxContentLength:I,maxBodyLength:H}=_D(j);const V=Ee.isNumber(I)&&I>-1,X=Ee.isNumber(H)&&H>-1,N=J=>Ee.hasOwnProp(j,J)?j[J]:void 0;let W=i||fetch;L=L?(L+"").toLowerCase():"text";let O=SX([F,A&&A.toAbortSignal()],C),G=null;const M=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let z,K=null;const Y=()=>new Ft("Request body larger than maxBodyLength limit",Ft.ERR_BAD_REQUEST,j,G);try{let J;const Q=N("auth");if(Q){const he=Ee.getSafeProp(Q,"username")||"",le=Ee.getSafeProp(Q,"password")||"";J={username:he,password:le}}if(TX(k)){const he=new URL(k,ds.origin);if(!J&&(he.username||he.password)){const le=$F(he.username),ge=$F(he.password);J={username:le,password:ge}}(he.username||he.password)&&(he.username="",he.password="",k=he.href)}if(J&&(T.delete("authorization"),T.set("Authorization","Basic "+btoa(AX((J.username||"")+":"+(J.password||""))))),V&&typeof k=="string"&&k.startsWith("data:")&&FX(k)>I)throw new Ft("maxContentLength size of "+I+" exceeded",Ft.ERR_BAD_RESPONSE,j,G);if(X&&S!=="get"&&S!=="head"){const he=await y(_);if(typeof he=="number"&&isFinite(he)&&(z=he,he>H))throw Y()}
vendor: 5,668 bytes, lines 694-696
694const ie=X&&(Ee.isReadableStream(_)||Ee.isStream(_)),ae=(he,le,ge)=>zF(he,WF,$e=>{if(X&&$e>H)throw K=Y();le&&le($e)},ge);if(m&&S!=="get"&&S!=="head"&&(P||ie)){if(z=z??await v(T,_),z!==0||ie){let he=new a(k,{method:"POST",body:_,duplex:"half"}),le;if(Ee.isFormData(_)&&(le=he.headers.get("content-type"))&&T.setContentType(le),he.body){const[ge,$e]=P&&BF(z,qx(OF(P)))||[];_=ae(he.body,ge,$e)}}}else if(ie&&!c&&u&&S!=="get"&&S!=="head")_=ae(_);else if(ie&&c&&!m&&S!=="get"&&S!=="head")throw new Ft("Stream request bodies are not supported by the current fetch implementation",Ft.ERR_NOT_SUPPORT,j,G);Ee.isString(R)||(R=R?"include":"omit");const re=c&&"credentials"in a.prototype;if(Ee.isFormData(_)){const he=T.getContentType();he&&/^multipart\/form-data/i.test(he)&&!/boundary=/i.test(he)&&T.delete("content-type")}T.set("User-Agent","axios/"+RS,!1);const pe={...U,signal:O,method:S.toUpperCase(),headers:hD(T.normalize()),body:_,duplex:"half",credentials:re?R:void 0};G=c&&new a(k,pe);let Z=await(c?W(G,U):W(k,pe));const Ne=Rs.from(Z.headers);if(V){const he=Ee.toFiniteNumber(Ne.getContentLength());if(he!=null&&he>I)throw new Ft("maxContentLength size of "+I+" exceeded",Ft.ERR_BAD_RESPONSE,j,G)}const te=x&&(L==="stream"||L==="response");if(x&&Z.body&&(D||V||te&&M)){const he={};["status","statusText","headers"].forEach(Ve=>{he[Ve]=Z[Ve]});const le=Ee.toFiniteNumber(Ne.getContentLength()),[ge,$e]=D&&BF(le,qx(OF(D),!0))||[];let ft=0;const Qe=Ve=>{if(V&&(ft=Ve,ft>I))throw new Ft("maxContentLength size of "+I+" exceeded",Ft.ERR_BAD_RESPONSE,j,G);ge&&ge(Ve)};Z=new o(zF(Z.body,WF,Qe,()=>{$e&&$e(),M&&M()}),he)}L=L||"text";let xe=await w[Ee.findKey(w,L)||"text"](Z,j);if(V&&!x&&!te){let he;if(xe!=null&&(typeof xe.byteLength=="number"?he=xe.byteLength:typeof xe.size=="number"?he=xe.size:typeof xe=="string"&&(he=typeof s=="function"?new s().encode(xe).byteLength:xe.length)),typeof he=="number"&&he>I)throw new Ft("maxContentLength size of "+I+" exceeded",Ft.ERR_BAD_RESPONSE,j,G)}return!te&&M&&M(),await new Promise((he,le)=>{SD(he,le,{data:xe,headers:Rs.from(Z.headers),status:Z.status,statusText:Z.statusText,config:j,request:G})})}catch(J){if(M&&M(),O&&O.aborted&&O.reason instanceof Ft){const Q=O.reason;throw Q.config=j,G&&(Q.request=G),J!==Q&&Object.defineProperty(Q,"cause",{__proto__:null,value:J,writable:!0,enumerable:!1,configurable:!0}),Q}if(K)throw G&&!K.request&&(K.request=G),K;if(J instanceof Ft)throw G&&!J.request&&(J.request=G),J;if(J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)){const Q=new Ft("Network Error",Ft.ERR_NETWORK,j,G,J&&J.response);throw Object.defineProperty(Q,"cause",{__proto__:null,value:J.cause||J,writable:!0,enumerable:!1,configurable:!0}),Q}throw Ft.from(J,J&&J.code,j,G,J&&J.response)}}},RX=new Map,CD=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:i}=t,a=[s,i,n];let o=a.length,l=o,c,d,u=RX;for(;l--;)c=a[l],d=u.get(c),d===void 0&&u.set(c,d=l?new Map:NX(t)),u=d;return d};CD();const DS={http:HY,xhr:jX,fetch:{get:CD}};Ee.forEach(DS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const VF=e=>`- ${e}`,DX=e=>Ee.isFunction(e)||e===null||e===!1;function IX(e,t){e=Ee.isArray(e)?e:[e];const{length:n}=e;let s,i;const a={};for(let o=0;o<n;o++){s=e[o];let l;if(i=s,!DX(s)&&(i=DS[(l=String(s)).toLowerCase()],i===void 0))throw new Ft(`Unknown adapter '${l}'`);if(i&&(Ee.isFunction(i)||(i=i.get(t))))break;a[l||"#"+o]=i}if(!i){const o=Object.entries(a).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=n?o.length>1?`since :
695`+o.map(VF).join(`
696`):" "+VF(o[0]):"as no adapter specified";throw new Ft("There is no suitable adapter to dispatch the request "+l,Ft.ERR_NOT_SUPPORT)}return i}const ED={getAdapter:IX,adapters:DS};function Tb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gm(null,e)}function HF(e){return Tb(e),e.headers=Rs.from(e.headers),e.data=Ab.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ED.getAdapter(e.adapter||qm.adapter,e)(e).then(function(s){Tb(e),e.response=s;try{s.data=Ab.call(e,e.transformResponse,s)}finally{delete e.response}return s.headers=Rs.from(s.headers),s},function(s){if(!jD(s)&&(Tb(e),s&&s.response)){e.response=s.response;try{s.response.data=Ab.call(e,e.transformResponse,s.response)}finally{delete e.response}s.response.headers=Rs.from(s.response.headers)}return Promise.reject(s)})}const Xy={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xy[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const qF={};Xy.transitional=function(t,n,s){function i(a,o){return"[Axios v"+RS+"] Transitional option '"+a+"'"+o+(s?". "+s:"")}return(a,o,l)=>{if(t===!1)throw new Ft(i(o," has been removed"+(n?" in "+n:"")),Ft.ERR_DEPRECATED);return n&&!qF[o]&&(qF[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,l):!0}};Xy.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function PX(e,t,n){if(typeof e!="object"||e===null)throw new Ft("options must be an object",Ft.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const a=s[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){const l=e[a],c=l===void 0||o(l,a,e);if(c!==!0)throw new Ft("option "+a+" must be "+c,Ft.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ft("Unknown option "+a,Ft.ERR_BAD_OPTION)}}const kx={assertOptions:PX,validators:Xy}
vendor: 4,194 bytes, lines 696-700
696,Ss=kx.validators;let Bd=class{constructor(t){this.defaults=t||{},this.interceptors={request:new IF,response:new IF}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=(()=>{if(!i.stack)return"";const o=i.stack.indexOf(`
697`);return o===-1?"":i.stack.slice(o+1)})();try{if(!s.stack)s.stack=a;else if(a){const o=a.indexOf(`
698`),l=o===-1?-1:a.indexOf(`
699`,o+1),c=l===-1?"":a.slice(l+1);String(s.stack).endsWith(c)||(s.stack+=`
700`+a)}}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ud(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:a}=n;s!==void 0&&kx.assertOptions(s,{silentJSONParsing:Ss.transitional(Ss.boolean),forcedJSONParsing:Ss.transitional(Ss.boolean),clarifyTimeoutError:Ss.transitional(Ss.boolean),legacyInterceptorReqResOrdering:Ss.transitional(Ss.boolean),advertiseZstdAcceptEncoding:Ss.transitional(Ss.boolean),validateStatusUndefinedResolves:Ss.transitional(Ss.boolean)},!1),i!=null&&(Ee.isFunction(i)?n.paramsSerializer={serialize:i}:kx.assertOptions(i,{encode:Ss.function,serialize:Ss.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),kx.assertOptions(n,{baseUrl:Ss.spelling("baseURL"),withXsrfToken:Ss.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&Ee.merge(a.common,a[n.method]);a&&Ee.forEach(["delete","get","head","post","put","patch","query","common"],w=>{delete a[w]}),n.headers=Rs.concat(o,a);const l=[];let c=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(n)===!1)return;c=c&&y.synchronous;const v=n.transitional||TS;v&&v.legacyInterceptorReqResOrdering?l.unshift(y.fulfilled,y.rejected):l.push(y.fulfilled,y.rejected)});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let u,p=0,m;if(!c){const w=[HF.bind(this),void 0];for(w.unshift(...l),w.push(...d),m=w.length,u=Promise.resolve(n);p<m;)u=u.then(w[p++],w[p++]);return u}m=l.length;let x=n;for(;p<m;){const w=l[p++],y=l[p++];try{x=w(x)}catch(v){y.call(this,v);break}}try{u=HF.call(this,x)}catch(w){return Promise.reject(w)}for(p=0,m=d.length;p<m;)u=u.then(d[p++],d[p++]);return u}getUri(t){t=Ud(this.defaults,t);const n=kD(t.baseURL,t.url,t.allowAbsoluteUrls,t);return vD(n,t.params,t.paramsSerializer)}};Ee.forEach(["delete","get","head","options"],function(t){Bd.prototype[t]=function(n,s){return this.request(Ud(s||{},{method:t,url:n,data:s&&Ee.hasOwnProp(s,"data")?s.data:void 0}))}});Ee.forEach(["post","put","patch","query"],function(t){function n(s){return function(a,o,l){return this.request(Ud(l||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Bd.prototype[t]=n(),t!=="query"&&(Bd.prototype[t+"Form"]=n(!0))});let BX=class FD{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const s=this;this.promise.then(i=>{if(!s._listeners)return;let a=s._listeners.length;for(;a-- >0;)s._listeners[a](i);s._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(l=>{s.subscribe(l),a=l}).then(i);return o.cancel=function(){s.unsubscribe(a)},o},t(function(a,o,l){s.reason||(s.reason=new Gm(a,o,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new FD(function(i){t=i}),cancel:t}}};function OX(e){return function(n){return e.apply(null,n)}}function MX(e){return Ee.isObject(e)&&e.isAxiosError===!0}const Ow={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
700setContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ow).forEach(([e,t])=>{Ow[t]=e});function AD(e){const t=new Bd(e),n=iD(Bd.prototype.request,t);return Ee.extend(n,Bd.prototype,t,{allOwnKeys:!0}),Ee.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return AD(Ud(e,i))},n}const jr=AD(qm);jr.Axios=Bd;jr.CanceledError=Gm;jr.CancelToken=BX;jr.isCancel=jD;jr.VERSION=RS;jr.toFormData=Yy;jr.AxiosError=Ft;jr.Cancel=jr.CanceledError;jr.all=function(t){return Promise.all(t)};jr.spread=OX;jr.isAxiosError=MX;jr.mergeConfig=Ud;jr.AxiosHeaders=Rs;jr.formToJSON=e=>wD(Ee.isHTMLForm(e)?new FormData(e):e);jr.getAdapter=ED.getAdapter;jr.HttpStatusCode=Ow;jr.default=jr;const{Axios:Y6e,AxiosError:X6e,CanceledError:J6e,isCancel:Q6e,CancelToken:Z6e,VERSION:eNe,all:tNe,Cancel:nNe,isAxiosError:rNe,spread:sNe,toFormData:iNe,AxiosHeaders:aNe,HttpStatusCode:oNe,formToJSON:lNe,getAdapter:cNe,mergeConfig:dNe,create:uNe}=jr,TD=typeof window>"u",GF=!TD&&window.self!==window.top,LX=!TD&&typeof document>"u",ND=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),os=[];for(let e=0;e<256;++e)os.push((e+256).toString(16).slice(1));function zX(e,t=0){return(os[e[t+0]]+os[e[t+1]]+os[e[t+2]]+os[e[t+3]]+"-"+os[e[t+4]]+os[e[t+5]]+"-"+os[e[t+6]]+os[e[t+7]]+"-"+os[e[t+8]]+os[e[t+9]]+"-"+os[e[t+10]]+os[e[t+11]]+os[e[t+12]]+os[e[t+13]]+os[e[t+14]]+os[e[t+15]]).toLowerCase()}let Nb;const WX=new Uint8Array(16);function $X(){if(!Nb){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Nb=crypto.getRandomValues.bind(crypto)}return Nb(WX)}const UX=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),KF={randomUUID:UX};function VX(e,t,n){var i;e=e||{};const s=e.random??((i=e.rng)==null?void 0:i.call(e))??$X();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,zX(s)}function HX(e,t,n){return KF.randomUUID&&!e?KF.randomUUID():VX(e)}const qp=typeof window<"u"?window:{base44SharedInstances:{}};function qX(e,t){return qp.base44SharedInstances||(qp.base44SharedInstances={}),qp.base44SharedInstances[e]||(qp.base44SharedInstances[e]={instance:t()}),qp.base44SharedInstances[e].instance}const GX="__user_heartbeat_event__",KX="__initialization_event__",YX="__session_duration_event__",YF="analytics-enable",XF="base44_analytics_session_id",XX={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},JX="analytics",Pn=qX(JX,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...XX,...iJ()}})),QX=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:s,enabled:i})=>{var a;const{maxQueueSize:o,throttleTime:l,batchSize:c}=Pn.config;if(!i||!(!((a=Pn.config)===null||a===void 0)&&a.enabled)||LX)return{track:()=>{},cleanup:()=>{}};let d;const u=`${t}/api/apps/${n}/analytics/track/batch`,p=async _=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:_}})},m=_=>{try{const F=JSON.stringify({events:_}),A=new Blob([F],{type:"application/json"});return typeof navigator>"u"||F.length>6e4||!navigator.sendBeacon(u,A)}catch{return!1}},x=async(_,F={})=>
700{if(_.length===0)return;const A=await sJ(s),C=_.map(rJ(A));try{(!F.isBeacon||!m(C))&&await p(C)}catch{}},w=()=>{QF(x,{throttleTime:l,batchSize:c})},y=_=>{if(Pn.requestsQueue.length>=o)return;const F=nJ();Pn.requestsQueue.push({..._,...F}),w()},v=()=>{QF(x,{throttleTime:l,batchSize:c}),d=ZF(y),eJ()},j=()=>{JF(),d==null||d(),tJ(y);const _=Pn.requestsQueue.splice(0);x(_,{isBeacon:!0})},k=()=>{typeof window>"u"||(document.visibilityState==="hidden"?j():document.visibilityState==="visible"&&v())},S=()=>{JF(),d==null||d(),typeof window<"u"&&window.removeEventListener("visibilitychange",k)};return w(),d=ZF(y),ZX(y),typeof window<"u"&&window.addEventListener("visibilitychange",k),{track:y,cleanup:S}};function JF(){Pn.isProcessing=!1}async function QF(e,t){if(Pn.isProcessing)return;Pn.isProcessing=!0;const{throttleTime:n=1e3,batchSize:s=30}=t??{};for(;Pn.isProcessing&&Pn.requestsQueue.length>0;){const i=Pn.requestsQueue.splice(0,s);i.length&&await e(i),await new Promise(a=>setTimeout(a,n))}Pn.isProcessing=!1}function ZF(e){var t;if(typeof window>"u"||Pn.isHeartBeatProcessing||((t=Pn.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Pn.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:GX})},Pn.config.heartBeatInterval);return()=>{clearInterval(n),Pn.isHeartBeatProcessing=!1}}function ZX(e){typeof window>"u"||Pn.wasInitializationTracked||(Pn.wasInitializationTracked=!0,e({eventName:KX,properties:{referrer:document==null?void 0:document.referrer}}))}function eJ(){typeof window>"u"||Pn.sessionStartTime!==null||(Pn.sessionStartTime=new Date().toISOString())}function tJ(e){if(typeof window>"u"||Pn.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Pn.sessionStartTime).getTime();Pn.sessionStartTime=null,e({eventName:YX,properties:{sessionDuration:t}})}function nJ(){var e,t;return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"&&(t=(e=window.location)===null||e===void 0?void 0:e.pathname)!==null&&t!==void 0?t:null}}function rJ(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let kh=null;function e5(){Pn.sessionContext=null,kh=null}async function sJ(e){if(!Pn.sessionContext){if(!e.hasToken())return{user_id:null,session_id:Kx()};if(!kh){const s=Kx();kh=e.me().then(i=>({user_id:i.id,session_id:s})).catch(()=>({user_id:null,session_id:s}))}const t=kh,n=await t;return kh===t&&(Pn.sessionContext=n),n}return Pn.sessionContext}function iJ(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(YF);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(YF);const s=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",s),{enabled:t==="true"}}function t5(){var e;return(e=Pn.fallbackSessionId)!==null&&e!==void 0?e:Pn.fallbackSessionId=ND()}function Kx(){if(typeof window>"u")return t5();try{const e=localStorage.getItem(XF);if(!e){const t=ND();return localStorage.setItem(XF,t),t}return e}catch{return t5()}}class aJ extends Error{constructor(t,n,s,i,a){super(t),this.name="Base44Error",this.status=n,this.code=s,this.data=i,this.originalError=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Gp({baseURL:e,headers:t={},token:n,interceptResponses:s=!0,onError:i}){const a=jr.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(a.defaults.headers.common.Authorization=`Bearer ${n}`),a.interceptors.request.use(o=>{typeof window<"u"&&(window.location&&o.headers.set("X-Origin-URL",window.location.href),o.headers.get("Authorization")||o.headers.set("X-Base44-Anonymous-Id",Kx()));const l=HX();if(o.requestId=l,GF)try{window.parent.postMessage({type:"api-request-start",requestId:l,data:{url:e+o.url,method:o.method,body:o.data instanceof FormData?"[FormData object]":o.data}},"*")}catch{}return o}),s&&a.interceptors.response.use(o=>{var l;const c=(l=o.config)===null||l===void 0?void 0:l.requestId;try{GF&&c&&window.parent.postMessage({type:"api-request-end",requestId:c,data:{statusCode:o.status,response:o.data}},"*")}catch{}return o.data},o=>{var l,c,d,u,p,m,x,w,y,v,j,k;const S=(l=o.response)===null||l===void 0?void 0:l.data,_=((c=S==null?void 0:S.error)===null||c===void 0?void 0:c.message)||(S==null?void 0:S.message)||(S==null?void 0:S.detail)||o.message,F=new aJ(_,(d=o.response)===null||d===void 0?void 0:d.status,(v=(m=(p=(u=S==null?void 0:S.error)===null||u===void 0?void 0:u.code)!==null&&p!==void 0?p:S==null?void 0:S.code)!==null&&m!==void 0?m:(y=(w=(x=o.response)===null||x===void 0?void 0:x.headers)===null||w===void 0?void 0:w.get)===null||y===void 0?void 0:y.call(w,"x-base44-connector-error"))!==null&&v!==void 0?v:(k=(j=o.response)===null||j===void 0?void 0:j.headers)===null||k===void 0?void 0:k["x-base44-connector-error"],S,o);return i==null||i(F),Promise.reject(F)}),a}function n5(e){const{axios:t,appId:n,getSocket:s}=e;return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return cJ(t,n,a,s)}})}function oJ(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}const lJ=100;function r5(e){return typeof e=="object"&&e!==null}function cJ(e,t,n,s){const i=`/apps/${t}/entities/${n}`,a=c=>Array.isArray(c)?c.join(","):c,o=(c,d,u,p,m)=>{const x={};return m&&(x.q=JSON.stringify(m)),c&&(x.sort=c),d&&(x.limit=d),u&&(x.skip=u),p&&(x.fields=a(p)),e.get(i,{params:x})},l=(c,d)=>{const u={};return d&&(u.q=JSON.stringify(d)),u.limit=c.limit||lJ,c.cursor&&(u.cursor=c.cursor),"distinct"in c?u.distinct=c.distinct:(c.sort&&(u.sort=c.sort),c.fields&&(u.fields=a(c.fields))),e.get(`${i}/v2/list`,{params:u})};return{async list(...c){const[d,u,p,m]=c;return r5(d)?l(d):o(d,u,p,m)},async filter(c,...d){const[u,p,m,x]=d;return r5(u)?l(u,c):o(u,p,m,x,c)},async get(c){return e.get(`${i}/${c}`)},async create(c){return e.post(i,c)},async update(c,d){return e.put(`${i}/${c}`,d)},async delete(c){return e.delete(`${i}/${c}`)},async deleteMany(c){return e.delete(i,{data:c})},async bulkCreate(c){return e.post(`${i}/bulk`,c)},async updateMany(c,d){return e.patch(`${i}/update-many`,{query:c,data:d})},async count(c){const d={};return c&&(d.q=JSON.stringify(c)),(await e.get(`${i}/count`,{params:d})).count},async aggregate(c){return e.post(`${i}
700/aggregate`,c)},async upsert(c,d){return e.post(`${i}/upsert`,{records:c,key:d.key})},async bulkUpdate(c){return e.put(`${i}/bulk`,c)},async importEntities(c){const d=new FormData;return d.append("file",c,c.name),e.post(`${i}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(c){const d=`entities:${t}:${n}`;return s().subscribeToRoom(d,{update_model:m=>{var x;const w=oJ(m.data);if(w){w.type!=="delete"&&(!((x=w.data)===null||x===void 0)&&x._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${w.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${w.id}")\` to fetch the full record.`);try{c(w)}catch(y){console.error("[Base44 SDK] Subscription callback error:",y)}}}})}}}function dJ(e,t){return{async call(n,s,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:a,queryParams:o,...l}=i??{},c={...l,...a&&{path_params:a},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${n}/${s}`,c)}}}function s5(e,t){const n=dJ(e,t);return new Proxy({},{get(s,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(a,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return async l=>{if(typeof l=="string")throw new Error(`Integration ${o} must receive an object with named parameters, received: ${l}`);let c,d;return l instanceof FormData||l&&Object.values(l).some(u=>u instanceof File)?(c=new FormData,Object.keys(l).forEach(u=>{l[u]instanceof File?c.append(u,l[u],l[u].name):typeof l[u]=="object"&&l[u]!==null?c.append(u,JSON.stringify(l[u])):c.append(u,l[u])}),d="multipart/form-data"):(c=l,d="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${o}`,c||l,{headers:{"Content-Type":d}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${o}`,c||l,{headers:{"Content-Type":d}})}}})}})}function uJ(){return typeof window>"u"?!1:window!==window.parent}function fJ(e,t,n){const a=Math.round(window.screenX+(window.outerWidth-500)/2),o=Math.round(window.screenY+(window.outerHeight-600)/2),l=window.open(e,"base44_auth",`width=500,height=600,left=${a},top=${o},resizable=yes,scrollbars=yes`);if(!l)return;const c=()=>{window.removeEventListener("message",d),clearInterval(u),l.closed||l.close()},d=p=>{var m;if(p.origin!==n||p.source!==l||!(!((m=p.data)===null||m===void 0)&&m.access_token))return;c();const x=new URL(t),{access_token:w,is_new_user:y}=p.data;x.searchParams.set("access_token",w),y!=null&&x.searchParams.set("is_new_user",String(y)),window.location.href=x.toString()},u=setInterval(()=>{l.closed&&c()},500);window.addEventListener("message",d)}function pJ(e,t,n,s){let i=null;const a=()=>{i=null};let o=!!s.token;return{hasToken(){return o},async me(){const l=i??e.get(`/apps/${n}/entities/User/me`).finally(()=>{i===l&&(i=null)});return i=l,l},async updateMe(l){return e.put(`/apps/${n}/entities/User/me`,l)},redirectToLogin(l){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const c=l?new URL(l,window.location.origin).toString():window.location.href,d=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(c)}`;window.location.href=d},loginWithProvider(l,c="/"){const d=new URL(c,window.location.origin).toString(),u=`app_id=${n}&from_url=${encodeURIComponent(d)}`;let p;l==="sso"?p=`/apps/${n}/auth/sso/login`:p=`/apps/auth${l==="google"?"":`/${l}`}/login`;const m=`${s.appBaseUrl}/api${p}?${u}`;if(uJ()){const x=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return fJ(x,d,window.location.origin)}window.location.href=m},logout(l){if(delete e.defaults.headers.common.Authorization,a(),e5(),o=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(u){console.error("Failed to remove token from localStorage:",u)}const c=l||window.location.href,d=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(c)}`;window.location.href=d}},setToken(l,c=!0){if(l&&(a(),e5(),o=!0,e.defaults.headers.common.Authorization=`Bearer ${l}`,t.defaults.headers.common.Authorization=`Bearer ${l}`,c&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",l),window.localStorage.setItem("token",l)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(l,c,d){var u;try{const p=await e.post(`/apps/${n}/auth/login`,{email:l,password:c,...d&&{turnstile_token:d}}),{access_token:m,user:x}=p;return m&&this.setToken(m),{access_token:m,user:x}}catch(p){throw((u=p.response)===null||u===void 0?void 0:u.status)===401&&await this.logout(),p}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(l,c){return e.post(`/apps/${n}/users/invite-user`,{user_email:l,role:c})},register(l){return e.post(`/apps/${n}/auth/register`,l)},verifyOtp({email:l,otpCode:c}){return e.post(`/apps/${n}/auth/verify-otp`,{email:l,otp_code:c})},resendOtp(l){return e.post(`/apps/${n}/auth/resend-otp`,{email:l})},resetPasswordRequest(l){return e.post(`/apps/${n}/auth/reset-password-request`,{email:l})},resetPassword({resetToken:l,newPassword:c}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:l,new_password:c})},changePassword({userId:l,currentPassword:c,newPassword:d}){return e.post(`/apps/${n}/auth/change-password`,{user_id:l,current_password:c,new_password:d})}}}function hJ(e,t){return{async getAccessToken(n){const s=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(s)},async getIdToken(n){const s=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(s)}}}const mJ=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);
700function gJ(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`)).access_token},async getConnection(n){var s;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`);return{accessToken:a.access_token,connectionConfig:(s=a.connection_config)!==null&&s!==void 0?s:null}},async getWorkspaceConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(n)}`);return{accessToken:a.access_token,connectionConfig:(s=a.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`)).access_token},async getCurrentAppUserConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`);return{accessToken:a.access_token,connectionConfig:(s=a.connection_config)!==null&&s!==void 0?s:null}},async callApi(n,s){return RD(n,"Integration type"),xJ(e,`/apps/${t}/connectors/${encodeURIComponent(n)}/call`,s)}}}function RD(e,t){if(!e||typeof e!="string")throw new Error(`${t} is required and must be a string`)}async function xJ(e,t,n){var s,i,a,o,l,c,d,u,p;if(!n||typeof n!="object")throw new Error("Request is required and must be an object");RD(n.path,"Request path");const m=(s=n.method)!==null&&s!==void 0?s:"GET";if(!mJ.has(m))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const w=await e.post(t,{method:m,...n.host==null?{}:{host:n.host},path:n.path,query:(i=n.query)!==null&&i!==void 0?i:{},headers:(a=n.headers)!==null&&a!==void 0?a:{},body:(o=n.body)!==null&&o!==void 0?o:null});return{success:w.success,phase:w.phase,status:(l=w.status_code)!==null&&l!==void 0?l:null,data:w.data,dataBase64:(c=w.data_base64)!==null&&c!==void 0?c:null,contentType:(d=w.content_type)!==null&&d!==void 0?d:null,headers:(u=w.headers)!==null&&u!==void 0?u:{},creditsCharged:(p=w.credits_charged)!==null&&p!==void 0?p:0}}function yJ(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}`)}}}function dc(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:s=!0,removeFromUrl:i=!0}=e;let a=null;if(typeof window<"u"&&window.location)try{const o=new URLSearchParams(window.location.search);if(a=o.get(n),a){if(s&&vJ(a,{storageKey:t}),i){o.delete(n);const l=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}return a}}catch(o){console.error("Error retrieving token from URL:",o)}if(typeof window<"u"&&window.localStorage)try{return a=window.localStorage.getItem(t),a}catch(o){console.error("Error retrieving token from local storage:",o)}return null}function vJ(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function bJ({axios:e,serviceRoleAxios:t,appId:n,serverUrl:s,functionsVersion:i,platformHeaders:a}){const o=new Headers(a),l=c=>{const d=c.defaults.headers.common.Authorization;return typeof d=="string"&&d.startsWith("Bearer ")?d:null};return async function(d,u={}){wJ(d);const{fetch:p=fetch,...m}=u,x=new Headers(u.headers),w=(y,v)=>{v&&!x.has(y)&&x.set(y,v)};return w("Authorization",l(e)),w("Base44-Service-Authorization",l(t)),w("Base44-App-Id",n),w("Base44-Api-Url",s),w("Base44-Functions-Version",i),w("Base44-State",o.get("Base44-State")),w("X-Data-Env",o.get("X-Data-Env")),p(d,{...m,headers:x})}}function wJ(e){if(typeof e!="string"||e==="")throw new Error("fetchWithAuth() requires a path, such as '/api/orders'.");const t=e.replace(/[\t\n\r]/g,"").replace(/^[\x00-\x20]+/,"");if(!t.startsWith("/")||t.startsWith("//")||t.startsWith("/\\"))throw new Error(`fetchWithAuth() only sends requests to your app's own origin, so your app's credentials never reach a third party. "${e}" is not a path on it — pass a relative path such as '/api/orders'. Use base44.functions.fetch() to call a Base44 backend function, or plain fetch() for another origin.`)}
700function i5(e,t,n){const s=(a,o)=>a?`${String(a).replace(/\/$/,"")}${o}`:o,i=a=>{const o=new Headers;if(n!=null&&n.getAuthHeaders){const l=n.getAuthHeaders();Object.entries(l).forEach(([c,d])=>{d!=null&&o.set(c,String(d))})}return a&&new Headers(a).forEach((l,c)=>{o.set(c,l)}),o};return{async invoke(a,o){if(typeof o=="string")throw new Error(`Function ${a} must receive an object with named parameters, received: ${o}`);let l,c;return o instanceof FormData||o&&Object.values(o).some(d=>d instanceof File)?(l=new FormData,Object.keys(o).forEach(d=>{o[d]instanceof File?l.append(d,o[d],o[d].name):typeof o[d]=="object"&&o[d]!==null?l.append(d,JSON.stringify(o[d])):l.append(d,o[d])}),c="multipart/form-data"):(l=o,c="application/json"),e.post(`/apps/${t}/functions/${a}`,l||o,{headers:{"Content-Type":c}})},async fetch(a,o={}){const c=`/functions${a.startsWith("/")?a:`/${a}`}`,d=i(o.headers),u={...o,headers:d};return await fetch(s(n==null?void 0:n.baseURL,c),u)}}}function a5({axios:e,getSocket:t,appId:n,serverUrl:s,token:i}
700){const a=`/apps/${n}/agents`,o={},l=()=>e.get(`${a}/conversations`),c=y=>e.get(`${a}/conversations/${y}`);return{getConversations:l,getConversation:c,listConversations:y=>e.get(`${a}/conversations`,{params:y}),createConversation:y=>e.post(`${a}/conversations`,y),addMessage:async(y,v)=>e.post(`${a}/conversations/v2/${y.id}/messages`,v),subscribeToConversation:(y,v)=>{const j=`/agent-conversations/${y}`,k=t(),S=c(y).then(_=>(o[y]=_,_));return k.subscribeToRoom(j,{connect:()=>{},update_model:async({data:_})=>{const F=JSON.parse(_);if(F._message){await S;const A=F._message,C=o[y];if(C){const D=C.messages||[],P=D.findIndex(T=>T.id===A.id),L=P!==-1?D.map((T,R)=>R===P?A:T):[...D,A];o[y]={...C,messages:L},v==null||v(o[y])}}}})},getWhatsAppConnectURL:y=>{const v=`${s}/api/apps/${n}/agents/${encodeURIComponent(y)}/whatsapp`,j=i??dc();return j?`${v}?token=${j}`:v},getTelegramConnectURL:y=>{const v=`${s}/api/apps/${n}/agents/${encodeURIComponent(y)}/telegram`,j=i??dc();return j?`${v}?token=${j}`:v}}}const o5={openai:"openai",typesafe:"typesafe"};function l5({serverUrl:e,token:t,appId:n,headers:s={}}){return{connection:({provider:a="openai"}={})=>{var o;if(!Object.prototype.hasOwnProperty.call(o5,a))throw new Error(`Unsupported AI Gateway provider: ${a}`);const l=o5[a];return{baseURL:`${e}/api/apps/${n}/ai/${l}/v1`,token:(o=t??dc())!==null&&o!==void 0?o:"",headers:{...s}}}}}function c5(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(s){await e.post(`${n}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await e.get(n,{params:s})},async getStats(s={}){return await e.get(`${n}/stats`,{params:s})}}}function jJ(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function SJ(e,t){return{async inviteUser(n,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:s})}}}const Co=Object.create(null);Co.open="0";Co.close="1";Co.ping="2";Co.pong="3";Co.message="4";Co.upgrade="5";Co.noop="6";const _x=Object.create(null);Object.keys(Co).forEach(e=>{_x[Co[e]]=e});const Mw={type:"error",data:"parser error"},DD=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ID=typeof ArrayBuffer=="function",PD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,IS=({type:e,data:t},n,s)=>DD&&t instanceof Blob?n?s(t):d5(t,s):ID&&(t instanceof ArrayBuffer||PD(t))?n?s(t):d5(new Blob([t]),s):s(Co[e]+(t||"")),d5=(e,t)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];t("b"+(s||""))},n.readAsDataURL(e)};function u5(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Rb;function kJ(e,t){if(DD&&e.data instanceof Blob)return e.data.arrayBuffer().then(u5).then(t);if(ID&&(e.data instanceof ArrayBuffer||PD(e.data)))return t(u5(e.data));IS(e,!1,n=>{Rb||(Rb=new TextEncoder),t(Rb.encode(n))})}const f5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_h=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<f5.length;e++)_h[f5.charCodeAt(e)]=e;const _J=e=>{let t=e.length*.75,n=e.length,s,i=0,a,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),u=new Uint8Array(d);for(s=0;s<n;s+=4)a=_h[e.charCodeAt(s)],o=_h[e.charCodeAt(s+1)],l=_h[e.charCodeAt(s+2)],c=_h[e.charCodeAt(s+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|l>>2,u[i++]=(l&3)<<6|c&63;return d},CJ=typeof ArrayBuffer=="function",PS=(e,t)=>{if(typeof e!="string")return{type:"message",data:BD(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:EJ(e.substring(1),t)}:_x[n]?e.length>1?{type:_x[n],data:e.substring(1)}:{type:_x[n]}:Mw},EJ=(e,t)=>{if(CJ){const n=_J(e);return BD(n,t)}else return{base64:!0,data:e}},BD=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},OD="�",FJ=(e,t)=>{const n=e.length,s=new Array(n);let i=0;e.forEach((a,o)=>{IS(a,!1,l=>{s[o]=l,++i===n&&t(s.join(OD))})})},AJ=(e,t)=>
vendor: 3,901 bytes, line 700
700{const n=e.split(OD),s=[];for(let i=0;i<n.length;i++){const a=PS(n[i],t);if(s.push(a),a.type==="error")break}return s};function TJ(){return new TransformStream({transform(e,t){kJ(e,n=>{const s=n.length;let i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,s)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Db;function yg(e){return e.reduce((t,n)=>t+n.length,0)}function vg(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let s=0;for(let i=0;i<t;i++)n[i]=e[0][s++],s===e[0].length&&(e.shift(),s=0);return e.length&&s<e[0].length&&(e[0]=e[0].slice(s)),n}function NJ(e,t){Db||(Db=new TextDecoder);const n=[];let s=0,i=-1,a=!1;return new TransformStream({transform(o,l){for(n.push(o);;){if(s===0){if(yg(n)<1)break;const c=vg(n,1);a=(c[0]&128)===128,i=c[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(yg(n)<2)break;const c=vg(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),s=3}else if(s===2){if(yg(n)<8)break;const c=vg(n,8),d=new DataView(c.buffer,c.byteOffset,c.length),u=d.getUint32(0);if(u>Math.pow(2,21)-1){l.enqueue(Mw);break}i=u*Math.pow(2,32)+d.getUint32(4),s=3}else{if(yg(n)<i)break;const c=vg(n,i);l.enqueue(PS(a?c:Db.decode(c),t)),s=0}if(i===0||i>e){l.enqueue(Mw);break}}}})}const MD=4;function Tr(e){if(e)return RJ(e)}function RJ(e){for(var t in Tr.prototype)e[t]=Tr.prototype[t];return e}Tr.prototype.on=Tr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Tr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Tr.prototype.off=Tr.prototype.removeListener=Tr.prototype.removeAllListeners=Tr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s,i=0;i<n.length;i++)if(s=n[i],s===t||s.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Tr.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(n){n=n.slice(0);for(var s=0,i=n.length;s<i;++s)n[s].apply(this,t)}return this};Tr.prototype.emitReserved=Tr.prototype.emit;Tr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Tr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Jy=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ia=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),DJ="arraybuffer";function LD(e,...t){return t.reduce((n,s)=>(e.hasOwnProperty(s)&&(n[s]=e[s]),n),{})}const IJ=ia.setTimeout,PJ=ia.clearTimeout;function Qy(e,t){t.useNativeTimers?(e.setTimeoutFn=IJ.bind(ia),e.clearTimeoutFn=PJ.bind(ia)):(e.setTimeoutFn=ia.setTimeout.bind(ia),e.clearTimeoutFn=ia.clearTimeout.bind(ia))}const BJ=1.33;function OJ(e){return typeof e=="string"?MJ(e):Math.ceil((e.byteLength||e.size)*BJ)}function MJ(e){let t=0,n=0;for(let s=0,i=e.length;s<i;s++)t=e.charCodeAt(s),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(s++,n+=4);return n}function zD(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function LJ(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function zJ(e){let t={},n=e.split("&");for(let s=0,i=n.length;s<i;s++){let a=n[s].split("=");
vendor: 5,464 bytes, line 700
700t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class WJ extends Error{constructor(t,n,s){super(t),this.description=n,this.context=s,this.type="TransportError"}}class BS extends Tr{constructor(t){super(),this.writable=!1,Qy(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,s){return super.emitReserved("error",new WJ(t,n,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=PS(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=LJ(t);return n.length?"?"+n:""}}class $J extends BS{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};AJ(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,FJ(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=zD()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let WD=!1;try{WD=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const UJ=WD;function VJ(){}class HJ extends $J{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let s=location.port;s||(s=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,n){const s=this.request({method:"POST",data:t});s.on("success",n),s.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=t}}class wo extends Tr{constructor(t,n,s){super(),this.createRequest=t,Qy(this,s),this._opts=s,this._method=s.method||"GET",this._uri=n,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var t;const n=LD(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(n);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&s.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var i;s.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=wo.requestsCount++,wo.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=VJ,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete wo.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}wo.requestsCount=0;wo.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",p5);else if(typeof addEventListener=="function"){const e="onpagehide"in ia?"pagehide":"unload";addEventListener(e,p5,!1)}}function p5(){for(let e in wo.requests)wo.requests.hasOwnProperty(e)&&wo.requests[e].abort()}const qJ=(function(){const e=$D({xdomain:!1});return e&&e.responseType!==null})();class GJ extends HJ{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=qJ&&!n}request(t={}){return Object.assign(t,{xd:this.xd}
vendor: 16,786 bytes, line 700
700,this.opts),new wo($D,this.uri(),t)}}function $D(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||UJ))return new XMLHttpRequest}catch{}if(!t)try{return new ia[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const UD=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class KJ extends BS{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,s=UD?{}:LD(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const s=t[n],i=n===t.length-1;IS(s,this.supportsBinary,a=>{try{this.doWrite(s,a)}catch{}i&&Jy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=zD()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ib=ia.WebSocket||ia.MozWebSocket;class YJ extends KJ{createSocket(t,n,s){return UD?new Ib(t,n,s):n?new Ib(t,n):new Ib(t)}doWrite(t,n){this.ws.send(n)}}class XJ extends BS{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=NJ(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(n).getReader(),i=TJ();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const a=()=>{s.read().then(({done:l,value:c})=>{l||(this.onPacket(c),a())}).catch(l=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const s=t[n],i=n===t.length-1;this._writer.write(s).then(()=>{i&&Jy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const JJ={websocket:YJ,webtransport:XJ,polling:GJ},QJ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ZJ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Lw(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),s=e.indexOf("]");n!=-1&&s!=-1&&(e=e.substring(0,n)+e.substring(n,s).replace(/:/g,";")+e.substring(s,e.length));let i=QJ.exec(e||""),a={},o=14;for(;o--;)a[ZJ[o]]=i[o]||"";return n!=-1&&s!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=eQ(a,a.path),a.queryKey=tQ(a,a.query),a}function eQ(e,t){const n=/\/{2,9}/g,s=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function tQ(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,a){i&&(n[i]=a)}),n}const zw=typeof addEventListener=="function"&&typeof removeEventListener=="function",Cx=[];zw&&addEventListener("offline",()=>{Cx.forEach(e=>e())},!1);class xc extends Tr{constructor(t,n){if(super(),this.binaryType=DJ,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const s=Lw(t);n.hostname=s.host,n.secure=s.protocol==="https"||s.protocol==="wss",n.port=s.port,s.query&&(n.query=s.query)}else n.host&&(n.hostname=Lw(n.host).host);Qy(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(s=>{const i=s.prototype.name;this.transports.push(i),this._transportsByName[i]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=zJ(this.opts.query)),zw&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Cx.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=MD,n.transport=t,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&xc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",xc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s<this.writeBuffer.length;s++){const i=this.writeBuffer[s].data;if(i&&(n+=OJ(i)),s>0&&n>this._maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Jy(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,s){return this._sendPacket("message",t,n,s),this}send(t,n,s){return this._sendPacket("message",t,n,s),this}_sendPacket(t,n,s,i){if(typeof n=="function"&&(i=n,n=void 0),typeof s=="function"&&(i=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const a={type:t,data:n,options:s};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(xc.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),zw&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Cx.indexOf(this._offlineEventListener);s!==-1&&Cx.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}xc.protocol=MD;class nQ extends xc{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),s=!1;xc.priorWebsocketSuccess=!1;const i=()=>{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!s)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;xc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function a(){s||(s=!0,u(),n.close(),n=null)}const o=p=>{const m=new Error("probe error: "+p);m.transport=n.name,a(),this.emitReserved("upgradeError",m)};function l(){o("transport closed")}function c(){o("socket closed")}function d(p){n&&p.name!==n.name&&a()}const u=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};n.once("open",i),n.once("error",o),n.once("close",l),this.once("close",c),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let s=0;s<t.length;s++)~this.transports.indexOf(t[s])&&n.push(t[s]);return n}}let rQ=class extends nQ{constructor(t,n={}){const s=typeof t=="object"?t:n;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>JJ[i]).filter(i=>!!i)),super(t,s)}};function sQ(e,t="",n){let s=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),s=Lw(e)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const a=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+a+":"+s.port+t,s.href=s.protocol+"://"+a+(n&&n.port===s.port?"":":"+s.port),s}const iQ=typeof ArrayBuffer=="function",aQ=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,VD=Object.prototype.toString,oQ=typeof Blob=="function"||typeof Blob<"u"&&VD.call(Blob)==="[object BlobConstructor]",lQ=typeof File=="function"||typeof File<"u"&&VD.call(File)==="[object FileConstructor]";function OS(e){return iQ&&(e instanceof ArrayBuffer||aQ(e))||oQ&&e instanceof Blob||lQ&&e instanceof File}function Ex(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,s=e.length;n<s;n++)if(Ex(e[n]))return!0;return!1}if(OS(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ex(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ex(e[n]))return!0;return!1}function cQ(e){const t=[],n=e.data,s=e;return s.data=Ww(n,t),s.attachments=t.length,{packet:s,buffers:t}}function Ww(e,t){if(!e)return e;if(OS(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let s=0;s<e.length;s++)n[s]=Ww(e[s],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=Ww(e[s],t));return n}return e}function dQ(e,t){return e.data=$w(e.data,t),delete e.attachments,e}function $w(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=$w(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=$w(e[n],t));return e}const uQ=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var vn;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(vn||(vn={}));class fQ{constructor(t){this.replacer=t}encode(t){return(t.type===vn.EVENT||t.type===vn.ACK)&&Ex(t)?this.encodeAsBinary({type:t.type===vn.EVENT?vn.BINARY_EVENT:vn.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===vn.BINARY_EVENT||t.type===vn.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=cQ(t),s=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(s),i}}class MS extends Tr{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const s=n.type===vn.BINARY_EVENT;s||n.type===vn.BINARY_ACK?(n.type=s?vn.EVENT:vn.ACK,this.reconstructor=new pQ(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(OS(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const s={type:Number(t.charAt(0))};if(vn[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===vn.BINARY_EVENT||s.type===vn.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(a,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););s.nsp=t.substring(a,n)}else s.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const a=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}s.id=Number(t.substring(a,n+1))}
vendor: 4,501 bytes, line 700
700if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(MS.isPayloadValid(s.type,a))s.data=a;else throw new Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case vn.CONNECT:return h5(n);case vn.DISCONNECT:return n===void 0;case vn.CONNECT_ERROR:return typeof n=="string"||h5(n);case vn.EVENT:case vn.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&uQ.indexOf(n[0])===-1);case vn.ACK:case vn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class pQ{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=dQ(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function h5(e){return Object.prototype.toString.call(e)==="[object Object]"}const hQ=Object.freeze(Object.defineProperty({__proto__:null,Decoder:MS,Encoder:fQ,get PacketType(){return vn}},Symbol.toStringTag,{value:"Module"}));function Da(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const mQ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class HD extends Tr{constructor(t,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Da(t,"open",this.onopen.bind(this)),Da(t,"packet",this.onpacket.bind(this)),Da(t,"error",this.onerror.bind(this)),Da(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var s,i,a;if(mQ.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:vn.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const u=this.ids++,p=n.pop();this._registerAckCallback(u,p),o.id=u}const l=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var s;const i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),o=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((s,i)=>{const a=(o,l)=>o?i(o):s(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...a)=>(this._queue[0],i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...a)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:vn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}
vendor: 7,087 bytes, line 700
700_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(s=>String(s.id)===t)){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case vn.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case vn.EVENT:case vn.BINARY_EVENT:this.onevent(t);break;case vn.ACK:case vn.BINARY_ACK:this.onack(t);break;case vn.DISCONNECT:this.ondisconnect();break;case vn.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let s=!1;return function(...i){s||(s=!0,n.packet({type:vn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:vn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let s=0;s<n.length;s++)if(t===n[s])return n.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let s=0;s<n.length;s++)if(t===n[s])return n.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const s of n)s.apply(this,t.data)}}}function Qf(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Qf.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Qf.prototype.reset=function(){this.attempts=0};Qf.prototype.setMin=function(e){this.ms=e};Qf.prototype.setMax=function(e){this.max=e};Qf.prototype.setJitter=function(e){this.jitter=e};class Uw extends Tr{constructor(t,n){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Qy(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Qf({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||hQ;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new rQ(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const i=Da(n,"open",function(){s.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=Da(n,"error",a);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Da(t,"ping",this.onping.bind(this)),Da(t,"data",this.ondata.bind(this)),Da(t,"error",this.onerror.bind(this)),Da(t,"close",this.onclose.bind(this)),Da(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Jy(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new HD(this,t,n),this.nsps[t]=s),s}_destroy(t){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let s=0;s<n.length;s++)this.engine.write(n[s],t.options)}
700cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Kp={};function Fx(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=sQ(e,t.path||"/socket.io"),s=n.source,i=n.id,a=n.path,o=Kp[i]&&a in Kp[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new Uw(s,t):(Kp[i]||(Kp[i]=new Uw(s,t)),c=Kp[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Fx,{Manager:Uw,Socket:HD,io:Fx,connect:Fx});const gQ=250;function m5(e,t){var n;const s=(n=e.token)!==null&&n!==void 0?n:dc(),i={app_id:e.appId};s?i.token=s:i.anonymous_id=Kx();const a=Fx(e.serverUrl,{path:e.mountPath,transports:e.transports,query:i});return a.on("connect",async()=>{var o;return console.log("connect",a.id),(o=t.connect)===null||o===void 0?void 0:o.call(t)}),a.on("update_model",async o=>{var l;return(l=t.update_model)===null||l===void 0?void 0:l.call(t,o)}),a.on("error",async o=>{var l;return(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),a.on("connect_error",async o=>{var l;return console.error("connect_error",o),(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),a}function xQ({config:e}){let t={...e};const n={},s={},i={connect:async()=>{const j=[];Object.keys(n).forEach(k=>{const S=m(k);S.length!==0&&(d(k),S.forEach(({connect:_})=>{const F=async()=>_==null?void 0:_();j.push(F())}))}),await Promise.all(j)},update_model:async j=>{const S=m(j.room).map(_=>{var F;return(F=_.update_model)===null||F===void 0?void 0:F.call(_,j)});await Promise.all(S)},error:async j=>{console.error("error",j);const k=Object.values(n).flat().map(S=>{var _;return(_=S.error)===null||_===void 0?void 0:_.call(S,j)});await Promise.all(k)}};let a=m5(e,i);function o(){l()}function l(){w(),a&&a.disconnect()}function c(j){o(),t={...t,...j},a=m5(t,i)}function d(j){a.emit("join",j)}function u(j){a.emit("leave",j)}async function p(j,k){var S;const _=JSON.stringify(k);return(S=i.update_model)===null||S===void 0?void 0:S.call(i,{room:j,data:_})}function m(j){var k;return(k=n[j])!==null&&k!==void 0?k:[]}function x(j){const k=s[j];k&&(clearTimeout(k),delete s[j])}function w(){Object.keys(s).forEach(j=>{var k,S;clearTimeout(s[j]),delete s[j],((S=(k=n[j])===null||k===void 0?void 0:k.length)!==null&&S!==void 0?S:0)===0&&delete n[j]})}function y(j){x(j),s[j]=setTimeout(()=>{var k,S;delete s[j],!(((S=(k=n[j])===null||k===void 0?void 0:k.length)!==null&&S!==void 0?S:0)>0)&&(u(j),delete n[j])},gQ)}return{socket:a,subscribeToRoom:(j,k)=>{n[j]?x(j):(d(j),n[j]=[]),n[j].push(k);let S=!1;return()=>{var _,F;S||(S=!0,n[j]=(F=(_=n[j])===null||_===void 0?void 0:_.filter(A=>A!==k))!==null&&F!==void 0?F:[],n[j].length===0&&y(j))}},updateConfig:c,updateModel:p,disconnect:l}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
701  PartySocket requires a global 'EventTarget' class to be available!
702  You can polyfill this global by adding this to your code before any partysocket imports: 
703  
704  \`\`\`
705  import 'partysocket/event-target-polyfill';
706  \`\`\`
707  Please file an issue at https://github.com/partykit/partykit if you're still having trouble.
708`);
vendor: 5,074 bytes, line 708
708var qD=class extends Event{constructor(t,n){super("error",n);Gn(this,"message");Gn(this,"error");this.message=t.message,this.error=t}},GD=class extends Event{constructor(t=1e3,n="",s){super("close",s);Gn(this,"code");Gn(this,"reason");Gn(this,"wasClean",!0);this.code=t,this.reason=n}},Pb={Event,ErrorEvent:qD,CloseEvent:GD};function yQ(e,t){if(!e)throw new Error(t)}function vQ(e){return new e.constructor(e.type,e)}function bQ(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new GD(e.code||1999,e.reason||"unknown reason",e):"error"in e?new qD(e.error,e):new Event(e.type,e)}var KR,wQ=typeof process<"u"&&typeof((KR=process.versions)==null?void 0:KR.node)<"u"&&typeof document>"u",bg=wQ?bQ:vQ,od={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},g5=!1,jQ=class md extends EventTarget{constructor(n,s,i={}){super();Gn(this,"_ws");Gn(this,"_retryCount",-1);Gn(this,"_uptimeTimeout");Gn(this,"_connectTimeout");Gn(this,"_shouldReconnect",!0);Gn(this,"_connectLock",!1);Gn(this,"_binaryType","blob");Gn(this,"_closeCalled",!1);Gn(this,"_messageQueue",[]);Gn(this,"_url");Gn(this,"_protocols");Gn(this,"_options");Gn(this,"onclose",null);Gn(this,"onerror",null);Gn(this,"onmessage",null);Gn(this,"onopen",null);Gn(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:s=od.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),s),yQ(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(i=>{var a;return(a=this._ws)==null?void 0:a.send(i)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(bg(n))});Gn(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(bg(n))});Gn(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(bg(n)),this._connect()});Gn(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(bg(n))});this._url=n,this._protocols=s,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return md.CONNECTING}get OPEN(){return md.OPEN}get CLOSING(){return md.CLOSING}get CLOSED(){return md.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((s,i)=>(typeof i=="string"?s+=i.length:i instanceof Blob?s+=i.size:s+=i.byteLength,s),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?md.CLOSED:md.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,s){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,s)}reconnect(n,s){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,s),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:s=od.maxEnqueuedMessages}=this._options;this._messageQueue.length<s&&(this._debug("enqueue",n),this._messageQueue.push(n))}}_debug(...n){this._options.debug&&console.log.apply(console,["RWS>",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=od.reconnectionDelayGrowFactor,minReconnectionDelay:s=od.minReconnectionDelay,maxReconnectionDelay:i=od.maxReconnectionDelay}=this._options;let a=0;return this._retryCount>0&&(a=s*Math.pow(n,this._retryCount-1),a>i&&(a=i)),this._debug("next delay",a),a}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const s=n();if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(s.then)return s}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const s=n();if(typeof s=="string")return Promise.resolve(s);if(s.then)return s}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;
708const{maxRetries:n=od.maxRetries,connectionTimeout:s=od.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([i,a])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!g5&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. 
709
710For example, if you're using node.js, run \`npm install ws\`, and then in your code:
711
712import PartySocket from 'partysocket';
713import WS from 'ws';
714
715const partysocket = new PartySocket({
716  host: "127.0.0.1:1999",
717  room: "test-room",
718  WebSocket: WS
719});
720
721`),g5=!0);const o=this._options.WebSocket||WebSocket;this._debug("connect",{url:i,protocols:a}),this._ws=a?new o(i,a):new o(i),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),s)}).catch(i=>{this._connectLock=!1,this._handleError(new Pb.ErrorEvent(Error(i.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new Pb.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,s){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,s),this._handleClose(new Pb.CloseEvent(n,s,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*!
722 * Reconnecting WebSocket
723 * by Pedro Ladaria <[email protected]>
724 * https://github.com/pladaria/reconnecting-websocket
725 * License MIT
726 */const SQ=1e3,kQ=3e3,_Q=new Set([405,409,422,503]),CQ=new Set([400,403,404]);function EQ(e){const t=e&&typeof e=="object"?e.status:void 0;return typeof t=="number"?t:void 0}function FQ(e){return e instanceof Error?e:new Error(String(e))}class AQ{constructor(t,n,s,i,a){var o;this.onClose=a,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=(o=i==null?void 0:i.id)!==null&&o!==void 0?o:crypto.randomUUID();let l=s.transport==="proxy";const c=async()=>{var m;if(this.closed)throw new Error("Actor connection is closed");if(!l)try{const{websocket_url:x,token:w}=await s.mintConnectionToken(t,n,this.id),y=x.includes("?")?"&":"?";return`${x}${y}token=${encodeURIComponent(w)}`}catch(x){const w=EQ(x);if(!(s.transport!=="direct"&&w!==void 0&&_Q.has(w))){w!==void 0&&CQ.has(w)&&this.close();try{(m=s.onMintError)===null||m===void 0||m.call(s,FQ(x))}catch{}throw x}l=!0}return NQ(s.host,t,n,this.id,s.appId,s.getAuthToken(),s.functionsVersion)},d=new jQ(c);this.ws=d;let u=Date.now();const p=()=>{u=Date.now()};d.addEventListener("open",p),d.addEventListener("message",m=>{p();let x;try{x=JSON.parse(m.data)}catch{return}if((x&&typeof x=="object"?x.type:void 0)!=="__pong")for(const y of this.listeners)y(x)}),this.heartbeat=setInterval(()=>{if(Date.now()-u>kQ){p(),d.readyState===d.OPEN&&d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},SQ)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.closed||this.ws.send(JSON.stringify(t))}close(){this.closed||(this.closed=!0,this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose())}}function TQ(e,t,n,s){let i=null;return{connect(a){if(i)return i;const o=new AQ(e,t,n,a,()=>{s.delete(o),i===o&&(i=null)});return i=o,s.add(o),o}}}function NQ(e,t,n,s,i,a,o){let l=e.replace(/^(http|https|ws|wss):\/\//,"");l.endsWith("/")&&(l=l.slice(0,-1));const c=l.startsWith("localhost:")||l.startsWith("127.0.0.1:")||l.startsWith("192.168.")||l.startsWith("10.")||l.startsWith("172.")&&l.split(".")[1]>="16"&&l.split(".")[1]<="31"||l.startsWith("[::ffff:7f00:1]:"),d=new URLSearchParams([["_pk",s],["app_id",i],["handler",t]]);return a&&d.append("token",a),o&&d.append("fv",o),`${c?"ws":"wss"}://${l}/parties/${t}/${n}?${d}`}function RQ(e,t){return e&&!e.startsWith("/")?e:t??e}function DQ(e){const t=new Set;return{module:new Proxy({}
726,{get(s,i){if(!(typeof i!="string"||i==="then"))return a=>TQ(i,a,e,t)}}),closeAll:()=>{for(const s of[...t])s.close()}}}function IQ(e){var t,n,s,i;const{serverUrl:a="https://base44.app",appId:o,analytics:l,token:c,serviceToken:d,requiresAuth:u=!1,appBaseUrl:p,options:m,functionsVersion:x,headers:w}=e,y=typeof p=="string"?p:"",v={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:o,token:c};let j=null;const k=()=>(j||(j=xQ({config:v})),j),S={...w,"X-App-Id":String(o)},_=w==null?void 0:w["Base44-State"],F=_?{"Base44-State":_}:{},A=x?{...S,"Base44-Functions-Version":x}:S,C=Gp({baseURL:`${a}/api`,headers:S,token:c,onError:m==null?void 0:m.onError}),D=Gp({baseURL:`${a}/api`,headers:A,token:c,interceptResponses:!1,onError:m==null?void 0:m.onError}),P={...S,...c?{"on-behalf-of":`Bearer ${c}`}:{}},L=Gp({baseURL:`${a}/api`,headers:P,token:d,onError:m==null?void 0:m.onError}),T=Gp({baseURL:`${a}/api`,headers:A,token:d,interceptResponses:!1}),R=Gp({baseURL:`${a}/api`,headers:S}),U=pJ(C,D,o,{appBaseUrl:y,token:c});if(typeof window<"u"){const N=c||dc();N&&U.setToken(N)}const I=DQ({appId:o,host:RQ(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:x,getAuthToken:()=>c||dc(),mintConnectionToken:async(N,W,O)=>{const G=c||dc();return await R.post(`/apps/${o}/actors/${encodeURIComponent(N)}/connection-token`,{room:W,connection_id:O},{headers:{...G?{Authorization:`Bearer ${G}`}:{},...x?{"Base44-Functions-Version":x}:{}}})},transport:m==null?void 0:m.actorsTransport,onMintError:m==null?void 0:m.onError}),H={entities:n5({axios:C,appId:o,getSocket:k}),integrations:s5(C,o),connectors:yJ(C,o),auth:U,functions:i5(D,o,{getAuthHeaders:()=>{const N={},W=c||dc();return W&&(N.Authorization=`Bearer ${W}`),N},baseURL:(n=D.defaults)===null||n===void 0?void 0:n.baseURL}),agents:a5({axios:C,getSocket:k,appId:o,serverUrl:a,token:c}),aiGateway:l5({serverUrl:a,token:c,appId:o,headers:F}),appLogs:c5(C,o),app:jJ(C,o),users:SJ(C,o),analytics:QX({axiosClient:C,serverUrl:a,appId:o,userAuthModule:U,enabled:(s=l==null?void 0:l.enabled)!==null&&s!==void 0?s:!0}),actors:I.module,cleanup:()=>{H.analytics.cleanup(),I.closeAll(),j&&j.disconnect()}},V={entities:n5({axios:L,appId:o,getSocket:k}),integrations:s5(L,o),sso:hJ(L,o),connectors:gJ(L,o),functions:i5(T,o,{getAuthHeaders:()=>{const N={};return d&&(N.Authorization=`Bearer ${d}`),N},baseURL:(i=T.defaults)===null||i===void 0?void 0:i.baseURL}),agents:a5({axios:L,getSocket:k,appId:o,serverUrl:a,token:c}),aiGateway:l5({serverUrl:a,token:d,appId:o,headers:F}),appLogs:c5(L,o),cleanup:()=>{j&&j.disconnect()}};return u&&typeof window<"u"&&setTimeout(async()=>{try{await H.auth.isAuthenticated()||H.auth.redirectToLogin(window.location.href)}catch(N){console.error("Authentication check failed:",N),H.auth.redirectToLogin(window.location.href)}},0),{...H,fetchWithAuth:bJ({axios:C,serviceRoleAxios:L,appId:String(o),serverUrl:a,functionsVersion:x,platformHeaders:w}),setToken(N){H.auth.setToken(N),j&&j.updateConfig({token:N}),v.token=N},getConfig(){return{serverUrl:a,appId:o,requiresAuth:u}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return V}}}const KD=typeof window>"u",PQ=KD?{localStorage:new Map}:window,Bh=PQ.localStorage,BQ=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Pu=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(KD)return t;const s=`base44_${BQ(e)}`,i=new URLSearchParams(window.location.search),a=i.get(e);if(n){i.delete(e);const l=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}if(a)return Bh.setItem(s,a),a;if(t)return Bh.setItem(s,t),t;const o=Bh.getItem(s);return o||null},OQ=()=>(Pu("clear_access_token")==="true"&&(Bh.removeItem("base44_access_token"),Bh.removeItem("token")),{appId:Pu("app_id",{defaultValue:"69dc1b168deed8792f4850e5"}),token:Pu("access_token",{removeFromUrl:!0}),fromUrl:Pu("from_url",{defaultValue:window.location.href}),functionsVersion:Pu("functions_version",{defaultValue:"prod"}),appBaseUrl:Pu("app_base_url",{defaultValue:void 0})}),Yu={...OQ()},{appId:MQ,token:LQ,functionsVersion:zQ,appBaseUrl:WQ}=Yu,ne=IQ({appId:MQ,token:LQ,functionsVersion:zQ,serverUrl:"",requiresAuth:!1,appBaseUrl:WQ});var YR,XR;const x5=(XR=(YR=ne.analytics)==null?void 0:YR.track)==null?void 0:XR.bind(ne.analytics);x5&&(ne.analytics.track=async(...e)=>{try{return await x5(...e)}catch{}});const YD=g.createContext(),$Q=({children:e})=>{const[t,n]=g.useState(null),[s,i]=g.useState(!1),[a,o]=g.useState(!0),[l,c]=g.useState(!0),[d,u]=g.useState(null),[p,m]=g.useState(null);g.useEffect(()=>{x()},[]);const x=async()=>{var j,k;try{c(!0),u(null);try{const S={"X-App-Id":Yu.appId};Yu.token&&(S.Authorization=`Bearer ${Yu.token}`);const _=await fetch(`/api/apps/public/prod/public-settings/by-id/${Yu.appId}`,{headers:S});if(!_.ok){const A=await _.json().catch(()=>({})),C=new Error((A==null?void 0:A.message)||"Failed");throw C.status=_.status,C.data=A,C}const F=await _.json();m(F),Yu.token?await w():(o(!1),i(!1)),c(!1)}catch(S){if(console.error("App state check failed:",S),S.status===403&&((k=(j=S.data)==null?void 0:j.extra_data)!=null&&k.reason)){const _=S.data.extra_data.reason;u(_==="auth_required"?{type:"auth_required",message:"Authentication required"}:_==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:_,message:S.message})}else u({type:"unknown",message:S.message||"Failed to load app"});c(!1),o(!1)}}catch(S){console.error("Unexpected error:",S),u({type:"unknown",message:S.message||"An unexpected error occurred"}),c(!1),o(!1)}},w=async()=>{try{o(!0);const j=await ne.auth.me();n(j),i(!0),o(!1)}catch(j){console.error("User auth check failed:",j),o(!1),i(!1),(j.status===401||j.status===403)&&u({type:"auth_required",message:"Authentication required"})}},y=(j=!0)=>{n(null),i(!1),j?ne.auth.logout("/"):ne.auth.logout()},v=()=>{ne.auth.redirectToLogin(window.location.href)};return r.jsx(YD.Provider,{value:{user:t,isAuthenticated:s,isLoadingAuth:a,isLoadingPublicSettings:l,authError:d,appPublicSettings:p,logout:y,navigateToLogin:v,checkAppState:x},children:e})},tr=()=>{const e=g.useContext(YD);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},UQ=()=>r.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:r.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:r.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),r.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),r.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),r.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[r.jsx("p",{children:"If you believe this is an error, you can:"}),r.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[r.jsx("li",{children:"Verify you are logged in with the correct account"}),r.jsx("li",{children:"Contact the app administrator for access"}),r.jsx("li",{children:"Try logging out and back in again"})]})]})]})})});function y5(e,t){if(typeof e=="function")return e(t);
726e!=null&&(e.current=t)}function _l(...e){return t=>{let n=!1;const s=e.map(i=>{const a=y5(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():y5(e[i],null)}}}}function Mn(...e){return g.useCallback(_l(...e),e)}var VQ=Symbol.for("react.lazy"),Yx=My[" use ".trim().toString()];function HQ(e){return typeof e=="object"&&e!==null&&"then"in e}function XD(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===VQ&&"_payload"in e&&HQ(e._payload)}function JD(e){const t=GQ(e),n=g.forwardRef((s,i)=>{let{children:a,...o}=s;XD(a)&&typeof Yx=="function"&&(a=Yx(a._payload));const l=g.Children.toArray(a),c=l.find(YQ);if(c){const d=c.props.children,u=l.map(p=>p===c?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return r.jsx(t,{...o,ref:i,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return r.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var qQ=JD("Slot");function GQ(e){const t=g.forwardRef((n,s)=>{let{children:i,...a}=n;if(XD(i)&&typeof Yx=="function"&&(i=Yx(i._payload)),g.isValidElement(i)){const o=JQ(i),l=XQ(a,i.props);return i.type!==g.Fragment&&(l.ref=s?_l(s,o):o),g.cloneElement(i,l)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var KQ=Symbol("radix.slottable");function YQ(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===KQ}function XQ(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function JQ(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const LS=lS("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),on=g.forwardRef(({className:e,variant:t,size:n,asChild:s=!1,...i},a)=>{const o=s?qQ:"button";return r.jsx(o,{className:pn(LS({variant:t,size:n,className:e})),ref:a,...i})});on.displayName="Button";const QQ="https://i.imgur.com/ajgFWwT.png",ZQ="https://i.imgur.com/MVgsUJ5.png",v5={sm:"h-7",md:"h-9",lg:"h-12"};function Io({size:e="md",variant:t="onLight",className:n=""}){const s=t==="onDark"?QQ:ZQ,i=v5[e]||v5.md;return r.jsx("img",{src:s,alt:"Summit Inc",className:pn(i,"w-auto object-contain",n)})}function eZ(){return r.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-6",children:r.jsxs("div",{className:"text-center max-w-md",children:[r.jsx(Io,{variant:"onLight",size:"md",className:"justify-center mb-8"}),r.jsx("h1",{className:"text-6xl font-bold text-foreground mb-4",children:"404"}),r.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:"A página que você está procurando não existe ou foi movida."}),r.jsxs("div",{className:"flex items-center justify-center gap-3",children:[r.jsx(ut,{to:"/",children:r.jsxs(on,{variant:"outline",className:"font-medium",children:[r.jsx(bo,{className:"w-4 h-4 mr-2"}),"Voltar ao início"]})}),r.jsx(ut,{to:"/app",children:r.jsx(on,{className:"font-medium",children:"Acessar app"})})]})]})})}const QD="summit_cookie_consent",tZ=4368*60*60*1e3,wd="#6C24F5",Vw="#0A2540",Oh="#425466",Mh="#E6E8EB";function b5({analytics:e,ads:t}){typeof window.gtag=="function"&&window.gtag("consent","update",{ad_storage:t?"granted":"denied",ad_user_data:t?"granted":"denied",ad_personalization:t?"granted":"denied",analytics_storage:e?"granted":"denied"})}const lm="summit-cookie-consent-changed";function zS(){try{const e=localStorage.getItem(QD);if(!e)return null;const t=JSON.parse(e);return!(t!=null&&t.date)||Date.now()-new Date(t.date).getTime()>tZ?null:t}catch{return null}}function nZ(){const[e,t]=g.useState(!1),[n,s]=g.useState(!1),[i,a]=g.useState(!1),[o,l]=g.useState(!1),[c,d]=g.useState(!1),[u,p]=g.useState(typeof window<"u"&&window.innerWidth<640);g.useEffect(()=>{const y=()=>p(window.innerWidth<640);return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]),g.useEffect(()=>{const y=zS();
726if(y)b5({analytics:!!y.analytics,ads:!!y.ads}),l(!!y.analytics),d(!!y.ads);else{const v=setTimeout(()=>{t(!0),requestAnimationFrame(()=>s(!0))},1e3);return()=>clearTimeout(v)}},[]),g.useEffect(()=>{const y=()=>{a(!1),t(!0),requestAnimationFrame(()=>s(!0))};return window.addEventListener("summit-open-cookie-consent",y),()=>window.removeEventListener("summit-open-cookie-consent",y)},[]);const m=y=>{try{localStorage.setItem(QD,JSON.stringify({...y,date:new Date().toISOString()}))}catch{}b5(y),window.dispatchEvent(new CustomEvent(lm,{detail:y})),l(y.analytics),d(y.ads),s(!1),setTimeout(()=>{t(!1),a(!1)},250)};if(!e)return null;const x=u?{position:"fixed",bottom:0,left:0,right:0,zIndex:1200,padding:12}:{position:"fixed",bottom:24,left:24,zIndex:1200,width:360,maxWidth:"calc(100vw - 48px)"},w={flex:"1 1 0",minWidth:0,padding:"10px 14px",borderRadius:8,fontSize:14,fontWeight:600,cursor:"pointer",fontFamily:"inherit",lineHeight:1.2};return r.jsx("div",{style:x,children:r.jsxs("div",{style:{background:"#FFFFFF",border:`1px solid ${Mh}`,borderRadius:12,boxShadow:"0 12px 32px rgba(10, 37, 64, 0.14)",padding:20,opacity:n?1:0,transform:n?"translateY(0)":"translateY(8px)",transition:"opacity 260ms ease, transform 260ms ease"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8,color:Vw},children:[r.jsx(gV,{size:18,color:wd}),r.jsx("span",{style:{fontSize:15,fontWeight:700},children:"Cookies na Summit"})]}),r.jsx("p",{style:{fontSize:13,color:Oh,lineHeight:1.6,margin:"0 0 16px"},children:"Cookies nos mostram o que é útil pra você, o que funciona no site e o que precisamos melhorar — e nos ajudam a alcançar outros times de RH como o seu. Nada de dado sensível, ou comunicação invasiva."}),i?r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{borderTop:`1px solid ${Mh}`,marginBottom:4}}),r.jsx(Bb,{title:"Essenciais",desc:"login, sessão, segurança",fixed:!0}),r.jsx(Bb,{title:"Análise",desc:"páginas visitadas, origem do acesso",checked:o,onChange:l}),r.jsx(Bb,{title:"Publicidade",desc:"alcance da Summit em outros sites",checked:c,onChange:d}),r.jsx("button",{onClick:()=>m({analytics:o,ads:c}),style:{...w,width:"100%",marginTop:12,background:wd,color:"#FFFFFF",border:`1px solid ${wd}`},children:"Salvar preferências"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",flexDirection:u?"column":"row",gap:8},children:[r.jsx("button",{onClick:()=>m({analytics:!0,ads:!0}),style:{...w,background:wd,color:"#FFFFFF",border:`1px solid ${wd}`},children:"Aceitar todos"}),r.jsx("button",{onClick:()=>m({analytics:!1,ads:!1}),style:{...w,background:"#FFFFFF",color:Vw,border:`1px solid ${Mh}`},children:"Apenas essenciais"})]}),r.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:14,marginTop:12},children:[r.jsx("button",{onClick:()=>a(!0),style:{background:"none",border:"none",padding:0,cursor:"pointer",fontSize:12,color:Oh,fontFamily:"inherit",textDecoration:"underline"},children:"Personalizar"}),r.jsx(ut,{to:"/legal",style:{fontSize:12,color:Oh,textDecoration:"underline"},children:"Política de cookies"})]})]})]})})}function Bb({title:e,desc:t,checked:n,onChange:s,fixed:i}){return r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"10px 0",borderBottom:`1px solid ${Mh}`},children:[r.jsxs("div",{style:{minWidth:0},children:[r.jsx("div",{style:{fontSize:13,fontWeight:600,color:Vw},children:e}),r.jsx("div",{style:{fontSize:12,color:Oh,lineHeight:1.4},children:t})]}),i?r.jsx("span",{style:{fontSize:11,fontWeight:600,color:Oh,whiteSpace:"nowrap"},children:"Sempre ativo"}):r.jsx("button",{onClick:()=>s(!n),"aria-pressed":n,"aria-label":e,style:{width:40,height:22,borderRadius:999,flexShrink:0,cursor:"pointer",border:`1px solid ${n?wd:Mh}`,background:n?wd:"#F0F2F5",position:"relative",padding:0,transition:"background 160ms ease"},children:r.jsx("span",{style:{position:"absolute",top:2,left:n?20:2,width:16,height:16,borderRadius:"50%",background:"#FFFFFF",transition:"left 160ms ease",boxShadow:"0 1px 2px rgba(0,0,0,0.2)"}})})]})}
726const rZ={"/":{title:"Summit — Infraestrutura de Recrutamento para Empresas",description:"Plataforma completa de recrutamento: ATS, publicação de vagas, avaliações e banco de talentos. Comece grátis, sem cartão de crédito."},"/pricing":{title:"Preços e Planos | Summit",description:"Um preço para cada etapa do seu recrutamento. Planos flexíveis do grátis ao completo. Veja os valores da Summit e comece hoje."},"/ats":{title:"Software de Recrutamento (ATS) | Summit",description:"O ATS que recruta com você: comunicação ágil, agenda integrada, sourcing do LinkedIn e insights. Gestão de candidatos de ponta a ponta."},"/jobs":{title:"Publicar Vagas Grátis | Job Board da Summit",description:"Publique vagas ilimitadas no job board da Summit, grátis para sempre. Página de carreiras própria e multipostagem em vários canais."},"/talent":{title:"Banco de Talentos e Hunting | Summit Talent",description:"Candidatos qualificados prontos para suas vagas. Você publica, a Summit busca e qualifica, e os candidatos chegam no seu pipeline."},"/assessments":{title:"Testes de Perfil e Avaliação de Candidatos | Summit",description:"Pare de contratar errado. DISC, Big Five e perfis de personalidade aplicados ao trabalho para filtrar candidatos antes da entrevista."},"/como-funciona":{title:"Como Funciona | Summit — Recrutamento Integrado",description:"Recrutamento integrado do sourcing à contratação, numa plataforma só. Veja como a Summit conecta cada etapa do seu processo seletivo."},"/job-board":{title:"Vagas Abertas | Summit",description:"Confira as vagas abertas publicadas na Summit e candidate-se com perfil completo."}};function Yp(e,t,n){let s=document.head.querySelector(`meta[${e}="${t}"]`);s||(s=document.createElement("meta"),s.setAttribute(e,t),document.head.appendChild(s)),s.setAttribute("content",n)}const w5=typeof document<"u"?document.title:"";function sZ(){const{pathname:e}=Bs();return g.useEffect(()=>{const t=e.length>1?e.replace(/\/+$/,""):e,n=rZ[t];if(!n){document.title!==w5&&(document.title=w5);return}document.title=n.title,Yp("name","description",n.description),Yp("property","og:title",n.title),Yp("property","og:description",n.description),Yp("name","twitter:title",n.title),Yp("name","twitter:description",n.description)},[e]),null}const j5="hs-script-loader",iZ="https://js.hs-scripts.com/51959548.js",aZ=["hubspotutk","__hstc","__hssc","__hssrc"],oZ=["/","/ats","/assessments","/talent","/jobs","/pricing","/como-funciona","/job-board","/legal"],lZ=e=>{const t=e.length>1?e.replace(/\/+$/,""):e;return oZ.includes(t)};function cZ(){const e=window.location.hostname.split("."),t=[""];for(let n=0;n<e.length-1;n++)t.push("."+e.slice(n).join("."));aZ.forEach(n=>t.forEach(s=>{document.cookie=`${n}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/${s?`; domain=${s}`:""}`}))}function dZ(){const{pathname:e}=Bs(),[t,n]=g.useState(()=>{var i;return!!((i=zS())!=null&&i.analytics)}),s=g.useRef(null);return g.useEffect(()=>{const i=a=>{var l;const o=!!((l=a.detail)!=null&&l.analytics);o||(window._hsp=window._hsp||[],window._hsp.push(["revokeCookieConsent"]),(window._hsq=window._hsq||[]).push(["doNotTrack"]),cZ()),n(o)};return window.addEventListener(lm,i),()=>window.removeEventListener(lm,i)},[]),g.useEffect(()=>{const i=window._hsq=window._hsq||[],a=!!document.getElementById(j5);if(t&&lZ(e)){if(i.push(["doNotTrack",{track:!0}]),a&&s.current!==e&&(i.push(["setPath",e]),i.push(["trackPageView"])),s.current=e,!a){const o=document.createElement("script");o.id=j5,o.type="text/javascript",o.async=!0,o.defer=!0,o.src=iZ,document.head.appendChild(o)}}else a&&(s.current=null,i.push(["doNotTrack"]))},[e,t]),null}function uZ(){const{pathname:e}=Bs(),[t,n]=g.useState(()=>!zS()),[s,i]=g.useState(typeof window<"u"&&window.innerWidth<640);return g.useEffect(()=>{const a=()=>i(window.innerWidth<640),o=()=>n(!0),l=()=>n(!1);return window.addEventListener("resize",a),window.addEventListener("summit-open-cookie-consent",o),window.addEventListener(lm,l),()=>{window.removeEventListener("resize",a),window.removeEventListener("summit-open-cookie-consent",o),window.removeEventListener(lm,l)}},[]),e.startsWith("/app")||e.startsWith("/meu-perfil")||s&&t?null:r.jsx("a",{href:"https://wa.me/551151968733",target:"_blank",rel:"noopener noreferrer","aria-label":"Falar com a Summit no WhatsApp",className:"fixed bottom-6 right-6 z-40 flex h-14 w-14 items-center justify-center rounded-full bg-[#25D366] shadow-lg transition-transform duration-150 hover:scale-110",children:r.jsx("svg",{viewBox:"0 0 24 24",width:"28",height:"28",fill:"#FFFFFF","aria-hidden":"true",children:r.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-.
726198 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.001-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"})})})}const fZ="https://i.imgur.com/MVgsUJ5.png",pZ="https://i.imgur.com/ajgFWwT.png",hZ=[{icon:On,color:"#0EA5E9",name:"Summit Jobs",desc:"Publique vagas grátis e ilimitadas",href:"/jobs",badge:null},{icon:ts,color:"#6C24F5",name:"Summit Assessments",desc:"Avaliações comportamentais e cognitivas",href:"/assessments",badge:null},{icon:Nr,color:"#F5A623",name:"Summit ATS",desc:"Pipeline inteligente de recrutamento",href:"/ats",badge:null},{icon:vl,color:"#10B981",name:"Summit Talent",desc:"Banco de talentos com IA",href:"#",badge:"Em breve"}];function mZ({scrolled:e=!1}){const[t,n]=g.useState(!1),s=g.useRef(null),i=()=>{s.current&&clearTimeout(s.current),n(!0)},a=()=>{s.current=setTimeout(()=>n(!1),150)},o=!e,l=o?"#ffffff":"#0A2540",c=o?"transparent":"#ffffff",d=o?"transparent":"#E3E8EF";return r.jsx("nav",{style:{position:"fixed",top:0,left:0,right:0,zIndex:100,background:c,borderBottom:`1px solid ${d}`,transition:"background 0.3s, border-color 0.3s"},children:r.jsxs("div",{style:{maxWidth:1160,margin:"0 auto",padding:"0 24px",height:64,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[r.jsx(ut,{to:"/",children:r.jsx("img",{src:e?fZ:pZ,alt:"Summit",style:{height:36,display:"block"}})}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[r.jsx(ut,{to:"/job-board",style:{padding:"8px 12px",fontSize:14,fontWeight:500,color:l,textDecoration:"none",borderRadius:6},children:"Vagas"}),r.jsxs("div",{onMouseEnter:i,onMouseLeave:a,style:{position:"relative"},children:[r.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"8px 12px",fontSize:14,fontWeight:500,color:l,background:"none",border:"none",cursor:"pointer",borderRadius:6},children:["Produtos",r.jsx(ar,{style:{width:14,height:14,transition:"transform 0.2s",transform:t?"rotate(180deg)":"rotate(0deg)"}})]}),t&&r.jsx("div",{style:{position:"absolute",top:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)",background:"#ffffff",border:"1px solid #E3E8EF",borderRadius:12,boxShadow:"0 8px 32px rgba(0,0,0,0.10)",padding:8,width:280,zIndex:200},children:hZ.map(u=>{const p=u.icon;return r.jsxs(ut,{to:u.href,style:{display:"flex",alignItems:"flex-start",gap:12,padding:"10px 12px",borderRadius:8,textDecoration:"none",color:"inherit",transition:"background 0.15s"},onMouseEnter:m=>m.currentTarget.style.background="#F6F9FC",onMouseLeave:m=>m.currentTarget.style.background="transparent",children:[r.jsx("div",{style:{width:32,height:32,borderRadius:8,background:u.color+"15",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(p,{style:{width:15,height:15,color:u.color}})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{fontSize:13,fontWeight:600,color:"#0A2540"},children:u.name}),u.badge&&r.jsx("span",{style:{fontSize:10,fontWeight:700,color:"#64748B",background:"#F1F5F9",padding:"1px 6px",borderRadius:20},children:u.badge})]}),r.jsx("p",{style:{fontSize:12,color:"#64748B",margin:0,marginTop:1},children:u.desc})]})]},u.name)})})]}),r.jsx(ut,{to:"/como-funciona",style:{padding:"8px 12px",fontSize:14,fontWeight:500,color:l,textDecoration:"none",borderRadius:6},children:"Como Funciona"}),r.jsx(ut,{to:"/pricing",style:{padding:"8px 12px",fontSize:14,fontWeight:500,color:l,textDecoration:"none",borderRadius:6},children:"Planos"}),r.jsx(ut,{to:"/app",style:{padding:"8px 12px",fontSize:14,fontWeight:500,color:l,textDecoration:"none",borderRadius:6},children:"Entrar"}),r.jsx(ut,{to:"/signup",style:{marginLeft:8,padding:"9px 18px",fontSize:14,fontWeight:600,color:"#ffffff",background:"#6C24F5",borderRadius:8,textDecoration:"none"},children:"Começar grátis"})]})]})})}const gZ="https://i.imgur.com/ajgFWwT.png";function xZ(){return r.jsx("footer",{style:{background:"#0A2540",color:"#ffffff"},children:r.jsxs("div",{style:{maxWidth:1160,margin:"0 auto",padding:"56px 24px 32px"},children:[r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr 1fr",gap:40,marginBottom:48},children:[r.jsxs("div",{children:[r.jsx("img",{src:gZ,alt:"Summit",style:{height:36,marginBottom:16,display:"block"}}),r.jsxs("p",{style:{fontSize:14,color:"#94A3B8",lineHeight:1.6,margin:0},children:["Tudo que sua equipe de recrutamento precisa.",r.jsx("br",{}),"Num só lugar."]})]}),r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:12,fontWeight:700,letterSpacing:"0.08em",color:"#64748B",textTransform:"uppercase",marginBottom:16},children:"Produtos"}),r.jsxs("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:[r.jsx("li",{children:r.jsx(ut,{to:"/jobs",style:{fontSize:14,color:"#CBD5E1",textDecoration:"none"},children:"Summit Jobs"})}),r.jsx("li",{children:r.jsx(ut,{to:"/assessments",style:{fontSize:14,color:"#CBD5E1",textDecoration:"none"},children:"Summit Assessments"})}),r.jsx("li",{children:r.jsx(ut,{to:"/ats",style:{fontSize:14,color:"#CBD5E1",textDecoration:"none"},children:"Summit ATS"})}),r.jsx("li",{children:r.jsxs("span",{style:{fontSize:14,color:"#64748B"}
726,children:["Summit Talent ",r.jsx("span",{style:{fontSize:10,color:"#64748B",background:"#1E3A5F",padding:"1px 6px",borderRadius:20,marginLeft:4},children:"Em breve"})]})})]})]}),r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:12,fontWeight:700,letterSpacing:"0.08em",color:"#64748B",textTransform:"uppercase",marginBottom:16},children:"Plataforma"}),r.jsxs("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:[r.jsx("li",{children:r.jsx(ut,{to:"/como-funciona",style:{fontSize:14,color:"#CBD5E1",textDecoration:"none"},children:"Como Funciona"})}),r.jsx("li",{children:r.jsx(ut,{to:"/pricing",style:{fontSize:14,color:"#CBD5E1",textDecoration:"none"},children:"Planos e Preços"})}),r.jsx("li",{children:r.jsx(ut,{to:"/signup",style:{fontSize:14,color:"#CBD5E1",textDecoration:"none"},children:"Criar conta grátis"})})]})]}),r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:12,fontWeight:700,letterSpacing:"0.08em",color:"#64748B",textTransform:"uppercase",marginBottom:16},children:"Suporte"}),r.jsxs("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:[r.jsx("li",{children:r.jsx(ut,{to:"/app/suporte",style:{fontSize:14,color:"#CBD5E1",textDecoration:"none"},children:"Central de ajuda"})}),r.jsx("li",{children:r.jsx("a",{href:"mailto:[email protected]",style:{fontSize:14,color:"#CBD5E1",textDecoration:"none"},children:"Contato"})})]})]})]}),r.jsxs("div",{style:{borderTop:"1px solid #1E3A5F",paddingTop:24,display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:12},children:[r.jsx("p",{style:{fontSize:13,color:"#475569",margin:0},children:"© 2026 Summit Inc. Todos os direitos reservados."}),r.jsxs("div",{style:{display:"flex",gap:20},children:[r.jsx(ut,{to:"/legal",style:{fontSize:13,color:"#475569",textDecoration:"none"},children:"Privacidade"}),r.jsx(ut,{to:"/legal",style:{fontSize:13,color:"#475569",textDecoration:"none"},children:"Termos"}),r.jsx("button",{onClick:()=>window.dispatchEvent(new Event("summit-open-cookie-consent")),style:{fontSize:13,color:"#475569",background:"none",border:"none",padding:0,cursor:"pointer",fontFamily:"inherit"},children:"Cookies"})]})]})]})})}function yZ(){const[e,t]=g.useState(!1);return g.useEffect(()=>{const n=()=>t(window.scrollY>20);return window.addEventListener("scroll",n,{passive:!0}),()=>window.removeEventListener("scroll",n)},[]),r.jsxs("div",{children:[r.jsx(mZ,{scrolled:e}),r.jsx(Gy,{}),r.jsx(xZ,{})]})}const WS=g.createContext({});function $S(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Zy=g.createContext(null),US=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class vZ extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function bZ({children:e,isPresent:t}){const n=g.useId(),s=g.useRef(null),i=g.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=g.useContext(US);return g.useInsertionEffect(()=>{const{width:o,height:l,top:c,left:d}=i.current;if(t||!s.current||!o||!l)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return a&&(u.nonce=a),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
727          [data-motion-pop-id="${n}"] {
728            position: absolute !important;
729            width: ${o}px !important;
730            height: ${l}px !important;
731            top: ${c}px !important;
732            left: ${d}px !important;
733          }
734        `),()=>{document.head.removeChild(u)}},[t]),r.jsx(vZ,{isPresent:t,childRef:s,sizeRef:i,children:g.cloneElement(e,{ref:s})})}const wZ=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:a,mode:o})=>{const l=$S(jZ),c=g.useId(),d=g.useCallback(p=>{l.set(p,!0);for(const m of l.values())if(!m)return;s&&s()},[l,s]),u=g.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:d,register:p=>(l.set(p,!1),()=>l.delete(p))}),a?[Math.random(),d]:[n,d]);return g.useMemo(()=>{l.forEach((p,m)=>l.set(m,!1))},[n]),g.useEffect(()=>{!n&&!l.size&&s&&s()},[n]),o==="popLayout"&&(e=r.jsx(bZ,{isPresent:n,children:e})),r.jsx(Zy.Provider,{value:u,children:e})};function jZ(){return new Map}function ZD(e=!0){const t=g.useContext(Zy);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,a=g.useId();g.useEffect(()=>{e&&i(a)},[e]);const o=g.useCallback(()=>e&&s&&s(a),[a,s,e]);return!n&&s?[!1,o]:[!0]}const wg=e=>e.key||"";function S5(e){const t=[];
vendor: 6,831 bytes, line 734
734return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const VS=typeof window<"u",eI=VS?g.useLayoutEffect:g.useEffect,SZ=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1})=>{const[l,c]=ZD(o),d=g.useMemo(()=>S5(e),[e]),u=o&&!l?[]:d.map(wg),p=g.useRef(!0),m=g.useRef(d),x=$S(()=>new Map),[w,y]=g.useState(d),[v,j]=g.useState(d);eI(()=>{p.current=!1,m.current=d;for(let _=0;_<v.length;_++){const F=wg(v[_]);u.includes(F)?x.delete(F):x.get(F)!==!0&&x.set(F,!1)}},[v,u.length,u.join("-")]);const k=[];if(d!==w){let _=[...d];for(let F=0;F<v.length;F++){const A=v[F],C=wg(A);u.includes(C)||(_.splice(F,0,A),k.push(A))}a==="wait"&&k.length&&(_=k),j(S5(_)),y(d);return}const{forceRender:S}=g.useContext(WS);return r.jsx(r.Fragment,{children:v.map(_=>{const F=wg(_),A=o&&!l?!1:d===v||u.includes(F),C=()=>{if(x.has(F))x.set(F,!0);else return;let D=!0;x.forEach(P=>{P||(D=!1)}),D&&(S==null||S(),j(m.current),o&&(c==null||c()),s&&s())};return r.jsx(wZ,{isPresent:A,initial:!p.current||n?void 0:!1,custom:A?void 0:t,presenceAffectsLayout:i,mode:a,onExitComplete:A?void 0:C,children:_},F)})})},Ii=e=>e;let tI=Ii;function HS(e){let t;return()=>(t===void 0&&(t=e()),t)}const Of=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s},ul=e=>e*1e3,fl=e=>e/1e3,kZ={useManualTiming:!1};function _Z(e){let t=new Set,n=new Set,s=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(d){a.has(d)&&(c.schedule(d),e()),d(o)}const c={schedule:(d,u=!1,p=!1)=>{const x=p&&s?t:n;return u&&a.add(d),x.has(d)||x.add(d),d},cancel:d=>{n.delete(d),a.delete(d)},process:d=>{if(o=d,s){i=!0;return}s=!0,[t,n]=[n,t],t.forEach(l),t.clear(),s=!1,i&&(i=!1,c.process(d))}};return c}const jg=["read","resolveKeyframes","update","preRender","render","postRender"],CZ=40;function nI(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=jg.reduce((j,k)=>(j[k]=_Z(a),j),{}),{read:l,resolveKeyframes:c,update:d,preRender:u,render:p,postRender:m}=o,x=()=>{const j=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(j-i.timestamp,CZ),1),i.timestamp=j,i.isProcessing=!0,l.process(i),c.process(i),d.process(i),u.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(x))},w=()=>{n=!0,s=!0,i.isProcessing||e(x)};return{schedule:jg.reduce((j,k)=>{const S=o[k];return j[k]=(_,F=!1,A=!1)=>(n||w(),S.schedule(_,F,A)),j},{}),cancel:j=>{for(let k=0;k<jg.length;k++)o[jg[k]].cancel(j)},state:i,steps:o}}const{schedule:er,cancel:kc,state:ls,steps:Ob}=nI(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ii,!0),rI=g.createContext({strict:!1}),k5={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Mf={};for(const e in k5)Mf[e]={isEnabled:t=>k5[e].some(n=>!!t[n])};function EZ(e){for(const t in e)Mf[t]={...Mf[t],...e[t]}}const FZ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Xx(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||FZ.has(e)}let sI=e=>!Xx(e);function AZ(e){e&&(sI=t=>t.startsWith("on")?!Xx(t):e(t))}try{AZ(require("@emotion/is-prop-valid").default)}catch{}function TZ(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(sI(i)||n===!0&&Xx(i)||!t&&!Xx(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}function NZ(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...s)=>e(...s);return new Proxy(n,{get:(s,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const e1=g.createContext({});function cm(e){return typeof e=="string"||Array.isArray(e)}function t1(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const qS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],GS=["initial",...qS];function n1(e){return t1(e.animate)||GS.some(t=>cm(e[t]))}function iI(e){return!!(n1(e)||e.variants)}function RZ(e,t){if(n1(e)){const{initial:n,animate:s}=e;return{initial:n===!1||cm(n)?n:void 0,animate:cm(s)?s:void 0}}return e.inherit!==!1?t:{}}function DZ(e){const{initial:t,animate:n}=RZ(e,g.useContext(e1));return g.useMemo(()=>({initial:t,animate:n}),[_5(t),_5(n)])}function _5(e){return Array.isArray(e)?e.join(" "):e}const IZ=Symbol.for("motionComponentSymbol");function nf(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function PZ(e,t,n){return g.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):nf(n)&&(n.current=s))},[t])}const KS=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),BZ="framerAppearId",aI="data-"+KS(BZ),{schedule:YS}=nI(queueMicrotask,!1),oI=g.createContext({});function OZ(e,t,n,s,i){var a,o;const{visualElement:l}=g.useContext(e1),c=g.useContext(rI),d=g.useContext(Zy),u=g.useContext(US).reducedMotion,p=g.useRef(null);s=s||c.renderer,!p.current&&s&&(p.current=s(e,{visualState:t,parent:l,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:u}));const m=p.current,x=g.useContext(oI);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&MZ(p.current,n,i,x);const w=g.useRef(!1);g.useInsertionEffect(()=>{m&&w.current&&m.update(n,d)});const y=n[aI],v=g.useRef(!!y&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,y))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,y)));return eI(()=>{m&&(w.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),YS.render(m.render),v.current&&m.animationState&&m.animationState.animateChanges())}),g.useEffect(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)===null||j===void 0||j.call(window,y)}),v.current=!1))}),m}function MZ(e,t,n,s){const{layoutId:i,layout:a,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:lI(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||l&&nf(l),visualElement:e,animationType:typeof a=="str
734ing"?a:"both",initialPromotionConfig:s,layoutScroll:c,layoutRoot:d})}function lI(e){if(e)return e.options.allowProjection!==!1?e.projection:lI(e.parent)}function LZ({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:i}){var a,o;e&&EZ(e);function l(d,u){let p;const m={...g.useContext(US),...d,layoutId:zZ(d)},{isStatic:x}=m,w=DZ(d),y=s(d,x);if(!x&&VS){WZ();const v=$Z(m);p=v.MeasureLayout,w.visualElement=OZ(i,y,m,t,v.ProjectionNode)}return r.jsxs(e1.Provider,{value:w,children:[p&&w.visualElement?r.jsx(p,{visualElement:w.visualElement,...m}):null,n(i,d,PZ(y,w.visualElement,u),y,x,w.visualElement)]})}l.displayName=`motion.${typeof i=="string"?i:`create(${(o=(a=i.displayName)!==null&&a!==void 0?a:i.name)!==null&&o!==void 0?o:""})`}`;const c=g.forwardRef(l);return c[IZ]=i,c}function zZ({layoutId:e}){const t=g.useContext(WS).id;return t&&e!==void 0?t+"-"+e:e}function WZ(e,t){g.useContext(rI).strict}function $Z(e){const{drag:t,layout:n}=Mf;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const UZ=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function XS(e){return typeof e!="string"||e.includes("-")?!1:!!(UZ.indexOf(e)>-1||/[A-Z]/u.test(e))}function C5(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function JS(e,t,n,s){if(typeof t=="function"){const[i,a]=C5(s);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=C5(s);t=t(n!==void 0?n:e.custom,i,a)}return t}const Hw=e=>Array.isArray(e),VZ=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),HZ=e=>Hw(e)?e[e.length-1]||0:e,Ts=e=>!!(e&&e.getVelocity);function Ax(e){const t=Ts(e)?e.get():e;return VZ(t)?t.toValue():t}function qZ({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},s,i,a){const o={latestValues:GZ(s,i,a,e),renderState:t()};return n&&(o.onMount=l=>n({props:s,current:l,...o}),o.onUpdate=l=>n(l)),o}const cI=e=>(t,n)=>{const s=g.useContext(e1),i=g.useContext(Zy),a=()=>qZ(e,t,s,i);return n?a():$S(a)};function GZ(e,t,n,s){const i={},a=s(e,{});for(const m in a)i[m]=Ax(a[m]);let{initial:o,animate:l}=e;const c=n1(e),d=iI(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const p=u?l:o;if(p&&typeof p!="boolean"&&!t1(p)){const m=Array.isArray(p)?p:[p];for(let x=0;x<m.length;x++){const w=JS(e,m[x]);if(w){const{transitionEnd:y,transition:v,...j}=w;for(const k in j){let S=j[k];if(Array.isArray(S)){const _=u?S.length-1:0;S=S[_]}S!==null&&(i[k]=S)}for(const k in y)i[k]=y[k]}}}return i}const Zf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],eu=new Set(Zf),dI=e=>t=>typeof t=="string"&&t.startsWith(e),uI=dI("--"),KZ=dI("var(--"),QS=e=>KZ(e)?YZ.test(e.split("/*")[0].trim()):!1,YZ=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,fI=(e,t)=>t&&typeof e=="number"?t.transform(e):e,bl=(e,t,n)=>n>t?t:n<e?e:n,ep={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},dm={...ep,transform:e=>bl(0,1,e)},Sg={...ep,default:1},Km=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zl=Km("deg"),jo=Km("%"),Xt=Km("px"),XZ=Km("vh"),JZ=Km("vw"),E5={...jo,parse:e=>jo.parse(e)/100,transform:e=>jo.transform(e*100)},QZ={borderWidth:Xt,borderTopWidth:Xt,borderRightWidth:Xt,borderBottomWidth:Xt,borderLeftWidth:Xt,borderRadius:Xt,radius:Xt,borderTopLeftRadius:Xt,borderTopRightRadius:Xt,borderBottomRightRadius:Xt,borderBottomLeftRadius:Xt,width:Xt,maxWidth:Xt,height:Xt,maxHeight:Xt,top:Xt,right:Xt,bottom:Xt,left:Xt,padding:Xt,paddingTop:Xt,paddingRight:Xt,paddingBottom:Xt,paddingLeft:Xt,margin:Xt,marginTop:Xt,marginRight:Xt,marginBottom:Xt,marginLeft:Xt,backgroundPositionX:Xt,backgroundPositionY:Xt},ZZ={rotate:Zl,rotateX:Zl,rotateY:Zl,rotateZ:Zl,scale:Sg,scaleX:Sg,scaleY:Sg,scaleZ:Sg,skew:Zl,skewX:Zl,skewY:Zl,distance:Xt,translateX:Xt,translateY:Xt,translateZ:Xt,x:Xt,y:Xt,z:Xt,perspective:Xt,transformPerspective:Xt,opacity:dm,originX:E5,originY:E5,originZ:Xt},F5={...ep,transform:Math.round},ZS={...QZ,...ZZ,zIndex:F5,size:Xt,fillOpacity:dm,strokeOpacity:dm,numOctaves:F5},eee={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tee=Zf.length;function nee(e,t,n){let s="",i=!0;for(let a=0;a<tee;a++){const o=Zf[a],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const d=fI(l,ZS[o]);if(!c){i=!1;const u=eee[o]||o;s+=`${u}(${d}) `}n&&(t[o]=d)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function ek(e,t,n){const{style:s,vars:i,transformOrigin:a}=e;let o=!1,l=!1;for(const c in t){const d=t[c];if(eu.has(c)){o=!0;continue}else if(uI(c)){i[c]=d;continue}else{const u=fI(d,ZS[c]);c.startsWith("origin")?(l=!0,a[c]=u):s[c]=u}}if(t.transform||(o||n?s.transform=nee(t,e.transform,n):s.transform&&(s.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:u=0}=a;s.transformOrigin=`${c} ${d} ${u}`}}const ree={offset:"stroke-dashoffset",array:"stroke-dasharray"},see={offset:"strokeDashoffset",array:"strokeDasharray"};function iee(e,t,n=1,s=0,i=!0){e.pathLength=1;const a=i?ree:see;e[a.offset]=Xt.transform(-s);const o=Xt.transform(t),l=Xt.transform(n);e[a.array]=`${o} ${l}`}function A5(e,t,n){return typeof e=="string"?e:Xt.transform(t+n*e)}function aee(e,t,n){const s=A5(t,e.x,e.width),i=A5(n,e.y,e.height);return`${s} ${i}`}function tk(e,{attrX:t,attrY:n,attrScale:s,originX:i,originY:a,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...d}
vendor: 17,562 bytes, line 734
734,u,p){if(ek(e,d,p),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:x,dimensions:w}=e;m.transform&&(w&&(x.transform=m.transform),delete m.transform),w&&(i!==void 0||a!==void 0||x.transform)&&(x.transformOrigin=aee(w,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(m.x=t),n!==void 0&&(m.y=n),s!==void 0&&(m.scale=s),o!==void 0&&iee(m,o,l,c,!1)}const nk=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),pI=()=>({...nk(),attrs:{}}),rk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hI(e,{style:t,vars:n},s,i){Object.assign(e.style,t,i&&i.getProjectionStyles(s));for(const a in n)e.style.setProperty(a,n[a])}const mI=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function gI(e,t,n,s){hI(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(mI.has(i)?i:KS(i),t.attrs[i])}const Jx={};function oee(e){Object.assign(Jx,e)}function xI(e,{layout:t,layoutId:n}){return eu.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Jx[e]||e==="opacity")}function sk(e,t,n){var s;const{style:i}=e,a={};for(const o in i)(Ts(i[o])||t.style&&Ts(t.style[o])||xI(o,e)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(a[o]=i[o]);return a}function yI(e,t,n){const s=sk(e,t,n);for(const i in e)if(Ts(e[i])||Ts(t[i])){const a=Zf.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[a]=e[i]}return s}function lee(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const T5=["x","y","width","height","cx","cy","r"],cee={useVisualState:cI({scrapeMotionValuesFromProps:yI,createRenderState:pI,onUpdate:({props:e,prevProps:t,current:n,renderState:s,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(const l in i)if(eu.has(l)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let l=0;l<T5.length;l++){const c=T5[l];e[c]!==t[c]&&(o=!0)}o&&er.read(()=>{lee(n,s),er.render(()=>{tk(s,i,rk(n.tagName),e.transformTemplate),gI(n,s)})})}})},dee={useVisualState:cI({scrapeMotionValuesFromProps:sk,createRenderState:nk})};function vI(e,t,n){for(const s in t)!Ts(t[s])&&!xI(s,n)&&(e[s]=t[s])}function uee({transformTemplate:e},t){return g.useMemo(()=>{const n=nk();return ek(n,t,e),Object.assign({},n.vars,n.style)},[t])}function fee(e,t){const n=e.style||{},s={};return vI(s,n,e),Object.assign(s,uee(e,t)),s}function pee(e,t){const n={},s=fee(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}function hee(e,t,n,s){const i=g.useMemo(()=>{const a=pI();return tk(a,t,rk(s),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};vI(a,e.style,e),i.style={...a,...i.style}}return i}function mee(e=!1){return(n,s,i,{latestValues:a},o)=>{const c=(XS(n)?hee:pee)(s,a,o,n),d=TZ(s,typeof n=="string",e),u=n!==g.Fragment?{...d,...c,ref:i}:{},{children:p}=s,m=g.useMemo(()=>Ts(p)?p.get():p,[p]);return g.createElement(n,{...u,children:m})}}function gee(e,t){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...XS(s)?cee:dee,preloadedFeatures:e,useRender:mee(i),createVisualElement:t,Component:s};return LZ(o)}}function bI(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}function r1(e,t,n){const s=e.getProps();return JS(s,t,n!==void 0?n:s.custom,e)}const xee=HS(()=>window.ScrollTimeline!==void 0);class yee{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=n}attachTimeline(t,n){const s=this.animations.map(i=>{if(xee()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{s.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class vee extends yee{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function ik(e,t){return e?e[t]||e.default||e:void 0}const qw=2e4;function wI(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<qw;)t+=n,s=e.next(t);return t>=qw?1/0:t}function ak(e){return typeof e=="function"}function N5(e,t){e.timeline=t,e.onfinish=null}const ok=e=>Array.isArray(e)&&typeof e[0]=="number",bee={linearEasing:void 0};function wee(e,t){const n=HS(e);return()=>{var s;return(s=bee[t])!==null&&s!==void 0?s:n()}}const Qx=wee(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jI=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)s+=e(Of(0,i-1,a))+", ";return`linear(${s.substring(0,s.length-2)})`};function SI(e){return!!(typeof e=="function"&&Qx()||!e||typeof e=="string"&&(e in Gw||Qx())||ok(e)||Array.isArray(e)&&e.every(SI))}const Ch=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Gw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ch([0,.65,.55,1]),circOut:Ch([.55,0,1,.45]),backIn:Ch([.31,.01,.66,-.59]),backOut:Ch([.33,1.53,.69,.99])};function kI(e,t){if(e)return typeof e=="function"&&Qx()?jI(e,t):ok(e)?Ch(e):Array.isArray(e)?e.map(n=>kI(n,t)||Gw.easeOut):Gw[e]}const Fa={x:!1,y:!1};function _I(){return Fa.x||Fa.y}function jee(e,t,n){var s;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const a=(s=void 0)!==null&&s!==void 0?s:i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function CI(e,t){const n=jee(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function R5(e){return t=>{t.pointerType==="touch"||_I()||e(t)}}function See(e,t,n={}){const[s,i,a]=CI(e,n),o=R5(l=>{const{target:c}=l,d=t(l);if(typeof d!="function"||!c)return;const u=R5(p=>{d(p),c.removeEventListener("pointerleave",u)});c.addEventListener("pointerleave",u,i)});return s.forEach(l=>{l.addEventListener("pointerenter",o,i)}),a}const EI=(e,t)=>t?e===t?!0:EI(e,t.parentElement):!1,lk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,kee=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _ee(e){return kee.has(e.tagName)||e.tabIndex!==-1}const Eh=new WeakSet;function D5(e){return t=>{t.key==="Enter"&&e(t)}}function Mb(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Cee=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=D5(()=>{if(Eh.has(n))return;Mb(n,"down");const i=D5(()=>{Mb(n,"up")}),a=()=>Mb(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function I5(e){return lk(e)&&!_I()}function Eee(e,t,n={}){const[s,i,a]=CI(e,n),o=l=>{const c=l.currentTarget;if(!I5(l)||Eh.has(c))return;Eh.add(c);const d=t(l),u=(x,w)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",m),!(!I5(x)||!Eh.has(c))&&(Eh.delete(c),typeof d=="function"&&d(x,{success:w}))},p=x=>{u(x,n.useGlobalTarget||EI(c,x.target))},m=x=>{u(x,!1)};window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",m,i)};return s.forEach(l=>{!_ee(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),l.addEventListener("focus",d=>Cee(d,i),i)}),a}function Fee(e){return e==="x"||e==="y"?Fa[e]?null:(Fa[e]=!0,()=>{Fa[e]=!1}):Fa.x||Fa.y?null:(Fa.x=Fa.y=!0,()=>{Fa.x=Fa.y=!1})}const FI=new Set(["width","height","top","left","right","bottom",...Zf]);let Tx;function Aee(){Tx=void 0}const So={now:()=>(Tx===void 0&&So.set(ls.isProcessing||kZ.useManualTiming?ls.timestamp:performance.now()),Tx),set:e=>{Tx=e,queueMicrotask(Aee)}};function ck(e,t){e.indexOf(t)===-1&&e.push(t)}function dk(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class uk{constructor(){this.subscriptions=[]}add(t){return ck(this.subscriptions,t),()=>dk(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function AI(e,t){return t?e*(1e3/t):0}const P5=30,Tee=e=>!isNaN(parseFloat(e));class Nee{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const a=So.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=So.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Tee(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new uk);const s=this.events[t].add(n);return t==="change"?()=>{s(),er.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=So.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>P5)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,P5);return AI(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function um(e,t){return new Nee(e,t)}function Ree(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,um(n))}function Dee(e,t){const n=r1(e,t);let{transitionEnd:s={},transition:i={},...a}=n||{};a={...a,...s};for(const o in a){const l=HZ(a[o]);Ree(e,o,l)}}function Iee(e){return!!(Ts(e)&&e.add)}function Kw(e,t){const n=e.getValue("willChange");if(Iee(n))return n.add(t)}function TI(e){return e.props[aI]}const NI=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Pee=1e-7,Bee=12;function Oee(e,t,n,s,i){let a,o,l=0;do o=t+(n-t)/2,a=NI(o,s,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Pee&&++l<Bee);return o}function Ym(e,t,n,s){if(e===t&&n===s)return Ii;const i=a=>Oee(a,0,1,e,n);return a=>a===0||a===1?a:NI(i(a),t,s)}const RI=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,DI=e=>t=>1-e(1-t),II=Ym(.33,1.53,.69,.99),fk=DI(II),PI=RI(fk),BI=e=>(e*=2)<1?.5*fk(e):.5*(2-Math.pow(2,-10*(e-1))),pk=e=>1-Math.sin(Math.acos(e)),OI=DI(pk),MI=RI(pk),LI=e=>/^0[^.\s]+$/u.test(e);function Mee(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||LI(e):!0}const Lh=e=>Math.round(e*1e5)/1e5,hk=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lee(e){return e==null}const zee=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mk=(e,t)=>n=>!!(typeof n=="string"&&zee.test(n)&&n.startsWith(e)||t&&!Lee(n)&&Object.prototype.hasOwnProperty.call(n,t)),zI=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,a,o,l]=s.match(hk);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},Wee=e=>bl(0,255,e),Lb={...ep,transform:e=>Math.round(Wee(e))},kd={test:mk("rgb","red"),parse:zI("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Lb.transform(e)+", "+Lb.transform(t)+", "+Lb.transform(n)+", "+Lh(dm.transform(s))+")"};function $ee(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Yw={test:mk("#"),parse:$ee,transform:kd.transform},rf={test:mk("hsl","hue"),parse:zI("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+jo.transform(Lh(t))+", "+jo.transform(Lh(n))+", "+Lh(dm.transform(s))+")"},Es={test:e=>kd.test(e)||Yw.test(e)||rf.test(e),parse:e=>kd.test(e)?kd.parse(e):rf.test(e)?rf.parse(e):Yw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?kd.transform(e):rf.transform(e)},Uee=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vee(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(hk))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Uee))===null||n===void 0?void 0:n.length)||0)>0}const WI="number",$I="color",Hee="var",qee="var(",B5="${}",Gee=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fm(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(Gee,c=>(Es.test(c)?(s.color.push(a),i.push($I),n.push(Es.parse(c))):c.startsWith(qee)?(s.var.push(a),i.push(Hee),n.push(c)):(s.number.push(a),i.push(WI),n.push(parseFloat(c))),++a,B5)).split(B5);return{values:n,split:l,indexes:s,types:i}}function UI(e){return fm(e).values}function VI(e){const{split:t,types:n}=fm(e),s=t.length;return i=>{let a="";for(let o=0;o<s;o++)if(a+=t[o],i[o]!==void 0){const l=n[o];l===WI?a+=Lh(i[o]):l===$I?a+=Es.transform(i[o]):a+=i[o]}return a}}const Kee=e=>typeof e=="number"?0:e;function Yee(e){const t=UI(e);return VI(e)(t.map(Kee))}const _c={test:Vee,parse:UI,createTransformer:VI,getAnimatableNone:Yee},Xee=new Set(["brightness","contrast","saturate","opacity"]);function Jee(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(hk)||[];if(!s)return e;const i=n.replace(s,"");let a=Xee.has(t)?1:0;return s!==n&&(a*=100),t+"("+a+i+")"}const Qee=/\b([a-z-]*)\(.*?\)/gu,Xw={..._c,getAnimatableNone:e=>{const t=e.match(Qee);return t?t.map(Jee).join(" "):e}},Zee={...ZS,color:Es,backgroundColor:Es,outlineColor:Es,fill:Es,stroke:Es,borderColor:Es,borderTopColor:Es,borderRightColor:Es,borderBottomColor:Es,borderLeftColor:Es,filter:Xw,WebkitFilter:Xw},gk=e=>Zee[e];function HI(e,t){let n=gk(e);return n!==Xw&&(n=_c),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ete=new Set(["auto","none","0"]);function tte(e,t,n){let s=0,i;for(;s<e.length&&!i;){const a=e[s];typeof a=="string"&&!ete.has(a)&&fm(a).values.length&&(i=e[s]),s++}if(i&&n)for(const a of t)e[a]=HI(n,i)}const O5=e=>e===ep||e===Xt,M5=(e,t)=>parseFloat(e.split(", ")[t]),L5=(e,t)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return M5(i[1],t);{const a=s.match(/^matrix\((.+)\)$/u);return a?M5(a[1],e):0}},nte=new Set(["x","y","z"]),rte=Zf.filter(e=>!nte.has(e));function ste(e){const t=[];return rte.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Lf={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:L5(4,13),y:L5(5,14)};Lf.translateX=Lf.x;Lf.translateY=Lf.y;const Od=new Set;let Jw=!1,Qw=!1;function qI(){if(Qw){const e=Array.from(Od).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=ste(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);
vendor: 14,068 bytes, line 734
734i&&i.forEach(([a,o])=>{var l;(l=s.getValue(a))===null||l===void 0||l.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Qw=!1,Jw=!1,Od.forEach(e=>e.complete()),Od.clear()}function GI(){Od.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qw=!0)})}function ite(){GI(),qI()}class xk{constructor(t,n,s,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Od.add(this),Jw||(Jw=!0,er.read(GI),er.resolveKeyframes(qI))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=i==null?void 0:i.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const c=s.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),i&&o===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Od.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Od.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const KI=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ate=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ote(e){const t=ate.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}function YI(e,t,n=1){const[s,i]=ote(e);if(!s)return;const a=window.getComputedStyle(t).getPropertyValue(s);if(a){const o=a.trim();return KI(o)?parseFloat(o):o}return QS(i)?YI(i,t,n+1):i}const XI=e=>t=>t.test(e),lte={test:e=>e==="auto",parse:e=>e},JI=[ep,Xt,jo,Zl,JZ,XZ,lte],z5=e=>JI.find(XI(e));class QI extends xk{constructor(t,n,s,i,a){super(t,n,s,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),QS(d))){const u=YI(d,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!FI.has(s)||t.length!==2)return;const[i,a]=t,o=z5(i),l=z5(a);if(o!==l)if(O5(o)&&O5(l))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)Mee(t[i])&&s.push(i);s.length&&tte(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Lf[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(s);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,l=i[o];i[o]=Lf[s](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,d])=>{n.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const W5=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_c.test(e)||e==="0")&&!e.startsWith("url("));function cte(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function dte(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=W5(i,t),l=W5(a,t);return!o||!l?!1:cte(e)||(n==="spring"||ak(n))&&s}const ute=e=>e!==null;function s1(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(ute),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||s===void 0?i[a]:s}const fte=40;class ZI{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=So.now(),this.options={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:a,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>fte?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ite(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=So.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:a,delay:o,onComplete:l,onUpdate:c,isGenerator:d}=this.options;if(!d&&!dte(t,s,i,a))if(o)this.options.duration=0;else{c&&c(s1(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const cr=(e,t,n)=>e+(t-e)*n;function zb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pte({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=zb(c,l,e+1/3),a=zb(c,l,e),o=zb(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:s}}function Zx(e,t){return n=>n>0?t:e}const Wb=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},hte=[Yw,kd,rf],mte=e=>hte.find(t=>t.test(e));function $5(e){const t=mte(e);if(!t)return!1;let n=t.parse(e);return t===rf&&(n=pte(n)),n}const U5=(e,t)=>{const n=$5(e),s=$5(t);if(!n||!s)return Zx(e,t);const i={...n};return a=>(i.red=Wb(n.red,s.red,a),i.green=Wb(n.green,s.green,a),i.blue=Wb(n.blue,s.blue,a),i.alpha=cr(n.alpha,s.alpha,a),kd.transform(i))},gte=(e,t)=>n=>t(e(n)),Xm=(...e)=>e.reduce(gte),Zw=new Set(["none","hidden"]);function xte(e,t){return Zw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function yte(e,t){return n=>cr(e,t,n)}function yk(e){return typeof e=="number"?yte:typeof e=="string"?QS(e)?Zx:Es.test(e)?U5:wte:Array.isArray(e)?eP:typeof e=="object"?Es.test(e)?U5:vte:Zx}function eP(e,t){const n=[...e],s=n.length,i=e.map((a,o)=>yk(a)(a,t[o]));return a=>{for(let o=0;o<s;o++)n[o]=i[o](a);return n}}function vte(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=yk(e[i])(e[i],t[i]));return i=>{for(const a in s)n[a]=s[a](i);return n}}function bte(e,t){var n;const s=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],l=e.indexes[o][i[o]],c=(n=e.values[l])!==null&&n!==void 0?n:0;s[a]=c,i[o]++}return s}const wte=(e,t)=>{const n=_c.createTransformer(t),s=fm(e),i=fm(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Zw.has(e)&&!i.values.length||Zw.has(t)&&!s.values.length?xte(e,t):Xm(eP(bte(s,i),i.values),n):Zx(e,t)};function tP(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?cr(e,t,n):yk(e)(e,t)}const jte=5;function nP(e,t,n){const s=Math.max(t-jte,0);return AI(n-e(s),t-s)}const pr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},$b=.001;function Ste({duration:e=pr.duration,bounce:t=pr.bounce,velocity:n=pr.velocity,mass:s=pr.mass}){let i,a,o=1-t;o=bl(pr.minDamping,pr.maxDamping,o),e=bl(pr.minDuration,pr.maxDuration,fl(e)),o<1?(i=d=>{const u=d*o,p=u*e,m=u-n,x=ej(d,o),w=Math.exp(-p);return $b-m/x*w},a=d=>{const p=d*o*e,m=p*n+n,x=Math.pow(o,2)*Math.pow(d,2)*e,w=Math.exp(-p),y=ej(Math.pow(d,2),o);return(-i(d)+$b>0?-1:1)*((m-x)*w)/y}):(i=d=>{const u=Math.exp(-d*e),p=(d-n)*e+1;return-$b+u*p},a=d=>{const u=Math.exp(-d*e),p=(n-d)*(e*e);return u*p});const l=5/e,c=_te(i,a,l);if(e=ul(e),isNaN(c))return{stiffness:pr.stiffness,damping:pr.damping,duration:e};{const d=Math.pow(c,2)*s;return{stiffness:d,damping:o*2*Math.sqrt(s*d),duration:e}}}const kte=12;function _te(e,t,n){let s=n;for(let i=1;i<kte;i++)s=s-e(s)/t(s);return s}function ej(e,t){return e*Math.sqrt(1-t*t)}const Cte=["duration","bounce"],Ete=["stiffness","damping","mass"];function V5(e,t){return t.some(n=>e[n]!==void 0)}function Fte(e){let t={velocity:pr.velocity,stiffness:pr.stiffness,damping:pr.damping,mass:pr.mass,isResolvedFromDuration:!1,...e};if(!V5(e,Ete)&&V5(e,Cte))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,a=2*bl(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:pr.mass,stiffness:i,damping:a}}else{const n=Ste(e);t={...t,...n,mass:pr.mass},t.isResolvedFromDuration=!0}return t}function rP(e=pr.visualDuration,t=pr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:d,mass:u,duration:p,velocity:m,isResolvedFromDuration:x}=Fte({...n,velocity:-fl(n.velocity||0)}),w=m||0,y=d/(2*Math.sqrt(c*u)),v=o-a,j=fl(Math.sqrt(c/u)),k=Math.abs(v)<5;s||(s=k?pr.restSpeed.granular:pr.restSpeed.default),i||(i=k?pr.restDelta.granular:pr.restDelta.default);let S;if(y<1){const F=ej(j,y);S=A=>{const C=Math.exp(-y*j*A);return o-C*((w+y*j*v)/F*Math.sin(F*A)+v*Math.cos(F*A))}}else if(y===1)S=F=>o-Math.exp(-j*F)*(v+(w+j*v)*F);else{const F=j*Math.sqrt(y*y-1);S=A=>{const C=Math.exp(-y*j*A),D=Math.min(F*A,300);return o-C*((w+y*j*v)*Math.sinh(D)+F*v*Math.cosh(D))/F}}const _={calculatedDuration:x&&p||null,next:F=>{const A=S(F);if(x)l.done=F>=p;else{let C=0;y<1&&(C=F===0?ul(w):nP(S,F,A));const D=Math.abs(C)<=s,P=Math.abs(o-A)<=i;l.done=D&&P}return l.value=l.done?o:A,l},toString:()=>{const F=Math.min(wI(_),qw),A=jI(C=>_.next(F*C).value,F,30);return F+"ms "+A}};return _}function H5({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:c,restDelta:d=.5,restSpeed:u}){const p=e[0],m={done:!1,value:p},x=D=>l!==void 0&&D<l||c!==void 0&&D>c,w=D=>l===void 0?c:c===void 0||Math.abs(l-D)<Math.abs(c-D)?l:c;let y=n*t;const v=p+y,j=o===void 0?v:o(v);j!==v&&(y=j-p);const k=D=>-y*Math.exp(-D/s),S=D=>j+k(D),_=D=>{const P=k(D),L=S(D);m.done=Math.abs(P)<=d,m.value=m.done?j:L};let F,A;const C=D=>{x(m.value)&&(F=D,A=rP({keyframes:[m.value,w(m.value)],velocity:nP(S,D,m.value),damping:i,stiffness:a,restDelta:d,restSpeed:u}))};return C(0),{calculatedDuration:null,next:D=>{let P=!1;return!A&&F===void 0&&(P=!0,_(D),C(D)),F!==void 0&&D>=F?A.next(D-F):(!P&&_(D),m)}}}const Ate=Ym(.42,0,1,1),Tte=Ym(0,0,.58,1),sP=Ym(.42,0,.58,1),Nte=e=>Array.isArray(e)&&typeof e[0]!="number",Rte={linear:Ii,easeIn:Ate,easeInOut:sP,easeOut:Tte,circIn:pk,circInOut:MI,circOut:OI,backIn:fk,backInOut:PI,backOut:II,anticipate:BI},q5=e=>{if(ok(e)){tI(e.length===4);const[t,n,s,i]=e;return Ym(t,n,s,i)}else if(typeof e=="string")return Rte[e];return e};function Dte(e,t,n){const s=[],i=n||tP,a=e.length-1;for(let o=0;o<a;o++){let l=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ii:t;l=Xm(c,l)}s.push(l)}return s}function Ite(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const a=e.length;if(tI(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Dte(t,s,i),c=l.length,d=u=>{if(o&&u<e[0])return t[0];let p=0;if(c>1)for(;p<e.length-2&&!(u<e[p+1]);p++);const m=Of(e[p],e[p+1],u);return l[p](m)};return n?u=>d(bl(e[0],e[a-1],u)):d}function Pte(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Of(0,t,s);e.push(cr(n,1,i))}}function Bte(e){const t=[0];return Pte(t,e.length-1),t}function Ote(e,t){return e.map(n=>n*t)}function Mte(e,t){return e.map(()=>t||sP).splice(0,e.length-1)}function ey({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Nte(s)?s.map(q5):q5(s),a={done:!1,value:t[0]},o=Ote(n&&n.length===t.length?n:Bte(t),e),l=Ite(o,t,{ease:Array.isArray(i)?i:Mte(t,i)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const Lte=e=>{const t=({timestamp:n})=>e(n);return{start:()=>er.update(t,!0),stop:()=>kc(t),now:()=>ls.isProcessing?ls.timestamp:So.now()}},zte={decay:H5,inertia:H5,tween:ey,keyframes:ey,spring:rP},Wte=e=>e/100;class vk extends ZI{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:s,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||xk,l=(c,d)=>this.onKeyframesResolved(c,d);this.resolver=new o(a,l,n,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,l=ak(n)?n:zte[n]||ey;let c,d;l!==ey&&typeof t[0]!="number"&&(c=Xm(Wte,tP(t[0],t[1])),t=[0,100]);const u=l({...this.options,keyframes:t});a==="mirror"&&(d=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=wI(u));const{calculatedDuration:p}=u,m=p+i,x=m*(s+1)-i;return{generator:u,mirroredGenerator:d,mapPercentToKeyframes:c,calculatedDuration:p,resolvedDuration:m,totalDuration:x}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:s}=this;if(!s){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:d,totalDuration:u,resolvedDuration:p}=s;
vendor: 55,735 bytes, line 734
734if(this.startTime===null)return a.next(0);const{delay:m,repeat:x,repeatType:w,repeatDelay:y,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const j=this.currentTime-m*(this.speed>=0?1:-1),k=this.speed>=0?j<0:j>u;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let S=this.currentTime,_=a;if(x){const D=Math.min(this.currentTime,u)/p;let P=Math.floor(D),L=D%1;!L&&D>=1&&(L=1),L===1&&P--,P=Math.min(P,x+1),!!(P%2)&&(w==="reverse"?(L=1-L,y&&(L-=y/p)):w==="mirror"&&(_=o)),S=bl(0,1,L)*p}const F=k?{done:!1,value:c[0]}:_.next(S);l&&(F.value=l(F.value));let{done:A}=F;!k&&d!==null&&(A=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return C&&i!==void 0&&(F.value=s1(c,this.options,i)),v&&v(F.value),C&&this.finish(),F}get duration(){const{resolved:t}=this;return t?fl(t.calculatedDuration):0}get time(){return fl(this.currentTime)}set time(t){t=ul(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=fl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Lte,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const $te=new Set(["opacity","clipPath","filter","transform"]);function Ute(e,t,n,{delay:s=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:l="easeInOut",times:c}={}){const d={[t]:n};c&&(d.offset=c);const u=kI(l,i);return Array.isArray(u)&&(d.easing=u),e.animate(d,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}const Vte=HS(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ty=10,Hte=2e4;function qte(e){return ak(e.type)||e.type==="spring"||!SI(e.ease)}function Gte(e,t){const n=new vk({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:e[0]};const i=[];let a=0;for(;!s.done&&a<Hte;)s=n.sample(a),i.push(s.value),a+=ty;return{times:void 0,keyframes:i,duration:a-ty,ease:"linear"}}const iP={anticipate:BI,backInOut:PI,circInOut:MI};function Kte(e){return e in iP}class G5 extends ZI{constructor(t){super(t);const{name:n,motionValue:s,element:i,keyframes:a}=this.options;this.resolver=new QI(a,(o,l)=>this.onKeyframesResolved(o,l),n,s,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:s=300,times:i,ease:a,type:o,motionValue:l,name:c,startTime:d}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof a=="string"&&Qx()&&Kte(a)&&(a=iP[a]),qte(this.options)){const{onComplete:p,onUpdate:m,motionValue:x,element:w,...y}=this.options,v=Gte(t,y);t=v.keyframes,t.length===1&&(t[1]=t[0]),s=v.duration,i=v.times,a=v.ease,o="keyframes"}const u=Ute(l.owner.current,c,t,{...this.options,duration:s,times:i,ease:a});return u.startTime=d??this.calcStartTime(),this.pendingTimeline?(N5(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:p}=this.options;l.set(s1(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:s,times:i,type:o,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return fl(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return fl(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=ul(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ii;const{animation:s}=n;N5(s,t)}return Ii}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:s,duration:i,type:a,ease:o,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:u,onComplete:p,element:m,...x}=this.options,w=new vk({...x,keyframes:s,duration:i,type:a,ease:o,times:l,isGenerator:!0}),y=ul(this.time);d.setWithVelocity(w.sample(y-ty).value,w.sample(y).value,ty)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:s,repeatDelay:i,repeatType:a,damping:o,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=n.owner.getProps();return Vte()&&s&&$te.has(s)&&!c&&!d&&!i&&a!=="mirror"&&o!==0&&l!=="inertia"}}const Yte={type:"spring",stiffness:500,damping:25,restSpeed:10},Xte=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Jte={type:"keyframes",duration:.8},Qte={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zte=(e,{keyframes:t})=>t.length>2?Jte:eu.has(e)?e.startsWith("scale")?Xte(t[1]):Yte:Qte;function ene({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:l,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const bk=(e,t,n,s={},i,a)=>o=>{const l=ik(s,e)||{},c=l.delay||s.delay||0;let{elapsed:d=0}=s;d=d-ul(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};ene(l)||(u={...u,...Zte(e,u)}),u.duration&&(u.duration=ul(u.duration)),u.repeatDelay&&(u.repeatDelay=ul(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let p=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(p=!0)),p&&!a&&t.get()!==void 0){const m=s1(u.keyframes,l);if(m!==void 0)return er.update(()=>{u.onUpdate(m),u.onComplete()}),new vee([])}return!a&&G5.supports(u)?new G5(u):new vk(u)};function tne({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function aP(e,t,{delay:n=0,transitionOverride:s,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...c}=t;s&&(o=s);const d=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const p in c){const m=e.getValue(p,(a=e.latestValues[p])!==null&&a!==void 0?a:null),x=c[p];if(x===void 0||u&&tne(u,p))continue;const w={delay:n,...ik(o||{},p)};let y=!1;if(window.MotionHandoffAnimation){const j=TI(e);if(j){const k=window.MotionHandoffAnimation(j,p,er);k!==null&&(w.startTime=k,y=!0)}}Kw(e,p),m.start(bk(p,m,x,e.shouldReduceMotion&&FI.has(p)?{type:!1}:w,e,y));const v=m.animation;v&&d.push(v)}return l&&Promise.all(d).then(()=>{er.update(()=>{l&&Dee(e,l)})}),d}function tj(e,t,n={}){var s;const i=r1(e,t,n.type==="exit"?(s=e.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(aP(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:p,staggerDirection:m}=a;return nne(e,t,u+d,p,m,n)}:()=>Promise.resolve(),{when:c}=a;if(c){const[d,u]=c==="beforeChildren"?[o,l]:[l,o];return d().then(()=>u())}else return Promise.all([o(),l(n.delay)])}function nne(e,t,n=0,s=0,i=1,a){const o=[],l=(e.variantChildren.size-1)*s,c=i===1?(d=0)=>d*s:(d=0)=>l-d*s;return Array.from(e.variantChildren).sort(rne).forEach((d,u)=>{d.notify("AnimationStart",t),o.push(tj(d,t,{...a,delay:n+c(u)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(o)}function rne(e,t){return e.sortNodePosition(t)}function sne(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(a=>tj(e,a,n));s=Promise.all(i)}else if(typeof t=="string")s=tj(e,t,n);else{const i=typeof t=="function"?r1(e,t,n.custom):t;s=Promise.all(aP(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const ine=GS.length;function oP(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?oP(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ine;n++){const s=GS[n],i=e.props[s];(cm(i)||i===!1)&&(t[s]=i)}return t}const ane=[...qS].reverse(),one=qS.length;function lne(e){return t=>Promise.all(t.map(({animation:n,options:s})=>sne(e,n,s)))}function cne(e){let t=lne(e),n=K5(),s=!0;const i=c=>(d,u)=>{var p;const m=r1(e,u,c==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(m){const{transition:x,transitionEnd:w,...y}=m;d={...d,...y,...w}}return d};function a(c){t=c(e)}function o(c){const{props:d}=e,u=oP(e.parent)||{},p=[],m=new Set;let x={},w=1/0;for(let v=0;v<one;v++){const j=ane[v],k=n[j],S=d[j]!==void 0?d[j]:u[j],_=cm(S),F=j===c?k.isActive:null;F===!1&&(w=v);let A=S===u[j]&&S!==d[j]&&_;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),k.protectedKeys={...x},!k.isActive&&F===null||!S&&!k.prevProp||t1(S)||typeof S=="boolean")continue;const C=dne(k.prevProp,S);let D=C||j===c&&k.isActive&&!A&&_||v>w&&_,P=!1;const L=Array.isArray(S)?S:[S];let T=L.reduce(i(j),{});F===!1&&(T={});const{prevResolvedValues:R={}}=k,U={...R,...T},I=X=>{D=!0,m.has(X)&&(P=!0,m.delete(X)),k.needsAnimating[X]=!0;const N=e.getValue(X);N&&(N.liveStyle=!1)};for(const X in U){const N=T[X],W=R[X];if(x.hasOwnProperty(X))continue;let O=!1;Hw(N)&&Hw(W)?O=!bI(N,W):O=N!==W,O?N!=null?I(X):m.add(X):N!==void 0&&m.has(X)?I(X):k.protectedKeys[X]=!0}k.prevProp=S,k.prevResolvedValues=T,k.isActive&&(x={...x,...T}),s&&e.blockInitialAnimation&&(D=!1),D&&(!(A&&C)||P)&&p.push(...L.map(X=>({animation:X,options:{type:j}})))}if(m.size){const v={};m.forEach(j=>{const k=e.getBaseTarget(j),S=e.getValue(j);S&&(S.liveStyle=!0),v[j]=k??null}),p.push({animation:v})}let y=!!p.length;return s&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(p):Promise.resolve()}function l(c,d){var u;if(n[c].isActive===d)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(m=>{var x;return(x=m.animationState)===null||x===void 0?void 0:x.setActive(c,d)}),n[c].isActive=d;const p=o(c);for(const m in n)n[m].protectedKeys={};return p}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>n,reset:()=>{n=K5(),s=!0}}}function dne(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!bI(t,e):!1}function ld(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function K5(){return{animate:ld(!0),whileInView:ld(),whileHover:ld(),whileTap:ld(),whileDrag:ld(),whileFocus:ld(),exit:ld()}}class Bc{constructor(t){this.isMounted=!1,this.node=t}update(){}}class une extends Bc{constructor(t){super(t),t.animationState||(t.animationState=cne(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();t1(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let fne=0;class pne extends Bc{constructor(){super(...arguments),this.id=fne++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const hne={animation:{Feature:une},exit:{Feature:pne}};function pm(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Jm(e){return{point:{x:e.pageX,y:e.pageY}}}const mne=e=>t=>lk(t)&&e(t,Jm(t));function zh(e,t,n,s){return pm(e,t,mne(n),s)}const Y5=(e,t)=>Math.abs(e-t);function gne(e,t){const n=Y5(e.x,t.x),s=Y5(e.y,t.y);return Math.sqrt(n**2+s**2)}class lP{constructor(t,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Vb(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,x=gne(p.offset,{x:0,y:0})>=3;if(!m&&!x)return;const{point:w}=p,{timestamp:y}=ls;this.history.push({...w,timestamp:y});const{onStart:v,onMove:j}=this.handlers;m||(v&&v(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Ub(m,this.transformPagePoint),er.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:x,onSessionEnd:w,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Vb(p.type==="pointercancel"?this.lastMoveEventInfo:Ub(m,this.transformPagePoint),this.history);this.startEvent&&x&&x(p,v),w&&w(p,v)},!lk(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=Jm(t),l=Ub(o,this.transformPagePoint),{point:c}=l,{timestamp:d}=ls;this.history=[{...c,timestamp:d}];const{onSessionStart:u}=n;u&&u(t,Vb(l,this.history)),this.removeListeners=Xm(zh(this.contextWindow,"pointermove",this.handlePointerMove),zh(this.contextWindow,"pointerup",this.handlePointerUp),zh(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),kc(this.updatePoint)}}function Ub(e,t){return t?{point:t(e.point)}:e}function X5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vb({point:e},t){return{point:e,delta:X5(e,cP(t)),offset:X5(e,xne(t)),velocity:yne(t,.1)}}function xne(e){return e[0]}function cP(e){return e[e.length-1]}function yne(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=cP(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>ul(t)));)n--;if(!s)return{x:0,y:0};const a=fl(i.timestamp-s.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-s.x)/a,y:(i.y-s.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const dP=1e-4,vne=1-dP,bne=1+dP,uP=.01,wne=0-uP,jne=0+uP;function Li(e){return e.max-e.min}function Sne(e,t,n){return Math.abs(e-t)<=n}function J5(e,t,n,s=.5){e.origin=s,e.originPoint=cr(t.min,t.max,e.origin),e.scale=Li(n)/Li(t),e.translate=cr(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vne&&e.scale<=bne||isNaN(e.scale))&&(e.scale=1),(e.translate>=wne&&e.translate<=jne||isNaN(e.translate))&&(e.translate=0)}function Wh(e,t,n,s){J5(e.x,t.x,n.x,s?s.originX:void 0),J5(e.y,t.y,n.y,s?s.originY:void 0)}function Q5(e,t,n){e.min=n.min+t.min,e.max=e.min+Li(t)}function kne(e,t,n){Q5(e.x,t.x,n.x),Q5(e.y,t.y,n.y)}function Z5(e,t,n){e.min=t.min-n.min,e.max=e.min+Li(t)}function $h(e,t,n){Z5(e.x,t.x,n.x),Z5(e.y,t.y,n.y)}function _ne(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?cr(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?cr(n,e,s.max):Math.min(e,n)),e}function eA(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Cne(e,{top:t,left:n,bottom:s,right:i}){return{x:eA(e.x,n,i),y:eA(e.y,t,s)}}function tA(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function Ene(e,t){return{x:tA(e.x,t.x),y:tA(e.y,t.y)}}function Fne(e,t){let n=.5;const s=Li(e),i=Li(t);return i>s?n=Of(t.min,t.max-s,e.min):s>i&&(n=Of(e.min,e.max-i,t.min)),bl(0,1,n)}function Ane(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const nj=.35;function Tne(e=nj){return e===!1?e=0:e===!0&&(e=nj),{x:nA(e,"left","right"),y:nA(e,"top","bottom")}}function nA(e,t,n){return{min:rA(e,t),max:rA(e,n)}}function rA(e,t){return typeof e=="number"?e:e[t]||0}const sA=()=>({translate:0,scale:1,origin:0,originPoint:0}),sf=()=>({x:sA(),y:sA()}),iA=()=>({min:0,max:0}),br=()=>({x:iA(),y:iA()});function na(e){return[e("x"),e("y")]}function fP({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Nne({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Rne(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Hb(e){return e===void 0||e===1}function rj({scale:e,scaleX:t,scaleY:n}){return!Hb(e)||!Hb(t)||!Hb(n)}function gd(e){return rj(e)||pP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function pP(e){return aA(e.x)||aA(e.y)}function aA(e){return e&&e!=="0%"}function ny(e,t,n){const s=e-n,i=t*s;return n+i}function oA(e,t,n,s,i){return i!==void 0&&(e=ny(e,i,s)),ny(e,n,s)+t}function sj(e,t=0,n=1,s,i){e.min=oA(e.min,t,n,s,i),e.max=oA(e.max,t,n,s,i)}function hP(e,{x:t,y:n}){sj(e.x,t.translate,t.scale,t.originPoint),sj(e.y,n.translate,n.scale,n.originPoint)}const lA=.999999999999,cA=1.0000000000001;function Dne(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let l=0;l<i;l++){a=n[l],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&a.options.layoutScroll&&a.scroll&&a!==a.root&&of(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,hP(e,o)),s&&gd(a.latestValues)&&of(e,a.latestValues))}t.x<cA&&t.x>lA&&(t.x=1),t.y<cA&&t.y>lA&&(t.y=1)}function af(e,t){e.min=e.min+t,e.max=e.max+t}function dA(e,t,n,s,i=.5){const a=cr(e.min,e.max,i);sj(e,t,n,a,s)}function of(e,t){dA(e.x,t.x,t.scaleX,t.scale,t.originX),dA(e.y,t.y,t.scaleY,t.scale,t.originY)}function mP(e,t){return fP(Rne(e.getBoundingClientRect(),t))}function Ine(e,t,n){const s=mP(e,n),{scroll:i}=t;return i&&(af(s.x,i.offset.x),af(s.y,i.offset.y)),s}const gP=({current:e})=>e?e.ownerDocument.defaultView:null,Pne=new WeakMap;class Bne{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=br(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Jm(u).point)},a=(u,p)=>{const{drag:m,dragPropagation:x,onDragStart:w}=this.getProps();if(m&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fee(m),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),na(v=>{let j=this.getAxisMotionValue(v).get()||0;if(jo.test(j)){const{projection:k}=this.visualElement;if(k&&k.layout){const S=k.layout.layoutBox[v];S&&(j=Li(S)*(parseFloat(j)/100))}}this.originPoint[v]=j}),w&&er.postRender(()=>w(u,p)),Kw(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(u,p)=>{const{dragPropagation:m,dragDirectionLock:x,onDirectionLock:w,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=p;if(x&&this.currentDirection===null){this.currentDirection=One(v),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",p.point,v),this.updateAxis("y",p.point,v),this.visualElement.render(),y&&y(u,p)},l=(u,p)=>this.stop(u,p),c=()=>na(u=>{var p;return this.getAnimationState(u)==="paused"&&((p=this.getAxisMotionValue(u).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new lP(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:gP(this.visualElement)})}stop(t,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&er.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!kg(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=_ne(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&nf(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Cne(i.layoutBox,n):this.constraints=!1,this.elastic=Tne(s),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&na(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Ane(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nf(t))return!1;const s=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Ine(s,i.root,this.visualElement.getTransformPagePoint());let o=Ene(i.layout.layoutBox,a);if(n){const l=n(Nne(o));this.hasMutatedConstraints=!!l,l&&(o=fP(l))}return o}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=na(u=>{if(!kg(u,n,this.currentDirection))return;let p=c&&c[u]||{};o&&(p={min:0,max:0});const m=i?200:1e6,x=i?40:1e7,w={type:"inertia",velocity:s?t[u]:0,bounceStiffness:m,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...a,...p};return this.startAxisValueAnimation(u,w)});return Promise.all(d).then(l)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Kw(this.visualElement,t),s.start(bk(t,s,0,n,this.visualElement,!1))}stopAnimation(){na(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){na(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){na(n=>{const{drag:s}=this.getProps();if(!kg(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n];a.set(t[n]-cr(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!nf(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};na(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();i[o]=Fne({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),na(o=>{if(!kg(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];l.set(cr(c,d,i[o]))})}addListeners(){if(!this.visualElement.current)return;Pne.set(this.visualElement,this);const t=this.visualElement.current,n=zh(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();nf(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),er.read(s);const o=pm(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(na(u=>{const p=this.getAxisMotionValue(u);p&&(this.originPoint[u]+=c[u].translate,p.set(p.get()+c[u].translate))}),this.visualElement.render())}));return()=>{o(),n(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=nj,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function kg(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function One(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Mne extends Bc{constructor(t){super(t),this.removeGroupControls=Ii,this.removeListeners=Ii,this.controls=new Bne(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ii}unmount(){this.removeGroupControls(),this.removeListeners()}}const uA=e=>(t,n)=>{e&&er.postRender(()=>e(t,n))};class Lne extends Bc{constructor(){super(...arguments),this.removePointerDownListener=Ii}onPointerDown(t){this.session=new lP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:gP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:uA(t),onStart:uA(n),onMove:s,onEnd:(a,o)=>{delete this.session,i&&er.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=zh(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Nx={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xp={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Xt.test(e))e=parseFloat(e);else return e;const n=fA(e,t.target.x),s=fA(e,t.target.y);return`${n}% ${s}%`}},zne={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=_c.parse(e);if(i.length>5)return s;const a=_c.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=c;const d=cr(l,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=d),typeof i[3+o]=="number"&&(i[3+o]/=d),a(i)}};class Wne extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:a}=t;oee($ne),a&&(n.group&&n.group.add(a),s&&s.register&&i&&s.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Nx.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:a}=this.props,o=s.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||er.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),YS.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function xP(e){const[t,n]=ZD(),s=g.useContext(WS);return r.jsx(Wne,{...e,layoutGroup:s,switchLayoutGroup:g.useContext(oI),isPresent:t,safeToRemove:n})}const $ne={borderRadius:{...Xp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xp,borderTopRightRadius:Xp,borderBottomLeftRadius:Xp,borderBottomRightRadius:Xp,boxShadow:zne};function Une(e,t,n){const s=Ts(e)?e:um(e);return s.start(bk("",s,t,n)),s.animation}function Vne(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Hne=(e,t)=>e.depth-t.depth;class qne{constructor(){this.children=[],this.isDirty=!1}add(t){ck(this.children,t),this.isDirty=!0}remove(t){dk(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Hne),this.isDirty=!1,this.children.forEach(t)}}function Gne(e,t){const n=So.now(),s=({timestamp:i})=>{const a=i-n;a>=t&&(kc(s),e(a-t))};return er.read(s,!0),()=>kc(s)}const yP=["TopLeft","TopRight","BottomLeft","BottomRight"],Kne=yP.length,pA=e=>typeof e=="string"?parseFloat(e):e,hA=e=>typeof e=="number"||Xt.test(e);function Yne(e,t,n,s,i,a){i?(e.opacity=cr(0,n.opacity!==void 0?n.opacity:1,Xne(s)),e.opacityExit=cr(t.opacity!==void 0?t.opacity:1,0,Jne(s))):a&&(e.opacity=cr(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<Kne;o++){const l=`border${yP[o]}Radius`;let c=mA(t,l),d=mA(n,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||hA(c)===hA(d)?(e[l]=Math.max(cr(pA(c),pA(d),s),0),(jo.test(d)||jo.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||n.rotate)&&(e.rotate=cr(t.rotate||0,n.rotate||0,s))}function mA(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Xne=vP(0,.5,OI),Jne=vP(.5,.95,Ii);function vP(e,t,n){return s=>s<e?0:s>t?1:n(Of(e,t,s))}function gA(e,t){e.min=t.min,e.max=t.max}function Ki(e,t){gA(e.x,t.x),gA(e.y,t.y)}function xA(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function yA(e,t,n,s,i){return e-=t,e=ny(e,1/n,s),i!==void 0&&(e=ny(e,1/i,s)),e}function Qne(e,t=0,n=1,s=.5,i,a=e,o=e){if(jo.test(t)&&(t=parseFloat(t),t=cr(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=cr(a.min,a.max,s);e===a&&(l-=t),e.min=yA(e.min,t,n,l,i),e.max=yA(e.max,t,n,l,i)}function vA(e,t,[n,s,i],a,o){Qne(e,t[n],t[s],t[i],t.scale,a,o)}const Zne=["x","scaleX","originX"],ere=["y","scaleY","originY"];function bA(e,t,n,s){vA(e.x,t,Zne,n?n.x:void 0,s?s.x:void 0),vA(e.y,t,ere,n?n.y:void 0,s?s.y:void 0)}function wA(e){return e.translate===0&&e.scale===1}function bP(e){return wA(e.x)&&wA(e.y)}function jA(e,t){return e.min===t.min&&e.max===t.max}function tre(e,t){return jA(e.x,t.x)&&jA(e.y,t.y)}function SA(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wP(e,t){return SA(e.x,t.x)&&SA(e.y,t.y)}function kA(e){return Li(e.x)/Li(e.y)}function _A(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class nre{constructor(){this.members=[]}add(t){ck(this.members,t),t.scheduleRender()}remove(t){if(dk(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){s=a;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rre(e,t,n){let s="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(s=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:u,rotateX:p,rotateY:m,skewX:x,skewY:w}=n;d&&(s=`perspective(${d}px) ${s}`),u&&(s+=`rotate(${u}deg) `),p&&(s+=`rotateX(${p}deg) `),m&&(s+=`rotateY(${m}deg) `),x&&(s+=`skewX(${x}deg) `),w&&(s+=`skewY(${w}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(s+=`scale(${l}, ${c})`),s||"none"}const xd={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Fh=typeof window<"u"&&window.MotionDebug!==void 0,qb=["","X","Y","Z"],sre={visibility:"hidden"},CA=1e3;let ire=0;function Gb(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function jP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=TI(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",er,!(i||a))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&jP(s)}function SP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=ire++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Fh&&(xd.totalNodes=xd.resolvedTargetDeltas=xd.recalculatedProjection=0),this.nodes.forEach(lre),this.nodes.forEach(pre),this.nodes.forEach(hre),this.nodes.forEach(cre),Fh&&window.MotionDebug.record(xd)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new qne)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new uk),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Vne(o),this.instance=o;const{layoutId:c,layout:d,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(d||c)&&(this.isLayoutDirty=!0),e){let p;const m=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=Gne(m,250),Nx.hasAnimatedSinceResize&&(Nx.hasAnimatedSinceResize=!1,this.nodes.forEach(FA))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||d)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:m,hasRelativeTargetChanged:x,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||vre,{onLayoutAnimationStart:v,onLayoutAnimationComplete:j}=u.getProps(),k=!this.targetLayout||!wP(this.targetLayout,w)||x,S=!m&&x;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||m&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,S);const _={...ik(y,"layout"),onPlay:v,onComplete:j};(u.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else m||FA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,kc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(mre),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const p=this.path[u];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(EA);return}this.isUpdating||this.nodes.forEach(ure),this.isUpdating=!1,this.nodes.forEach(fre),this.nodes.forEach(are),this.nodes.forEach(ore),this.clearAllSnapshots();const l=So.now();ls.delta=bl(0,1e3/60,l-ls.timestamp),ls.timestamp=l,ls.isProcessing=!0,Ob.update.process(ls),Ob.preRender.process(ls),Ob.render.process(ls),ls.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,YS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dre),this.sharedNodes.forEach(gre)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,er.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){er.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=br(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!bP(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;o&&(l||gd(this.latestValues)||u)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),bre(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return br();const c=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(wre))){const{scroll:u}=this.root;u&&(af(c.x,u.offset.x),af(c.y,u.offset.y))}return c}removeElementScroll(o){var l;const c=br();if(Ki(c,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:p,options:m}=u;u!==this.root&&p&&m.layoutScroll&&(p.wasRoot&&Ki(c,o),af(c.x,p.offset.x),af(c.y,p.offset.y))}return c}applyTransform(o,l=!1){const c=br();Ki(c,o);for(let d=0;d<this.path.length;d++){const u=this.path[d];!l&&u.options.layoutScroll&&u.scroll&&u!==u.root&&of(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),gd(u.latestValues)&&of(c,u.latestValues)}return gd(this.latestValues)&&of(c,this.latestValues),c}removeTransform(o){const l=br();Ki(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!gd(d.latestValues))continue;rj(d.latestValues)&&d.updateSnapshot();const u=br(),p=d.measurePageBox();Ki(u,p),bA(l,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return gd(this.latestValues)&&bA(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ls.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==c;if(!(o||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:m}=this.options;if(!(!this.layout||!(p||m))){if(this.resolvedRelativeTargetAt=ls.timestamp,!this.targetDelta&&!this.relativeTarget){const x=this.getClosestProjectingParent();x&&x.layout&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=br(),this.relativeTargetOrigin=br(),$h(this.relativeTargetOrigin,this.layout.layoutBox,x.layout.layoutBox),Ki(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=br(),this.targetWithTransforms=br()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kne(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ki(this.target,this.layout.layoutBox),hP(this.target,this.targetDelta)):Ki(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const x=this.getClosestProjectingParent();x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=br(),this.relativeTargetOrigin=br(),$h(this.relativeTargetOrigin,this.target,x.target),Ki(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Fh&&xd.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||rj(this.parent.latestValues)||pP(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(d=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===ls.timestamp&&(d=!1),d)return;const{layout:u,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||p))return;Ki(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,x=this.treeScale.y;Dne(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=br());const{target:w}=l;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xA(this.prevProjectionDelta.x,this.projectionDelta.x),xA(this.prevProjectionDelta.y,this.projectionDelta.y)),Wh(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==x||!_A(this.projectionDelta.x,this.prevProjectionDelta.x)||!_A(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w)),Fh&&xd.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=sf(),this.projectionDelta=sf(),this.projectionDeltaWithTransform=sf()}setAnimationOrigin(o,l=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},p=sf();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=br(),x=c?c.source:void 0,w=this.layout?this.layout.source:void 0,y=x!==w,v=this.getStack(),j=!v||v.members.length<=1,k=!!(y&&!j&&this.options.crossfade===!0&&!this.path.some(yre));this.animationProgress=0;let S;this.mixTargetDelta=_=>{const F=_/1e3;AA(p.x,o.x,F),AA(p.y,o.y,F),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($h(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),xre(this.relativeTarget,this.relativeTargetOrigin,m,F),S&&tre(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=br()),Ki(S,this.relativeTarget)),y&&(this.animationValues=u,Yne(u,d,this.latestValues,F,k,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(kc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=er.update(()=>{Nx.hasAnimatedSinceResize=!0,this.currentAnimation=Une(0,CA,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(CA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:u}=o;if(!(!l||!c||!d)){if(this!==o&&this.layout&&d&&kP(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||br();const p=Li(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+p;const m=Li(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+m}Ki(l,c),of(l,u),Wh(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new nre),this.sharedNodes.get(o).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&Gb("z",o,d,this.animationValues);for(let u=0;u<qb.length;u++)Gb(`rotate${qb[u]}`,o,d,this.animationValues),Gb(`skew${qb[u]}`,o,d,this.animationValues);o.render();for(const u in d)o.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);o.scheduleRender()}getProjectionStyles(o){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return sre;const d={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Ax(o==null?void 0:o.pointerEvents)||"",d.transform=u?u(this.latestValues,""):"none",d;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Ax(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!gd(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const m=p.animationValues||p.latestValues;this.applyTransformsToTarget(),d.transform=rre(this.projectionDeltaWithTransform,this.treeScale,m),u&&(d.transform=u(m,d.transform));const{x,y:w}=this.projectionDelta;d.transformOrigin=`${x.origin*100}% ${w.origin*100}% 0`,p.animationValues?d.opacity=p===this?(c=(l=m.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:d.opacity=p===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const y in Jx){if(m[y]===void 0)continue;const{correct:v,applyTo:j}=Jx[y],k=d.transform==="none"?m[y]:v(m[y],p);if(j){const S=j.length;for(let _=0;_<S;_++)d[j[_]]=k}else d[y]=k}return this.options.layoutId&&(d.pointerEvents=p===this?Ax(o==null?void 0:o.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(EA),this.root.sharedNodes.clear()}}}function are(e){e.updateLayout()}function ore(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?na(p=>{const m=o?n.measuredBox[p]:n.layoutBox[p],x=Li(m);m.min=s[p].min,m.max=m.min+x}):kP(a,n.layoutBox,s)&&na(p=>{const m=o?n.measuredBox[p]:n.layoutBox[p],x=Li(s[p]);m.max=m.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+x)});const l=sf();Wh(l,s,n.layoutBox);const c=sf();o?Wh(c,e.applyTransform(i,!0),n.measuredBox):Wh(c,s,n.layoutBox);const d=!bP(l);let u=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:x}=p;if(m&&x){const w=br();$h(w,n.layoutBox,m.layoutBox);const y=br();$h(y,s,x.layoutBox),wP(w,y)||(u=!0),p.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=w,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function lre(e){Fh&&xd.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cre(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dre(e){e.clearSnapshot()}function EA(e){e.clearMeasurements()}function ure(e){e.isLayoutDirty=!1}function fre(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function FA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pre(e){e.resolveTargetDelta()}function hre(e){e.calcProjection()}
vendor: 5,781 bytes, line 734
734function mre(e){e.resetSkewAndRotation()}function gre(e){e.removeLeadSnapshot()}function AA(e,t,n){e.translate=cr(t.translate,0,n),e.scale=cr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function TA(e,t,n,s){e.min=cr(t.min,n.min,s),e.max=cr(t.max,n.max,s)}function xre(e,t,n,s){TA(e.x,t.x,n.x,s),TA(e.y,t.y,n.y,s)}function yre(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const vre={duration:.45,ease:[.4,0,.1,1]},NA=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),RA=NA("applewebkit/")&&!NA("chrome/")?Math.round:Ii;function DA(e){e.min=RA(e.min),e.max=RA(e.max)}function bre(e){DA(e.x),DA(e.y)}function kP(e,t,n){return e==="position"||e==="preserve-aspect"&&!Sne(kA(t),kA(n),.2)}function wre(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const jre=SP({attachResizeListener:(e,t)=>pm(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Kb={current:void 0},_P=SP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Kb.current){const e=new jre({});e.mount(window),e.setOptions({layoutScroll:!0}),Kb.current=e}return Kb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Sre={pan:{Feature:Lne},drag:{Feature:Mne,ProjectionNode:_P,MeasureLayout:xP}};function IA(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=s[i];a&&er.postRender(()=>a(t,Jm(t)))}class kre extends Bc{mount(){const{current:t}=this.node;t&&(this.unmount=See(t,n=>(IA(this.node,n,"Start"),s=>IA(this.node,s,"End"))))}unmount(){}}class _re extends Bc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xm(pm(this.node.current,"focus",()=>this.onFocus()),pm(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function PA(e,t,n){const{props:s}=e;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=s[i];a&&er.postRender(()=>a(t,Jm(t)))}class Cre extends Bc{mount(){const{current:t}=this.node;t&&(this.unmount=Eee(t,n=>(PA(this.node,n,"Start"),(s,{success:i})=>PA(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ij=new WeakMap,Yb=new WeakMap,Ere=e=>{const t=ij.get(e.target);t&&t(e)},Fre=e=>{e.forEach(Ere)};function Are({root:e,...t}){const n=e||document;Yb.has(n)||Yb.set(n,{});const s=Yb.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(Fre,{root:e,...t})),s[i]}function Tre(e,t,n){const s=Are(t);return ij.set(e,n),s.observe(e),()=>{ij.delete(e),s.unobserve(e)}}const Nre={some:0,all:1};class Rre extends Bc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Nre[i]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,a&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:p}=this.node.getProps(),m=d?u:p;m&&m(c)};return Tre(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Dre(t,n))&&this.startObserver()}unmount(){}}function Dre({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ire={inView:{Feature:Rre},tap:{Feature:Cre},focus:{Feature:_re},hover:{Feature:kre}},Pre={layout:{ProjectionNode:_P,MeasureLayout:xP}},aj={current:null},CP={current:!1};function Bre(){if(CP.current=!0,!!VS)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>aj.current=e.matches;e.addListener(t),t()}else aj.current=!1}const Ore=[...JI,Es,_c],Mre=e=>Ore.find(XI(e)),BA=new WeakMap;function Lre(e,t,n){for(const s in t){const i=t[s],a=n[s];if(Ts(i))e.addValue(s,i);else if(Ts(a))e.addValue(s,um(i,{owner:e}));else if(a!==i)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(s);e.addValue(s,um(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const OA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class zre{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xk,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=So.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,er.render(this.render,!1,!0))};
vendor: 5,866 bytes, line 734
734const{latestValues:c,renderState:d,onUpdate:u}=o;this.onUpdate=u,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=n1(n),this.isVariantNode=iI(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in m){const w=m[x];c[x]!==void 0&&Ts(w)&&w.set(c[x],!1)}}mount(t){this.current=t,BA.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),CP.current||Bre(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:aj.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){BA.delete(this.current),this.projection&&this.projection.unmount(),kc(this.notifyUpdate),kc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=eu.has(t),i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&er.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Mf){const n=Mf[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):br()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<OA.length;s++){const i=OA[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Lre(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=um(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){var s;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(KI(i)||LI(i))?i=parseFloat(i):!Mre(i)&&_c.test(n)&&(i=HI(t,n)),this.setBaseTarget(t,Ts(i)?i.get():i)),Ts(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=JS(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(s&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Ts(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new uk),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class EP extends zre{constructor(){super(...arguments),this.KeyframeResolver=QI}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ts(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Wre(e){return window.getComputedStyle(e)}
734class $re extends EP{constructor(){super(...arguments),this.type="html",this.renderInstance=hI}readValueFromInstance(t,n){if(eu.has(n)){const s=gk(n);return s&&s.default||0}else{const s=Wre(t),i=(uI(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return mP(t,n)}build(t,n,s){ek(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return sk(t,n,s)}}class Ure extends EP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=br}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(eu.has(n)){const s=gk(n);return s&&s.default||0}return n=mI.has(n)?n:KS(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return yI(t,n,s)}build(t,n,s){tk(t,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,s,i){gI(t,n,s,i)}mount(t){this.isSVGTag=rk(t.tagName),super.mount(t)}}const Vre=(e,t)=>XS(e)?new Ure(t):new $re(t,{allowProjection:e!==g.Fragment}),Hre=gee({...hne,...Ire,...Sre,...Pre},Vre),Jr=NZ(Hre);function qre(){return r.jsxs("section",{style:{background:"radial-gradient(ellipse 70% 55% at 50% 38%, #0D2D5E 0%, #081D40 40%, #050E25 75%, #030818 100%)",minHeight:"calc(100vh - 64px)",display:"flex",alignItems:"center",justifyContent:"center"},className:"relative px-6 overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")`}}),r.jsxs("div",{className:"relative text-center max-w-4xl mx-auto",style:{paddingTop:140,paddingBottom:120},children:[r.jsxs(Jr.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.5},className:"inline-flex items-center gap-2 bg-white/10 border border-white/20 text-white/80 text-xs font-medium px-4 py-1.5 rounded-full backdrop-blur-sm",style:{marginBottom:28},children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),"Plataforma de Inteligência de Talentos — PT-BR"]}),r.jsxs(Jr.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},style:{fontSize:"clamp(32px, 4.5vw, 52px)",fontWeight:800,letterSpacing:"-0.02em",lineHeight:1.15,marginTop:0,marginBottom:0},children:[r.jsx("span",{className:"block text-white",style:{marginBottom:6},children:"Uma Plataforma."}),r.jsxs("span",{className:"block",style:{marginBottom:6},children:[r.jsx("span",{style:{background:"linear-gradient(135deg, #7C5FFF 0%, #A87FFF 60%, #9068F5 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"Múltiplas"})," ",r.jsx("span",{style:{background:"linear-gradient(135deg, #F5A623 0%, #FF8040 55%, #FF5C2E 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"Ferramentas."})]}),r.jsx("span",{className:"block text-white",children:"Inteligência de Talentos Infinita."})]}),r.jsx(Jr.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},style:{fontSize:17,lineHeight:1.7,maxWidth:540,margin:"20px auto 28px",color:"rgba(255,255,255,0.60)"},children:"Publicação de vagas, gestão de candidatos, avaliações científicas e banco de talentos — integrados numa plataforma só. Comece de graça."}),r.jsxs(Jr.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"flex items-center justify-center flex-wrap",style:{gap:16},children:[r.jsx(ut,{to:"/signup",children:r.jsxs("button",{style:{background:"linear-gradient(135deg, #6C24F5, #7C5FFF)",color:"#fff",padding:"15px 32px",fontSize:15,fontWeight:600,borderRadius:8,border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:8},children:["Começar grátis",r.jsx(Rc,{style:{width:16,height:16}})]})}),r.jsx(ut,{to:"/pricing",children:r.jsx("button",{style:{background:"rgba(255,255,255,0.05)",color:"#fff",padding:"15px 32px",fontSize:15,fontWeight:600,borderRadius:8,border:"1px solid rgba(255,255,255,0.20)",cursor:"pointer"},children:"Ver planos"})})]}),r.jsx(Jr.p,{initial:{opacity:0}
734,animate:{opacity:1},transition:{delay:.6},className:"text-white/30 text-sm",style:{marginTop:20},children:"Grátis para começar · Sem cartão de crédito · Cancele a qualquer momento"})]})]})}function Gre(){const e=[{icon:On,color:"#0EA5E9",bg:"#EFF6FF",name:"Jobs",desc:"Vagas ilimitadas",path:"/jobs",badge:"Grátis",badgeBg:"#DCFCE7",badgeColor:"#166534",available:!0},{icon:Nr,color:"#F5A623",bg:"#FEF3C7",name:"ATS",desc:"Pipeline inteligente",path:"/ats",badge:null,available:!0},{icon:ts,color:"#6C24F5",bg:"#EDE9FE",name:"Assessments",desc:"Avaliações científicas",path:"/assessments",badge:null,available:!0},{icon:vl,color:"#10B981",bg:"#DCFCE7",name:"Talent",desc:"Banco de talentos",path:null,badge:"Em breve",badgeBg:"#F1F5F9",badgeColor:"#64748B",available:!1}];return r.jsx("section",{style:{background:"#F6F9FC",padding:"80px 24px 48px"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:48,alignItems:"center",marginBottom:48},children:[r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:13,fontWeight:600,color:"#6C24F5",textTransform:"uppercase",letterSpacing:"0.08em",margin:"0 0 12px"},children:"Tudo integrado"}),r.jsx("h2",{style:{fontSize:36,fontWeight:800,color:"#0A2540",lineHeight:1.15,margin:"0 0 16px"},children:"Chega de costurar ferramentas que não se falam."}),r.jsx("p",{style:{fontSize:16,color:"#64748B",lineHeight:1.7,margin:"0 0 24px",maxWidth:420},children:"Publicação de vagas, pipeline de candidatos, avaliações científicas e banco de talentos — integrados numa plataforma só. Dados conectados. Decisões melhores."})]}),r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx("img",{src:"https://i.imgur.com/Y5seekR.png",alt:"Summit integra LinkedIn, Google Sheets, Outlook, Gmail, Google Forms e Google Drive numa única plataforma",style:{width:"100%",maxWidth:480,height:"auto"}})})]}),r.jsx("div",{style:{background:"#ffffff",borderRadius:14,border:"1px solid #E3E8EF",display:"flex",overflow:"hidden"},children:e.map((t,n)=>{const s=t.icon,i=n===e.length-1,a=r.jsxs("div",{style:{flex:1,padding:"22px 18px",display:"flex",alignItems:"center",gap:14,borderRight:i?"none":"1px solid #E3E8EF",opacity:t.available?1:.55,cursor:t.available?"pointer":"default"},children:[r.jsx("div",{style:{width:40,height:40,borderRadius:10,background:t.bg,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(s,{style:{width:20,height:20,color:t.color}})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{fontSize:14,fontWeight:700,color:"#0A2540"},children:t.name}),t.badge&&r.jsx("span",{style:{fontSize:10,padding:"1px 6px",borderRadius:999,background:t.badgeBg,color:t.badgeColor,fontWeight:600},children:t.badge})]}),r.jsx("p",{style:{fontSize:12,color:"#94A3B8",margin:0},children:t.desc})]}),t.available&&r.jsx(Rc,{style:{width:16,height:16,color:"#CBD5E1",flexShrink:0}})]},t.name);return t.available&&t.path?r.jsx(ut,{to:t.path,style:{flex:1,textDecoration:"none",display:"contents"},children:a},t.name):a})})]})})}function Kre(){const e=[{id:"pipeline",badge:"Summit ATS",badgeColor:"#F5A623",badgeBg:"#FEF3C7",title:"Organize seu recrutamento visualmente",desc:"Arraste candidatos entre etapas, acompanhe scores de IA e tome decisões com contexto completo — tudo num único painel.",bullets:["Pipeline kanban com drag and drop","Rating com IA — score de 0 a 100 em 1 clique","Email em massa, agendamento e automações nativos"],imageUrl:null,mockup:"pipeline"},{id:"perfil",badge:"Inteligência artificial",badgeColor:"#6C24F5",badgeBg:"#EDE9FE",title:"Conheça cada candidato em profundidade",desc:"Perfil completo com resumo gerado por IA, histórico de interações, avaliações e arquivos — tudo acessível em um clique.",bullets:["Resumo e análise gerados por IA","Histórico completo: emails, notas, movimentações","Avaliações e arquivos integrados ao perfil"],imageUrl:null,mockup:"perfil"},{id:"extension",badge:"Sourcing",badgeColor:"#0EA5E9",badgeBg:"#DBEAFE",title:"Capture talentos direto do LinkedIn",desc:"Com a extensão para Chrome, salve perfis do LinkedIn no Summit com um clique. Dados capturados automaticamente, prontos para o pipeline.",bullets:["Captura automática de nome, cargo e contato","Adicione direto a uma vaga do pipeline","Extensão gratuita na Chrome Web Store"],imageUrl:"https://i.imgur.com/uvkxtqO.png",mockup:null},{id:"assessments",badge:"Summit Assessments",badgeColor:"#6C24F5",badgeBg:"#EDE9FE",title:"Avaliações científicas integradas ao pipeline",desc:"DISC, Big Five, MBTI e mais — envie testes direto do perfil do candidato e veja resultados sem sair da plataforma.",bullets:["Biblioteca com 27+ modelos validados","Relatórios individuais detalhados","Resultados aparecem direto no perfil do candidato"],imageUrl:"https://i.imgur.com/CVMKSKh.png",mockup:null},{id:"hiring",badge:"Colaboração",badgeColor:"#10B981",badgeBg:"#DCFCE7",title:"Compartilhe candidatos com gestores sem fricção",desc:"Envie um link público para o hiring manager avaliar candidatos. Sem criar conta, sem licença extra, sem onboarding. Ele abre, avalia e pronto.",bullets:["Link público — gestor avalia sem criar conta",'Aprovar, rejeitar ou "talvez" com comentário',"Sem custo extra — não consome asse
734nto do plano"],imageUrl:null,mockup:"hiring"},{id:"inteligencia",badge:"Inteligência de Talentos",badgeColor:"#0A2540",badgeBg:"#E2E8F0",title:"Transforme dados em decisões",desc:"O Summit cruza pipeline, avaliações e histórico para gerar insights acionáveis. Funil de conversão, health score do processo e recomendações de IA — tudo num painel só.",bullets:["Funil de candidatos com taxa de conversão por etapa","Health Score do processo — saúde da vaga em tempo real","Summit Insights — recomendações automáticas de IA"],imageUrl:null,mockup:"inteligencia"},{id:"agendamento",badge:"Produtividade",badgeColor:"#6C24F5",badgeBg:"#EDE9FE",title:"Agendamento nativo — zero ferramentas extras",desc:"Cada recrutador tem seu próprio link de agendamento. O candidato escolhe o melhor horário, o evento é criado no calendário e a confirmação dispara sozinha. Tudo dentro do Summit.",bullets:["Link de agendamento próprio para cada recrutador","Sincroniza com Google Calendar e Outlook","Confirmação automática por email para o candidato"],imageUrl:"https://i.imgur.com/m3nTk2C.png",mockup:null}];function t(){const a=[{name:"Sourced",count:4,candidates:[{init:"LP",bg:"#0EA5E9",name:"Lucas P.",role:"Data Analyst",score:45,scoreColor:"#F59E0B",scoreBg:"#FEF3C7"},{init:"MR",bg:"#8B5CF6",name:"Marina R.",role:"PM Senior",score:82,scoreColor:"#059669",scoreBg:"#DCFCE7"}]},{name:"Triagem",count:7,candidates:[{init:"AC",bg:"#10B981",name:"Ana C.",role:"UX Designer",score:91,scoreColor:"#059669",scoreBg:"#DCFCE7"},{init:"FS",bg:"#F59E0B",name:"Felipe S.",role:"Eng. Software",score:55,scoreColor:"#F59E0B",scoreBg:"#FEF3C7"}]},{name:"Entrevista",count:5,candidates:[{init:"JM",bg:"#EF4444",name:"Julia M.",role:"Sales Lead",score:78,scoreColor:"#059669",scoreBg:"#DCFCE7"}]},{name:"Proposta",count:3,candidates:[{init:"RC",bg:"#3B82F6",name:"Rafael C.",role:"DevOps",score:88,scoreColor:"#059669",scoreBg:"#DCFCE7"}]}];return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"Pipeline — Dev Frontend Senior"})]}),r.jsxs("div",{style:{padding:12},children:[r.jsx("div",{style:{display:"flex",gap:6,marginBottom:10},children:a.map(o=>r.jsxs("span",{style:{fontSize:10,color:"#64748B",padding:"2px 8px",background:"#F8F9FB",borderRadius:4,border:"1px solid #E3E8EF"},children:[o.name," ",r.jsx("span",{style:{fontWeight:600},children:o.count})]},o.name))}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:6},children:a.map(o=>r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:o.candidates.map(l=>r.jsxs("div",{style:{background:"#F8F9FB",border:"1px solid #E3E8EF",borderRadius:6,padding:8},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5,marginBottom:3},children:[r.jsx("div",{style:{width:18,height:18,borderRadius:"50%",background:l.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:8,color:"#fff",fontWeight:600},children:l.init}),r.jsx("span",{style:{fontSize:10,fontWeight:600,color:"#0A2540"},children:l.name})]}),r.jsx("p",{style:{fontSize:9,color:"#94A3B8",margin:"0 0 4px"},children:l.role}),r.jsx("span",{style:{fontSize:10,fontWeight:600,color:l.scoreColor,background:l.scoreBg,padding:"1px 6px",borderRadius:8},children:l.score})]},l.init))},o.name))})]})]})}function n(){return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}
734),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"summitinc.io/app/candidatos"})]}),r.jsxs("div",{style:{padding:14},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12,paddingBottom:12,borderBottom:"1px solid #E3E8EF"},children:[r.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:"#6C24F5",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,color:"#fff",fontWeight:600},children:"MC"}),r.jsxs("div",{style:{flex:1},children:[r.jsx("p",{style:{fontSize:14,fontWeight:600,color:"#0A2540",margin:0},children:"Mariana Campos"}),r.jsx("p",{style:{fontSize:11,color:"#94A3B8",margin:0},children:"Product Designer Senior"})]}),r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("span",{style:{fontSize:24,fontWeight:700,color:"#059669"},children:"87"}),r.jsx("p",{style:{fontSize:9,color:"#94A3B8",margin:0},children:"Score"})]})]}),r.jsx("div",{style:{display:"flex",gap:6,marginBottom:10},children:["Perfil","Vagas 3","Histórico 12","Avaliações 2"].map((a,o)=>r.jsx("span",{style:{fontSize:10,padding:"3px 8px",borderRadius:4,background:o===0?"#EDE9FE":"#F8F9FB",color:o===0?"#6C24F5":"#94A3B8",fontWeight:o===0?600:400,border:o===0?"none":"1px solid #E3E8EF"},children:a},a))}),r.jsxs("div",{style:{background:"#F8F9FB",borderRadius:8,padding:"8px 10px",border:"1px solid #E3E8EF",marginBottom:8},children:[r.jsx("p",{style:{fontSize:9,textTransform:"uppercase",color:"#94A3B8",letterSpacing:"0.05em",margin:"0 0 4px",fontWeight:600},children:"Resumo do perfil"}),r.jsx("p",{style:{fontSize:11,color:"#475569",lineHeight:1.5,margin:0},children:"Designer senior com 6 anos em produtos digitais. Forte em research, prototipação e design systems. Perfil colaborativo com liderança técnica."})]}),r.jsxs("div",{style:{background:"#FEF3C7",borderRadius:8,padding:"8px 10px",border:"1px solid #FDE68A"},children:[r.jsx("p",{style:{fontSize:9,textTransform:"uppercase",color:"#92400E",letterSpacing:"0.05em",margin:"0 0 4px",fontWeight:600},children:"Análise IA — 87"}),r.jsx("p",{style:{fontSize:11,color:"#78350F",lineHeight:1.5,margin:0},children:"Perfil altamente aderente. Experiência sólida em design de produto, com competências complementares em pesquisa e sistemas de design."})]})]})]})}function s(){return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"summitinc.io/app/analises"})]}),r.jsxs("div",{style:{padding:14},children:[r.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12},children:[r.jsxs("div",{style:{flex:1,background:"#F8F9FB",borderRadius:8,padding:"8px 10px",border:"1px solid #E3E8EF",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:8,color:"#94A3B8",margin:0},children:"Candidatos"}),r.jsx("p",{style:{fontSize:18,fontWeight:700,color:"#0A2540",margin:0},children:"47"})]}),r.jsxs("div",{style:{flex:1,background:"#F8F9FB",borderRadius:8,padding:"8px 10px",border:"1px solid #E3E8EF",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:8,color:"#94A3B8",margin:0},children:"Conversão"}),r.jsx("p",{style:{fontSize:18,fontWeight:700,color:"#059669",margin:0},children:"12%"})]}),r.jsxs("div",{style:{flex:1,background:"#F8F9FB",borderRadius:8,padding:"8px 10px",border:"1px solid #E3E8EF",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:8,color:"#94A3B8",margin:0},children:"Health Score"}),r.jsx("p",{style:{fontSize:18,fontWeight:700,color:"#059669",margin:0},children:"78"}),r.jsx("p",{style:{fontSize:8,color:"#059669",margin:0},children:"Saudável"})]})]}),r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("p",{style:{fontSize:10,fontWeight:600,color:"#0A2540",margin:"0 0 6px"},children:"Funil de candidatos"}),[{stage:"Sourced",count:18,width:"100%",color:"#F59E0B"},{stage:"Triagem",count:12,width:"67%",color:"#3B82F6"},{stage:"Entrevista",count:8,width:"44%",color:"#6C24F5"},{stage:"Proposta",count:5,width:"28%",color:"#0EA5E9"},{stage:"Contratado",count:2,width:"11%",color:"#059669"}].map(a=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:3},children:[r.jsx("span",{style:{fontSize:9,color:"#64748B",width:60,textAlign:"right"},children:a.stage}),r.jsx("div",{style:{flex:1,height:10,background:"#F1F5F9",borderRadius:4,overflow:"hidden"},children:r.jsx("div",{style:{width:a.width,height:"100%",background:a.color,borderRadius:4}})}),r.jsx("span",{style:{fontSize:9,fontWeight:600,color:"#0A2540",width:16,textAlign:"right"},children:a.count})]},a.stage))]}),r.jsxs("div",{style:{background:"#F0FDF4",borderRadius:8,padding:"8px 10px",border:"1px solid #BBF7D0"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,marginBottom:4},children:[r.jsx("span",{style:{fontSize:10,fontWeight:700,color:"#059669"},children:"✦ Summit Insights"}),r.jsx("span",{style:{fontSize:8,padding:"1px 5px",background:"#059669",color:"#fff",borderRadius:4,fontWeight:600},children:"IA"})]}
734),r.jsx("p",{style:{fontSize:10,color:"#166534",lineHeight:1.5,margin:"0 0 4px"},children:"Taxa de conversão Triagem → Entrevista de 67% indica boa qualidade de sourcing. Tempo médio de 3,4 dias na Entrevista — considere agendar retornos mais rápido."})]})]})]})}function i(){return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"summitinc.io/review/abc123"})]}),r.jsxs("div",{style:{padding:14},children:[r.jsxs("div",{style:{marginBottom:10},children:[r.jsx("p",{style:{fontSize:13,fontWeight:600,color:"#0A2540",margin:0},children:"Gerente de Projetos"}),r.jsx("p",{style:{fontSize:10,color:"#94A3B8",margin:0},children:"Compartilhado por Carolina · 4 candidatos"})]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,marginBottom:12},children:[{init:"RP",bg:"#6C24F5",name:"Renata Pires",role:"Coord. de Projetos · 8 anos",score:92,status:"Aprovado",statusBg:"#DCFCE7",statusColor:"#166534"},{init:"DM",bg:"#0EA5E9",name:"Diego Moura",role:"Gerente de Projetos · 6 anos",score:85,status:"Aprovado",statusBg:"#DCFCE7",statusColor:"#166534"},{init:"LS",bg:"#F59E0B",name:"Laura Santos",role:"Analista de Processos · 3 anos",score:48,status:"Talvez",statusBg:"#FEF3C7",statusColor:"#92400E"}].map(a=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"#F8F9FB",borderRadius:8,border:"1px solid #E3E8EF"},children:[r.jsx("div",{style:{width:22,height:22,borderRadius:"50%",background:a.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,color:"#fff",fontWeight:600},children:a.init}),r.jsxs("div",{style:{flex:1},children:[r.jsx("p",{style:{fontSize:11,fontWeight:600,color:"#0A2540",margin:0},children:a.name}),r.jsx("p",{style:{fontSize:9,color:"#94A3B8",margin:0},children:a.role})]}),r.jsx("span",{style:{fontSize:12,fontWeight:700,color:a.score>=70?"#059669":"#F59E0B"},children:a.score}),r.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"2px 8px",borderRadius:6,background:a.statusBg,color:a.statusColor},children:a.status})]},a.init))}),r.jsxs("div",{style:{display:"flex",gap:6},children:[r.jsx("button",{style:{flex:1,fontSize:11,textAlign:"center",padding:"8px 0",border:"1px solid #22C55E",color:"#059669",borderRadius:6,fontWeight:600,background:"#fff",cursor:"pointer"},children:"✓ Aprovar"}),r.jsx("button",{style:{flex:1,fontSize:11,textAlign:"center",padding:"8px 0",border:"1px solid #E3E8EF",color:"#94A3B8",borderRadius:6,fontWeight:600,background:"#fff",cursor:"pointer"},children:"? Talvez"}),r.jsx("button",{style:{flex:1,fontSize:11,textAlign:"center",padding:"8px 0",border:"1px solid #EF4444",color:"#EF4444",borderRadius:6,fontWeight:600,background:"#fff",cursor:"pointer"},children:"✕ Rejeitar"})]})]})]})}return r.jsx("section",{style:{padding:0},children:e.map((a,o)=>{const l=o%2!==0,c=o%2===0?"#ffffff":"#F6F9FC",d=a.imageUrl?r.jsx("div",{style:{borderRadius:12,overflow:"hidden",border:"1px solid #E3E8EF"},children:r.jsx("img",{src:a.imageUrl,alt:a.title,style:{width:"100%",display:"block"}})}):a.mockup==="pipeline"?r.jsx(t,{}):a.mockup==="perfil"?r.jsx(n,{}):a.mockup==="hiring"?r.jsx(i,{}):a.mockup==="inteligencia"?r.jsx(s,{}):null,u=r.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[r.jsx("div",{style:{display:"inline-flex",alignItems:"center",gap:5,background:a.badgeBg,padding:"3px 10px",borderRadius:20,marginBottom:14,alignSelf:"flex-start"},children:r.jsx("span",{style:{fontSize:11,fontWeight:600,color:a.badgeColor},children:a.badge})}),r.jsx("h3",{style:{fontSize:28,fontWeight:800,color:"#0A2540",margin:"0 0 10px",lineHeight:1.2},children:a.title}),r.jsx("p",{style:{fontSize:15,color:"#64748B",lineHeight:1.7,margin:"0 0 20px"},children:a.desc}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:a.bullets.map((p,m)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,fontSize:14,color:"#475569"},children:[r.jsx("div",{style:{width:20,height:20,borderRadius:"50%",background:"#DCFCE7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(fn,{style:{width:12,height:12,color:"#059669"}})}),p]},m))})]});return r.jsx("div",{style:{background:c,padding:"80px 24px",borderTop:o>0?"1px solid #E3E8EF":"none"},children:r.jsx("div",{style:{maxWidth:1060,margin:"0 auto",display:"grid",gridTemplateColumns:l?"1fr 1.2fr":"1.2fr 1fr",gap:48,alignItems:"center"},children:l?r.jsxs(r.Fragment,{children:[u,d]}):r.jsxs(r.Fragment,{children:[d,u]})})},a.id)})})}function Yre(){return r.jsx("section",{style:{background:"#0A2540",padding:"80px 24px"},children:r.jsxs("div",{style:{maxWidth:720,margin:"0 auto",textAlign:"center"},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,background:"rgba(108,36,245,0.2)",borderRadius:9999,padding:"4px 14px",marginBottom:24},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"#10B981"}}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:"#C4B5FD"},children:"Vagas limitadas"})]}),r.jsx("h2",{style:{fontSize:36,fontWeight:800,color:"#ffffff",marginBottom:16,lineHeight:1.2},children:"Seja um Cliente Founder"}),r.jsx("p",{style:{fontSize:17,color:"rgba(255,255,255,0.6)",lineHeight:1.7,marginBottom:32,maxWidth:520,margin:"0 auto 32px"},children:"Clientes Founder garantem 25% de desconto sobre o preço de tabela — para sempre. Sem prazo de expiração. Enquanto sua assinatura estiver ativa, o desconto é seu."}),r.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:16,marginBottom:32,flexWrap:"wrap"},children:[r.jsxs("div",{style:{background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.12)",borderRadius:12,padding:"16px 24px",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:28,fontWeight:800,color:"#C4B5FD",margin:0},children:"25%"}),r.jsx("p",{style:{fontSize:12,color:"rgba(255,255,255,0.5)",margin:0,marginTop:4},children:"Desconto permanente"})]}),r.jsxs("div",{style:{background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.12)",borderRadius:12,padding:"16px 24px",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:28,fontWeight:800,color:"#10B981",margin:0},children:"∞"}),r.jsx("p",{style:{fontSize:12,color:"rgba(255,255,255,0.5)",margin:0,marginTop:4},children:"Sem expiração"})]})]}),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:"linear-gradient(135deg, #6C24F5, #7C5FFF)",color:"#fff",padding:"15px 36px",fontSize:16,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Garantir minha vaga →"})})]})})}function Xre(){return r.jsx("section",{style:{background:"#ffffff",padding:"80px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:640,margin:"0 auto",textAlign:"center"},children:[r.jsx("h2",{style:{fontSize:32,fontWeight:800,color:"#0A2540",marginBottom:12,lineHeight:1.2},children:"Comece de graça. Expanda quando quiser. Economize a cada passo."}),r.jsx("p",{style:{fontSize:16,color:"#64748B",marginBottom:32,lineHeight:1.7},children:"Crie sua conta em 30 segundos, publique sua primeira vaga grátis e descubra o poder de uma plataforma 
734integrada."}),r.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:16,flexWrap:"wrap"},children:[r.jsx(ut,{to:"/signup",children:r.jsxs("button",{style:{background:"linear-gradient(135deg, #6C24F5, #7C5FFF)",color:"#fff",padding:"15px 32px",fontSize:15,fontWeight:600,borderRadius:8,border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:8},children:["Começar grátis ",r.jsx(Rc,{style:{width:16,height:16}})]})}),r.jsx(ut,{to:"/pricing",children:r.jsx("button",{style:{background:"#fff",color:"#0A2540",padding:"15px 32px",fontSize:15,fontWeight:600,borderRadius:8,border:"1px solid #E3E8EF",cursor:"pointer"},children:"Ver planos"})})]}),r.jsx("p",{style:{fontSize:13,color:"#94A3B8",marginTop:20},children:"Grátis para começar · Sem cartão de crédito · Cancele a qualquer momento"})]})})}function Jre(){return r.jsxs("div",{children:[r.jsx(qre,{}),r.jsx(Gre,{}),r.jsx(Kre,{}),r.jsx(Yre,{}),r.jsx(Xre,{})]})}function Qre(){const e="#6C24F5";return r.jsx("section",{style:{background:"linear-gradient(135deg, #12172a 0%, #0f0a1f 55%, #1a0020 100%)",padding:"160px 24px 220px"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,background:e+"22",border:"1px solid "+e+"55",padding:"4px 12px",borderRadius:9999,marginBottom:24},children:[r.jsx(ts,{style:{width:14,height:14,color:e}}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:"#A78BFA"},children:"Summit Assessments"})]}),r.jsx("h1",{style:{fontSize:44,fontWeight:800,color:"#fff",lineHeight:1.1,marginBottom:4,maxWidth:700},children:"Pare de contratar errado."}),r.jsx("h1",{style:{fontSize:44,fontWeight:800,color:"#A78BFA",lineHeight:1.1,marginBottom:20,maxWidth:700},children:"Comece a contratar com dados."}),r.jsx("p",{style:{fontSize:17,color:"rgba(255,255,255,0.55)",lineHeight:1.7,marginBottom:32,maxWidth:480},children:"Avaliações comportamentais e cognitivas calibradas para o mercado brasileiro. Decida com evidência, não com achismo. Em português, do jeito brasileiro."}),r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:12},children:[r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:e,color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Começar grátis →"})}),r.jsx(ut,{to:"/pricing",children:r.jsx("button",{style:{background:"transparent",color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:600,borderRadius:8,border:"1px solid rgba(255,255,255,0.20)",cursor:"pointer"},children:"Ver planos"})})]})]})})}function Zre(){const e=[{icon:t8,name:"Comportamental",desc:"DISC, Big Five, MBTI — como a pessoa se comporta, se comunica e toma decisões",color:"#7C5FFF",available:!0},{icon:qf,name:"Cognitivo",desc:"Raciocínio lógico, numérico e verbal — capacidade de aprender e resolver problemas",color:"#0EA5E9",available:!0},{icon:zy,name:"Idiomas",desc:"Inglês, espanhol e mais — avaliações calibradas no padrão CEFR internacional",color:"#10B981",available:!0},{icon:uS,name:"Socioemocional",desc:"Inteligência emocional, resiliência e empatia",color:"#EF4444",available:!1},{icon:On,name:"Liderança",desc:"Estilos de gestão e tomada de decisão",color:"#F5A623",available:!1},{icon:j8,name:"Técnico",desc:"Conhecimentos específicos por área",color:"#6366F1",available:!1}];return r.jsx("section",{className:"bg-white border-b border-[#E3E8EF]",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-20",children:[r.jsxs("div",{className:"text-center mb-12",children:[r.jsx("h2",{className:"text-3xl font-bold text-[#0A2540] mb-3",children:"Uma visão completa de cada candidato"}),r.jsx("p",{className:"text-gray-500 max-w-lg mx-auto",children:"Esferas de avaliação complementares que apoiam suas decisões de pessoas — vá além do que o currículo mostra."})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:e.map(t=>{const n=t.icon;return r.jsxs("div",{className:`border border-[#E3E8EF] rounded-xl p-6 text-center ${t.available?"":"opacity-50"}`,children:[r.jsx("div",{className:"w-12 h-12 rounded-xl mx-auto mb-4 flex items-center justify-center",style:{backgroundColor:t.color+"15"},children:r.jsx(n,{className:"w-6 h-6",style:{color:t.color}})}),r.jsx("p",{className:"font-semibold text-[#0A2540] mb-1",children:t.name}),r.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:t.desc}),!t.available&&r.jsx("span",{className:"inline-block mt-2 text-[10px] font-semibold uppercase tracking-wider px-2 py-0.5 rounded-full bg-blue-50 text-blue-600",children:"Em breve"})]},t.name)}
734)})]})})}const ese=[{icon:x8,title:"Filtre candidatos antes da entrevista",desc:"Triagem comportamental antes do RH gastar tempo. Funil mais limpo, decisões mais rápidas."},{icon:qf,title:"Conheça quem já está dentro",desc:"Mapeie perfis do time atual. Aloque pessoas onde elas rendem. Identifique sucessores."},{icon:Uy,title:"Desenvolva com base em dados",desc:"Pontos fortes e gaps mapeados por dimensão. PDIs que partem de evidência, não de palpite."}];function tse(){return r.jsxs("section",{className:"max-w-7xl mx-auto px-6 py-24",children:[r.jsxs("div",{className:"text-center mb-16",children:[r.jsx("h2",{className:"text-3xl font-bold text-[#0A2540] mb-4",children:"Para que serve o Summit Assessments?"}),r.jsx("p",{className:"text-gray-500 text-lg max-w-xl mx-auto",children:"Da triagem ao desenvolvimento. Decisões de talento orientadas por dados em todo o ciclo."})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:ese.map(e=>{const t=e.icon;return r.jsxs("div",{className:"border border-[#E3E8EF] rounded-2xl p-8",children:[r.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#7C5FFF]/10 flex items-center justify-center mb-6",children:r.jsx(t,{className:"w-6 h-6 text-[#7C5FFF]"})}),r.jsx("h3",{className:"text-lg font-semibold text-[#0A2540] mb-3",children:e.title}),r.jsx("p",{className:"text-gray-500 text-sm leading-relaxed",children:e.desc})]},e.title)})})]})}function nse({isOpen:e,onClose:t,categoryName:n,categoryKey:s}){const[i,a]=g.useState(""),[o,l]=g.useState(""),[c,d]=g.useState(""),[u,p]=g.useState(""),[m,x]=g.useState("idle"),[w,y]=g.useState(""),v=s==="sugestao_avaliacao",j=()=>{a(""),l(""),d(""),p(""),x("idle"),y("")},k=()=>{j(),t()},S=async()=>{if(!i.trim()||!o.trim()){y("Preencha nome e e-mail."),x("error");return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o.trim())){y("E-mail inválido."),x("error");return}x("loading"),y("");try{const F=v?"assessments_sugerir":"assessments_biblioteca_categoria";await ne.entities.LeadInteresseProduto.create({nome:i.trim(),email:o.trim().toLowerCase(),telefone:c.trim()||void 0,produto_interesse:v?"sugestao_avaliacao":s,origem:F}),x("success")}catch(F){console.error("Erro ao salvar lead:",F),y("Não foi possível enviar agora. Tente novamente em instantes."),x("error")}};return e?r.jsx(SZ,{children:r.jsx(Jr.div,{initial:{opacity:0}
734,animate:{opacity:1},exit:{opacity:0},onClick:k,className:"fixed inset-0 z-50 flex items-center justify-center px-4",style:{background:"rgba(5, 14, 37, 0.75)",backdropFilter:"blur(8px)"},children:r.jsxs(Jr.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},onClick:_=>_.stopPropagation(),className:"bg-white rounded-2xl shadow-2xl w-full max-w-md relative",style:{padding:32},children:[r.jsx("button",{onClick:k,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Fechar",children:r.jsx(Jt,{className:"w-5 h-5"})}),m==="success"?r.jsxs("div",{className:"text-center py-4",children:[r.jsx("div",{className:"w-14 h-14 rounded-full mx-auto mb-4 flex items-center justify-center bg-[#7C5FFF]/15 text-[#7C5FFF]",children:r.jsx(fn,{className:"w-7 h-7"})}),r.jsx("h3",{className:"text-xl font-bold text-[#0A2540] mb-2",children:"Recebido!"}),r.jsxs("p",{className:"text-gray-500 text-sm mb-6",children:["Vamos avisar você assim que avaliações de ",r.jsx("strong",{children:n})," estiverem disponíveis."]}),r.jsx(on,{onClick:k,className:"font-semibold w-full",children:"Fechar"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mb-4 bg-[#7C5FFF]/15 text-[#7C5FFF]",children:r.jsx(fn,{className:"w-6 h-6"})}),r.jsxs("h3",{className:"text-xl font-bold text-[#0A2540] mb-1",children:["Tenho interesse em ",n]}),r.jsx("p",{className:"text-sm text-gray-500 mb-5",children:"Deixe seu contato. Avisamos assim que estiver disponível."}),r.jsxs("div",{className:"space-y-3",children:[v&&r.jsxs("div",{children:[r.jsxs("label",{className:"text-xs font-medium text-gray-700 mb-1 block",children:["Qual avaliação você gostaria? ",r.jsx("span",{className:"text-gray-400 font-normal",children:"(opcional)"})]}),r.jsx("textarea",{value:u,onChange:_=>p(_.target.value),disabled:m==="loading",rows:3,className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#6C24F5]/30 focus:border-[#6C24F5] disabled:bg-gray-50 resize-none",placeholder:"Descreva o tipo de avaliação que sua empresa precisa..."})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"text-xs font-medium text-gray-700 mb-1 block",children:["Nome ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"text",value:i,onChange:_=>a(_.target.value),disabled:m==="loading",className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#6C24F5]/30 focus:border-[#6C24F5] disabled:bg-gray-50",placeholder:"Seu nome"})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"text-xs font-medium text-gray-700 mb-1 block",children:["E-mail corporativo ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"email",value:o,onChange:_=>l(_.target.value),disabled:m==="loading",className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#6C24F5]/30 focus:border-[#6C24F5] disabled:bg-gray-50",placeholder:"[email protected]"})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"text-xs font-medium text-gray-700 mb-1 block",children:["Telefone ",r.jsx("span",{className:"text-gray-400 font-normal",children:"(opcional)"})]}),r.jsx("input",{type:"tel",value:c,onChange:_=>d(_.target.value),disabled:m==="loading",className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#6C24F5]/30 focus:border-[#6C24F5] disabled:bg-gray-50",placeholder:"(11) 99999-9999"})]})]}),m==="error"&&w&&r.jsx("p",{className:"text-sm text-red-600 mt-3",children:w}),r.jsx(on,{onClick:S,disabled:m==="loading",className:"font-semibold w-full mt-5 bg-[#7C5FFF] hover:bg-[#6B4FE0] text-white",children:m==="loading"?r.jsxs(r.Fragment,{children:[r.jsx(rt,{className:"w-4 h-4 mr-2 animate-spin"}),"Enviando..."]}):"Enviar"}),r.jsx("p",{className:"text-[11px] text-gray-400 mt-3 text-center",children:"Seus dados ficam protegidos e são usados apenas para contato sobre este produto."})]})]})})}):null}const MA=[{icon:t8,name:"Comportamental",key:"comportamental",available:!0,description:"DISC, Big Five e perfis de personalidade aplicados a contexto de trabalho.",examples:"DISC · Big Five · Eneagrama profissional"},{icon:qf,name:"Cognitivo",key:"cognitivo",available:!0,description:"Raciocínio lógico, numérico, verbal e capacidade de aprendizagem.",examples:"Raciocínio lógico · Numérico · Verbal"},{icon:zy,name:"Línguas",key:"linguas",available:!0,description:"Avaliações bilíngues calibradas, alinhadas ao padrão CEFR internacional.",examples:"Inglês CEFR · Espanhol · Francês"},{icon:uS,name:"Socioemocional",key:"socioemocional",available:!1,description:"Inteligência emocional, resiliência, empatia e habilidades interpessoais.",examples:"Em desenvolvimento — junte-se à lista"},{icon:On,name:"Liderança",key:"lideranca",available:!1,description:"Estilos de gestão, tomada de decisão estratég
734ica, gestão de conflitos.",examples:"Em desenvolvimento — junte-se à lista"},{icon:j8,name:"Técnico",key:"tecnico",available:!1,description:"Conhecimentos específicos por área: tecnologia, finanças, vendas, operações.",examples:"Em desenvolvimento — junte-se à lista"}];function rse(){const[e,t]=g.useState(null),n=i=>t(i),s=()=>t(null);return r.jsxs("section",{className:"bg-white py-24 border-t border-[#E3E8EF]",children:[r.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[r.jsxs("div",{className:"mb-12",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-[#7C5FFF] mb-3",children:"Biblioteca Summit"}),r.jsxs("h2",{className:"text-3xl font-bold text-[#0A2540] mb-3",children:["6 categorias. Biblioteca em expansão,",r.jsx("br",{className:"hidden md:block"}),"em construção com nossos clientes."]}),r.jsx("p",{className:"text-gray-500 max-w-2xl leading-relaxed",children:"Construímos cada avaliação calibrada para o mercado brasileiro, em português nativo, com base científica reconhecida. Novas avaliações entram a cada ciclo, priorizadas pelo que nossos clientes mais precisam."})]}),r.jsxs("div",{className:"border border-[#E3E8EF] rounded-xl overflow-hidden bg-white",children:[r.jsxs("div",{className:"hidden md:grid md:grid-cols-12 gap-4 px-6 py-3 bg-[#F6F9FC] border-b border-[#E3E8EF]",children:[r.jsx("div",{className:"col-span-4 text-[10px] font-semibold uppercase tracking-[0.12em] text-gray-500",children:"Categoria"}),r.jsx("div",{className:"col-span-4 text-[10px] font-semibold uppercase tracking-[0.12em] text-gray-500",children:"Descrição"}),r.jsx("div",{className:"col-span-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-gray-500",children:"Status"}),r.jsx("div",{className:"col-span-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-gray-500 text-right",children:"Ação"})]}),MA.map((i,a)=>{const o=i.icon,l=a===MA.length-1;return r.jsxs("div",{className:`grid grid-cols-1 md:grid-cols-12 gap-4 px-6 py-5 items-center hover:bg-[#FAFBFC] transition-colors ${l?"":"border-b border-[#E3E8EF]"}`,children:[r.jsxs("div",{className:"md:col-span-4 flex items-center gap-3",children:[r.jsx("div",{className:`w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0 ${i.available?"bg-[#7C5FFF]/10 text-[#7C5FFF]":"bg-gray-100 text-gray-400"}`,children:r.jsx(o,{className:"w-4 h-4"})}),r.jsxs("div",{children:[r.jsx("p",{className:`font-semibold text-sm ${i.available?"text-[#0A2540]":"text-gray-500"}`,children:i.name}),r.jsx("p",{className:"text-[11px] text-gray-400 mt-0.5",style:{fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:i.examples})]})]}),r.jsx("div",{className:"md:col-span-4",children:r.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:i.description})}),r.jsx("div",{className:"md:col-span-2",children:i.available?r.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-emerald-700 whitespace-nowrap",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 flex-shrink-0"}),"Disponível"]}):r.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-blue-600 whitespace-nowrap",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-blue-500 animate-pulse flex-shrink-0"}),"Em breve"]})}),r.jsx("div",{className:"md:col-span-2 flex md:justify-end",children:i.available?r.jsx(ut,{to:"/signup",className:"text-gray-400 hover:text-[#7C5FFF] transition-colors","aria-label":`Conhecer ${i.name}`,children:r.jsx(Qr,{className:"w-5 h-5"})}):r.jsx("button",{onClick:()=>n(i),className:"text-[11px] font-semibold uppercase tracking-wider text-[#7C5FFF] hover:text-[#6B4FE0] transition-colors whitespace-nowrap",children:"Tenho interesse →"})})]},i.key)})]}),r.jsxs("div",{className:"mt-8 p-6 bg-[#F6F9FC] border border-[#E3E8EF] rounded-xl flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-semibold text-[#0A2540] mb-1",children:"Precisa de algo específico que ainda não está aqui?"}),r.jsx("p",{className:"text-xs text-gray-500",children:"Nossa biblioteca cresce a partir da necessidade dos nossos clientes."})]}),r.jsx("button",{onClick:()=>n({name:"Avaliação personalizada",key:"sugestao_avaliacao"}),className:"text-sm font-semibold text-[#7C5FFF] hover:text-[#6B4FE0] transition-colors whitespace-nowrap",children:"Sugerir uma avaliação →"})]})]}),r.jsx(nse,{isOpen:!!e,onClose:s,categoryName:(e==null?void 0:e.name)||"",categoryKey:(e==null?void 0:e.key)||""})]})}function sse(){return r.jsx("section",{className:"max-w-7xl mx-auto px-6 py-24 border-t border-[#
734E3E8EF]",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-[#7C5FFF] mb-3",children:"Relatórios"}),r.jsx("h2",{className:"text-3xl font-bold text-[#0A2540] mb-4",children:"Relatórios que o gestor realmente lê"}),r.jsx("p",{className:"text-gray-500 leading-relaxed mb-8",children:"Cada avaliação gera um relatório visual com pontuação por dimensão, perfil primário, estilo de comunicação e orientações de gestão. Informação acionável, não um PDF de 40 páginas."}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-5 h-5 rounded-full bg-emerald-100 flex items-center justify-center flex-shrink-0",children:r.jsx(fn,{className:"w-3 h-3 text-emerald-600"})}),r.jsx("span",{className:"text-sm text-gray-600",children:"Pontuação visual por dimensão"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-5 h-5 rounded-full bg-emerald-100 flex items-center justify-center flex-shrink-0",children:r.jsx(fn,{className:"w-3 h-3 text-emerald-600"})}),r.jsx("span",{className:"text-sm text-gray-600",children:"Perfil primário com orientações de gestão"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-5 h-5 rounded-full bg-emerald-100 flex items-center justify-center flex-shrink-0",children:r.jsx(fn,{className:"w-3 h-3 text-emerald-600"})}),r.jsx("span",{className:"text-sm text-gray-600",children:"Integrado ao perfil do candidato no ATS"})]})]})]}),r.jsxs("div",{className:"bg-[#F6F9FC] border border-[#E3E8EF] rounded-2xl p-8",children:[r.jsx("p",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-6",children:"Exemplo — Relatório DISC"}),r.jsx("div",{className:"space-y-4 mb-6",children:[{label:"Dominância",value:78,color:"#DC2626"},{label:"Influência",value:54,color:"#F5A623"},{label:"Estabilidade",value:32,color:"#16A34A"},{label:"Conscienciosidade",value:61,color:"#2563EB"}].map(e=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[r.jsx("span",{className:"font-medium",children:e.label}),r.jsxs("span",{className:"text-gray-400",children:[e.value,"%"]})]}),r.jsx("div",{className:"h-2 bg-gray-100 rounded-full",children:r.jsx("div",{className:"h-2 rounded-full",style:{width:`${e.value}%`,backgroundColor:e.color}})})]},e.label))}),r.jsxs("div",{className:"border-t border-[#E3E8EF] pt-5",children:[r.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Perfil primário"}),r.jsx("p",{className:"text-base font-bold text-[#0A2540] mb-2",children:"Dominante-Consciente (D/C)"}),r.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:"Orientado a metas com pensamento analítico. Toma decisões rápidas e fundamentadas. Prefere autonomia com métricas claras. Comunica-se de forma direta — responde melhor a feedbacks baseados em dados."})]})]})]})})}function ise(){const e=[{icon:zH,title:"Conformidade LGPD",desc:"Tratamos dados de candidatos como pessoais sensíveis. Finalidade específica, prazo de retenção definido e direitos do titular respeitados em todas as etapas."},{icon:hS,title:"Infraestrutura certificada",desc:"Plataforma com certificações SOC 2 Type II e ISO 27001. Criptografia em trânsito e em repouso, backups automáticos e monitoramento contínuo."},{icon:Ly,title:"Pagamentos seguros",desc:"Processamento via provedores certificados PCI DSS. Dados de cartão jamais armazenados em nossos servidores."},{icon:h8,title:"Suporte humano em português",desc:"Atendimento por humanos, em português brasileiro. Resposta em até 4 horas úteis em horário comercial."}];return r.jsx("section",{className:"bg-white py-24 border-t border-[#E3E8EF]",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-16",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-[#7C5FFF] mb-3",children:"Confiança e segurança"}),r.jsx("h2",{className:"text-3xl font-bold text-[#0A2540] mb-4",children:"Decisões sobre pessoas exigem cuidado com dados."}),r.jsx("p",{className:"text-gray-500 text-lg max-w-2xl mx-auto leading-relaxed",children:"Construímos o Summit em uma base de governança, segurança e atendimento humano — porque dados de candidatos não são números, são pessoas."})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map(t=>{const n=t.icon;return r.jsxs(Jr.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0}
734,className:"border border-[#E3E8EF] rounded-2xl p-6",children:[r.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#7C5FFF]/10 flex items-center justify-center mb-4",children:r.jsx(n,{className:"w-5 h-5 text-[#7C5FFF]"})}),r.jsx("h4",{className:"font-semibold text-[#0A2540] mb-2 text-base",children:t.title}),r.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:t.desc})]},t.title)})}),r.jsxs("p",{className:"text-center text-xs text-gray-400 mt-12",children:["Mais detalhes em nossos"," ",r.jsx(ut,{to:"/legal",className:"underline hover:text-[#7C5FFF]",children:"Termos de Uso"})," ","e"," ",r.jsx(ut,{to:"/legal",className:"underline hover:text-[#7C5FFF]",children:"Política de Privacidade"}),"."]})]})})}function ase(){return r.jsx("section",{className:"bg-[#F6F9FC] py-20 border-t border-[#E3E8EF]",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-12",children:[r.jsx("h2",{className:"text-3xl font-bold text-[#0A2540] mb-3",children:"Escolha o plano certo para sua operação"}),r.jsx("p",{className:"text-gray-500",children:"Comece grátis. Expanda quando precisar de mais volume."})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:[r.jsxs("div",{className:"bg-white border border-[#E3E8EF] rounded-2xl p-7",children:[r.jsx("p",{className:"text-lg font-bold text-[#0A2540] mb-1",children:"Free"}),r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Para explorar sem compromisso"}),r.jsxs("div",{className:"mb-5",children:[r.jsx("span",{className:"text-3xl font-extrabold text-[#0A2540]",children:"R$0"}),r.jsx("span",{className:"text-sm text-gray-500 ml-1",children:"/para sempre"})]}),["30 créditos/mês","Modelo DISC básico","Relatórios individuais","1 assento","Suporte por e-mail"].map(e=>r.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-2",children:[r.jsx(fn,{className:"w-4 h-4 text-[#6C24F5] flex-shrink-0"}),e]},e)),r.jsx(ut,{to:"/signup",className:"block mt-5",children:r.jsx("button",{className:"w-full py-2.5 rounded-lg text-sm font-semibold border border-[#E3E8EF] text-[#0A2540] bg-white cursor-pointer",children:"Começar grátis →"})})]}),r.jsxs("div",{className:"bg-white border border-[#E3E8EF] rounded-2xl p-7",children:[r.jsx("p",{className:"text-lg font-bold text-[#0A2540] mb-1",children:"Starter"}),r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Volume e automação para equipes"}),r.jsxs("div",{className:"mb-5",children:[r.jsx("span",{className:"text-sm text-gray-400 line-through mr-2",children:"R$499"}),r.jsx("span",{className:"text-3xl font-extrabold text-[#0A2540]",children:"R$399"}),r.jsx("span",{className:"text-sm text-gray-500 ml-1",children:"/mês"})]}),r.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:12,padding:"7px 10px",borderRadius:7,background:"rgba(16,185,129,0.06)",border:"1px solid rgba(16,185,129,0.1)"},children:r.jsxs("span",{style:{fontSize:11,color:"#10B981"},children:[r.jsx("strong",{children:"Founders:"})," R$299/mês"]})}),["200 créditos/mês","Todos os modelos Summit","Até 3 testes por campanha","Até 3 assentos","Relatórios completos","Suporte prioritário"].map(e=>r.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-2",children:[r.jsx(fn,{className:"w-4 h-4 text-[#6C24F5] flex-shrink-0"}),e]},e)),r.jsx(ut,{to:"/signup",className:"block mt-5",children:r.jsx("button",{className:"w-full py-2.5 rounded-lg text-sm font-semibold bg-[#6C24F5] text-white border-none cursor-pointer",children:"Assinar Starter →"})})]}),r.jsxs("div",{className:"bg-white border-2 border-[#6C24F5] rounded-2xl p-7 relative",children:[r.jsx("span",{className:"absolute -top-3 right-4 text-xs font-bold px-4 py-1 bg-[#6C24F5] text-white rounded-full",children:"Mais popular"}),r.jsx("p",{className:"text-lg font-bold text-[#0A2540] mb-1",children:"Growth"}),r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Para operações maiores"}),r.jsxs("div",{className:"mb-5",children:[r.jsx("span",{className:"text-sm text-gray-400 line-through mr-2",children:"R$899"}),r.jsx("span",{className:"text-3xl font-extrabold text-[#0A2540]",children:"R$799"}),r.jsx("span",{className:"text-sm text-gray-500 ml-1",children:"/mês"})]}),r.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:12,padding:"7px 10px",borderRadius:7,background:"rgba(16,185,129,0.06)",border:"1px solid rgba(16,185,129,0.1)"},children:r.jsxs("span",{style:{fontSize:11,color:"#10B981"},children:[r.jsx("strong",{children:"Founders:"})," R$599/mês"]})}),["600 créditos/mês","Todos os modelos Summit","Até 5 testes por campanha","Até 10 assentos","Relatórios completos + export","Suporte dedicado"].map(e=>r.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-2",children:[r.jsx(fn,{className:"w-4 h-4 text-[#6C24F5] flex-shrink-0"}),e]},e)),r.jsx(ut,{to:"/signup",className:"block mt-5",children:r.jsx("button",{className:"w-full py-2.5 rounded-lg text-sm font-semibold bg-[#6C24F5] text-white border-none cursor-pointer",children:"Assinar Growth →"})})]})]})]})})}function ose(){return r.jsx("section",{className:"py-12 px-6",children:r.jsx("div",{className:"max-w-5xl mx-auto",children:r.jsxs("div",{style:{borderRadius:14,background:"linear-gradient(135deg, #0F0B2E 0%, #1A1145 40%, #2D1B69 70%, #3D2580 100%)",padding:"28px 32px",position:"relative",overflow:"hidden",display:"flex",alignItems:"center",gap:32},children:[r.jsx("div",{style:{position:"absolute",top:-30,right:-30,width:140,height:140,borderRadius:"50%",background:"rgba(99,91,255,0.08)",pointerEvents:"none"}}),r.jsxs("div",{style:{flex:1,position:"relative",zIndex:1},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 10px",borderRadius:16,background:"rgba(108,36,245,0.2)",border:"1px solid rgba(108,36,245,0.3)",fontSize:11,color:"#A78BFA",marginBottom:12},children:[r.jsx(Va,{size:11})," Assessments + ATS"]}),r.jsxs("div",{style:{fontSize:22,fontWeight:800,color:"#FFFFFF",lineHeight:1.3},children:["Quando ciência",r.jsx("br",{}),r.jsx("span",{style:{background:"linear-gradient(90deg, #F97316, #FB923C, #FBBF24)",WebkitBackgroun
734dClip:"text",WebkitTextFillColor:"transparent"},children:"encontra recrutamento."})]}),r.jsx("div",{style:{fontSize:13,color:"#A0A0B8",lineHeight:1.6,marginTop:8,marginBottom:16,maxWidth:360},children:"O Assessments identifica elementos e aponta tendências que o currículo não mostra. O ATS organiza o fluxo. Juntos, você seleciona com mais clareza."}),r.jsxs("div",{style:{display:"flex",gap:10},children:[r.jsx(ut,{to:"/ats",style:{display:"inline-flex",alignItems:"center",background:"#6C24F5",color:"#fff",borderRadius:8,padding:"9px 20px",fontSize:13,fontWeight:500,textDecoration:"none",boxShadow:"0 2px 8px rgba(99,91,255,0.3)"},children:"Conhecer ATS →"}),r.jsx(ut,{to:"/pricing",style:{background:"rgba(255,255,255,0.08)",color:"#D4D4E0",border:"1px solid rgba(255,255,255,0.12)",borderRadius:8,padding:"9px 16px",fontSize:13,textDecoration:"none",display:"inline-flex",alignItems:"center"},children:"Ver planos"})]})]}),r.jsx("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",gap:8,position:"relative",zIndex:1},children:[{icon:ts,text:"Pipeline visual com insights de candidatos"},{icon:ui,text:"Resultados de testes no perfil"},{icon:h8,text:"Email e agendamento nativos"},{icon:Ly,text:"Desconto automático multimódulo"}].map((e,t)=>{const n=e.icon;return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,padding:"6px 12px",borderRadius:8,background:"rgba(99,91,255,0.12)"},children:[r.jsx("div",{style:{width:26,height:26,borderRadius:"50%",background:"rgba(167,139,250,0.15)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(n,{size:13,style:{color:"#A78BFA"}})}),r.jsx("span",{style:{fontSize:12,color:"#D4D4E0",whiteSpace:"nowrap"},children:e.text})]},t)})})]})})})}function lse(){return r.jsx("section",{className:"py-16 px-6",children:r.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[r.jsx("h2",{className:"text-2xl font-extrabold text-[#0A2540] mb-4",children:"Avalie seus candidatos com dados e método."}),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:"linear-gradient(135deg, #6C24F5, #7C5FFF)",color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Criar conta grátis →"})})]})})}function cse(){return r.jsxs("div",{className:"bg-white",children:[r.jsx(Qre,{}),r.jsx(Zre,{}),r.jsx(tse,{}),r.jsx(rse,{}),r.jsx(sse,{}),r.jsx(ise,{}),r.jsx(ase,{}),r.jsx(ose,{}),r.jsx(lse,{})]})}const dse=new Set(["gmail.com","hotmail.com","outlook.com","yahoo.com","icloud.com","live.com","bol.com.br","uol.com.br","terra.com.br","ig.com.br"]);function LA(e){var n;const t=(n=e.split("@")[1])==null?void 0:n.toLowerCase();return t?dse.has(t):!1}const zA={jobs:{key:"jobs",label:"Jobs",color:"#FF1B50",icon:On,plans:[{name:"Free",desc:"Para começar a publicar vagas",price:"R$0",period:"/para sempre",oldPrice:null,cta:"Começar grátis",ctaVariant:"outline",popular:!1,features:["Vagas ilimitadas","Job board público","Candidaturas com perfil completo","Dashboard básico","Até 50 candidatos ativos"]},{name:"Starter",desc:"Página de carreiras e mais alcance",price:"R$149",period:"/mês por assento",oldPrice:"R$199",cta:"Assinar Starter",ctaVariant:"primary",popular:!1,features:["Tudo do Free +","Página de carreiras","Candidatos ilimitados","Testes nas vagas","Notificações avançadas"]},{name:"Growth",desc:"Múltiplos canais e vídeo",price:"R$399",period:"/mês por assento",oldPrice:"R$499",cta:"Assinar Growth",ctaVariant:"primary",popular:!0,features:["Tudo do Starter +","Multi-Job Board","Video Job Pitch","Analytics avançado","Campos customizados"]}]},ats:{key:"ats",label:"ATS",color:"#F5A623",icon:Nr,plans:[{name:"Free",desc:"Para explorar o pipeline",price:"R$0",period:"/para sempre",oldPrice:null,cta:"Começar grátis",ctaVariant:"outline",popular:!1,features:["Pipeline kanban básico","Até 50 candidatos","Visualização de candidaturas","Hiring manager links","Extensão LinkedIn","1 assento"]},{name:"Starter",desc:"Para quem quer organizar e ganhar tempo",price:"R$349",period:"/mês por assento",oldPrice:"R$449",cta:"Assinar Starter",ctaVariant:"primary",popular:!1,founderPrice
734:"R$262",features:["Pipeline kanban ilimitado","Email nativo (Gmail + Outlook)","Agendamento nativo","Hiring manager links","Extensão LinkedIn (sourcing direto)","Automações básicas"]},{name:"Growth",desc:"Para quem quer decidir com inteligência",price:"R$549",period:"/mês por assento",oldPrice:"R$649",cta:"Assinar Growth",ctaVariant:"primary",popular:!0,founderPrice:"R$412",features:["Tudo do Starter +","Rating com IA (score + análise)","Resumo de candidato com IA","Extensão LinkedIn (sourcing direto)","Automações avançadas (9 tipos)","Analytics completo + Insights","Campos customizados"]}]},assessments:{key:"assessments",label:"Assessments",color:"#6C24F5",icon:ts,plans:[{name:"Free",desc:"Para explorar sem compromisso",price:"R$0",period:"/para sempre",oldPrice:null,cta:"Começar grátis",ctaVariant:"outline",popular:!1,features:["30 créditos/mês","Modelo DISC básico","Relatórios individuais","1 assento","Suporte por e-mail"]},{name:"Starter",desc:"Volume e automação para equipes",price:"R$399",period:"/mês",oldPrice:"R$499",cta:"Assinar Starter",ctaVariant:"primary",popular:!1,founderPrice:"R$299",features:["200 créditos/mês","Todos os modelos Summit","Até 3 testes por campanha","Até 3 assentos","Relatórios completos","Suporte prioritário"]},{name:"Growth",desc:"Para operações maiores",price:"R$799",period:"/mês",oldPrice:"R$899",cta:"Assinar Growth",ctaVariant:"primary",popular:!0,founderPrice:"R$599",features:["600 créditos/mês","Todos os modelos Summit","Até 5 testes por campanha","Até 10 assentos","Relatórios completos + export","Suporte dedicado"]}]},talent:{key:"talent",label:"Talent",color:"#10B981",icon:vl,plans:null}},use=[{q:"Posso ativar um módulo por vez?",a:"Sim. Cada módulo é independente. Comece com Jobs (grátis), ative o ATS quando precisar de pipeline, e adicione Assessments quando quiser avaliar candidatos com dados. Sem pacote forçado."},{q:"O plano Gratuito tem prazo de expiração?",a:"Não. O plano Free é permanente em todos os módulos. Use sem limite de tempo. Se precisar de mais recursos, faça upgrade quando quiser."},{q:"Posso mudar de plano a qualquer momento?",a:"Sim. Upgrade ou downgrade quando quiser, diretamente pela plataforma. As mudanças passam a valer no próximo ciclo de cobrança."},{q:"Quais formas de pagamento vocês aceitam?",a:"Cartão de crédito das principais bandeiras e boleto bancário. Outras formas estão sendo avaliadas."},{q:"Existe contrato de fidelidade ou multa por cancelamento?",a:"Não. Cancele quando quiser. Sem fidelidade, sem multa. O acesso permanece até o fim do ciclo já pago."},{q:"Como funcionam os créditos do Assessments?",a:"Cada crédito equivale a um candidato avaliado. Quando o candidato finaliza a avaliação, um crédito é consumido. Os créditos renovam mensalmente."},{q:"Os candidatos precisam pagar para fazer as avaliações?",a:"Não. Os candidatos recebem um link único e respondem gratuitamente. Quem paga é a empresa."},{q:"Vocês emitem nota fiscal?",a:"Sim. Nota fiscal de serviço para todos os planos pagos, em conformidade com a legislação brasileira."},{q:"Os dados dos candidatos ficam seguros?",a:"Sim. Operamos em conformidade com a LGPD, com infraestrutura certificada SOC 2 Type II e ISO 27001, criptografia em trânsito e em repouso."}];function fse({faq:e}){const[t,n]=g.useState(!1);return r.jsxs("div",{style:{borderBottom:"1px solid #E3E8EF"},children:[r.jsxs("button",{onClick:()=>n(s=>!s),style:{width:"100%",background:"transparent",border:"none",cursor:"pointer",padding:"20px 0",display:"flex",alignItems:"center",justifyContent:"space-between",textAlign:"left"},children:[r.jsx("span",{style:{fontSize:16,fontWeight:600,color:"#0A2540",lineHeight:1.4,flex:1,paddingRight:16},children:e.q}),t?r.jsx(Dc,{style:{width:20,height:20,color:"#6C24F5",flexShrink:0}}):r.jsx(ar,{style:{width:20,height:20,color:"#6C24F5",flexShrink:0}})]}),t&&r.jsx("p",{style:{fontSize:15,color:"#64748B",lineHeight:1.6,paddingBottom:20,margin:0},children:e.a})]})}function pse({isOpen:e,onClose:t}){const[n,s]=g.useState({nome:"",email:"",telefone:"",empresa:"",tamanho_time:"",mensagem:""}),[i,a]=g.useState(""),[o,l]=g.useState(!1),[c,d]=g.useState(!1),[u,p]=g.useState("");
734if(!e)return null;const m={width:"100%",padding:"10px 12px",borderRadius:8,border:"1px solid #CBD5E1",fontSize:14,color:"#0A2540",background:"#ffffff",fontFamily:"inherit",boxSizing:"border-box"},x={display:"block",fontSize:13,fontWeight:600,color:"#0A2540",marginBottom:6},w={marginBottom:16},y=k=>{const S=k.target.value;s(_=>({..._,email:S})),S&&LA(S)?a("Por favor, use seu email corporativo."):a("")},v=async k=>{if(k.preventDefault(),!(!n.nome.trim()||!n.email.trim()||!n.empresa.trim()||!n.tamanho_time)){if(LA(n.email)){a("Por favor, use seu email corporativo.");return}l(!0),p("");try{await ne.entities.LeadInteresseProduto.create({nome:n.nome.trim(),email:n.email.trim().toLowerCase(),telefone:n.telefone.trim()||null,produto_interesse:"Enterprise",origem:"pricing_enterprise_cta",mensagem:`Empresa: ${n.empresa}
735Tamanho do time: ${n.tamanho_time}
736Mensagem: ${n.mensagem.trim()||"(não informado)"}`}),d(!0)}catch{p("Ocorreu um erro ao enviar. Tente novamente.")}l(!1)}},j=()=>{s({nome:"",email:"",telefone:"",empresa:"",tamanho_time:"",mensagem:""}),a(""),l(!1),d(!1),p(""),t()};return r.jsx("div",{onClick:j,style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(10,37,64,0.6)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,padding:24},children:r.jsxs("div",{onClick:k=>k.stopPropagation(),style:{background:"#ffffff",borderRadius:16,maxWidth:480,width:"100%",padding:"32px 32px 28px",boxShadow:"0 24px 48px rgba(10,37,64,0.2)",position:"relative",maxHeight:"90vh",overflowY:"auto"},children:[r.jsx("button",{onClick:j,style:{position:"absolute",top:16,right:16,background:"transparent",border:"none",cursor:"pointer",padding:4},children:r.jsx(Jt,{style:{width:20,height:20,color:"#94A3B8"}})}),c?r.jsxs("div",{style:{textAlign:"center",padding:"16px 0"},children:[r.jsx("div",{style:{width:52,height:52,borderRadius:"50%",background:"#EEF2FF",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px"},children:r.jsx(fn,{style:{width:24,height:24,color:"#6C24F5"}})}),r.jsx("h3",{style:{fontSize:22,fontWeight:800,color:"#0A2540",marginBottom:10},children:"Recebemos seu contato!"}),r.jsx("p",{style:{fontSize:14,color:"#64748B",lineHeight:1.6,marginBottom:24},children:"Nosso time entra em contato em até 1 dia útil."}),r.jsx("button",{onClick:j,style:{padding:"11px 28px",borderRadius:8,fontSize:14,fontWeight:600,background:"#6C24F5",color:"#ffffff",border:"none",cursor:"pointer"},children:"Fechar"})]}):r.jsxs("form",{onSubmit:v,children:[r.jsx("h3",{style:{fontSize:22,fontWeight:800,color:"#0A2540",marginBottom:8},children:"Vamos conversar sobre seu projeto"}),r.jsx("p",{style:{fontSize:14,color:"#64748B",marginBottom:24,lineHeight:1.5},children:"Conte um pouco sobre sua operação. Nosso time entra em contato em até 1 dia útil."}),r.jsxs("div",{style:w,children:[r.jsx("label",{style:x,children:"Nome completo *"}),r.jsx("input",{type:"text",required:!0,value:n.nome,onChange:k=>s(S=>({...S,nome:k.target.value})),style:m})]}),r.jsxs("div",{style:w,children:[r.jsx("label",{style:x,children:"Email corporativo *"}),r.jsx("input",{type:"email",required:!0,value:n.email,onChange:y,style:{...m,borderColor:i?"#EF4444":"#CBD5E1"}}),i&&r.jsx("p",{style:{fontSize:12,color:"#EF4444",marginTop:4},children:i})]}),r.jsxs("div",{style:w,children:[r.jsx("label",{style:x,children:"Telefone ou WhatsApp (opcional)"}),r.jsx("input",{type:"tel",value:n.telefone,onChange:k=>s(S=>({...S,telefone:k.target.value})),placeholder:"(11) 99999-9999",style:m})]}),r.jsxs("div",{style:w,children:[r.jsx("label",{style:x,children:"Empresa *"}),r.jsx("input",{type:"text",required:!0,value:n.empresa,onChange:k=>s(S=>({...S,empresa:k.target.value})),style:m})]}),r.jsxs("div",{style:w,children:[r.jsx("label",{style:x,children:"Tamanho do time *"}),r.jsxs("select",{required:!0,value:n.tamanho_time,onChange:k=>s(S=>({...S,tamanho_time:k.target.value})),style:m,children:[r.jsx("option",{value:"",children:"Selecione..."}),r.jsx("option",{value:"1-10",children:"1-10"}),r.jsx("option",{value:"11-50",children:"11-50"}),r.jsx("option",{value:"51-200",children:"51-200"}),r.jsx("option",{value:"201-500",children:"201-500"}),r.jsx("option",{value:"501-1000",children:"501-1000"}),r.jsx("option",{value:"Mais de 1000",children:"Mais de 1000"})]})]}),r.jsxs("div",{style:w,children:[r.jsx("label",{style:x,children:"Conte mais (opcional)"}),r.jsx("textarea",{rows:3,value:n.mensagem,onChange:k=>s(S=>({...S,mensagem:k.target.value})),placeholder:"Volume de contratações, principais cargos, prazos, etc.",style:{...m,resize:"vertical"}})]}),u&&r.jsx("p",{style:{fontSize:13,color:"#EF4444",marginBottom:8},children:u}),r.jsxs("div",{style:{display:"flex",gap:12,marginTop:24,justifyContent:"flex-end"},children:[r.jsx("button",{type:"button",onClick:j,style:{padding:"11px 20px",borderRadius:8,fontSize:14,fontWeight:600,background:"transparent",color:"#64748B",border:"1.5px solid #CBD5E1",cursor:"pointer"},children:"Cancelar"}),r.jsx("button",{type:"submit",disabled:o,style:{padding:"11px 24px",borderRadius:8,fontSize:14,fontWeight:600,background:"#6C24F5",color:"#ffffff",border:"none",cursor:o?"not-allowed":"pointer",opacity:o?.7:1},children:o?"Enviando...":"Enviar contato →"})]})]})]})})}function hse({plan:e}){var n;const t=e.ctaVariant==="primary";return r.jsxs("div",{style:{position:"relative",background:e.popular?"rgba(108,36,245,0.08)":"rgba(255,255,255,0.04)",border:e.popular?"2px solid #6C24F5":"1px solid rgba(255,255,255,0.08)",borderRadius:16,padding:"24px 22px",display:"flex",flexDirection:"column",flex:1},children:[e.popular&&r.jsx("div",{style:{position:"absolute",top:-14,left:"50%",transform:"translateX(-50%)",background:"#6C24F5",color:"#fff",fontSize:12,fontWeight:700,padding:"4px 16px",borderRadius:20,whiteSpace:"nowrap"},children:"Mais popular"}),r.jsx("h3",{style:{fontSize:18,fontWeight:700,color:"#fff",marginBottom:4},children:e.name}),r.jsx("p",{style:{fontSize:13,color:"rgba(255,255,255,0.4)",marginBottom:16,lineHeight:1.5},children:e.desc}),r.jsxs("div",{style:{marginBottom:20},children:[e.oldPrice&&r.jsx("span",{style:{fontSize:14,color:"rgba(255,255,255,0.3)",textDecoration:"line-through",marginRight:6},children:e.oldPrice}),r.jsx("span",{style:{fontSize:32,fontWeight:800,color:"#fff"},children:e.price}),r.jsx("span",{style:{fontSize:13,color:"rgba(255,255,255,0.35)",marginLeft:4},children:e.period})]}),e.founderPrice&&r.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:16,padding:"7px 10px",borderRadius:7,background:"rgba(16,185,129,0.08)",border:"1px solid rgba(16,185,129,0.15)"},children:r.jsxs("span",{style:{fontSize:11,color:"#10B981"},children:[r.jsx("strong",{children:"Founders:"}
736)," ",e.founderPrice,"/mês",(n=e.period)!=null&&n.includes("assento")?" por assento":""]})}),r.jsx(ut,{to:"/signup",style:{textDecoration:"none",marginBottom:20},children:r.jsxs("button",{style:{width:"100%",padding:"10px 0",borderRadius:8,fontSize:14,fontWeight:600,cursor:"pointer",border:t?"none":"1px solid rgba(255,255,255,0.12)",background:t?"#6C24F5":"transparent",color:"#fff",boxShadow:e.popular?"0 2px 12px rgba(108,36,245,0.3)":"none"},children:[e.cta," →"]})}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:e.features.map(s=>{const i=s.includes("sourcing direto");return r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[r.jsx("div",{style:{width:16,height:16,borderRadius:"50%",background:i?"rgba(16,185,129,0.15)":"rgba(108,36,245,0.15)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2},children:r.jsx(fn,{style:{width:10,height:10,color:i?"#10B981":"#6C24F5"}})}),r.jsx("span",{style:{fontSize:13,color:i?"rgba(255,255,255,0.85)":"rgba(255,255,255,0.6)",fontWeight:i?600:400,lineHeight:1.5},children:s})]},s)})})]})}function mse(){const[e,t]=g.useState("jobs"),[n,s]=g.useState(!1),i=zA[e];return r.jsxs("div",{children:[r.jsx("section",{style:{background:"linear-gradient(180deg, #0A2540 0%, #0F1B2E 40%, #111827 100%)",padding:"160px 24px 48px"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:28},children:[r.jsx("h1",{style:{fontSize:34,fontWeight:800,color:"#fff",letterSpacing:"-0.02em",lineHeight:1.2,marginBottom:8},children:"Um preço para cada etapa do seu recrutamento"}),r.jsx("p",{style:{fontSize:16,color:"rgba(255,255,255,0.45)",margin:0},children:"Comece grátis. Ative os módulos que precisar, quando precisar."})]}),r.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:r.jsx("div",{style:{display:"inline-flex",background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.08)",borderRadius:10,padding:4,gap:2},children:["jobs","ats","assessments","talent"].map(a=>{const o=zA[a],l=e===a;return r.jsxs("button",{onClick:()=>t(a),style:{padding:"8px 20px",borderRadius:7,border:"none",cursor:"pointer",fontSize:14,fontWeight:600,background:l?"rgba(255,255,255,0.12)":"transparent",color:l?"#fff":"rgba(255,255,255,0.4)",display:"flex",alignItems:"center",gap:6,transition:"all 0.15s"},children:[r.jsx("div",{style:{width:8,height:8,borderRadius:3,background:o.color,opacity:l?1:.4}}),o.label,a==="talent"&&r.jsx("span",{style:{fontSize:9,fontWeight:700,background:"rgba(255,255,255,0.08)",color:"rgba(255,255,255,0.5)",padding:"1px 6px",borderRadius:20},children:"Em breve"})]},a)})})}),i.plans?r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:20,alignItems:"start"},children:i.plans.map(a=>r.jsx(hse,{plan:a},a.name))}):r.jsxs("div",{style:{maxWidth:560,margin:"0 auto",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.08)",borderRadius:16,padding:40,textAlign:"center"},children:[r.jsx("div",{style:{width:48,height:48,borderRadius:12,background:"rgba(16,185,129,0.15)",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px"},children:r.jsx(vl,{style:{width:24,height:24,color:"#10B981"}})}),r.jsx("h3",{style:{fontSize:20,fontWeight:700,color:"#fff",marginBottom:8},children:"Summit Talent — Em breve"}),r.jsx("p",{style:{fontSize:14,color:"rgba(255,255,255,0.4)",lineHeight:1.6,marginBottom:20},children:"Pool de talentos pré-qualificados por especialistas Summit."}),r.jsx(ut,{to:"/talent",style:{textDecoration:"none"},children:r.jsx("button",{style:{background:"#10B981",color:"#fff",padding:"10px 24px",fontSize:14,fontWeight:600,borderRadius:8,border:"none",cursor:"pointer"},children:"Entrar na lista de espera →"})})]})]})}),r.jsx("section",{style:{background:"#F6F9FC",padding:"48px 24px",borderTop:"1px solid #E3E8EF"},className:"bg-[hsl(var(--background))]",children:r.jsx("div",{style:{maxWidth:1160,margin:"0 auto"},children:r.jsxs("div",{style:{background:"linear-gradient(160deg, #0a0a0a 0%, #111111 30%, #0d0d0d 60%, #161616 80%, #0a0a0a 100%)",borderRadius:16,padding:"40px 44px",position:"relative",overflow:"hidden",border:"1px solid rgba(255,255,255,0.04)",boxShadow:"0 0 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:32},children:[r.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,height:1,background:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 70%, transparent 100%)"}}),r.jsx("div",{style:{position:"absolute",top:-120,right:-60,width:300,height:300,background:"radial-gradient(circle, rgba(255,255,255,0.015) 0%, transparent 70%)",pointerEvents:"none"}}),r.jsxs("div",{style:{position:"relative",zIndex:1,flex:1},children:[r.jsx("p",{style:{fontSize:11,letterSpacing:"0.2em",textTransform:"uppercase",color:"#fff",margin:"0 0 12px",fontWeight:400},children:"Enterprise"}),r.jsx("h3",{style:{fontSize:28,fontWeight:800,color:"#fff",margin:"0 0 8px",lineHeight:1.25,letterSpacing:"-0.01em"},children:"Para operações que exigem o máximo."}),r.jsx("p",{style:{fontSize:15,color:"rgba(255,255,255,0.3)",lineHeight:1.7,margin:0,fontWeight:300,maxWidth:480},children:"Capacidade de módulos personalizada, créditos sob medida, gerente de sucesso dedicado e SLA garantidos. Sua operação ilimitada, com suporte premium."})]}),r.jsx("button",{onClick:()=>s(!0),style:{fontSize:14,padding:"14px 32px",background:"#fff",color:"#0a0a0a",borderRadius:8,fontWeight:500,border:"none",cursor:"pointer",letterSpacing:"0.01em",flexShrink:0,whiteSpace:"nowrap",position:"relative",zIndex:1},children:"Falar com vendas →"})]})})}),r.jsx("section",{style:{background:"#ffffff",padding:"64px 24px 80px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:760,margin:"0 auto"},children:[r.jsxs("div",{style:{marginBottom:40,textAlign:"center"},children:[r.jsx("p",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.12em",color:"#6C24F5",textTransform:"uppercase",marginBottom:12},children:"PERGUNTAS FREQUENTES"}),r.jsx("h2",{style:{fontSize:28,fontWeight:800,color:"#0A2540",marginBottom:8},children:"Tudo que você precisa saber."})]}),r.jsx("div",{style:{borderTop:"1px solid #E3E8EF"},children:use.map(a=>r.jsx(fse,{faq:a},a.q))})]})}),r.jsx("section",{style:{padding:"48px 24px 64px"},children:r.jsxs("div",{style:{maxWidth:640,margin:"0 auto",textAlign:"center"},children:[r.jsx("h2",{style:{fontSize:24,fontWeight:800,color:"#0A2540",marginBottom:16,lineHeight:1.3},children:"Comece grátis. Ative os módulos quando precisar."}),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:"linear-gradient(135deg, #6C24F5, #7C5FFF)",color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Criar conta grátis →"})})]})}),r.jsx(pse,{isOpen:n,onClose:()=>s(!1)})]})}function gse(){var G,M,z,K;const{token:e}=Do(),[t,n]=g.useState("loading"),[s,i]=g.useState(null),[a,o]=g.useState(null),[l,c]=g.useState([]),[d,u]=g.useState(null),[p,m]=g.useState([]),[x,w]=g.useState({}),[y,v]=g.useState(null),[j,k]=g.useState(0),[S,_]=g.useState({}),[F,A]=g.useState(null),[C,D]=g.useState(!1),[P,L]=g.useState(!1);g.useEffect(()=>{(async()=>{try{const J=await ne.functions.invoke("getInvitationByToken",{token:e}),Q=(J==null?void 0:J.data)??J;if(!Q||Q.status==="error"){A("Convite inválido ou expirado."),n("error");return}
736const{invitation:ie,campaign:ae,tests:re}=Q.data??Q;if(!ie||!re||re.length===0){A("Convite inválido ou expirado."),n("error");return}i(ie),o(ae),c(re),n("list")}catch{A("Não foi possível carregar o convite."),n("error")}})()},[e]);const T=async Y=>{var J;L(!0);try{const Q=await ne.functions.invoke("getInvitationByToken",{token:e,template_id:Y.template_id}),ie=(Q==null?void 0:Q.data)??Q,{questions:ae,optionsByQuestion:re}=ie.data??ie;if(!ae||ae.length===0){A("Não foi possível carregar as questões deste teste."),L(!1);return}const pe=await ne.functions.invoke("createAssessmentSession",{token:e,template_id:Y.template_id}),Z=(pe==null?void 0:pe.data)??pe,Ne=(Z==null?void 0:Z.session_id)||((J=Z==null?void 0:Z.data)==null?void 0:J.session_id);if(!Ne)throw new Error("Sessão não criada");u(Y),m(ae),w(re||{}),v(Ne),k(0),_({}),n("questions")}catch{A("Erro ao iniciar teste. Tente novamente.")}L(!1)},R=async()=>{if(!C){D(!0);try{for(const ae of p){const re=S[ae.id],pe=ae.question_type;pe==="single_choice"||pe==="likert"?await ne.entities.AssessmentResponse.create({session_id:y,question_id:ae.id,option_id:re.option_id}):await ne.entities.AssessmentResponse.create({session_id:y,question_id:ae.id,option_id:re.mais,option_ids:[re.menos]})}try{await ne.functions.invoke("completeAssessmentSession",{session_id:y,token:e})}catch(ae){console.error("completeAssessmentSession failed:",ae)}const Y=await ne.functions.invoke("getInvitationByToken",{token:e}),J=(Y==null?void 0:Y.data)??Y,{tests:Q}=J.data??J;c(Q||l);const ie=(Q||l).every(ae=>ae.session&&(ae.session.status==="completed"||ae.session.status==="scored"));u(null),v(null),_({}),D(!1),n(ie?"done":"list")}catch{A("Erro ao enviar respostas. Tente novamente."),D(!1)}}},U=p.length>0&&p[0].question_type||"single_choice",I=p[j],H=S[I==null?void 0:I.id]||{mais:null,menos:null},V=U==="single_choice"||U==="likert",X=V?!!((G=S[I==null?void 0:I.id])!=null&&G.option_id):!!(H.mais&&H.menos),N=V?p.every(Y=>{var J;return(J=S[Y.id])==null?void 0:J.option_id}):p.every(Y=>{const J=S[Y.id];return J&&J.mais&&J.menos}),W=(Y,J)=>{_(Q=>({...Q,[Y]:{option_id:J}}))},O=(Y,J,Q)=>{_(ie=>{const ae=ie[Y]||{mais:null,menos:null};return J==="mais"?ae.menos===Q?ie:{...ie,[Y]:{...ae,mais:Q}}:ae.mais===Q?ie:{...ie,[Y]:{...ae,menos:Q}}})};if(t==="loading"||P)return r.jsx("div",{style:zt.page,children:r.jsx("div",{style:zt.card,children:r.jsx("p",{style:zt.loadText,children:"Carregando..."})})});if(t==="error")return r.jsx("div",{style:zt.page,children:r.jsxs("div",{style:zt.card,children:[r.jsx("p",{style:zt.title,children:"Não foi possível carregar"}),r.jsx("p",{style:zt.sub,children:F||"Convite inválido ou expirado."})]})});if(t==="done")return r.jsx("div",{style:zt.page,children:r.jsxs("div",{style:{...zt.card,maxWidth:520,textAlign:"center"},children:[r.jsx("div",{style:zt.checkmark,children:"✓"}),r.jsxs("p",{style:zt.title,children:["Parabéns, ",((M=s==null?void 0:s.full_name)==null?void 0:M.split(" ")[0])||"candidato","!"]}),r.jsx("p",{style:zt.body,children:"Você concluiu todos os testes com sucesso."}),r.jsxs("p",{style:{...zt.body,color:"#6b7280"},children:["Em breve você será contatado por ",r.jsx("strong",{children:(a==null?void 0:a.company_name)||"a organização"}),". Boa sorte!"]})]})});if(t==="list"){const Y=l.reduce((Q,ie)=>Q+(ie.estimated_duration_minutes||20),0),J=l.filter(Q=>Q.session&&(Q.session.status==="completed"||Q.session.status==="scored")).length;return r.jsx("div",{style:zt.page,children:r.jsxs("div",{style:{...zt.card,maxWidth:560},children:[r.jsxs("p",{style:zt.eyebrow,children:["Olá, ",(s==null?void 0:s.full_name)||"candidato","!"]}),r.jsx("p",{style:zt.title,children:"Sua bateria de avaliações"}),r.jsxs("p",{style:zt.body,children:["Você tem ",r.jsxs("strong",{children:[l.length," teste",l.length!==1?"s":""]})," para completar. Tempo estimado total: ",r.jsxs("strong",{children:[Y," min"]}),". Você pode fazer em qualquer ordem e retomar quando quiser."]}),r.jsxs("div",{style:{marginBottom:24},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:6},children:[r.jsx("span",{style:{fontSize:13,color:"#6b7280"},children:"Progresso"}),r.jsxs("span",{style:{fontSize:13,color:"#6b7280"},children:[J,"/",l.length]})]}),r.jsx("div",{style:{height:4,background:"#F3F4F6",borderRadius:999,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",background:"#6C24F5",borderRadius:999,width:`${l.length>0?J/l.length*100:0}%`,transition:"width 0.4s"}})})]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:l.map(Q=>{const ie=Q.session&&(Q.session.status==="completed"||Q.session.status==="scored"),ae=Q.session&&Q.session.status==="in_progress";return r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",border:`1px solid ${ie?"#D1FAE5":"#E5E7EB"}`,borderRadius:12,background:ie?"#F0FDF4":"#FFFFFF"},children:[r.jsxs("div",{children:[r.jsxs("p",{style:{fontSize:14,fontWeight:500,color:"#1F2937",marginBottom:2},children:[ie&&"✓ ",Q.name_pt]}),r.jsxs("p",{style:{fontSize:12,color:"#6B7280"},children:[Q.question_count," questões · ",Q.estimated_duration_minutes," min"]})]}),!ie&&r.jsx("button",{style:{...zt.btnSmall,background:ae?"#F3F4F6":"#6C24F5",color:ae?"#374151":"#FFFFFF"},onClick:()=>T(Q),children:ae?"Continuar":"Iniciar"})]},Q.template_id)})})]})})}if(t==="questions"&&I&&U==="single_choice"){const Y=x[I.id]||[],J=(j+1)/p.length*100,Q=((z=S[I.id])==null?void 0:z.option_id)||null;return r.jsx("div",{style:zt.page,children:r.jsxs("div",{style:{...zt.card,maxWidth:640},children:[r.jsx("p",{style:{...zt.eyebrow,marginBottom:8},children:d==null?void 0:d.name_pt}),r.jsx("div",{style:zt.progressWrap,children:r.jsx("div",{style:{...zt.progressBar,width:`${J}%`}})}),r.jsxs("p",{style:zt.questionCount,children:[j+1," de ",p.length]}),r.jsx("p",{style:zt.questionText,children:I.prompt_pt||I.question_text}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,marginBottom:32},children:Y.map(ie=>{const ae=Q===ie.id;return r.jsxs("button",{onClick:()=>W(I.id,ie.id),style:{display:"flex",alignItems:"center",gap:12,padding:"13px 16px",border:`1px solid ${ae?"#6C24F5":"#E5E7EB"}`,borderRadius:12,cursor:"pointer",background:ae?"#F5F0FF":"#FFFFFF",textAlign:"left",width:"100%",fontFamily:Xu},children:[r.jsx("div",{style:{width:18,height:18,borderRadius:"50%",flexShrink:0,border:`1.5px solid ${ae?"#6C24F5":"#D1D5DB"}`,background:ae?"#6C24F5":"transparent",display:"flex",alignItems:"center",justifyContent:"center"},children:ae&&r.jsx("div",{style:{width:7,height:7,borderRadius:"50%",background:"#FFFFFF"}})}),r.jsx("span",{style:{fontSize:14,color:ae?"#1F2937":"#374151",fontWeight:ae?500:400},children:ie.label_pt||ie.option_text})]},ie.id)})}),r.jsxs("div",{style:zt.navRow,children:[r.jsx("button",{style:zt.btnSecondary,onClick:()=>k(ie=>ie-1),disabled:j===0,children:"← Anterior"}),j<p.length-1?r.jsx("button",{style:{...zt.btnPrimary,opacity:X?1:.4},onClick:()=>k(ie=>ie+1),disabled:!X,children:"Próxima →"}):r.jsx("button",{style:{...zt.btnPrimary,opacity:N&&!C?1:.4},onClick:R,disabled:!N||C,children:C?"Enviando...":"Concluir teste →"})]})]})})}if(t==="questions"&&I&&U==="likert"){const Y=x[I.id]||[],J=(j+1)/p.length*100,Q=((K=S[I.id])==null?void 0:K.option_id)||null;return r.jsx("div",{style:zt.page,children:r.jsxs("div",{style:{...zt.card,maxWidth:640},children:[r.jsx("p",{style:{...zt.eyebrow,marginBottom:8},children:d==null?void 0:d.name_pt}),r.jsx("div",{style:zt.progressWrap,children:r.jsx("div",{style:{...zt.progressBar,width:`${J}%`}})}),r.jsxs("p",{style:zt.questionCount,children:[j+1," de ",p.length]}),r.jsx("p",{style:zt.questionText,children:I.prompt_pt||I.question_text}),r.jsxs("div",{style:{marginBottom:32},children:[r.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:Y.map(ie=>{const ae=Q===ie.id;return r.jsx("button",{onClick:()=>W(I.id,ie.id),style:{width:48,height:48,minWidth:44,minHeight:44,borderRadius:"50%",border:`2px solid ${ae?"#6C24F5":"#D1D5DB"}`,background:ae?"#6C24F5":"#FFFFFF",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s"},children:ae&&r.jsx("div",{style:{width:16,height:16,borderRadius:"50%",background:"#FFFFFF"}})},ie.id)})}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10},children:[r.jsx("span",{style:{fontSize:12,color:"#6B7280"},children:"Discordo totalmente"}),r.jsx("span",{style:{fontSize:12,color:"#6B7280"},children:"Concordo totalmente"})]})]}),r.jsxs("div",{style:zt.navRow,children:[r.jsx("button",{style:zt.btnSecondary,onClick:()=>k(ie=>ie-1),disabled:j===0,children:"← Anterior"}),j<p.length-1?r.jsx("button",{style:{...zt.btnPrimary,opacity:X?1:.4},onClick:()=>k(ie=>ie+1),disabled:!X,children:"Próxima →"}):r.jsx("button",{style:{...zt.btnPrimary,opacity:N&&!C?1:.4},onClick:R,disabled:!N||C,children:C?"Enviando...":"Concluir teste →"})]})]})})}if(t==="questions"&&I&&U==="forced_choice"){const Y=x[I.id]||[],J=(j+1)/p.length*100;return r.jsx("div",{style:zt.page,children:r.jsxs("div",{style:{...zt.card,maxWidth:640},children:[r.jsx("p",{style:{...zt.eyebrow,marginBottom:8},children:d==null?void 0:d.name_pt}),r.jsx("div",{style:zt.progressWrap,children:r.jsx("div",{style:{...zt.progressBar,width:`${J}%`}})}),r.jsxs("p",{style:zt.questionCount,children:[j+1," de ",p.length]}),r.jsxs("p",{style:zt.questionText,children:["Selecione o adjetivo que ",r.jsx("strong",{children:"MAIS"})," descreve você e o que ",r.jsx("strong",{children:"MENOS"})," descreve você no ambiente de trabalho."]}),r.jsxs("div",{style:zt.labelsRow,children:[r.jsx("span",{style:zt.labelTag,children:"MAIS"}),r.jsx("span",{style:{flex:1}}),r.jsx("span",{style:zt.labelTag,children:"MENOS"})]}),r.jsx("div",{style:zt.optionsList,children:Y.map(Q=>{const ie=H.mais===Q.id,ae=H.menos===Q.id;return r.jsxs("div",{style:zt.optionRow,children:[r.jsx("button",{style:{...zt.radioBtn,...ie?zt.radioBtnMais:{}},onClick:()=>O(I.id,"mais",Q.id),children:ie?"●":"○"}),r.jsx("span",{style:zt.optionText,children:Q.option_text||Q.label_pt}),r.jsx("button",{style:{...zt.radioBtn,...ae?zt.radioBtnMenos:{}},onClick:()=>O(I.id,"menos",Q.id),children:ae?"●":"○"})]},Q.id)})}),r.jsxs("div",{style:zt.navRow,children:[r.jsx("button",{style:zt.btnSecondary,onClick:()=>k(Q=>Q-1),disabled:j===0,children:"← Anterior"}),j<p.length-1?r.jsx("button",{style:{...zt.btnPrimary,opacity:X?1:.4},onClick:()=>k(Q=>Q+1),disabled:!X,children:"Próxima →"}):r.jsx("button",{style:{...zt.btnPrimary,opacity:N&&!C?1:.4},onClick:R,disabled:!N||C,children:C?"Enviando...":"Concluir teste →"})]})]})})}return null}const Xu="Switzer, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",zt={page:{minHeight:"100vh",background:"#F9FAFB",display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem 1rem",fontFamily:Xu,color:"#1F2937"},card:{background:"#FFFFFF",border:"1px solid #E5E7EB",borderRadius:12,padding:"2.5rem 2rem",width:"100%",maxWidth:520,fontFamily:Xu},loadText:{textAlign:"center",color:"#6B7280",fontSize:14},eyebrow:{fontSize:12,fontWeight:500,letterSpacing:"0.08em",textTransform:"uppercase",color:"#6B7280",marginBottom:12},title:{fontSize:22,fontWeight:500,color:"#1F2937",marginBottom:12,letterSpacing:"-0.02em"},sub:{fontSize:14,color:"#6B7280",lineHeight:1.6},body:{fontSize:15,color:"#374151",lineHeight:1.7,marginBottom:16},btnPrimary:{display:"block",width:"100%",padding:"14px 24px",background:"#6C24F5",color:"#FFFFFF",border:"none",borderRadius:8,fontSize:15,fontWeight:500,cursor:"pointer",marginTop:24,letterSpacing:"-0.01em",fontFamily:Xu,transition:"background 0.15s"},btnSecondary:{padding:"10px 20px",background:"none",color:"#6B7280",border:"1px solid #E5E7EB",borderRadius:8,fontSize:14,cursor:"pointer",fontFamily:Xu},btnSmall:{padding:"8px 16px",border:"none",borderRadius:8,fontSize:13,fontWeight:500,cursor:"pointer",whiteSpace:"nowrap",fontFamily:Xu,transition:"background 0.15s"},checkmark:{width:56,height:56,borderRadius:"50%",background:"#EDE5FE",display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,color:"#6C24F5",margin:"0 auto 20px",textAlign:"center"},progressWrap:{height:4,background:"#F3F4F6",borderRadius:999,marginBottom:20,overflow:"hidden"},progressBar:{height:"100%",background:"#6C24F5",borderRadius:999,transition:"width 0.3s"},questionCount:{fontSize:13,color:"#6B7280",marginBottom:8},questionText:{fontSize:15,color:"#1F2937",lineHeight:1.65,marginBottom:24,fontWeight:500},labelsRow:{display:"flex",alignItems:"center",marginBottom:8,paddingLeft:40,paddingRight:40},labelTag:{fontSize:11,fontWeight:500,letterSpacing:"0.08em",textTransform:"uppercase",color:"#6B7280"},optionsList:{display:"flex",flexDirection:"column",gap:12,marginBottom:32},optionRow:{display:"flex",alignItems:"center",gap:16,padding:"14px 16px",border:"1px solid #E5E7EB",borderRadius:12},radioBtn:{width:28,height:28,borderRadius:"50%",border:"1.5px solid #D1D5DB",background:"none",cursor:"pointer",fontSize:16,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"#9
736CA3AF"},radioBtnMais:{borderColor:"#1D9E75",color:"#1D9E75",background:"#F0FDF4"},radioBtnMenos:{borderColor:"#E24B4A",color:"#E24B4A",background:"#FEF2F2"},optionText:{flex:1,fontSize:15,color:"#1F2937",textAlign:"center"},navRow:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:12}},xse=[{id:"privacy",label:"Política de Privacidade"},{id:"terms",label:"Termos de Uso"},{id:"founder",label:"Programa Founder"}];function gn({title:e,children:t}){return r.jsxs("div",{className:"mb-8",children:[r.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-3 pb-2 border-b border-gray-100",children:e}),r.jsx("div",{className:"text-sm text-gray-700 leading-relaxed space-y-3",children:t})]})}function yse(){return r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-gray-400 mb-8",children:"Última atualização: 24 de setembro de 2026 — Versão 2.2"}),r.jsxs(gn,{title:"1. Quem somos",children:[r.jsxs("p",{children:["A ",r.jsx("strong",{children:"Summit Servicos de RH Ltda"}),", inscrita no CNPJ sob o nº ",r.jsx("strong",{children:"45.902.995/0001-14"}),", com sede na Av. Paulista, 1471, Conj. 511, Bela Vista, São Paulo/SP, CEP 01.311-927, nome fantasia ",r.jsx("strong",{children:"Summit Inc."}),', opera a plataforma Summit ("Plataforma").']}),r.jsx("p",{children:'"Summit", "nós" ou "nosso(a)" referem-se à Summit Servicos de RH Ltda. "Contratante" refere-se à empresa ou profissional que contrata a Plataforma e a seus usuários autorizados. "Candidato" refere-se à pessoa cujos dados são tratados na Plataforma no contexto de processos de recrutamento e seleção. "Você" refere-se a qualquer titular de dados alcançado por esta Política.'})]}),r.jsxs(gn,{title:"2. Nossos papéis: quando somos controladora e quando somos operadora",children:[r.jsx("p",{children:'A Lei Geral de Proteção de Dados (Lei nº 13.709/2018 — "LGPD") distingue o controlador (quem decide as finalidades e os meios do tratamento) do operador (quem trata dados em nome do controlador). Na Summit, os dois papéis convivem, e esta distinção define responsabilidades:'}),r.jsxs("p",{children:[r.jsx("strong",{children:"A Summit é controladora"})," dos dados de conta e relacionamento: cadastro e autenticação de Contratantes, dados de faturamento, registros de uso e segurança da Plataforma, comunicações com a Summit e dados de visitantes do site."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"A Summit é operadora"}),' dos dados de Candidatos e perfis profissionais mantidos nos ambientes de trabalho ("workspaces") dos Contratantes — sejam eles recebidos por candidatura, inseridos manualmente, importados, capturados de fontes públicas ou enriquecidos por integrações. Nesses casos, o Contratante é o controlador: as decisões sobre coleta, finalidade, uso, correção, retenção e exclusão desses dados cabem exclusivamente ao Contratante. A Summit fornece a infraestrutura e os meios técnicos, trata os dados conforme as instruções do Contratante e as funcionalidades da Plataforma, e disponibiliza ao Contratante ferramentas para editar e excluir os dados sob sua gestão.']}),r.jsx("p",{children:"Como operadora, a Summit mantém as obrigações que a LGPD lhe atribui diretamente: adotar medidas de segurança adequadas, tratar os dados somente conforme instruções lícitas do controlador e comunicar incidentes de segurança na forma da lei."}),r.jsx("p",{children:"O Contratante, por sua vez, compromete-se a dispor de base legal válida para os dados que insere, importa ou captura por meio da Plataforma."})]}),r.jsxs(gn,{title:"3. Âmbito de aplicação",children:[r.jsx("p",{children:"Esta Política se aplica aos quatro módulos da Plataforma Summit em operação:"}),r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Summit Jobs"})," — publicação de vagas e recebimento de candidaturas em páginas públicas"]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Summit ATS"})," — gestão de pipeline de candidatos, comunicação e agendamento de entrevistas"]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Summit Assessments"})," — avaliações comportamentais e técnicas de candidatos"]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Summit Talent"})," — banco de talentos com perfis profissionais unificados"]})]}),r.jsx("p",{children:"Aplica-se também ao site summitinc.io, à extensão de navegador da Summit e às integrações ativadas pelo Contratante."})]}),r.jsxs(gn,{title:"4. Dados que tratamos",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"4.1 Dados de Contratantes (Summit como controladora):"})," nome completo, email, cargo, dados da empresa (razão social, nome fantasia, CNPJ, setor, porte, endereço, site), credenciais de acesso, registros de uso, dados técnicos (
736IP, navegador, sessão) e preferências. Dados de pagamento são processados exclusivamente pela Stripe — a Summit não armazena dados de cartão."]}),r.jsx("p",{children:r.jsx("strong",{children:"4.2 Dados de Candidatos (Summit como operadora), por origem:"})}),r.jsxs("p",{children:[r.jsx("strong",{children:"a)"})," Fornecidos pelo próprio Candidato — ao se candidatar a uma vaga, responder a uma avaliação, agendar uma entrevista ou enviar documentos: nome, email, telefone, currículo (arquivo e texto extraído), dados de carreira (experiências, formação, idiomas, certificações), pretensão salarial e preferências de contratação, mensagens trocadas, respostas e resultados de avaliações, e dados técnicos da sessão."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"b)"})," Inseridos ou importados pelo Contratante — cadastro manual, importação de planilhas ou de currículos em lote, com os mesmos tipos de dados acima."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"c)"})," Coletados de fontes publicamente acessíveis pelo Contratante — por meio da extensão de navegador da Summit, o Contratante pode capturar informações profissionais disponíveis publicamente (como nome, cargo, empresa, localização e histórico profissional exibidos em perfis públicos). Ver Seção 6."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"d)"})," Enriquecidos por integrações de dados — a pedido do Contratante, dados profissionais e empresariais podem ser complementados por provedores especializados (ver Seção 8), como cargo atual, empresa, setor e porte."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"e)"})," Integrações de email e agenda autorizadas pelo Contratante — quando o Contratante conecta sua conta Google, a Plataforma passa a ",r.jsx("strong",{children:"enviar emails a Candidatos em nome do Contratante"})," pela conta conectada, registrando na Plataforma apenas as mensagens enviadas por ela; não há leitura, importação ou sincronização de mensagens recebidas. A conexão com o Google Agenda permite consultar a agenda e criar ou atualizar eventos de entrevista. Quando a conta conectada é Microsoft, a Plataforma envia emails, registra as mensagens dessa comunicação e gerencia eventos de agenda relacionados ao processo seletivo."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"4.3 Dados automáticos:"})," cookies de sessão, registros de acesso e desempenho técnico, coletados automaticamente no uso da Plataforma (ver Seção 12)."]})]}),r.jsx(gn,{title:"5. Finalidades e bases legais",children:r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full text-xs border border-gray-200 rounded-lg overflow-hidden",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Tratamento"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Finalidade"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Base legal"})]})}),r.jsxs("tbody",{className:"divide-y divide-gray-100",children:[r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Conta e faturamento do Contratante"}),r.jsx("td",{className:"px-3 py-2",children:"Prestação do serviço contratado"}),r.jsx("td",{className:"px-3 py-2",children:"Execução de contrato"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Candidaturas via Summit Jobs"}),r.jsx("td",{className:"px-3 py-2",children:"Recebimento e gestão da candidatura pelo Contratante"}),r.jsx("td",{className:"px-3 py-2",children:"Execução de procedimentos preliminares a contrato, a pedido do titular"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Avaliações (Assessments)"}),r.jsx("td",{className:"px-3 py-2",children:"Aplicação de avaliação e geração de relatório para decisão do Contratante"}),r.jsx("td",{className:"px-3 py-2",children:"Consentimento do Candidato, registrado antes do início da avaliação"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Gestão de pipeline, anotações e comunicação"}),r.jsx("td",{className:"px-3 py-2",children:"Condução do processo seletivo pelo Contratante"}),r.jsx("td",{className:"px-3 py-2",children:"Base legal definida pelo Contratante, na qualidade de controlador (em regra, legítimo interesse ou procedimentos preliminares a contrato)"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Sourcing ativo (captura de perfis públicos)"}),r.jsx("td",{className:"px-3 py-2",children:"Identificação de potenciais candidatos pelo Contratante"}),r.jsx("td",{className:"px-3 py-2",children:"Legítimo interesse do Contratante, na qualidade de controlador (ver Seção 6)"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Enriquecimento de dados"}),r.jsx("td",{className:"px-3 py-2",children:"Complementação de perfis e cadastros a pedido do Contratante"}),r.jsx("td",{className:"px-3 py-2",children:"Legítimo interesse do Contratante"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Logs, segurança e prevenção a fraude"}),r.jsx("td",{className:"px-3 py-2",children:"Proteção da Plataforma e dos titulares"}),r.jsx("td",{className:"px-3 py-2",children:"Legítimo interesse da Summit"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Registros fiscais e de pagamento"}),r.jsx("td",{className:"px-3 py-2",children:"Cumprimento de obrigações legais"}),r.jsx("td",{className:"px-3 py-2",children:"Obrigação legal"})]})]})]})})}),r.jsxs(gn,{title:"6. Sourcing ativo e dados de fontes públicas",children:[r.jsx("p",{children:"A Plataforma permite que o Contratante capture, por meio da extensão de navegador, informações profissionais disponíveis em fontes publicamente acessíveis. Sobre esse fluxo, com transparência:"}),r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsx("li",{children:"O Contratante é o controlador desses dados: é ele quem decide capturar, com que finalidade e por quanto tempo manter."}),r.jsx("li",{children:"A Summit registra a origem de cada perfil (por exemplo: candidatura, importação, captura via extensão), de modo que a procedência do dado seja sempre identificável."}),r.jsx("li",{children:"O Candidato alcançado por sourcing tem os mesmos direitos de qualquer titular (Seção 10), incluindo o direito de se opor ao tratamento e de solicitar a exclusão de seus dados. A solicitação pode ser dirigida ao Contratante responsável ou à Summit, que a encaminhará ao Contratante e cooperará para seu atendimento."}
736),r.jsx("li",{children:"A Plataforma não captura dados de áreas restritas, privadas ou protegidas por autenticação de terceiros em nome do Contratante além do que o próprio Contratante visualiza publicamente."})]})]}),r.jsxs(gn,{title:"7. Avaliações e apoio automatizado à decisão",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Consentimento registrado."})," Nenhuma avaliação é iniciada sem o aceite expresso do Candidato, apresentado antes do início e registrado com data, contexto e conteúdo do termo aceito."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Natureza dos instrumentos."})," As avaliações da Summit são instrumentos de avaliação comportamental e técnica construídos sobre frameworks consolidados pela literatura científica. Não constituem testes psicológicos de uso restrito, não fornecem diagnóstico e não substituem avaliação profissional regulamentada."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Apoio de inteligência artificial."})," A Plataforma pode gerar análises de apoio, como extração de dados de currículos e indicadores de aderência de candidatos a vagas. Esses recursos são sugestões de apoio à decisão: a avaliação e a decisão finais sobre qualquer Candidato cabem sempre a uma pessoa, no âmbito do Contratante."]}
736),r.jsx("p",{children:"Nos termos do art. 20 da LGPD, o titular pode solicitar a revisão de decisões tomadas unicamente com base em tratamento automatizado; solicitações nesse sentido serão encaminhadas ao Contratante responsável, com a cooperação da Summit."})]}),r.jsxs(gn,{title:"8. Compartilhamento e subprocessadores",children:[r.jsx("p",{children:"A Summit não vende dados pessoais. Compartilhamos dados apenas com os prestadores necessários à operação da Plataforma:"}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full text-xs border border-gray-200 rounded-lg overflow-hidden",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Terceiro"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Dados"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Finalidade"})]})}),r.jsxs("tbody",{className:"divide-y divide-gray-100",children:[r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Stripe Inc."}),r.jsx("td",{className:"px-3 py-2",children:"Dados de pagamento"}),r.jsx("td",{className:"px-3 py-2",children:"Processamento de cobranças"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Resend Inc."}),r.jsx("td",{className:"px-3 py-2",children:"Email e nome"}),r.jsx("td",{className:"px-3 py-2",children:"Envio de emails transacionais"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Wix.com Ltd."}),r.jsx("td",{className:"px-3 py-2",children:"Dados da aplicação e armazenamento"}),r.jsx("td",{className:"px-3 py-2",children:"Infraestrutura da aplicação em nuvem (EUA)"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Amazon Web Services (AWS)"}),r.jsx("td",{className:"px-3 py-2",children:"Dados de uso e armazenamento"}),r.jsx("td",{className:"px-3 py-2",children:"Infraestrutura de servidores em nuvem (EUA)"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Apollo.io (ZoomInfo Technologies)"}),r.jsx("td",{className:"px-3 py-2",children:"Identificadores profissionais e dados empresariais"}),r.jsx("td",{className:"px-3 py-2",children:"Enriquecimento de perfis e cadastros a pedido do Contratante"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Google LLC"}),r.jsx("td",{className:"px-3 py-2",children:"Emails enviados pela conta conectada e eventos de agenda do Contratante"}),r.jsx("td",{className:"px-3 py-2",children:"Envio de emails a Candidatos pelo Gmail e gestão da agenda no Google Agenda, mediante autorização expressa (sem leitura de mensagens recebidas)"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Microsoft Corporation"}),r.jsx("td",{className:"px-3 py-2",children:"Emails e eventos de agenda da conta conectada pelo Contratante"}),r.jsx("td",{className:"px-3 py-2",children:"Integração Outlook e Microsoft Calendar, mediante autorização expressa"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Provedores de inteligência artificial (via infraestrutura da aplicação)"}),r.jsx("td",{className:"px-3 py-2",children:"Conteúdo submetido a análise (ex.: texto de currículos)"}),r.jsx("td",{className:"px-3 py-2",children:"Extração de dados e geração de análises de apoio"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"HubSpot, Inc."}),r.jsx("td",{className:"px-3 py-2",children:"Nome, email, empresa, cargo, telefone e dados de navegação no site"}),r.jsx("td",{className:"px-3 py-2",children:"Gestão de relacionamento comercial, atendimento e análise de uso do site"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Meta Platforms, Inc. (WhatsApp)"}),r.jsx("td",{className:"px-3 py-2",children:"Conteúdo das mensagens trocadas, número e nome de exibição"}),r.jsx("td",{className:"px-3 py-2",children:"Atendimento e comunicação comercial via WhatsApp, quando iniciada pelo titular"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Eazybe"}),r.jsx("td",{className:"px-3 py-2",children:"Conteúdo das conversas de WhatsApp e seus anexos; dados de contato, empresa e negócio registrados no CRM; e-mails individuais registrados no CRM"}),r.jsx("td",{className:"px-3 py-2",children:"Sincronização das conversas de WhatsApp com o CRM e operação do CRM a partir do WhatsApp"})]})]})]})}),r.jsx("p",{children:"Todos os subprocessadores são contratualmente obrigados à conformidade com a LGPD. Dados podem ainda ser compartilhados quando exigido por lei ou ordem judicial."}),r.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 mt-3",children:r.jsxs("p",{children:[r.jsx("strong",{children:"Conformidade com políticas do Google e da Microsoft."})," O uso e a transferência de informações recebidas das APIs do Google obedecem à ",r.jsx("em",{children:"Google API Services 
736User Data Policy"}),", incluindo os requisitos de Uso Limitado (",r.jsx("em",{children:"Limited Use"}),"): essas informações são utilizadas exclusivamente para prover as funcionalidades de comunicação e agenda visíveis ao usuário que conectou a conta, não são usadas para publicidade e não são transferidas a terceiros fora das hipóteses permitidas. O mesmo padrão é aplicado às informações recebidas das APIs da Microsoft."]})})]}),r.jsx(gn,{title:"9. Retenção e exclusão de dados",children:r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Dados de conta do Contratante:"})," enquanto a conta estiver ativa e por até 5 anos após o encerramento, para cumprimento de obrigações legais e defesa em processos."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Dados de Candidatos nos workspaces:"})," pelo período determinado pelo Contratante, na qualidade de controlador, enquanto sua conta estiver ativa. A Plataforma disponibiliza ao Contratante ferramentas para correção e exclusão. Encerrada a conta do Contratante, os dados de seus workspaces são eliminados de forma segura ou anonimizados."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Registros de avaliação e consentimento:"})," mantidos junto ao workspace do Contratante, como evidência do aceite e do resultado, pelos mesmos prazos acima."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Logs de acesso e segurança:"})," 12 meses."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Registros de pagamento:"})," 5 anos (obrigação fiscal)."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Emails de contas suspensas por fraude:"})," bloqueados permanentemente para prevenção de novos abusos."]})]})}
736),r.jsxs(gn,{title:"10. Direitos dos titulares e como exercê-los",children:[r.jsx("p",{children:"Nos termos da LGPD, você tem direito a: confirmação da existência de tratamento; acesso; correção de dados incompletos, inexatos ou desatualizados; anonimização, bloqueio ou eliminação de dados desnecessários ou excessivos; portabilidade; eliminação de dados tratados com consentimento; informação sobre compartilhamento; informação sobre a possibilidade de não consentir; revogação do consentimento; oposição a tratamento realizado com base em legítimo interesse; e revisão de decisões automatizadas."}),r.jsx("p",{children:r.jsx("strong",{children:"Como exercer:"})}),r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Dados sob controle da Summit"})," (conta, faturamento, site): escreva para ",r.jsx("strong",{children:"[email protected]"}),' com o assunto "Direitos LGPD". Resposta em até 15 dias úteis.']}),r.jsxs("li",{children:[r.jsx("strong",{children:"Dados de Candidato em workspace de um Contratante:"})," o pedido pode ser dirigido diretamente ao Contratante (a empresa conduzindo o processo seletivo), que é o controlador. Se dirigido à Summit, encaminharemos ao Contratante responsável e cooperaremos para o atendimento, informando você do encaminhamento."]})]}),r.jsxs("p",{children:["Você também pode apresentar reclamação à ",r.jsx("strong",{children:"Autoridade Nacional de Proteção de Dados (ANPD)"})," em gov.br/anpd."]})]}),r.jsxs(gn,{title:"11. Segurança dos dados",children:[r.jsx("p",{children:"Adotamos criptografia em trânsito (TLS/HTTPS), controle de acesso por funções (RBAC), isolamento lógico de dados por workspace com regras de acesso em nível de registro, trilhas de auditoria das ações relevantes, princípio do menor privilégio e autenticação gerenciada pela infraestrutura da aplicação."}),r.jsx("p",{children:"Incidentes de segurança que possam acarretar risco ou dano relevante serão comunicados à ANPD e aos titulares afetados nos prazos e na forma previstos pela LGPD."})]}),r.jsxs(gn,{title:"12. Cookies",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Essenciais:"})," mantêm a sessão autenticada — necessários ao funcionamento, não podem ser desativados."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Desempenho:"})," monitoram erros e desempenho técnico."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Analíticos:"})," padrões de uso agregados para melhoria do produto."]}),r.jsx("p",{children:"Cookies não essenciais podem ser gerenciados nas configurações do navegador."})]}),r.jsxs(gn,{title:"12.1 Política de cookies",children:[r.jsx("p",{children:"No site público da Summit, os cookies são organizados em três categorias:"}),r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Essenciais:"})," login, sessão e segurança. São necessários ao funcionamento do site e não podem ser desativados."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Análise:"})," páginas visitadas e origem do acesso, para entender o que funciona e o que precisamos melhorar."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Publicidade:"})," mensuração e alcance da Summit em outros sites, para apresentar a Plataforma a outros times de RH."]})]}),r.jsxs("p",{children:["Os cookies de análise e de publicidade utilizam serviços do ",r.jsx("strong",{children:"Google (Google Ads)"})," e só são ativados após o seu consentimento, conforme o Google Consent Mode: até a sua escolha, o armazenamento de dados analíticos e publicitários permanece negado."]}),r.jsxs("p",{children:["O consentimento pode ser ",r.jsx("strong",{children:"revogado ou alterado a qualquer momento"})," pelo link ",r.jsx("strong",{children:'"Cookies"'})," no rodapé do site, que reabre o painel de preferências. Sua escolha fica registrada no seu navegador por 6 meses."]})]}),r.jsx(gn,{title:"13. Transferência internacional de dados",children:r.jsx("p",{children:"Os prestadores indicados na Seção 8 podem processar dados fora do Brasil, notadamente nos Estados Unidos. Adotamos salvaguardas adequadas para essas transferências, incluindo cláusulas contratuais e padrões de proteção compatíveis, em conformidade com o art. 33 da LGPD."})}),r.jsxs(gn,{title:"14. Alterações, contato e Encarregado de Dados (DPO)",children:[r.jsx("p",{children:"Alterações relevantes desta Política serão comunicadas por email ou aviso na Plataforma com antecedência mínima de 15 dias. O uso continuado após a entrada em vigor implica concordância com a nova versão."}),r.jsxs("p",{children:[r.jsx("strong",{children:"Summit Servicos de RH Ltda"}),r.jsx("br",{}),"Av. Paulista, 1471, Conj. 511, Bela Vista, São Paulo/SP — CEP 01.311-927",r.jsx("br",{}),"Encarregado pelo tratamento de dados pessoais (DPO): contato via ",r.jsx("strong",{children:"[email protected]"}),r.jsx("br",{}),"Telefone: (11) 9162-7786"]})]})]})}function vse(){return r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-gray-400 mb-8",children:"Última atualização: 16 de julho de 2026 — Versão 1.3"}),r.jsxs(gn,{title:"1. Aceitação dos Termos",children:[r.jsx("p",{children:'Ao acessar ou utilizar a plataforma Summit ("Plataforma"), você declara ter lido, compreendido e concordado integralmente com estes Termos de Uso ("Termos"). Caso não concorde com qualquer disposição, não utilize a Plataforma.'}),r.jsxs("p",{children:['Estes Termos constituem um contrato vinculante entre você (ou a empresa que representa, "Contratante") e a ',r.jsx("strong",{children:"Summit Servicos de RH Ltda"}),", CNPJ nº ",r.jsx("strong",{children:"45.902.995/0001-14"}),", Av. Paulista, 1471, Conj. 511, Bela Vista, São Paulo/SP, CEP 01.311-927, nome fantasia ",r.jsx("strong",{children:"Summit Inc."})]})]}),r.jsx(gn,{title:"2. Definições",children:r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Plataforma:"})," conjunto de produtos SaaS da Summit acessíveis via web"]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Contratante:"})," pessoa jurídica ou profissional que contrata o acesso à Plataforma"]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Usuário:"})," pessoa física autorizada pelo Contratante a operar a Plataforma"]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Candidato:"})," pessoa física convidada para avaliações ou cujos dados são cadastrados na Plataforma"]}
vendor: 4,972 bytes, line 736
736),r.jsxs("li",{children:[r.jsx("strong",{children:"Workspace:"})," ambiente exclusivo do Contratante, vinculado a um domínio corporativo único"]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Crédito:"})," unidade de consumo utilizada para realizar avaliações — consumido quando o Candidato conclui a avaliação"]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Módulo:"})," produto específico contratado separadamente"]}),r.jsxs("li",{children:[r.jsx("strong",{children:"TalentProfile:"})," perfil unificado de Candidato compartilhado entre módulos do mesmo Workspace"]})]})}),r.jsxs(gn,{title:"3. Descrição dos serviços",children:[r.jsx("p",{children:"A Plataforma Summit é composta por módulos independentes, contratáveis separadamente:"}),r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Summit ATS"})," — sistema de rastreamento de candidatos, pipeline de recrutamento, extensão para LinkedIn, integração com Google Calendar e Microsoft Outlook para agendamentos. Disponível para contratação."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Summit Assessments"})," — avaliações comportamentais, cognitivas, de idioma e específicas por cargo. Criação de campanhas, convite a candidatos, acompanhamento e relatórios. Disponível para contratação."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Summit Jobs"})," — publicação e gestão de vagas, recebimento de candidaturas, página pública de carreiras. Disponível no plano gratuito. Planos pagos em roadmap."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Summit Talent"})," — banco de talentos centralizado, contratação por lote sob demanda. Modelo de acesso e preços sob consulta."]})]}),r.jsx("p",{children:"A Summit pode lançar novos módulos, descontinuar funcionalidades com aviso prévio de 30 dias e atualizar os serviços existentes."})]}),r.jsxs(gn,{title:"4. Cadastro e elegibilidade",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Requisitos:"})," pessoa jurídica regularmente constituída ou profissional com CNPJ ativo; email corporativo obrigatório — domínios públicos (Gmail, Hotmail, Outlook, Yahoo, iCloud e similares) não são aceitos."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Workspace:"})," cada domínio corporativo dá direito a um único Workspace. Novos usuários do mesmo domínio devem solicitar acesso ao administrador do Workspace existente."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Usuários:"})," novos usuários só podem ser adicionados via convite do administrador. O Contratante é responsável por todas as ações realizadas em seu Workspace."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Veracidade:"})," o fornecimento de informações falsas pode resultar na suspensão ou encerramento imediato da conta."]})]}),r.jsxs(gn,{title:"5. Planos, créditos e cobrança",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Summit ATS"})," — cobrança por assento (per-seat):"]}),r.jsx("div",{className:"overflow-x-auto mb-3",children:r.jsxs("table",{className:"w-full text-xs border border-gray-200 rounded-lg overflow-hidden",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Plano"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Preço por assento/mês"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Ciclo anual"})]})}),r.jsxs("tbody",{className:"divide-y divide-gray-100",children:[r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Gratuito"}),r.jsx("td",{className:"px-3 py-2",children:"R$ 0"}),r.jsx("td",{className:"px-3 py-2",children:"—"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Starter"}),r.jsx("td",{className:"px-3 py-2",children:"R$ 349"}),r.jsx("td",{className:"px-3 py-2",children:"2 meses grátis"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Growth"}),r.jsx("td",{className:"px-3 py-2",children:"R$ 549"}),r.jsx("td",{className:"px-3 py-2",children:"2 meses grátis"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Enterprise"}),r.jsx("td",{className:"px-3 py-2",children:"Sob consulta"}),r.jsx("td",{className:"px-3 py-2",children:"Sob consulta"})]})]})]})}),r.jsxs("p",{children:[r.jsx("strong",{children:"Summit Assessments"})," — cobrança fixa por plano, com créditos e limite de assentos:"]}),r.jsx("div",{className:"overflow-x-auto mb-3",children:r.jsxs("table",{className:"w-full text-xs border border-gray-200 rounded-lg overflow-hidden",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Plano"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Preç
736o mensal"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Créditos/mês"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Assentos"}),r.jsx("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Testes/campanha"})]})}),r.jsxs("tbody",{className:"divide-y divide-gray-100",children:[r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Gratuito"}),r.jsx("td",{className:"px-3 py-2",children:"R$ 0"}),r.jsx("td",{className:"px-3 py-2",children:"30"}),r.jsx("td",{className:"px-3 py-2",children:"1"}),r.jsx("td",{className:"px-3 py-2",children:"1"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Starter"}),r.jsx("td",{className:"px-3 py-2",children:"R$ 399"}),r.jsx("td",{className:"px-3 py-2",children:"200"}),r.jsx("td",{className:"px-3 py-2",children:"até 3"}),r.jsx("td",{className:"px-3 py-2",children:"até 3"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Growth"}),r.jsx("td",{className:"px-3 py-2",children:"R$ 799"}),r.jsx("td",{className:"px-3 py-2",children:"600"}),r.jsx("td",{className:"px-3 py-2",children:"até 10"}),r.jsx("td",{className:"px-3 py-2",children:"até 5"})]}),r.jsxs("tr",{children:[r.jsx("td",{className:"px-3 py-2",children:"Enterprise"}),r.jsx("td",{className:"px-3 py-2",children:"Sob consulta"}),r.jsx("td",{className:"px-3 py-2",children:"Sob medida"}),r.jsx("td",{className:"px-3 py-2",children:"Ilimitado"}),r.jsx("td",{className:"px-3 py-2",children:"Ilimitado"})]})]})]})}),r.jsxs("p",{children:[r.jsx("strong",{children:"Summit Jobs"})," — plano Gratuito disponível. Planos pagos em roadmap; termos serão atualizados quando disponíveis."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Summit Talent"})," — comercialização e preços sob consulta."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Plano Gratuito:"}
736)," permanente, sem expiração, sem coleta de dados de pagamento."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Créditos (Summit Assessments):"})," consumidos na conclusão da avaliação. Créditos do plano mensal expiram ao fim do mês de competência. Créditos do plano anual expiram ao fim do ano contratado. Créditos adicionais adquiridos como add-on (pacotes avulsos) nunca expiram. Créditos não são reembolsáveis salvo erro comprovado da Plataforma."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Assentos (Summit ATS):"})," cada assento corresponde a um usuário ativo com acesso ao módulo. O número de assentos é ajustável a qualquer momento; alterações são refletidas na próxima cobrança proporcional (proração via Stripe)."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Cobrança:"})," mensal ou anual. O ciclo anual oferece equivalente a dois meses de desconto (aproximadamente 16,67% sobre o preço mensal). Processamento via Stripe. Inadimplência: suspensão após 7 dias de aviso. Alterações de preço com 30 dias de antecedência."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Programa Founder:"})," desconto adicional para os primeiros clientes do Summit. Termos completos disponíveis na aba ",r.jsx("em",{children:"Programa Founder"})," desta página."]})]}),r.jsx(gn,{title:"6. Obrigações do Contratante",children:r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsx("li",{children:"Utilizar a Plataforma exclusivamente para fins legítimos de recrutamento e gestão de pessoas"}),r.jsx("li",{children:"Obter consentimento adequado dos Candidatos para coleta e tratamento de dados pessoais (LGPD)"}),r.jsx("li",{children:"Informar os Candidatos sobre o uso de avaliações automatizadas no processo seletivo"}),r.jsx("li",{children:"Não utilizar resultados como único critério de contratação (art. 20 da LGPD)"}),r.jsx("li",{children:"Manter sigilo das credenciais de acesso ao Workspace"}),r.jsx("li",{children:"Notificar imediatamente a Summit em caso de suspeita de acesso não autorizado"})]})}),r.jsx(gn,{title:"7. Uso proibido",children:r.jsx("p",{children:"É vedado: uso discriminatório ou ilegal, engenharia reversa, scraping automatizado, sobrecarga intencional da infraestrutura, cadastro de perfis fictícios para consumo de créditos, revenda ou sublicenciamento do acesso, armazenamento ou transmissão de conteúdo ilegal ou difamatório."})}),r.jsxs(gn,{title:"8. Responsabilidade sobre dados de Candidatos",children:[r.jsxs("p",{children:["Para fins da LGPD, no contexto do ",r.jsx("strong",{children:"Summit Assessments"})," e do ",r.jsx("strong",{children:"Summit ATS"}),": o ",r.jsx("strong",{children:"Contratante"})," é o ",r.jsx("strong",{children:"controlador"})," dos dados dos Candidatos avaliados ou movimentados no pipeline; a ",r.jsx("strong",{children:"Summit"})," atua como ",r.jsx("strong",{children:"operadora"}),"."]}),r.jsx("p",{children:"O Contratante é responsável por: obter base legal adequada, informar os Candidatos sobre avaliações automatizadas e sobre a inclusão em pipeline de recrutamento, não discriminar com base em critérios proibidos por lei, e responder às solicitações de direitos dos t
736itulares."}),r.jsx("p",{children:"Solicitações de exclusão de dados de Candidatos atendidas em até 15 dias úteis."})]}),r.jsx(gn,{title:"9. Propriedade intelectual",children:r.jsx("p",{children:"Todos os direitos sobre a Plataforma, software, design, marca, metodologias de avaliação e relatórios gerados pertencem à Summit ou seus licenciantes. Dados inseridos pelo Contratante pertencem ao Contratante."})}),r.jsx(gn,{title:"10. Limitação de responsabilidade",children:r.jsx("p",{children:"A Summit não responde por decisões de contratação tomadas pelo Contratante com base nos resultados das avaliações. A responsabilidade total da Summit limita-se ao valor pago nos 3 meses anteriores ao evento. Não há responsabilidade por danos indiretos, lucros cessantes ou perda de dados."})}),r.jsxs(gn,{title:"11. Suspensão e encerramento",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Pela Summit (imediato):"})," violação dos Termos, uso fraudulento ou ilegal, inadimplência após notificação."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Pelo Contratante:"})," a qualquer momento. Créditos não utilizados não são reembolsados."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Pela Summit (programado):"})," aviso prévio de 30 dias sem necessidade de justificativa, exceto em casos de violação grave."]})]}),r.jsx(gn,{title:"12. Alterações nos Termos",children:r.jsx("p",{children:"Alterações relevantes serão comunicadas com antecedência mínima de 15 dias. O uso continuado após a entrada em vigor implica aceitação dos novos Termos."})}),r.jsx(gn,{title:"13. Lei aplicável e foro",children:r.jsx("p",{children:"Estes Termos são regidos pelas leis da República Federativa do Brasil. Fica eleito o foro da Comarca de São Paulo/SP, com renúncia a qualquer outro."})}),r.jsx(gn,{title:"14. Contato",children:r.jsxs("p",{children:[r.jsx("strong",{children:"Summit Servicos de RH Ltda"}),r.jsx("br",{}),"Av. Paulista, 1471, Conj. 511, Bela Vista, São Paulo/SP — CEP 01.311-927",r.jsx("br",{}),"Email: ",r.jsx("strong",{children:"[email protected]"}),r.jsx("br",{}),"Telefone: (11) 9162-7786"]})})]})}function bse(){return r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-gray-400 mb-8",children:"Última atualização: 16 de julho de 2026 — Versão 1.0"}),r.jsxs(gn,{title:"1. Sobre o Programa",children:[r.jsxs("p",{children:["O ",r.jsx("strong",{children:"Programa Founder"})," é um benefício comercial destinado aos primeiros clientes pagantes do Summit. Consiste em um desconto de ",r.jsx("strong",{children:"25% (vinte e cinco por cento)"})," aplicado sobre as cobranças recorrentes dos módulos elegíveis, concedido no momento da contratação e mantido conforme as regras desta aba."]}),r.jsxs("p",{children:["O desconto é aplicado tecnicamente por meio do cupom ",r.jsx("strong",{children:"SOUFOUNDER"})," e vinculado ao Workspace do Contratante."]})]}),r.jsxs(gn,{title:"2. Módulos elegíveis",children:[r.jsx("p",{children:"O desconto Founder aplica-se exclusivamente às assinaturas recorrentes dos seguintes módulos:"}),r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsx("li",{children:r.jsx("strong",{children:"Summit ATS"})}),r.jsx("li",{children:r.jsx("strong",{children:"Summit Assessments"})}),r.jsxs("li",{children:[r.jsx("strong",{children:"Summit Jobs"})," (quando disponível em planos pagos)"]})]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Summit Talent"})," não participa do Programa Founder."]})]}),r.jsxs(gn,{title:"3. Cobranças excluídas",children:[r.jsxs("p",{children:["O desconto Founder ",r.jsx("strong",{children:"não se aplica"})," a:"]}),r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsx("li",{children:"Add-ons de créditos e pacotes de créditos avulsos"}),r.jsx("li",{children:"Pacotes de talentos e serviços do Summit Talent"}),r.jsx("li",{children:"Cobranças não recorrentes (one-time)"}),r.jsx("li",{children:"Taxas de setup, onboarding assistido ou serviços profissionais"}),r.jsx("li",{children:"Migração, importação assistida ou consultoria"}),r.jsx("li",{children:"Módulos, funcionalidades ou add-ons contratados fora da mecânica de assinatura Stripe"}),r.jsx("li",{children:"Reembolsos, estornos e créditos promocionais"})]})]}),r.jsx(gn,{title:"4. Duração e reajustes",children:r.jsxs("p",{children:["O desconto é ",r.jsx("strong",{children:"vitalício"})," enquanto a assinatura permanecer ativa e adimplente. O benefício não é 
736congelado a um valor nominal: incide sempre sobre o ",r.jsx("strong",{children:"preço vigente no momento da cobrança"}),". Reajustes de preço aplicados pela Summit são refletidos, mantendo-se o percentual de 25% de desconto sobre o novo preço."]})}),r.jsx(gn,{title:"5. Não cumulatividade",children:r.jsx("p",{children:"O desconto Founder não é cumulativo com outras promoções, cupons ou descontos oferecidos pela Summit. Em caso de sobreposição, aplica-se apenas o maior desconto por módulo."})}),r.jsx(gn,{title:"6. Vagas limitadas",children:r.jsx("p",{children:"O Programa Founder é oferecido em número limitado de vagas, enquanto durar a promoção. Uma vez encerrado o programa, novas adesões não serão aceitas — o que não afeta os benefícios de founders já ativos."})}),r.jsxs(gn,{title:"7. Perda do benefício",children:[r.jsx("p",{children:"O desconto Founder é encerrado, sem direito a restabelecimento, nas seguintes situações:"}),r.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[r.jsx("li",{children:"Cancelamento seguido de nova assinatura no mesmo ou em outro Workspace"}),r.jsx("li",{children:"Inadimplência não regularizada após o prazo de suspensão previsto na Seção 5 dos Termos de Uso"}),r.jsx("li",{children:"Downgrade para o Plano Gratuito por período contínuo superior a 90 dias"}),r.jsx("li",{children:"Transferência de titularidade do Workspace ou alteração de CNPJ sem autorização expressa da Summit"}),r.jsx("li",{children:"Violação dos Termos de Uso que resulte em suspensão ou encerramento pela Summit"})]}),r.jsx("p",{children:"A perda do benefício não gera direito a compensação, crédito ou reembolso."})]}),r.jsxs(gn,{title:"8. Encerramento do Programa",children:[r.jsxs("p",{children:["A Summit pode encerrar novas adesões ao Programa Founder a qualquer momento, a seu exclusivo critério e sem aviso prévio. O encerramento do programa para novas adesões ",r.jsx("strong",{children:"não afeta"})," os benefícios de founders ativos, que permanecem regidos por esta aba."]}),r.jsx("p",{children:"A Summit reserva-se o direito de descontinuar integralmente o Programa Founder, inclusive para founders ativos, mediante aviso prévio mínimo de 90 dias, em caso de reestruturação comercial substancial da Plataforma."})]}),r.jsx(gn,{title:"9. Aceite",children:r.jsxs("p",{children:["A aplicação do cupom ",r.jsx("strong",{children:"SOUFOUNDER"})," no checkout do Stripe constitui aceite expresso destes termos pelo Contratante. Estes termos integram e complementam os ",r.jsx("strong",{children:"Termos de Uso"})," da Summit; em caso de conflito, prevalecem as disposições desta aba especificamente sobre o Programa Founder."]})}),r.jsx(gn,{title:"10. Contato",children:r.jsxs("p",{children:["Dúvidas sobre o Programa Founder: ",r.jsx("strong",{children:"[email protected]"}),"."]})})]})}function wse(){const[e,t]=g.useState("privacy");return r.jsxs("div",{className:"min-h-screen bg-gray-50",children:[r.jsx("div",{className:"bg-white border-b border-gray-200",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6 flex items-center justify-between",children:[r.jsx("a",{href:"/",children:r.jsx("img",{src:"https://i.imgur.com/MVgsUJ5.png",alt:"Summit Inc.",className:"h-8"})}),r.jsx("a",{href:"/",className:"text-sm text-gray-500 hover:text-gray-800 transition-colors",children:"← Voltar ao início"})]})}),r.jsx("div",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:r.jsx("div",{className:"max-w-3xl mx-auto px-6",children:r.jsx("div",{className:"flex gap-0",children:xse.map(n=>r.jsx("button",{onClick:()=>t(n.id),className:`px-6 py-4 text-sm font-medium border-b-2 transition-colors ${e===n.id?"border-violet-600 text-violet-600":"border-transparent text-gray-500 hover:text-gray-800"}`,children:n.label},n.id))})})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-12",children:[r.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:e==="privacy"?"Política de Privacidade":e==="terms"?"Termos de Uso":"Programa Founder"}),r.jsx("p",{className:"text-sm text-gray-500 mb-10",children:"Summit Servicos de RH Ltda — CNPJ 45.902.995/0001-14"}),e==="privacy"?r.jsx(yse,{}):e==="terms"?r.jsx(vse,{}):r.jsx(bse,{})]}),r.jsx("div",{className:"border-t border-gray-200 bg-white mt-12",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6 flex items-center justify-between",children:[r.jsx("p",{className:"text-xs text-gray-400",children:"© 2026 Summit Inc. Todos os direitos reservados."}),r.jsx("p",{className:"text-xs text-gray-400",children:"[email protected]"})]})})]})}const Ko="#F5A623",jse=[{id:"pipeline",title:"Seus candidatos não vão ficar esperando",desc:"Pipeline visual com score de IA em cada card. Você vê quem está parado, há quanto tempo, e com que aderência — e decide em minutos. O candidato certo não escapa por demora na triagem.",bullets:["Kanban com drag and drop e scores visíveis","Rating com IA — análise em 1 clique","Filtros por score, etapa, salário e vaga"],imageUrl:null,mockup:"pipeline"},{id:"email",title:"Você precisa de comunicação ágil",desc:"Email direto do pipeline, com sua conta Gmail ou Outlook. Templates prontos, envio em massa, histórico completo no perfil do candidato. Você fala com 50 candidatos sem abrir outra aba.",bullets:["Gmail e Outlook integrados nativamente","Templates e envio em massa com CC/BCC","Histórico fica no candidato, não na caixa de entrada"],imageUrl:null,mockup:"email"}
736,{id:"hiring",title:"Envolver os gestores no processo",desc:"Um link. O gestor abre, vê os candidatos com resumo e score, aprova ou rejeita com um clique. Sem conta, sem onboarding, sem licença extra. O feedback chega em minutos, não em semanas.",bullets:["Link público — zero fricção pro gestor",'Aprovar, rejeitar ou "talvez" com comentário',"Não consome assento — sem custo extra"],imageUrl:null,mockup:"hiring"},{id:"agendamento",title:"Simplificar a gestão da sua agenda",desc:"Seu link de agendamento próprio, sincronizado com Google Calendar ou Outlook. O candidato vê os horários, escolhe, e recebe confirmação automática. Você para de trocar 8 emails pra marcar uma entrevista.",bullets:["Link próprio por recrutador","Sincroniza com Google Calendar e Outlook","Confirmação e lembrete automáticos"],imageUrl:"https://i.imgur.com/m3nTk2C.png",mockup:null},{id:"extension",title:"Sourcing direto do LinkedIn, sem sair da página",desc:"Encontrou o perfil certo? Um clique e ele já está no pipeline da vaga. Nome, cargo, localização e contato capturados automaticamente. Você continua navegando, o Summit organiza.",bullets:["Captura automática de dados do perfil","Salva direto na vaga escolhida","Extensão gratuita na Chrome Web Store"],imageUrl:"https://i.imgur.com/uvkxtqO.png",mockup:null},{id:"analytics",title:"Inteligência que orienta suas decisões",desc:"Funil de candidatos, taxa de conversão por etapa, tempo médio em cada fase, e recomendações automáticas sobre o que ajustar. Você para de adivinhar e começa a decidir com evidência.",bullets:["Funil com conversão por etapa","Health Score do processo em tempo real","Summit Insights — recomendações de IA"],imageUrl:null,mockup:"analytics"}];function Sse(){const e=[{init:"RP",bg:"#6C24F5",name:"Renata P.",role:"Coord. Projetos · 8a",score:92,sc:"#059669",sb:"#DCFCE7"},{init:"DM",bg:"#0EA5E9",name:"Diego M.",role:"Ger. Projetos · 6a",score:85,sc:"#059669",sb:"#DCFCE7"},{init:"LS",bg:"#F59E0B",name:"Laura S.",role:"Analista · 3a",score:48,sc:"#D97706",sb:"#FEF3C7"},{init:"MC",bg:"#10B981",name:"Marco C.",role:"PMO Senior · 5a",score:76,sc:"#059669",sb:"#DCFCE7"}];return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"Pipeline — Gerente de Projetos"})]}),r.jsx("div",{style:{padding:12,display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:6},children:e.map(t=>r.jsxs("div",{style:{background:"#F8F9FB",border:"1px solid #E3E8EF",borderRadius:6,padding:8},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5,marginBottom:3},children:[r.jsx("div",{style:{width:18,height:18,borderRadius:"50%",background:t.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:8,color:"#fff",fontWeight:600},children:t.init}),r.jsx("span",{style:{fontSize:10,fontWeight:600,color:"#0A2540"},children:t.name})]}),r.jsx("p",{style:{fontSize:9,color:"#94A3B8",margin:"0 0 4px"},children:t.role}),r.jsx("span",{style:{fontSize:10,fontWeight:600,color:t.sc,background:t.sb,padding:"1px 6px",borderRadius:8},children:t.score})]},t.init))})]})}function kse(){return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}
736),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"Novo email — 3 candidatos selecionados"})]}),r.jsxs("div",{style:{padding:14},children:[r.jsxs("div",{style:{display:"flex",gap:6,marginBottom:10},children:[r.jsx("span",{style:{fontSize:10,padding:"3px 8px",background:"#EDE9FE",color:"#6C24F5",borderRadius:6,fontWeight:500},children:"Para: 3 candidatos"}),r.jsx("span",{style:{fontSize:10,padding:"3px 8px",background:"#F8F9FB",color:"#94A3B8",borderRadius:6,border:"1px solid #E3E8EF"},children:"CC/BCC"})]}),r.jsxs("div",{style:{marginBottom:10},children:[r.jsx("p",{style:{fontSize:10,color:"#94A3B8",margin:"0 0 4px"},children:"Template"}),r.jsx("div",{style:{fontSize:11,padding:"6px 10px",background:"#F8F9FB",border:"1px solid #E3E8EF",borderRadius:6,color:"#0A2540"},children:"Convite para entrevista"})]}),r.jsxs("div",{style:{background:"#F8F9FB",border:"1px solid #E3E8EF",borderRadius:8,padding:10,marginBottom:10},children:[r.jsxs("p",{style:{fontSize:11,color:"#0A2540",margin:0,lineHeight:1.5},children:["Olá ","{{nome}}",","]}),r.jsxs("p",{style:{fontSize:11,color:"#64748B",margin:"4px 0 0",lineHeight:1.5},children:["Gostaríamos de convidar você para uma entrevista para a vaga de ","{{vaga}}",". Segue o link para agendar o melhor horário..."]})]}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:6},children:[r.jsx("span",{style:{fontSize:10,padding:"5px 12px",background:"#F8F9FB",color:"#94A3B8",borderRadius:6,border:"1px solid #E3E8EF"},children:"Salvar rascunho"}),r.jsx("span",{style:{fontSize:10,padding:"5px 12px",background:"#6C24F5",color:"#fff",borderRadius:6,fontWeight:500},children:"Enviar para 3 →"})]})]})]})}function _se(){const e=[{init:"RP",bg:"#6C24F5",name:"Renata Pires",role:"Coord. de Projetos · 8 anos",score:92,status:"Aprovado",stBg:"#DCFCE7",stColor:"#166534"},{init:"DM",bg:"#0EA5E9",name:"Diego Moura",role:"Gerente de Projetos · 6 anos",score:85,status:"Aprovado",stBg:"#DCFCE7",stColor:"#166534"},{init:"LS",bg:"#F59E0B",name:"Laura Santos",role:"Analista de Processos · 3 anos",score:48,status:"Talvez",stBg:"#FEF3C7",stColor:"#92400E"}];return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"summitinc.io/review/abc123"})]}),r.jsxs("div",{style:{padding:14},children:[r.jsxs("div",{style:{marginBottom:10},children:[r.jsx("p",{style:{fontSize:13,fontWeight:600,color:"#0A2540",margin:0},children:"Gerente de Projetos"}),r.jsx("p",{style:{fontSize:10,color:"#94A3B8",margin:0},children:"Compartilhado por Carolina · 3 candidatos"})]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,marginBottom:12},children:e.map(t=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"#F8F9FB",borderRadius:8,border:"1px solid #E3E8EF"},children:[r.jsx("div",{style:{width:22,height:22,borderRadius:"50%",background:t.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,color:"#fff",fontWeight:600},children:t.init}),r.jsxs("div",{style:{flex:1},children:[r.jsx("p",{style:{fontSize:11,fontWeight:600,color:"#0A2540",margin:0},children:t.name}),r.jsx("p",{style:{fontSize:9,color:"#94A3B8",margin:0},children:t.role})]}),r.jsx("span",{style:{fontSize:12,fontWeight:700,color:t.score>=70?"#059669":"#D97706"},children:t.score}),r.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"2px 8px",borderRadius:6,background:t.stBg,color:t.stColor},children:t.status})]},t.init))}),r.jsxs("div",{style:{display:"flex",gap:6},children:[r.jsx("span",{style:{flex:1,fontSize:11,textAlign:"center",padding:"7px 0",border:"1px solid #22C55E",color:"#059669",borderRadius:6,fontWeight:600},children:"✓ Aprovar"}),r.jsx("span",{style:{flex:1,fontSize:11,textAlign:"center",padding:"7px 0",border:"1px solid #E3E8EF",color:"#94A3B8",borderRadius:6,fontWeight:600},children:"? Talvez"}),r.jsx("span",{style:{flex:1,fontSize:11,textAlign:"center",padding:"7px 0",border:"1px solid #EF4444",color:"#EF4444",borderRadius:6,fontWeight:600},children:"✕ Rejeitar"})]})]})]})}function Cse(){return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}
736),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"summitinc.io/app/analises"})]}),r.jsxs("div",{style:{padding:14},children:[r.jsx("div",{style:{display:"flex",gap:8,marginBottom:12},children:[{l:"Candidatos",v:"47"},{l:"Conversão",v:"12%",c:"#059669"},{l:"Health Score",v:"78",c:"#059669",s:"Saudável"}].map(e=>r.jsxs("div",{style:{flex:1,background:"#F8F9FB",borderRadius:8,padding:"8px 10px",border:"1px solid #E3E8EF",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:8,color:"#94A3B8",margin:0},children:e.l}),r.jsx("p",{style:{fontSize:18,fontWeight:700,color:e.c||"#0A2540",margin:0},children:e.v}),e.s&&r.jsx("p",{style:{fontSize:8,color:e.c,margin:0},children:e.s})]},e.l))}),r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("p",{style:{fontSize:10,fontWeight:600,color:"#0A2540",margin:"0 0 6px"},children:"Funil de candidatos"}),[{s:"Sourced",n:18,w:"100%",c:"#F59E0B"},{s:"Triagem",n:12,w:"67%",c:"#3B82F6"},{s:"Entrevista",n:8,w:"44%",c:"#6C24F5"},{s:"Proposta",n:5,w:"28%",c:"#0EA5E9"},{s:"Contratado",n:2,w:"11%",c:"#059669"}].map(e=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:3},children:[r.jsx("span",{style:{fontSize:9,color:"#64748B",width:60,textAlign:"right"},children:e.s}),r.jsx("div",{style:{flex:1,height:10,background:"#F1F5F9",borderRadius:4,overflow:"hidden"},children:r.jsx("div",{style:{width:e.w,height:"100%",background:e.c,borderRadius:4}})}),r.jsx("span",{style:{fontSize:9,fontWeight:600,color:"#0A2540",width:16,textAlign:"right"},children:e.n})]},e.s))]}),r.jsxs("div",{style:{background:"#F0FDF4",borderRadius:8,padding:"8px 10px",border:"1px solid #BBF7D0"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,marginBottom:4},children:[r.jsx("span",{style:{fontSize:10,fontWeight:700,color:"#059669"},children:"✦ Summit Insights"}),r.jsx("span",{style:{fontSize:8,padding:"1px 5px",background:"#059669",color:"#fff",borderRadius:4,fontWeight:600},children:"IA"})]}),r.jsx("p",{style:{fontSize:10,color:"#166534",lineHeight:1.5,margin:0},children:"Conversão Triagem → Entrevista de 67% indica boa qualidade de sourcing. Tempo médio de 3,4 dias na Entrevista — considere agendar retornos mais rápido."})]})]})]})}function Ese({feature:e,index:t}){const n=t%2!==0,s=t%2===0?"#ffffff":"#F6F9FC",i=e.imageUrl?r.jsx("div",{style:{borderRadius:12,overflow:"hidden",border:"1px solid #E3E8EF"},children:r.jsx("img",{src:e.imageUrl,alt:e.title,style:{width:"100%",display:"block"}})}):e.mockup==="pipeline"?r.jsx(Sse,{}):e.mockup==="email"?r.jsx(kse,{}):e.mockup==="hiring"?r.jsx(_se,{}):e.mockup==="analytics"?r.jsx(Cse,{}):null,a=r.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[r.jsx("h3",{style:{fontSize:28,fontWeight:800,color:"#0A2540",margin:"0 0 10px",lineHeight:1.2},children:e.title}),r.jsx("p",{style:{fontSize:15,color:"#64748B",lineHeight:1.7,margin:"0 0 20px"},children:e.desc}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:e.bullets.map((o,l)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,fontSize:14,color:"#475569"},children:[r.jsx("div",{style:{width:20,height:20,borderRadius:"50%",background:"#DCFCE7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(fn,{style:{width:12,height:12,color:"#059669"}})}),o]},l))})]});return r.jsx("div",{style:{background:s,padding:"80px 24px",borderTop:t>0?"1px solid #E3E8EF":"none"},children:r.jsx("div",{style:{maxWidth:1060,margin:"0 auto",display:"grid",gridTemplateColumns:n?"1fr 1.2fr":"1.2fr 1fr",gap:48,alignItems:"center"},children:n?r.jsxs(r.Fragment,{children:[a,i]}):r.jsxs(r.Fragment,{children:[i,a]})})})}function Fse(){return r.jsxs("div",{style:{background:"#fff"},children:[r.jsx("section",{style:{background:"linear-gradient(135deg, #12172a 0%, #1c1a0a 55%, #1f1500 100%)",padding:"160px 24px 220px"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,background:Ko+"22",border:"1px solid "+Ko+"55",padding:"4px 12px",borderRadius:9999,marginBottom:24},children:[r.jsx(Nr,{style:{width:14,height:14,color:Ko}}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:Ko},children:"Summit ATS"})]}),r.jsx("h1",{style:{fontSize:44,fontWeight:800,color:"#fff",lineHeight:1.1,marginBottom:16,maxWidth:700},children:"O ATS que recruta com você"}),r.jsx("p",{style:{fontSize:17,color:"rgba(255,255,255,0.55)",lineHeight:1.7,marginBottom:32,maxWidth:480},children:"Automações, kanban inteligente, insights de IA, agendamento simplificado e mais — para aliviar o peso do dia a dia. O Summit ATS foi criado por quem viveu recrutamento na ponta."}),r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:12},children:[r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:Ko,color:"#1A1500",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Começar grátis →"})}),r.jsx(ut,{to:"/pricing",children:r.jsx("button",{style:{background:"transparent",color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:600,borderRadius:8,border:"1px solid rgba(255,255,255,0.20)",cursor:"pointer"},children:"Ver planos"})})]})]})}),jse.map((e,t)=>r.jsx(Ese,{feature:e,index:t},e.id)),r.jsx("section",{style:{background:"#F6F9FC",padding:"80px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:900,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[r.jsx("h2",{style:{fontSize:32,fontWeight:800,color:"#0A2540",marginBottom:8},children:"Escolha o ritmo certo pra sua operação"}),r.jsx("p",{style:{fontSize:16,color:"#64748B"},children:"Dois planos. Mesmo pipeline. A diferença é a inteligência."})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:20},children:[r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:16,padding:32},children:[r.jsx("p",{style:{fontSize:18,fontWeight:700,color:"#0A2540",margin:"0 0 4px"},children:"Free"}),r.jsx("p",{style:{fontSize:13,color:"#94A3B8",margin:"0 0 12px"},children:"Para começar a publicar vagas agora"}),r.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:6,marginBottom:20},children:[r.jsx("span",{style:{fontSize:32,fontWeight:800,color:"#0A2540"},children:"R$0"}),r.jsx("span",{style:{fontSize:13,color:"#94A3B8"},children:"/para sempre"})]}),["Vagas ilimitadas","Página de carreiras","Candidaturas com perfil completo","Matching inteligente","Extensão LinkedIn","Até 50 candidatos ativos"].map(e=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:14,color:"#475569",marginBottom:8},children:[r.jsx(fn,{style:{width:16,height:16,color:"#059669",flexShrink:0}})," ",e]},e)),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{width:"100%",marginTop:16,background:"#fff",color:"#0A2540",padding:"12px",fontSize:14,fontWeight:600,borderRadius:8,border:"1px solid #E3E8EF",cursor:"pointer"},children:"Começar grátis →"})})]}),r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:16,padding:32},children:[r.jsx("p",{style:{fontSize:18,fontWeight:700,color:"#0A2540",margin:"0 0 4px"},children:"Starter"}),r.jsx("p",{style:{fontSize:13,color:"#94A3B8",margin:"0 0 12px"},children:"Para quem quer organizar e ganhar tempo"}),r.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:6,marginBottom:20},children:[r.jsx("span",{style:{fontSize:14,color:"#94A3B8",textDecoration:"line-through"},children:"R$449"}),r.jsx("span",{style:{fontSize:32,fontWeight:800,color:"#0A2540"},children:"R$349"}),r.jsx("span",{style:{fontSize:13,color:"#94A3B8"},children:"/mês por assento"})]}),r.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:12,padding:"7px 10px",borderRadius:7,background:"rgba(16,185,129,0.06)",border:"1px solid rgba(16,185,129,0.1)"},children:r.jsxs("span",{style:{fontSize:11,color:"#10B981"},children:[r.jsx("strong",{children:"Founders:"})," R$262/seat/mês"]})}),["Pipeline kanban ilimitado","Email nativo (Gmail + Outlook)","Agendamento nativo","Hiring manager links","Extensão LinkedIn (sourcing direto)","Automações básicas"].map(e=>{const t=e.includes("sourcing direto");return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:14,color:t?"#0A2540":"#475569",fontWeight:t?600:400,marginBottom:8},children:[r.jsx(fn,{style:{width:16,height:16,color:t?"#10B981":"#059669",flexShrink:0}})," ",e]},e)}),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{width:"100%",marginTop:16,background:"#fff",color:"#0A2540",padding:"12px",fontSize:14,fontWeight:600,borderRadius:8,border:"1px solid #E3E8EF",cursor:"pointer"},children:"Começar com Starter →"})})]}
736),r.jsxs("div",{style:{background:"#fff",border:"2px solid "+Ko,borderRadius:16,padding:32,position:"relative"},children:[r.jsx("span",{style:{position:"absolute",top:-10,right:16,fontSize:11,padding:"3px 12px",background:Ko,color:"#1A1500",borderRadius:999,fontWeight:600},children:"Mais popular"}),r.jsx("p",{style:{fontSize:18,fontWeight:700,color:"#0A2540",margin:"0 0 4px"},children:"Growth"}),r.jsx("p",{style:{fontSize:13,color:"#94A3B8",margin:"0 0 12px"},children:"Para quem quer decidir com inteligência"}),r.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:6,marginBottom:20},children:[r.jsx("span",{style:{fontSize:14,color:"#94A3B8",textDecoration:"line-through"},children:"R$649"}),r.jsx("span",{style:{fontSize:32,fontWeight:800,color:"#0A2540"},children:"R$549"}),r.jsx("span",{style:{fontSize:13,color:"#94A3B8"},children:"/mês por assento"})]}),r.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:12,padding:"7px 10px",borderRadius:7,background:"rgba(16,185,129,0.06)",border:"1px solid rgba(16,185,129,0.1)"},children:r.jsxs("span",{style:{fontSize:11,color:"#10B981"},children:[r.jsx("strong",{children:"Founders:"})," R$412/seat/mês"]})}),["Tudo do Starter +"].map(e=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:14,color:"#475569",marginBottom:8},children:[r.jsx(fn,{style:{width:16,height:16,color:"#059669",flexShrink:0}})," ",e]},e)),["Rating com IA (score + análise)","Resumo de candidato com IA","Extensão LinkedIn (sourcing direto)","Automações avançadas (9 tipos)","Analytics completo + Insights IA","Campos customizados"].map(e=>{const t=e.includes("sourcing direto");return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:14,color:t?"#0A2540":"#475569",fontWeight:t?600:400,marginBottom:8},children:[r.jsx(fn,{style:{width:16,height:16,color:t?"#10B981":Ko,flexShrink:0}})," ",e]},e)}),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{width:"100%",marginTop:16,background:Ko,color:"#1A1500",padding:"12px",fontSize:14,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Começar com Growth →"})})]})]})]})}),r.jsx("section",{style:{padding:"32px 24px"},children:r.jsx("div",{style:{maxWidth:1060,margin:"0 auto"},children:r.jsxs("div",{style:{borderRadius:14,background:"linear-gradient(135deg, #0F0B2E 0%, #1A1145 40%, #2D1B69 70%, #3D2580 100%)",padding:"28px 32px",position:"relative",overflow:"hidden",display:"flex",alignItems:"center",gap:32},children:[r.jsx("div",{style:{position:"absolute",top:-30,right:-30,width:140,height:140,borderRadius:"50%",background:"rgba(99,91,255,0.08)",pointerEvents:"none"}}),r.jsxs("div",{style:{flex:1,position:"relative",zIndex:1},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 10px",borderRadius:16,background:"rgba(99,91,255,0.25)",border:"1px solid rgba(99,91,255,0.3)",fontSize:11,color:"#C4B5FD",marginBottom:12},children:[r.jsx(Va,{size:11})," ATS + Assessments"]}),r.jsxs("div",{style:{fontSize:28,fontWeight:800,color:"#FFFFFF",lineHeight:1.3},children:["Quando recrutamento",r.jsx("br",{}),r.jsx("span",{style:{background:"linear-gradient(90deg, #F97316, #FB923C, #FBBF24)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"encontra ciência."})]}),r.jsx("div",{style:{fontSize:13,color:"#A0A0B8",lineHeight:1.6,marginTop:8,marginBottom:16},children:"O ATS organiza o fluxo. O Assessments refina o perfil do candidato. Juntos, você seleciona mais rápido e com mais clareza."}),r.jsxs("div",{style:{display:"flex",gap:10},children:[r.jsx(ut,{to:"/assessments",style:{display:"inline-flex",alignItems:"center",background:"#6C24F5",color:"#fff",borderRadius:8,padding:"9px 20px",fontSize:13,fontWeight:500,textDecoration:"none",boxShadow:"0 2px 8px rgba(108,36,245,0.3)"},children:"Conhecer Assessments →"}),r.jsx(ut,{to:"/pricing",style:{background:"rgba(255,255,255,0.08)",color:"#D4D4E0",border:"1px solid rgba(255,255,255,0.12)",borderRadius:8,padding:"9px 16px",fontSize:13,textDecoration:"none",display:"inline-flex",alignItems:"center"},children:"Ver desconto"})]})]}),r.jsx("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",gap:8,position:"relative",zIndex:1},children:[{icon:qf,text:"MBTI, DISC, Big Five e mais"},{icon:za,text:"Envie testes direto do pipeline"},{icon:XU,text:"Resultados no perfil do candidato"},{icon:YH,text:"Desconto para clientes Founder"}].map((e,t)=>{const n=e.icon;return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,padding:"6px 12px",borderRadius:8,background:"rgba(99,91,255,0.12)"},children:[r.jsx(n,{size:14,style:{color:"#A78BFA",flexShrink:0}}),r.jsx("span",{style:{fontSize:12,color:"#D4D4E0",whiteSpace:"nowrap"},children:e.text})]},t)})})]})})}),r.jsx("section",{style:{padding:"48px 24px 64px"},children:r.jsxs("div",{style:{maxWidth:640,margin:"0 auto",textAlign:"center"},children:[r.jsx("h2",{style:{fontSize:24,fontWeight:800,color:"#0A2540",marginBottom:16,lineHeight:1.3},children:"Comece grátis. O ATS que recruta com você está a um clique."}),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:"linear-gradient(135deg, #6C24F5, #7C5FFF)",color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Criar conta grátis →"})})]})})]})}const ao="#10B981";function Ase(){const[e,t]=g.useState({nome:"",email:"",empresa:""}),[n,s]=g.useState("idle"),i=async()=>
736{if(!(!e.nome.trim()||!e.email.trim()||!e.empresa.trim())){s("loading");try{await ne.entities.LeadInteresseProduto.create({nome:e.nome.trim(),email:e.email.trim().toLowerCase(),produto_interesse:"Talent",origem:"talent_waitlist",mensagem:`Empresa: ${e.empresa}`}),s("success")}catch(l){console.error(l),s("error")}}};if(n==="success")return r.jsxs("div",{style:{background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:12,padding:24,textAlign:"center"},children:[r.jsx("div",{style:{width:44,height:44,borderRadius:"50%",background:"rgba(16,185,129,0.2)",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 12px"},children:r.jsx(fn,{style:{width:20,height:20,color:"#34D399"}})}),r.jsx("p",{style:{fontSize:16,fontWeight:700,color:"#fff",margin:"0 0 4px"},children:"Você está na lista!"}),r.jsx("p",{style:{fontSize:13,color:"rgba(255,255,255,0.5)",margin:0},children:"Avisamos assim que o Talent estiver disponível."})]});const a={width:"100%",background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.12)",borderRadius:8,padding:"10px 12px",fontSize:13,color:"#fff",boxSizing:"border-box",fontFamily:"inherit"},o={fontSize:11,color:"rgba(255,255,255,0.5)",marginBottom:4,display:"block"};return r.jsx("div",{style:{background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:12,padding:24},children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[r.jsxs("div",{children:[r.jsx("label",{style:o,children:"Nome"}),r.jsx("input",{type:"text",value:e.nome,onChange:l=>t(c=>({...c,nome:l.target.value})),placeholder:"Seu nome",style:a})]}),r.jsxs("div",{children:[r.jsx("label",{style:o,children:"Email corporativo"}),r.jsx("input",{type:"email",value:e.email,onChange:l=>t(c=>({...c,email:l.target.value})),placeholder:"[email protected]",style:a})]}),r.jsxs("div",{children:[r.jsx("label",{style:o,children:"Empresa"}),r.jsx("input",{type:"text",value:e.empresa,onChange:l=>t(c=>({...c,empresa:l.target.value})),placeholder:"Nome da empresa",style:a})]}),r.jsx("button",{onClick:i,disabled:n==="loading",style:{width:"100%",padding:"12px",background:ao,color:"#fff",borderRadius:8,fontSize:14,fontWeight:600,border:"none",cursor:n==="loading"?"not-allowed":"pointer",opacity:n==="loading"?.7:1,marginTop:4},children:n==="loading"?"Enviando...":"Entrar na lista de espera →"}),n==="error"&&r.jsx("p",{style:{fontSize:12,color:"#EF4444",margin:0},children:"Erro ao enviar. Tente novamente."})]})})}function Tse(){const e=[{icon:kV,title:"Acesse a base",desc:"Navegue pelo pool de candidatos pré-qualificados pela equipe Summit. Filtre por cargo, senioridade, localização e competências. Desbloqueie perfis sob demanda.",recommended:!1},{icon:ma,title:"Mapeamento exclusivo",desc:"Solicite um mapeamento personalizado. A equipe Summit busca, qualifica e entrega um mapeamento com os perfis específicos para a sua vaga.",recommended:!0},{icon:Va,title:"Recomendações automáticas",desc:"Publique sua vaga e receba candidatos altamente aderentes direto no pipeline — automaticamente, sem precisar buscar.",recommended:!1}],t=[{num:"1",title:"Você publica a vaga",desc:"No Summit ou apenas descreve o perfil"},{num:"2",title:"A Summit busca e qualifica",desc:"Recrutadores especialistas avaliam e filtram"},{num:"3",title:"Candidatos chegam no seu pipeline",desc:"Prontos para entrevista, direto no ATS"}];return r.jsxs("div",{style:{background:"#fff"},children:[r.jsx("section",{style:{background:"linear-gradient(135deg, #12172a 0%, #0a1a14 55%, #001a0e 100%)",padding:"160px 24px 220px"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,background:ao+"22",border:"1px solid "+ao+"55",padding:"4px 12px",borderRadius:9999,marginBottom:24}
736,children:[r.jsx(vl,{style:{width:14,height:14,color:ao}}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:"#34D399"},children:"Summit Talent"}),r.jsx("span",{style:{fontSize:9,padding:"1px 6px",background:"rgba(16,185,129,0.2)",color:"#6EE7B7",borderRadius:999,fontWeight:600,marginLeft:4},children:"Em breve"})]}),r.jsx("h1",{style:{fontSize:44,fontWeight:800,color:"#fff",lineHeight:1.1,marginBottom:4,maxWidth:700},children:"Candidatos qualificados,"}),r.jsx("h1",{style:{fontSize:44,fontWeight:800,color:"#34D399",lineHeight:1.1,marginBottom:20,maxWidth:700},children:"prontos para as suas vagas."}),r.jsx("p",{style:{fontSize:17,color:"rgba(255,255,255,0.55)",lineHeight:1.7,marginBottom:32,maxWidth:480},children:"Um pool de talentos pré-qualificados pela equipe de recrutadores Summit. Você publica a vaga, a gente entrega os candidatos certos — direto no seu pipeline."}),r.jsx("a",{href:"#talent-waitlist",style:{textDecoration:"none"},children:r.jsx("button",{style:{background:ao,color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Entrar na lista de espera →"})})]})}),r.jsx("section",{style:{background:"#ffffff",padding:"80px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[r.jsx("h2",{style:{fontSize:32,fontWeight:800,color:"#0A2540",marginBottom:8},children:"Três formas de encontrar quem você precisa"}),r.jsx("p",{style:{fontSize:16,color:"#64748B"},children:"Escolha o nível de envolvimento que faz sentido para sua operação."})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:20},children:e.map(n=>{const s=n.icon;return r.jsxs("div",{style:{background:"#fff",border:n.recommended?"2px solid "+ao:"1px solid #E3E8EF",borderRadius:16,padding:28,position:"relative"},children:[n.recommended&&r.jsx("span",{style:{position:"absolute",top:-10,right:16,fontSize:11,padding:"3px 12px",background:ao,color:"#fff",borderRadius:999,fontWeight:600},children:"Recomendado"}),r.jsx("div",{style:{width:44,height:44,borderRadius:12,background:ao+"15",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:16},children:r.jsx(s,{style:{width:22,height:22,color:ao}})}),r.jsx("h3",{style:{fontSize:18,fontWeight:700,color:"#0A2540",marginBottom:8},children:n.title}),r.jsx("p",{style:{fontSize:14,color:"#64748B",lineHeight:1.6,margin:0},children:n.desc})]},n.title)})})]})}),r.jsx("section",{style:{background:"#F6F9FC",padding:"80px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto",display:"grid",gridTemplateColumns:"1fr 1.2fr",gap:48,alignItems:"center"},children:[r.jsxs("div",{children:[r.jsx("h2",{style:{fontSize:28,fontWeight:800,color:"#0A2540",marginBottom:12},children:"Receba tudo direto no ATS da Summit"}),r.jsx("p",{style:{fontSize:15,color:"#64748B",lineHeight:1.7,marginBottom:20},children:"Candidatos do Talent chegam direto no seu pipeline, prontos para avaliação. Sem planilha, sem email, sem ferramenta separada. E se você ainda não usa o ATS, recebe acesso temporário incluso."}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:["Candidatos entregues no pipeline","Qualificados por recrutadores especialistas Summit","Acesso temporário ao ATS incluso"].map(n=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,fontSize:14,color:"#475569"},children:[r.jsx("div",{style:{width:20,height:20,borderRadius:"50%",background:"#DCFCE7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(fn,{style:{width:12,height:12,color:"#059669"}})}),n]},n))})]}),r.jsx("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:16,padding:28},children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:16},children:t.map((n,s)=>r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14},children:[r.jsx("div",{style:{width:36,height:36,borderRadius:10,background:"#DCFCE7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,fontSize:15,fontWeight:700,color:"#059669"},children:n.num}),r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:14,fontWeight:700,color:"#0A2540",margin:0},children:n.title}),r.jsx("p",{style:{fontSize:12,color:"#94A3B8",margin:0},children:n.desc})]})]}),s<t.length-1&&r.jsx("div",{style:{width:2,height:16,background:"#E3E8EF",marginLeft:17}})]},n.num))})})]})}),r.jsx("section",{style:{background:"#ffffff",padding:"80px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto",display:"grid",gridTemplateColumns:"1.2fr 1fr",gap:48,alignItems:"center"},children:[r.jsxs("div",{style:{background:"#F8F9FB",border:"1px solid #E3E8EF",borderRadius:16,padding:28},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:16,paddingBottom:16,borderBottom:"1px solid #E3E8EF"},children:[r.jsx("div",{style:{width:40,height:40,borderRadius:10,background:"linear-gradient(135deg, "+ao+", #059669)",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx("span",{style:{fontSize:16,color:"#fff",fontWeight:600},children:"S"})}),r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:14,fontWeight:700,color:"#0A2540",margin:0},children:"Equipe Summit"}),r.jsx("p",{style:{fontSize:12,color:"#94A3B8",margin:0},children:"Recrutadores especialistas"})]})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,fontSize:13,color:"#475569",lineHeight:1.6},children:[r.jsx("p",{style:{margin:0},children:"Cada perfil é avaliado individualmente antes de entrar na base."}),r.jsx("p",{style:{margin:0},children:"Encontre perfis com alto nível de aderência às suas vagas."}),r.jsx("p",{style:{margin:0},children:"Base atualizada continuamente com novos talentos qualificados."})]})]}),r.jsxs("div",{children:[r.jsx("h2",{style:{fontSize:28,fontWeight:800,color:"#0A2540",marginBottom:12},children:"Candidatos qualificados por especialistas em recrutamento"}),r.jsx("p",{style:{fontSize:15,color:"#64748B",lineHeight:1.7,marginBottom:20}
736,children:"Cada candidato na base do Talent foi avaliado pela equipe de recrutadores Summit. Perfis qualificados, dados validados. Você recebe candidatos avaliados com critério por especialistas."}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:["Avaliados por recrutadores especialistas","Perfis com alto nível de aderência","Base atualizada continuamente"].map(n=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,fontSize:14,color:"#475569"},children:[r.jsx("div",{style:{width:20,height:20,borderRadius:"50%",background:"#DCFCE7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(fn,{style:{width:12,height:12,color:"#059669"}})}),n]},n))})]})]})}),r.jsx("section",{id:"talent-waitlist",style:{padding:"48px 24px"},children:r.jsx("div",{style:{maxWidth:1060,margin:"0 auto"},children:r.jsxs("div",{style:{background:"linear-gradient(135deg, #0a1a14, #001a0e)",borderRadius:14,padding:"36px 32px",display:"grid",gridTemplateColumns:"1fr 1fr",gap:32,alignItems:"center"},children:[r.jsxs("div",{children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:5,background:"rgba(16,185,129,0.2)",padding:"3px 10px",borderRadius:9999,marginBottom:14,border:"1px solid rgba(16,185,129,0.3)"},children:[r.jsx(Va,{style:{width:11,height:11,color:"#6EE7B7"}}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:"#6EE7B7"},children:"Summit Talent"})]}),r.jsx("h3",{style:{fontSize:24,fontWeight:800,color:"#fff",margin:"0 0 4px",lineHeight:1.2},children:"Seja um dos primeiros"}),r.jsx("h3",{style:{fontSize:24,fontWeight:800,color:"#34D399",margin:"0 0 12px",lineHeight:1.2},children:"a acessar o Talent."}),r.jsx("p",{style:{fontSize:13,color:"rgba(255,255,255,0.45)",lineHeight:1.6,margin:0},children:"Estamos construindo o Summit Talent com todos os detalhes e cuidados para você ter o melhor serviço. Deixe seu contato e avisamos assim que estiver disponível."})]}),r.jsx(Ase,{})]})})}),r.jsx("section",{style:{padding:"48px 24px 64px"},children:r.jsxs("div",{style:{maxWidth:640,margin:"0 auto",textAlign:"center"},children:[r.jsx("h2",{style:{fontSize:24,fontWeight:800,color:"#0A2540",marginBottom:6,lineHeight:1.3},children:"Enquanto isso, comece com o Jobs, ATS ou Assessments."}),r.jsx("p",{style:{fontSize:15,color:"#64748B",marginBottom:20},children:"Publique vagas, organize candidatos e avalie com dados."}),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:"linear-gradient(135deg, #6C24F5, #7C5FFF)",color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Criar conta grátis →"})})]})})]})}const ql="#FF1B50",Nse=[{id:"jobboard",title:"Suas vagas visíveis para quem importa",desc:"Publique quantas vagas quiser no job board da Summit, sem limite e sem custo. Cada vaga ganha uma página própria com descrição, requisitos, faixa salarial e candidatura em um clique.",bullets:["Vagas ilimitadas, grátis pra sempre","Página individual por vaga","Faixa salarial, modalidade e nível"],mockup:"jobboard"},{id:"candidatos",title:"Candidatos que chegam com contexto",desc:"Cada candidatura vem com perfil estruturado: experiência, formação, localização, pretensão salarial e CV. Você recebe informação suficiente pra decidir antes de ligar.",bullets:["Perfil estruturado com dados reais","Upload de CV integrado","Notificação de nova candidatura"],mockup:"candidato"},{id:"dashboard",title:"Acompanhe tudo de um só lugar",desc:"Dashboard com visão geral: quantas candidaturas recebeu, vagas abertas, status de cada processo. Simples, direto, sem complexidade desnecessária.",bullets:["Visão geral de vagas e candidaturas","Status de cada processo","Acesse de qualquer lugar"],mockup:"dashboard"},{id:"testes",title:"Adicione testes e avalie os aplicantes automaticamente",desc:"Configure testes direto na vaga. Quando o candidato se aplica, recebe o convite automaticamente. Resultados aparecem no perfil sem sair da plataforma.",bullets:["Configure testes por vaga","Convite automático ao candidato","Resultados integrados ao perfil"],mockup:"testes"}];function Rse(){const e=[{init:"S",bg:"#6C24F5",title:"Gerente de Projetos",info:"São Paulo · CLT · Híbrido"},{init:"T",bg:"#0EA5E9",title:"Dev Frontend Senior",info:"Remoto · PJ · R$15-20k"},{init:"A",bg:"#F59E0B",title:"Analista Contábil Sr.",info:"São Paulo · CLT · Híbrido"}];return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}
736),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"summitinc.io/job-board"})]}),r.jsx("div",{style:{padding:12,display:"flex",flexDirection:"column",gap:6},children:e.map(t=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:10,background:"#F8F9FB",borderRadius:8,border:"1px solid #E3E8EF"},children:[r.jsx("div",{style:{width:30,height:30,borderRadius:8,background:t.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#fff",fontWeight:600},children:t.init}),r.jsxs("div",{style:{flex:1},children:[r.jsx("p",{style:{fontSize:12,fontWeight:600,color:"#0A2540",margin:0},children:t.title}),r.jsx("p",{style:{fontSize:10,color:"#94A3B8",margin:0},children:t.info})]}),r.jsx("span",{style:{fontSize:10,color:"#059669",fontWeight:600},children:"Aberta"})]},t.title))})]})}function Dse(){return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"Candidatura — Gerente de Projetos"})]}),r.jsxs("div",{style:{padding:14},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:12,paddingBottom:12,borderBottom:"1px solid #E3E8EF"},children:[r.jsx("div",{style:{width:32,height:32,borderRadius:"50%",background:"#6C24F5",display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#fff",fontWeight:600},children:"RP"}),r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:13,fontWeight:600,color:"#0A2540",margin:0},children:"Renata Pires"}),r.jsx("p",{style:{fontSize:10,color:"#94A3B8",margin:0},children:"Coord. de Projetos · São Paulo"})]})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[{l:"Experiência",v:"8 anos"},{l:"Pretensão",v:"R$12.000"},{l:"Formação",v:"PUC-SP"},{l:"CV",v:"Ver PDF ↗",c:"#6C24F5"}].map(e=>r.jsxs("div",{style:{background:"#F8F9FB",borderRadius:6,padding:"6px 8px",border:"1px solid #E3E8EF"},children:[r.jsx("p",{style:{fontSize:9,color:"#94A3B8",margin:0},children:e.l}),r.jsx("p",{style:{fontSize:11,fontWeight:600,color:e.c||"#0A2540",margin:0},children:e.v})]},e.l))})]})]})}function Ise(){return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"summitinc.io/app"})]}),r.jsxs("div",{style:{padding:12},children:[r.jsx("p",{style:{fontSize:12,fontWeight:600,color:"#0A2540",margin:"0 0 10px"},children:"Bom dia, Carolina"}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:6,marginBottom:10},children:[{l:"Candidaturas",v:"47",s:"+12%"},{l:"Vagas abertas",v:"5"},{l:"Em processo",v:"38"}].map(e=>r.jsxs("div",{style:{background:"#F8F9FB",borderRadius:8,padding:"8px 10px",border:"1px solid #E3E8EF",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:9,color:"#94A3B8",margin:0},children:e.l}),r.jsx("p",{style:{fontSize:18,fontWeight:700,color:"#0A2540",margin:0},children:e.v}),e.s&&r.jsx("p",{style:{fontSize:9,color:"#059669",margin:0},children:e.s})]},e.l))}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:["Gerente de Projetos","Dev Frontend Senior"].map(e=>r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:11,padding:"6px 8px",background:"#F8F9FB",borderRadius:6,border:"1px solid #E3E8EF"},children:[r.jsx("span",{style:{fontWeight:600,color:"#0A2540"},children:e}),r.jsx("span",{style:{color:"#059669",fontWeight:600,fontSize:10},children:"Aberta"})]},e))})]})]})}function Pse(){return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{background:"#F8F9FB",padding:"6px 12px",borderBottom:"1px solid #E3E8EF",display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#EF4444",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#F59E0B",opacity:.5}}),r.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:"#22C55E",opacity:.5}}
736),r.jsx("span",{style:{fontSize:10,color:"#94A3B8",marginLeft:8},children:"Vaga — Gerente de Projetos · Avaliações"})]}),r.jsxs("div",{style:{padding:14},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[r.jsx("p",{style:{fontSize:12,fontWeight:600,color:"#0A2540",margin:0},children:"Testes configurados"}),r.jsx("span",{style:{fontSize:10,padding:"3px 10px",background:"#6C24F5",color:"#fff",borderRadius:6,fontWeight:500},children:"+ Adicionar teste"})]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[{dot:"#6C24F5",name:"DISC — Perfil Comportamental",info:"28 questões · ~9 min"},{dot:"#0EA5E9",name:"Raciocínio Lógico",info:"15 questões · ~12 min"}].map(e=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",background:"#F8F9FB",borderRadius:8,border:"1px solid #E3E8EF"},children:[r.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:e.dot,flexShrink:0}}),r.jsxs("div",{style:{flex:1},children:[r.jsx("p",{style:{fontSize:11,fontWeight:600,color:"#0A2540",margin:0},children:e.name}),r.jsx("p",{style:{fontSize:9,color:"#94A3B8",margin:0},children:e.info})]}),r.jsx("span",{style:{fontSize:9,color:"#059669",fontWeight:600},children:"Ativo"})]},e.name))}),r.jsx("div",{style:{marginTop:10,padding:"10px 12px",background:"#F0FDF4",borderRadius:8,border:"1px solid #BBF7D0"},children:r.jsx("p",{style:{fontSize:10,color:"#166534",margin:0,lineHeight:1.4},children:"Candidatos que se aplicarem receberão convite automático para estes testes."})})]})]})}function Bse({feature:e,index:t}){const n=t%2!==0,s=t%2===0?"#ffffff":"#F6F9FC",i=e.mockup==="jobboard"?Rse:e.mockup==="candidato"?Dse:e.mockup==="testes"?Pse:Ise,a=r.jsx(i,{}),o=r.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[r.jsx("h3",{style:{fontSize:28,fontWeight:800,color:"#0A2540",margin:"0 0 10px",lineHeight:1.2},children:e.title}),r.jsx("p",{style:{fontSize:15,color:"#64748B",lineHeight:1.7,margin:"0 0 20px"},children:e.desc}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:e.bullets.map((l,c)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,fontSize:14,color:"#475569"},children:[r.jsx("div",{style:{width:20,height:20,borderRadius:"50%",background:"#DCFCE7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(fn,{style:{width:12,height:12,color:"#059669"}})}),l]},c))})]});return r.jsx("div",{style:{background:s,padding:"80px 24px",borderTop:t>0?"1px solid #E3E8EF":"none"},children:r.jsx("div",{style:{maxWidth:1060,margin:"0 auto",display:"grid",gridTemplateColumns:n?"1fr 1.2fr":"1.2fr 1fr",gap:48,alignItems:"center"},children:n?r.jsxs(r.Fragment,{children:[o,a]}):r.jsxs(r.Fragment,{children:[a,o]})})})}function Ose(){return r.jsxs("div",{style:{background:"#fff"},children:[r.jsx("section",{style:{background:"linear-gradient(135deg, #12172a 0%, #1f0a10 55%, #1a0008 100%)",padding:"160px 24px 220px"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,background:ql+"22",border:"1px solid "+ql+"55",padding:"4px 12px",borderRadius:9999,marginBottom:24},children:[r.jsx(On,{style:{width:14,height:14,color:ql}}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:ql},children:"Summit Jobs"})]}),r.jsx("h1",{style:{fontSize:44,fontWeight:800,color:"#fff",lineHeight:1.1,marginBottom:4,maxWidth:700},children:"Publique vagas ilimitadas."}),r.jsx("h1",{style:{fontSize:44,fontWeight:800,color:ql,lineHeight:1.1,marginBottom:20,maxWidth:700},children:"Grátis. Pra sempre."}),r.jsx("p",{style:{fontSize:17,color:"rgba(255,255,255,0.55)",lineHeight:1.7,marginBottom:32,maxWidth:480},children:"Publique no job board da Summit, receba candidaturas com perfil completo e acompanhe tudo de um só lugar — sem pagar nada. Sem trial. Sem cartão. Grátis de verdade."}),r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:12},children:[r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:ql,color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Criar conta grátis →"})}),r.jsx(ut,{to:"/",children:r.jsx("button",{style:{background:"transparent",color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:600,borderRadius:8,border:"1px solid rgba(255,255,255,0.20)",cursor:"pointer"},children:"Conhecer o Summit"})})]})]})}),Nse.map((e,t)=>r.jsx(Bse,{feature:e,index:t},e.id)),r.jsx("section",{style:{background:"#F6F9FC",padding:"64px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsx("h2",{style:{fontSize:24,fontWeight:800,color:"#0A2540",marginBottom:6},children:"Leve suas vagas para o próximo nível"}),r.jsx("p",{style:{fontSize:15,color:"#64748B",marginBottom:24},children:"Recursos adicionais para expandir seu alcance e atrair os melhores talentos."}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:16}
736,children:[{icon:jc,title:"Página de Carreiras",desc:"Sua própria página de carreiras com a identidade da sua empresa. Logo, cores e descrição institucional.",badge:"Starter",badgeBg:"#FEF3C7",badgeColor:"#92400E"},{icon:TH,title:"Multi-Job Board",desc:"Dispare vagas em vários job boards ao mesmo tempo. Uma publicação, múltiplos canais. Mais alcance com menos trabalho.",badge:"Growth",badgeBg:"#141042",badgeColor:"#6366F1"},{icon:b8,title:"Video Job Pitch",desc:"Conte a história da sua vaga em vídeo. Seja mais que um job description. Mostre a cultura, o time, o dia a dia.",badge:"Growth",badgeBg:"#141042",badgeColor:"#6366F1"}].map(e=>{const t=e.icon;return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:14,padding:24,position:"relative"},children:[r.jsx("span",{style:{position:"absolute",top:14,right:14,fontSize:10,padding:"2px 10px",background:e.badgeBg,color:e.badgeColor,borderRadius:999,fontWeight:600},children:e.badge}),r.jsx("div",{style:{width:40,height:40,borderRadius:10,background:ql+"15",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:14},children:r.jsx(t,{style:{width:20,height:20,color:ql}})}),r.jsx("h3",{style:{fontSize:16,fontWeight:700,color:"#0A2540",marginBottom:6},children:e.title}),r.jsx("p",{style:{fontSize:13,color:"#64748B",lineHeight:1.6,margin:0},children:e.desc})]},e.title)})})]})}),r.jsx("section",{style:{padding:"48px 24px"},children:r.jsx("div",{style:{maxWidth:1060,margin:"0 auto"},children:r.jsxs("div",{style:{borderRadius:14,background:"linear-gradient(135deg, #0F0B2E 0%, #1A1145 40%, #2D1B69 70%, #3D2580 100%)",padding:"28px 32px",position:"relative",overflow:"hidden",display:"flex",alignItems:"center",gap:32},children:[r.jsx("div",{style:{position:"absolute",top:-30,right:-30,width:140,height:140,borderRadius:"50%",background:"rgba(99,91,255,0.08)",pointerEvents:"none"}}),r.jsxs("div",{style:{flex:1,position:"relative",zIndex:1},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 10px",borderRadius:16,background:"rgba(255,27,80,0.2)",border:"1px solid rgba(255,27,80,0.3)",fontSize:11,color:"#FF6B8A",marginBottom:12},children:[r.jsx(Va,{size:11})," Jobs + ATS"]}),r.jsxs("div",{style:{fontSize:22,fontWeight:800,color:"#FFFFFF",lineHeight:1.3},children:["Quando publicar vagas",r.jsx("br",{}),r.jsx("span",{style:{background:"linear-gradient(90deg, #F97316, #FB923C, #FBBF24)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"encontra inteligência de talentos."})]}),r.jsx("div",{style:{fontSize:13,color:"#A0A0B8",lineHeight:1.6,marginTop:8,marginBottom:16,maxWidth:360},children:"Jobs traz os candidatos. O ATS organiza, avalia e contrata. Juntos, seu recrutamento fica completo."}),r.jsxs("div",{style:{display:"flex",gap:10},children:[r.jsx(ut,{to:"/ats",style:{display:"inline-flex",alignItems:"center",background:"#6C24F5",color:"#fff",borderRadius:8,padding:"9px 20px",fontSize:13,fontWeight:500,textDecoration:"none",boxShadow:"0 2px 8px rgba(99,91,255,0.3)"},children:"Conhecer ATS →"}),r.jsx(ut,{to:"/pricing",style:{background:"rgba(255,255,255,0.08)",color:"#D4D4E0",border:"1px solid rgba(255,255,255,0.12)",borderRadius:8,padding:"9px 16px",fontSize:13,textDecoration:"none",display:"inline-flex",alignItems:"center"},children:"Ver planos"})]})]}),r.jsx("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",gap:8,position:"relative",zIndex:1},children:[{icon:ts,text:"Pipeline visual com insights de candidatos"},{icon:za,text:"Crie testes e convide candidatos automaticamente"},{icon:mr,text:"Email e agendamento nativos"},{icon:Nr,text:"Compartilhamento com gestores"}].map((e,t)=>{const n=e.icon;return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,padding:"6px 12px",borderRadius:8,background:"rgba(99,91,255,0.12)"},children:[r.jsx("div",{style:{width:26,height:26,borderRadius:"50%",background:"rgba(167,139,250,0.15)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(n,{size:13,style:{color:"#A78BFA"}})}),r.jsx("span",{style:{fontSize:12,color:"#D4D4E0",whiteSpace:"nowrap"},children:e.text})]},t)})})]})})}),r.jsx("section",{style:{padding:"48px 24px 64px"},children:r.jsxs("div",{style:{maxWidth:640,margin:"0 auto",textAlign:"center"},children:[r.jsx("h2",{style:{fontSize:24,fontWeight:800,color:"#0A2540",marginBottom:16,lineHeight:1.3},children:"Publique sua primeira vaga agora. É grátis."}),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:"linear-gradient(135deg, #6C24F5, #7C5FFF)",color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Criar conta grátis →"})})]})})]})}const Mse=[{icon:On,color:"#FF1B50",name:"Summit Jobs",desc:"Publique vagas ilimitadas e receba candidaturas com perfil completo.",href:"/jobs",available:!0},{icon:Nr,color:"#F5A623",name:"Summit ATS",desc:"Pipeline inteligente com email, agendamento, extensão Chrome e colaboração com gestores.",href:"/ats",available:!0},{icon:ts,color:"#6C24F5",name:"Summit Assessments",desc:"Avaliações comportamentais, c
736ognitivas e de idiomas com relatórios que orientam a decisão.",href:"/assessments",available:!0},{icon:vl,color:"#10B981",name:"Summit Talent",desc:"Candidatos pré-qualificados por especialistas, entregues direto no seu pipeline.",href:"/talent",available:!1}],Lse=[{letter:"F",name:"Free",desc:"Para conhecer a plataforma e começar a operar sem compromisso. Disponível em todos os módulos.",bg:"#DCFCE7",color:"#059669"},{letter:"S",name:"Starter",desc:"Para equipes que precisam de mais volume, automação e recursos profissionais.",bg:"#DBEAFE",color:"#1E40AF"},{letter:"G",name:"Growth",desc:"Para operações maiores que exigem inteligência, analytics e capacidade expandida.",bg:"#141042",color:"#6366F1"},{letter:"E",name:"Enterprise",desc:"Para operações com necessidades expandidas e/ou específicas. Capacidades personalizadas e suporte premium.",bg:"#0A0A0A",color:"#fff"}];function zse(){return r.jsxs("div",{style:{background:"#fff"},children:[r.jsx("section",{style:{background:"linear-gradient(180deg, #0A2540 0%, #0F1B2E 50%, #111827 100%)",padding:"160px 24px 220px"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsx("h1",{style:{fontSize:44,fontWeight:800,color:"#fff",lineHeight:1.1,marginBottom:16,maxWidth:900},children:"Recrutamento integrado, do sourcing à contratação."}),r.jsx("p",{style:{fontSize:17,color:"rgba(255,255,255,0.5)",lineHeight:1.7,marginBottom:48,maxWidth:520},children:"Uma plataforma, módulos independentes, dados conectados. Cada módulo potencializa o outro — juntos, transformam os seus resultados."}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"0.8fr 1.2fr",gap:32,alignItems:"center",paddingTop:32,borderTop:"1px solid rgba(255,255,255,0.06)"},children:[r.jsxs("div",{children:[r.jsx("h2",{style:{fontSize:28,fontWeight:800,color:"#fff",marginBottom:8,lineHeight:1.2},children:"Quatro soluções. Um fluxo."}),r.jsx("p",{style:{fontSize:15,color:"rgba(255,255,255,0.4)",lineHeight:1.6,margin:0},children:"Do primeiro contato à contratação, cada módulo cuida de uma etapa. Os dados fluem entre eles automaticamente."})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr auto 1fr auto 1fr auto 1fr",gap:0,alignItems:"center"},children:[{icon:On,color:"#FF1B50",num:"1",title:"Publique",sub:"Jobs"},{icon:Nr,color:"#F5A623",num:"2",title:"Organize",sub:"ATS"},{icon:ts,color:"#6C24F5",num:"3",title:"Avalie",sub:"Assessments"},{icon:vl,color:"#10B981",num:"4",title:"Contrate",sub:"Talent"}].map((e,t)=>{const n=e.icon;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.08)",borderRadius:14,padding:16,textAlign:"center"},children:[r.jsx("div",{style:{width:36,height:36,borderRadius:10,background:e.color+"25",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 8px"},children:r.jsx(n,{style:{width:18,height:18,color:e.color}})}),r.jsx("div",{style:{width:22,height:22,borderRadius:6,background:e.color,display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 6px",fontSize:11,color:"#fff",fontWeight:700},children:e.num}),r.jsx("p",{style:{fontSize:13,fontWeight:600,color:"#fff",margin:"0 0 2px"},children:e.title}),r.jsx("p",{style:{fontSize:10,color:"rgba(255,255,255,0.35)",margin:0},children:e.sub})]},e.num),t<3&&r.jsx("div",{style:{padding:"0 4px"},children:r.jsx("span",{style:{fontSize:14,color:"rgba(255,255,255,0.2)"},children:"→"})},"a"+t)]})})})]})]})}),r.jsx("section",{style:{background:"#F6F9FC",padding:"80px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[r.jsx("h2",{style:{fontSize:32,fontWeight:800,color:"#0A2540",marginBottom:8},children:"Cada módulo funciona independentemente"}),r.jsx("p",{style:{fontSize:16,color:"#64748B"},children:"Ative o que precisar, quando precisar."})]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:Mse.map(e=>{const t=e.icon;return r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:14,padding:"20px 24px",display:"flex",alignItems:"center",gap:20,opacity:e.available?1:.6},children:[r.jsx("div",{style:{width:48,height:48,borderRadius:12,background:e.color+"15",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(t,{style:{width:24,height:24,color:e.color}})}),r.jsxs("div",{style:{flex:1},children:[r.jsxs("p",{style:{fontSize:16,fontWeight:700,color:"#0A2540",margin:"0 0 2px"},children:[e.name,!e.available&&r.jsx("span",{style:{fontSize:10,padding:"2px 8px",background:"#DBEAFE",color:"#1E40AF",borderRadius:999,fontWeight:600,marginLeft:8},children:"Em breve"})]}),r.jsx("p",{style:{fontSize:14,color:"#64748B",margin:0},children:e.desc})]}),r.jsx(ut,{to:e.href,style:{textDecoration:"none",flexShrink:0},children:r.jsx("span",{style:{fontSize:13,color:e.available?"#6C24F5":e.color,fontWeight:600},children:e.available?"Conhecer →":"Lista de espera →"})})]},e.name)})})]})}),r.jsx("section",{style:{background:"#ffffff",padding:"80px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto",display:"grid",gridTemplateColumns:"1fr 1.2fr",gap:48,alignItems:"center"},children:[r.jsxs("div",{children:[r.jsx("h2",{style:{fontSize:28,fontWeight:800,color:"#0A2540",marginBottom:12},children:"Tudo conectado. Sem copiar, sem colar, sem retrabalho."}),r.jsx("p",{style:{fontSize:15,color:"#64748B",lineHeight:1.7,marginBottom:20}
736,children:"O candidato que se aplica no Jobs aparece no ATS com perfil completo. O teste do Assessments aparece no perfil do candidato. O feedback do gestor atualiza o pipeline. Um fluxo só."}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:["Candidatura → perfil no ATS automaticamente","Resultados de testes no perfil do candidato","Feedback do gestor atualiza o pipeline","Uma fonte de verdade para toda a equipe"].map(e=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,fontSize:14,color:"#475569"},children:[r.jsx("div",{style:{width:20,height:20,borderRadius:"50%",background:"#DCFCE7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(fn,{style:{width:12,height:12,color:"#059669"}})}),e]},e))})]}),r.jsxs("div",{style:{background:"#F8F9FB",border:"1px solid #E3E8EF",borderRadius:16,padding:24},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:16},children:[r.jsx("div",{style:{width:36,height:36,borderRadius:8,background:"#FF1B5015",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(On,{style:{width:16,height:16,color:"#FF1B50"}})}),r.jsx("div",{style:{flex:1,height:1,background:"#E3E8EF"}}),r.jsx("div",{style:{width:36,height:36,borderRadius:8,background:"#F5A62315",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(Nr,{style:{width:16,height:16,color:"#F5A623"}})}),r.jsx("div",{style:{flex:1,height:1,background:"#E3E8EF"}}),r.jsx("div",{style:{width:36,height:36,borderRadius:8,background:"#6C24F515",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(ts,{style:{width:16,height:16,color:"#6C24F5"}})})]}),r.jsxs("div",{style:{textAlign:"center",marginBottom:14},children:[r.jsx("p",{style:{fontSize:11,color:"#94A3B8",margin:0},children:"Jobs → ATS → Assessments"}),r.jsx("p",{style:{fontSize:13,fontWeight:600,color:"#0A2540",margin:"4px 0 0"},children:"Dados fluem entre os módulos"})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[[{init:"RP",bg:"#6C24F5",name:"Renata Pires",score:"92",test:"DISC ✓",testBg:"#EDE9FE",testColor:"#6C24F5"},{init:"DM",bg:"#0EA5E9",name:"Diego Moura",score:"85",test:"Pendente",testBg:"#FEF3C7",testColor:"#92400E"}].map(e=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",background:"#fff",borderRadius:8,border:"1px solid #E3E8EF"},children:[r.jsx("div",{style:{width:24,height:24,borderRadius:"50%",background:e.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,color:"#fff",fontWeight:600,flexShrink:0},children:e.init}),r.jsx("p",{style:{flex:1,fontSize:12,fontWeight:600,color:"#0A2540",margin:0},children:e.name}),r.jsx("span",{style:{fontSize:10,padding:"2px 6px",background:"#DCFCE7",color:"#059669",borderRadius:4,fontWeight:600},children:e.score}),r.jsx("span",{style:{fontSize:10,padding:"2px 6px",background:e.testBg,color:e.testColor,borderRadius:4,fontWeight:600},children:e.test})]},e.init)),r.jsxs("div",{style:{background:"linear-gradient(135deg, #0F0B2E 0%, #1A1145 40%, #2D1B69 70%, #3D2580 100%)",borderRadius:10,padding:"12px 14px",display:"flex",alignItems:"center",gap:10,border:"1px solid rgba(16,185,129,0.2)",marginTop:4},children:[r.jsx("div",{style:{width:28,height:28,borderRadius:8,background:"rgba(16,185,129,0.2)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(vl,{style:{width:14,height:14,color:"#10B981"}})}),r.jsxs("div",{style:{flex:1},children:[r.jsx("p",{style:{fontSize:12,fontWeight:600,color:"#fff",margin:"0 0 1px"},children:"Summit Talent"}),r.jsx("p",{style:{fontSize:10,color:"rgba(255,255,255,0.45)",margin:0},children:"27 candidatos recomendados (ratings: 90–97)"})]}),r.jsx("span",{style:{fontSize:10,padding:"5px 12px",background:"#10B981",color:"#fff",borderRadius:6,fontWeight:600,flexShrink:0,whiteSpace:"nowrap"},children:"Ver candidatos →"})]})]})]})]})}),r.jsx("section",{style:{background:"#F6F9FC",padding:"80px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:1060,margin:"0 auto"},children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[r.jsx("h2",{style:{fontSize:32,fontWeight:800,color:"#0A2540",marginBottom:8},children:"Quatro níveis para cada fase da sua operação"}),r.jsx("p",{style:{fontSize:16,color:"#64748B"},children:"Comece no Free. Evolua no seu ritmo."})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:16},children:Lse.map(e=>r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:16,padding:24,textAlign:"center"},children:[r.jsx("div",{style:{width:44,height:44,borderRadius:12,background:e.bg,display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 14px"},children:r.jsx("span",{style:{fontSize:18,fontWeight:700,color:e.color},children:e.letter})}),r.jsx("h3",{style:{fontSize:18,fontWeight:700,color:"#0A2540",marginBottom:8},children:e.name}),r.jsx("p",{style:{fontSize:13,color:"#64748B",lineHeight:1.6,margin:0},children:e.desc})]},e.name))}),r.jsx("div",{style:{textAlign:"center",marginTop:20},children:r.jsx(ut,{to:"/pricing",style:{fontSize:14,color:"#6C24F5",fontWeight:600,textDecoration:"none"},children:"Ver planos e preços →"})})]})}),r.jsx("section",{style:{padding:"80px 24px",borderTop:"1px solid #E3E8EF"},children:r.jsxs("div",{style:{maxWidth:640,margin:"0 auto",textAlign:"center"},children:[r.jsx("h2",{style:{fontSize:28,fontWeight:800,color:"#0A2540",marginBottom:8},children:"Faça um teste, sem compromisso."}),r.jsx("p",{style:{fontSize:16,color:"#64748B",marginBottom:24},children:"Conheça Jobs, ATS e Assessments no plano Free. Ative os módulos pagos quando preferir."}),r.jsx(ut,{to:"/signup",children:r.jsx("button",{style:{background:"linear-gradient(135deg, #6C24F5, #7C5FFF)",color:"#fff",padding:"14px 28px",fontSize:15,fontWeight:700,borderRadius:8,border:"none",cursor:"pointer"},children:"Criar conta →"})})]})})]})}const WA="#6C24F5",Jp="#0A2540";
736function Wse(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0][0].toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function wk(){var p;const{user:e,logout:t}=tr(),[n,s]=g.useState(!1),[i,a]=g.useState(null),o=g.useRef(null);if(g.useEffect(()=>{function m(x){o.current&&!o.current.contains(x.target)&&s(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]),g.useEffect(()=>{if(!(e!=null&&e.email))return;async function m(){var x;try{const w=await ne.functions.invoke("getTalentProfileByEmail",{email:e.email}),y=((x=w==null?void 0:w.data)==null?void 0:x.profile)||(w==null?void 0:w.profile)||(w==null?void 0:w.data)||null;y&&a(y)}catch{}}m()},[e==null?void 0:e.email]),!e)return null;const l=(i==null?void 0:i.full_name)||e.full_name||e.name||((p=e.email)==null?void 0:p.split("@")[0])||"Candidato",c=(i==null?void 0:i.email)||e.email||"",d=(i==null?void 0:i.avatar_url)||e.photo_url||null,u=Wse(l);return r.jsxs("div",{ref:o,style:{position:"relative"},children:[r.jsxs("button",{onClick:()=>s(m=>!m),style:{padding:0,background:"transparent",border:"none",cursor:"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",gap:12,borderRadius:9999,transition:"opacity 150ms ease"},onMouseEnter:m=>m.currentTarget.style.opacity="0.8",onMouseLeave:m=>m.currentTarget.style.opacity="1",children:[r.jsxs("div",{style:{textAlign:"right",lineHeight:1.25},children:[r.jsx("div",{style:{fontSize:13,fontWeight:600,color:Jp,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180},children:l}),r.jsx("div",{style:{fontSize:11,color:"#94A3B8",fontWeight:500},children:"Candidato"})]}),d?r.jsx("img",{src:d,alt:l,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",border:"2px solid #fff",boxShadow:"0 0 0 1px #E2E8F0",flexShrink:0}}):r.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:WA,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:600,fontSize:14,border:"2px solid #fff",boxShadow:"0 0 0 1px #E2E8F0",letterSpacing:.3,flexShrink:0},children:u}),r.jsx(ar,{size:14,color:"#94A3B8"})]}),n&&r.jsxs("div",{style:{position:"absolute",top:"calc(100% + 10px)",right:0,minWidth:260,background:"#fff",border:"1px solid #E3E8EF",borderRadius:14,boxShadow:"0 8px 28px rgba(0,0,0,0.08)",overflow:"hidden",padding:8,zIndex:50},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 12px 14px",borderBottom:"1px solid #F1F5F9",marginBottom:6},children:[d?r.jsx("img",{src:d,alt:l,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):r.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:WA,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:600,fontSize:15,flexShrink:0,letterSpacing:.3},children:u}),r.jsxs("div",{style:{minWidth:0,lineHeight:1.3},children:[r.jsx("div",{style:{fontSize:13,fontWeight:600,color:Jp,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l}),r.jsx("div",{style:{fontSize:11,color:"#94A3B8",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:c})]})]}),r.jsxs(ut,{to:"/meu-perfil",onClick:()=>s(!1),style:{display:"flex",alignItems:"center",gap:10,padding:"9px 12px",textDecoration:"none",color:Jp,fontSize:13,fontWeight:500,borderRadius:8,transition:"background 100ms ease"},onMouseEnter:m=>m.currentTarget.style.background="#F8FAFC",onMouseLeave:m=>m.currentTarget.style.background="transparent",children:[r.jsx(Sh,{size:16,color:"#64748B"}),"Meu perfil"]}),r.jsxs(ut,{to:"/job-board",onClick:()=>s(!1),style:{display:"flex",alignItems:"center",gap:10,padding:"9px 12px",textDecoration:"none",color:Jp,fontSize:13,fontWeight:500,borderRadius:8,transition:"background 100ms ease"},onMouseEnter:m=>m.currentTarget.style.background="#F8FAFC",onMouseLeave:m=>m.currentTarget.style.background="transparent",children:[r.jsx(On,{size:16,color:"#64748B"}),"Explorar vagas"]}),r.jsx("div",{style:{height:1,background:"#F1F5F9",margin:"6px 0"}}),r.jsxs("button",{onClick:()=>{s(!1),t("/")},style:{display:"flex",alignItems:"center",gap:10,padding:"9px 12px",width:"100%",background:"transparent",border:"none",color:Jp,fontSize:13,fontWeight:500,cursor:"pointer",fontFamily:"inherit",textAlign:"left",borderRadius:8,transition:"background 100ms ease"},onMouseEnter:m=>m.currentTarget.style.background="#F8FAFC",onMouseLeave:m=>m.currentTarget.style.background="transparent",children:[r.jsx(p8,{size:16,color:"#64748B"}),"Sair"]})]})]})}function jk({job:e,size:t="md",showLogo:n=!0}){const s=!(e!=null&&e.company_name),i={sm:{logo:32,font:13,gap:8},md:{logo:48,font:15,gap:12},lg:{logo:64,font:18,gap:16}},a=i[t]||i.md,o=s?"Empresa Confidencial":e.company_name;return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:a.gap},children:[n&&r.jsx("div",{style:{width:a.logo,height:a.logo,borderRadius:8,background:s?"#F1F4F9":"#FFFFFF",border:"1px solid #E3E8EE",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",flexShrink:0},children:!s&&(e!=null&&e.company_logo_url)?r.jsx("img",{src:e.company_logo_url,alt:e.company_name,style:{width:"100%",height:"100%",objectFit:"contain"}}):r.jsx(jc,{size:Math.floor(a.logo*.5),color:"#94A3B8"})}),r.jsx("div",{children:r.jsx("div",{style:{fontSize:a.font,fontWeight:600,color:s?"#64748B":"#0A2540",fontStyle:s?"italic":"normal"},children:o})})]})}const $se="https://i.imgur.com/MVgsUJ5.png",Use=[{icon:On,color:"#0EA5E9",name:"Summit Jobs",desc:"Publique vagas grátis e ilimitadas",href:"/jobs"},{icon:ts,color:"#6C24F5",name:"Summit Assessments",desc:"Avaliações comportamentais e cognitivas",href:"/assessments"},{icon:Nr,color:"#F5A623",name:"Summit ATS",desc:"Pipeline inteligente de recrutamento",href:"/ats"},{icon:vl,color:"#10B981",name:"Summit Talent",desc:"Banco de talentos com IA",href:"#",badge:"Em breve"}],Vse={remoto:"Remoto",hibrido:"Híbrido",presencial:"Presencial",clt:"CLT",pj:"PJ",senior:"Sênior",pleno:"Pleno",junior:"Júnior",especialista:"Especialista",estagio:"Estágio",autonomo:"Autônomo"},Hse={ate5k:"Até R$5k","5k10k":"R$5k–10k","10k20k":"R$10k–20k",mais20k:"+R$20k"},hf=e=>Vse[e]||e,FP=(e,t)=>
736`R$ ${e.toLocaleString("pt-BR")} – R$ ${t.toLocaleString("pt-BR")}`;function qse(e){const t=Math.floor((new Date-new Date(e))/864e5);return t===0?"Hoje":t===1?"Há 1 dia":t<7?`Há ${t} dias`:`Há ${Math.floor(t/7)} sem.`}function i1({label:e,bg:t,color:n,border:s}){return r.jsx("span",{style:{fontSize:11,padding:"3px 10px",borderRadius:9999,fontWeight:500,background:t,color:n,border:`1px solid ${s}`},children:e})}const $A={remoto:{bg:"#ECFDF5",color:"#065F46",border:"#A7F3D0"},hibrido:{bg:"#EDE9FE",color:"#5B21B6",border:"#C4B5FD"},presencial:{bg:"#F1F5F9",color:"#475569",border:"#CBD5E1"}};function AP({v:e}){const t=$A[e]||$A.presencial;return r.jsx(i1,{label:hf(e),bg:t.bg,color:t.color,border:t.border})}function TP({v:e}){return r.jsx(i1,{label:hf(e),bg:"#F1F5F9",color:"#475569",border:"#E2E8F0"})}function Gse({v:e}){return r.jsx(i1,{label:hf(e),bg:"#EFF6FF",color:"#1D4ED8",border:"#BFDBFE"})}function Kse({label:e}){return r.jsx(i1,{label:e,bg:"#EDE9FE",color:"#5B21B6",border:"#C4B5FD"})}const Yse=[{key:"format",label:"Formato",opts:["remoto","hibrido","presencial"],fn:hf},{key:"contract",label:"Contrato",opts:["clt","pj","estagio","autonomo"],fn:hf},{key:"seniority",label:"Senioridade",opts:["junior","pleno","senior","especialista"],fn:hf},{key:"salary",label:"Faixa salarial",opts:["ate5k","5k10k","10k20k","mais20k"],fn:e=>Hse[e]}];function Xse({filters:e,onChange:t,onClose:n}){const s=(a,o)=>{const l=e[a];t({...e,[a]:l.includes(o)?l.filter(c=>c!==o):[...l,o]})},i=Object.values(e).reduce((a,o)=>a+o.length,0);return r.jsxs("div",{style:{position:"absolute",top:44,left:0,zIndex:50,width:268,background:"#fff",border:"1px solid #E3E8EF",borderRadius:16,padding:20,boxShadow:"0 16px 48px rgba(0,0,0,0.12)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[r.jsxs("span",{style:{fontWeight:700,fontSize:14,color:"#0A2540"},children:["Filtros ",i>0&&r.jsx("span",{style:{background:"#6C24F5",color:"#fff",borderRadius:9999,padding:"1px 7px",fontSize:11,marginLeft:4},children:i})]}),r.jsx("button",{onClick:n,style:{background:"none",border:"none",cursor:"pointer",color:"#64748B",padding:2},children:r.jsx(Jt,{size:15})})]}),Yse.map(({key:a,label:o,opts:l,fn:c})=>r.jsxs("div",{style:{marginBottom:16},children:[r.jsx("p",{style:{fontSize:10,fontWeight:700,color:"#94A3B8",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:8},children:o}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:l.map(d=>{const u=e[a].includes(d);return r.jsx("button",{onClick:()=>s(a,d),style:{padding:"4px 11px",borderRadius:9999,border:`1px solid ${u?"#6C24F5":"#E2E8F0"}`,background:u?"#EDE9FE":"#fff",color:u?"#5B21B6":"#475569",fontSize:12,cursor:"pointer",fontWeight:u?600:400},children:c(d)},d)})})]},a)),i>0&&r.jsx("button",{onClick:()=>t({format:[],contract:[],seniority:[],salary:[]}),style:{width:"100%",padding:"7px 0",borderRadius:8,border:"1px solid #E2E8F0",background:"#fff",color:"#64748B",fontSize:12,cursor:"pointer",marginTop:4},children:"Limpar filtros"})]})}function Jse({job:e,active:t,onClick:n}){var s;return r.jsxs("button",{onClick:n,style:{width:"100%",textAlign:"left",display:"flex",gap:10,padding:"14px 16px",borderRadius:14,cursor:"pointer",background:t?"#F5F3FF":"#FFFFFF",border:t?"1.5px solid #C4B5FD":"
7361px solid #E8E6E1",boxShadow:t?"0 2px 8px rgba(108,36,245,0.12)":"0 2px 8px rgba(0,0,0,0.06)",transition:"all 0.15s",marginBottom:10},onMouseEnter:i=>{t||(i.currentTarget.style.boxShadow="0 4px 12px rgba(0,0,0,0.08)",i.currentTarget.style.borderColor="#D5D0CB")},onMouseLeave:i=>{t||(i.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.06)",i.currentTarget.style.borderColor="#E8E6E1")},children:[((s=e.video_url)==null?void 0:s.trim())&&r.jsx("div",{style:{width:100,height:56,borderRadius:8,background:"#F7F6F4",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,border:"1px solid #E8E6E1"},children:r.jsx(g8,{size:14,color:"#8B8680"})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{fontSize:12,fontWeight:500,color:"#1B1626",lineHeight:1.4,marginBottom:4,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:e.title}),r.jsx("div",{style:{marginBottom:5},children:r.jsx(jk,{job:e,size:"sm"})}),r.jsxs("div",{style:{display:"flex",gap:4,flexWrap:"wrap",marginBottom:3},children:[r.jsx(AP,{v:e.work_format}),r.jsx(TP,{v:e.contract_type})]}),e.salary_visible?r.jsx("p",{style:{fontSize:11,fontWeight:600,color:"#059669"},children:FP(e.salary_min,e.salary_max)}):r.jsx("p",{style:{fontSize:11,fontWeight:600,color:"#059669"},children:"Flexível"})]})]})}function Qse(){var P,L,T;const{user:e}=tr(),t=(e==null?void 0:e.role)==="candidate",[n,s]=g.useState(null),[i,a]=g.useState(!1),[o,l]=g.useState(!1),[c,d]=g.useState(""),[u,p]=g.useState({format:[],contract:[],seniority:[],salary:[]}),[m,x]=g.useState([]),[w]=Um(),[y,v]=g.useState(!0),j=g.useRef(null),[k,S]=g.useState(null);g.useEffect(()=>{async function R(){var U;try{const I=await ne.functions.invoke("listPublicJobs",{}),H=(I==null?void 0:I.data)||I,V=(H==null?void 0:H.jobs)||[];x(V);const X=w.get("slug");if(X){const N=V.find(W=>W.slug===X);s(N?N.id:(U=V[0])==null?void 0:U.id)}else V.length>0&&s(V[0].id)}catch{S("Não foi possível carregar as vagas agora.")}finally{v(!1)}}R()},[]);const _=m.find(R=>R.id===n)||null,F=Object.values(u).some(R=>R.length>0),A=Object.values(u).reduce((R,U)=>R+U.length,0);function C(R){if(!R||!R.trim())return null;let U=R;const I=R.match(/(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/);if(I)U=`https://www.youtube.com/embed/${I[1]}?rel=0&modestbranding=1`;else if(R.includes("vimeo.com")){const H=R.match(/vimeo\.com\/(\d+)/);H&&(U=`https://player.vimeo.com/video/${H[1]}`)}else if(R.match(/\.(mp4|webm|mov)(\?.*)?$/i))return r.jsx("div",{style:{borderRadius:16,overflow:"hidden",marginBottom:24,aspectRatio:"16/9",border:"1px solid #E3E8EF",maxWidth:"70%"},children:r.jsx("video",{src:U,controls:!0,style:{width:"100%",height:"100%",objectFit:"cover"}})});return r.jsx("div",{style:{borderRadius:16,overflow:"hidden",marginBottom:24,aspectRatio:"16/9",border:"1px solid #E3E8EF",maxWidth:"70%"},children:r.jsx("iframe",{src:U,style:{width:"100%",height:"100%",border:"none"},allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",allowFullScreen:!0,title:"Apresentação da vaga"})})}const D=m.filter(R=>{if(c){const U=c.toLowerCase();if(!R.title.toLowerCase().includes(U)&&!(R.company_name||"").toLowerCase().includes(U))return!1}if(u.format.length&&!u.format.includes(R.work_format)||u.contract.length&&!u.contract.includes(R.contract_type)||u.seniority.length&&!u.seniority.includes(R.seniority))return!1;if(u.salary.length){const U=(R.salary_min+R.salary_max)/2;if(!u.salary.some(I=>I==="ate5k"&&U<=5e3||I==="5k10k"&&U>5e3&&U<=1e4||I==="10k20k"&&U>1e4&&U<=2e4||I==="mais20k"&&U>2e4))return!1}return!0});return r.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:"#F7F6F4",fontFamily:"'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[r.jsx("header",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"0 24px",height:64,background:"#FFFFFF",flexShrink:0,position:"sticky",top:0,zIndex:30,borderBottom:"1px solid #E8E6E1"},children:r.jsxs("div",{style:{maxWidth:1160,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[r.jsx(ut,{to:"/",children:r.jsx("img",{src:$se,alt:"Summit",style:{height:36,display:"block"}})}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[r.jsx(ut,{to:"/job-board",style:{padding:"8px 12px",fontSize:14,fontWeight:600,color:"#1B1626",textDecoration:"none",borderRadius:6},children:"Vagas"}),r.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{j.current&&clearTimeout(j.current),l(!0)},onMouseLeave:()=>{j.current=setTimeout(()=>l(!1),200)},children:[r.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"8px 12px",fontSize:14,fontWeight:500,color:"#6B7280",background:"none",border:"none",cursor:"pointer",borderRadius:6},children:["Produtos",r.jsx(ar,{style:{width:14,height:14,transition:"transform 0.2s",transform:o?"rotate(180deg)":"rotate(0deg)"}})]}),o&&r.jsx("div",{style:{position:"absolute",top:"calc(100% + 2px)",left:"50%",transform:"translateX(-50%)",background:"#ffffff",border:"1px solid #E3E8EF",borderRadius:12,boxShadow:"0 8px 32px rgba(0,0,0,0.10)",padding:8,width:280,zIndex:200},children:Use.map(R=>{const U=R.icon;return r.jsxs(ut,{to:R.href,style:{display:"flex",alignItems:"flex-start",ga
736p:12,padding:"10px 12px",borderRadius:8,textDecoration:"none",color:"inherit",transition:"background 0.15s"},onMouseEnter:I=>I.currentTarget.style.background="#F6F9FC",onMouseLeave:I=>I.currentTarget.style.background="transparent",children:[r.jsx("div",{style:{width:32,height:32,borderRadius:8,background:R.color+"15",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(U,{style:{width:15,height:15,color:R.color}})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{fontSize:13,fontWeight:600,color:"#0A2540"},children:R.name}),R.badge&&r.jsx("span",{style:{fontSize:10,fontWeight:700,color:"#64748B",background:"#F1F5F9",padding:"1px 6px",borderRadius:20},children:R.badge})]}),r.jsx("p",{style:{fontSize:12,color:"#64748B",margin:0,marginTop:1},children:R.desc})]})]},R.name)})})]}),r.jsx(ut,{to:"/pricing",style:{padding:"8px 12px",fontSize:14,fontWeight:500,color:"#6B7280",textDecoration:"none",borderRadius:6},children:"Planos"}),t?r.jsx("div",{style:{marginLeft:8},children:r.jsx(wk,{})}):r.jsxs(r.Fragment,{children:[r.jsx(ut,{to:"/app",style:{padding:"8px 12px",fontSize:14,fontWeight:500,color:"#6B7280",textDecoration:"none",borderRadius:6},children:"Entrar"}),r.jsx(ut,{to:"/signup",style:{marginLeft:8,padding:"9px 18px",fontSize:14,fontWeight:600,color:"#ffffff",background:"#6C24F5",borderRadius:8,textDecoration:"none"},children:"Começar grátis"})]})]})]})}),r.jsx("div",{style:{padding:"14px 32px 0",flexShrink:0,background:"#fff"},children:r.jsxs("div",{style:{background:"linear-gradient(135deg, #0F0B2E 0%, #1A1145 40%, #2D1B69 70%, #3D2580 100%)",borderRadius:12,padding:"12px 20px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:16,position:"relative",overflow:"hidden"},children:[r.jsx("div",{style:{position:"absolute",top:-40,right:-40,width:140,height:140,borderRadius:"50%",background:"rgba(99,91,255,0.08)",pointerEvents:"none"}}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,position:"relative",zIndex:1},children:[r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,background:"rgba(99,91,255,0.2)",borderRadius:9999,padding:"3px 10px",flexShrink:0},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"#10B981"}}),r.jsx("span",{style:{fontSize:10,color:"#FFFFFF",fontWeight:600},children:"Para empresas"})]}),r.jsx("p",{style:{fontSize:13,color:"#FFFFFF",lineHeight:1.5,margin:0},children:"Publique sua vaga e alcance talentos com perfil completo e matching inteligente."})]}),r.jsx(ut,{to:"/signup",style:{textDecoration:"none",flexShrink:0,position:"relative",zIndex:1},children:r.jsx("button",{style:{background:"#6C24F5",color:"#fff",fontWeight:600,borderRadius:8,padding:"8px 18px",fontSize:12,border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:5,whiteSpace:"nowrap"},children:"Publicar vaga →"})})]})}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"14px 32px",background:"#fff",borderBottom:"1px solid #E8E6E1",flexShrink:0},children:[r.jsxs("div",{style:{position:"relative",flexShrink:0},children:[r.jsxs("button",{onClick:()=>a(R=>!R),style:{display:"flex",alignItems:"center",gap:7,padding:"9px 16px",borderRadius:8,border:`1px solid ${F?"#6C24F5":"#E8E6E1"}`,background:F?"#EDE9FE":"#fff",color:F?"#5B21B6":"#475569",fontSize:13,cursor:"pointer",fontWeight:500,whiteSpace:"nowrap"},children:[r.jsx($H,{size:14}),"Filtros",F&&r.jsx("span",{style:{background:"#6C24F5",color:"#fff",borderRadius:9999,width:18,height:18,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:700},children:A})]}),i&&r.jsx(Xse,{filters:u,onChange:p,onClose:()=>a(!1)})]}),r.jsxs("div",{style:{position:"relative",flex:1,maxWidth:380},children:[r.jsx(Ua,{style:{position:"absolute",left:14,top:"50%",transform:"translateY(-50%)",width:16,height:16,color:"#8B8680",pointerEvents:"none"}}),r.jsx("input",{value:c,onChange:R=>d(R.target.value),placeholder:"Buscar vagas, empresas...",style:{width:"100%",paddingLeft:42,paddingRight:16,paddingTop:9,paddingBottom:9,background:"#F7F6F4",border:"1px solid #E8E6E1",borderRadius:8,fontSize:13,color:"#1B1626",outline:"none"},onFocus:R=>{R.target.style.borderColor="#6C24F5",R.target.style.boxShadow="0 0 0 3px rgba(108,36,245,0.1)"},onBlur:R=>{R.target.style.borderColor="#E8E6E1",R.target.style.boxShadow="none"}})]}),[{label:"Todas",key:null,value:null},{label:"Remoto",key:"format",value:"remoto"},{label:"Híbrido",key:"format",value:"hibrido"},{label:"Presencial",key:"format",value:"presencial"},{label:"CLT",key:"contract",value:"clt"},{label:"PJ",key:"contract",value:"pj"}].map(R=>{const U=R.key===null?!F:u[R.key].includes(R.value);return r.jsx("button",{onClick:()=>
736{if(R.key===null)p({format:[],contract:[],seniority:[],salary:[]});else{const I=u[R.key];p({...u,[R.key]:I.includes(R.value)?I.filter(H=>H!==R.value):[...I,R.value]})}},style:{padding:"5px 14px",borderRadius:9999,fontSize:12,fontWeight:500,cursor:"pointer",flexShrink:0,background:U?"#6C24F5":"#FFFFFF",color:U?"#FFFFFF":"#6B6560",border:U?"none":"0.5px solid #E8E6E1",transition:"all 0.15s"},children:R.label},R.label)}),r.jsxs("span",{style:{fontSize:12,color:"#8B8680",whiteSpace:"nowrap",marginLeft:"auto",flexShrink:0},children:[D.length," vagas"]})]}),r.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[r.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px 20px",minWidth:0,maxWidth:"calc(100% - 440px)"},children:[y&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:200,gap:12},children:[r.jsx("div",{style:{width:32,height:32,border:"3px solid #E8E6E1",borderTop:"3px solid #6C24F5",borderRadius:"50%",animation:"spin 0.8s linear infinite"}}),r.jsx("p",{style:{color:"#8B8680",fontSize:13},children:"Carregando vagas..."}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}),!y&&k&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:200,gap:12},children:[r.jsx("p",{style:{color:"#8B8680",fontSize:13},children:k}),r.jsx("button",{onClick:()=>window.location.reload(),style:{padding:"8px 16px",borderRadius:8,border:"1px solid #E8E6E1",background:"#fff",color:"#6C24F5",fontSize:13,cursor:"pointer",fontWeight:600},children:"Tentar novamente"})]}),!y&&!k&&m.length===0&&r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:200},children:r.jsx("p",{style:{color:"#8B8680",fontSize:13},children:"Nenhuma vaga disponível no momento."})}),((P=_==null?void 0:_.video_url)==null?void 0:P.trim())&&C(_.video_url),!y&&!k&&_&&r.jsxs("div",{style:{background:"#fff",borderRadius:14,border:"1px solid #E8E6E1",padding:28,boxShadow:"0 1px 4px rgba(0,0,0,0.04)"},children:[r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:"#1B1626",marginBottom:14,lineHeight:1.2,letterSpacing:"-0.3px"},children:_.title}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:18,flexWrap:"wrap"},children:[r.jsx(jk,{job:_,size:"md"}),r.jsx("span",{style:{color:"#E8E6E1"},children:"·"}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,color:"#8B8680",fontSize:13},children:[r.jsx(ma,{size:12})," ",_.location]}),r.jsx("span",{style:{color:"#E8E6E1"},children:"·"}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,color:"#B5B0AA",fontSize:12},children:[r.jsx(Di,{size:12})," ",qse(_.published_at)]})]}),r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8,marginBottom:22},children:[r.jsx(AP,{v:_.work_format}),r.jsx(TP,{v:_.contract_type}),r.jsx(Gse,{v:_.seniority}),r.jsx("div",{style:{flex:1}}),r.jsxs("button",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",borderRadius:8,border:"1px solid #E8E6E1",background:"#fff",color:"#475569",fontSize:12,cursor:"pointer"},children:[r.jsx(MH,{size:13})," Compartilhar"]}),r.jsx(ut,{to:`/aplicar/${_.slug}`,style:{textDecoration:"none"},children:r.jsx("button",{style:{padding:"9px 22px",borderRadius:8,background:"#6C24F5",color:"#fff",fontWeight:700,fontSize:13,border:"none",cursor:"pointer",boxShadow:"0 4px 14px rgba(108,36,245,0.35)"},children:"Aplicar agora →"})})]}),r.jsx("div",{style:{height:1,background:"#E8E6E1",marginBottom:22}}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"14px 18px",background:"#F9FAF8",border:"0.5px solid #E8E6E1",borderRadius:10,marginBottom:22},children:[r.jsx("div",{style:{width:40,height:40,borderRadius:10,background:"#ECFDF5",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(o8,{size:20,color:"#059669"})}),r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:10,fontWeight:700,color:"#8B8680",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:2},children:"Faixa Salarial"}),_.salary_visible?r.jsxs(r.Fragment,{children:[r.jsxs("p",{style:{fontSize:17,fontWeight:700,color:"#059669",marginBottom:1},children:[FP(_.salary_min,_.salary_max)," /mês"]}),r.jsx("p",{style:{fontSize:11,color:"#8B8680",margin:0},children:"Pacote competitivo com benefícios"})]}):r.jsxs(r.Fragment,{children:[r.jsx("p",{style:{fontSize:17,fontWeight:700,color:"#059669",marginBottom:1},children:"Flexível"}),r.jsx("p",{style:{fontSize:11,color:"#8B8680",margin:0},children:"Informe sua expectativa salarial na aplicação"})]})]})]}),((L=_.skills)==null?void 0:L.length)>0&&r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:22},children:_.skills.map(R=>r.jsx(Kse,{label:R},R))}),((T=_.description_sections)==null?void 0:T.length)>0?r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:24},children:_.description_sections.map((R,U)=>r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#1B1626",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:12,paddingBottom:8,borderBottom:"1px solid #F1F0ED"},children:R.title}),r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:8},children:R.items.map((I,H)=>
736r.jsxs("li",{style:{display:"flex",alignItems:"flex-start",gap:10,fontSize:14,color:"#475569",lineHeight:1.7},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"#6C24F5",flexShrink:0,marginTop:8}}),I]},H))})]},U))}):_.description?r.jsx("p",{style:{fontSize:14,color:"#475569",lineHeight:1.8,whiteSpace:"pre-wrap"},children:_.description}):r.jsx("p",{style:{fontSize:14,color:"#94A3B8",lineHeight:1.8,fontStyle:"italic"},children:"Descrição não disponível."})]})]}),r.jsxs("div",{style:{width:440,flexShrink:0,overflowY:"auto",borderLeft:"1px solid #E8E6E1",padding:"20px 16px",background:"#F7F6F4"},children:[r.jsxs("p",{style:{fontSize:10,fontWeight:700,color:"#B5B0AA",textTransform:"uppercase",letterSpacing:"0.1em",marginBottom:16,paddingLeft:4},children:[D.length," vagas disponíveis"]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[D.map(R=>r.jsx(Jse,{job:R,active:R.id===n,onClick:()=>s(R.id)},R.id)),D.length===0&&r.jsxs("div",{style:{textAlign:"center",padding:"40px 20px"},children:[r.jsx("p",{style:{fontSize:13,color:"#8B8680"},children:"Nenhuma vaga encontrada."}),r.jsx("button",{onClick:()=>p({format:[],contract:[],seniority:[],salary:[]}),style:{marginTop:12,fontSize:12,color:"#6C24F5",background:"none",border:"none",cursor:"pointer",textDecoration:"underline"},children:"Limpar filtros"})]})]})]})]})]})}const Zse="https://i.imgur.com/MVgsUJ5.png",Nn="#6C24F5",Kn="#0A2540",UA=["Lendo seu currículo...","Identificando suas experiências profissionais...","Mapeando suas competências...","Organizando sua formação acadêmica...","Reconhecendo seus idiomas...","Criando seu perfil profissional...","Candidatos com perfil completo têm até 3x mais chances de entrevista.","Identificamos suas principais habilidades técnicas...","Quase pronto — finalizando seu perfil...","A Summit analisa mais de 50 pontos do seu currículo...","Perfis bem preenchidos recebem recomendações automáticas para novas vagas.","Último ajuste — garantindo que tudo está correto..."],eie={clt:"CLT",pj:"PJ",autonomo:"Autônomo",estagio:"Estágio",temporario:"Temporário"},tie={presencial:"Presencial",hibrido:"Híbrido",remoto:"Remoto"};function nie(){var Ht;const{slug:e}=Do(),{user:t}=tr(),n=(t==null?void 0:t.role)==="candidate",[s,i]=g.useState(null),[a,o]=g.useState(!0),[l,c]=g.useState(null),[d,u]=g.useState(null),[p,m]=g.useState(!1),[x,w]=g.useState(null),[y,v]=g.useState(!1),[j,k]=g.useState(!1),[S,_]=g.useState(null),[F,A]=g.useState(""),[C,D]=g.useState([]),[P,L]=g.useState(!1),[T,R]=g.useState(!1),[U,I]=g.useState([]),[H,V]=g.useState(!1),[X,N]=g.useState(""),W=g.useRef(null),[O,G]=g.useState(1),[M,z]=g.useState(""),[K,Y]=g.useState(null),[J,Q]=g.useState(null),[ie,ae]=g.useState(!1),[re,pe]=g.useState(!1),[Z,Ne]=g.useState(0),[te,xe]=g.useState(null),[he,le]=g.useState(null),[ge,$e]=g.useState(null),[ft,Qe]=g.useState(null),Ve=g.useRef(null),[ze,at]=g.useState({full_name:"",email:"",phone:"",salary_expectation:"",headline:"",skills:[],contract_type_desired:[],work_format_desired:[],summary_executive:""}),[Nt,_e]=g.useState(""),[be,Re]=g.useState(""),[Xe,He]=g.useState(null),[St,Ct]=g.useState(!1),[Se,et]=g.useState(""),[bt,Ot]=g.useState(!1);g.useEffect(()=>{async function ke(){try{const Ze=await ne.functions.invoke("getPublicJobBySlug",{slug:e}),Be=(Ze==null?void 0:Ze.data)||Ze;if(!(Be!=null&&Be.success)||!(Be!=null&&Be.job)){c("Vaga não encontrada ou encerrada.");return}i(Be.job)}catch{c("Não foi possível carregar esta vaga.")}finally{o(!1)}}ke()},[e]),g.useEffect(()=>{if(!n||!(t!=null&&t.email)||!s)return;async function ke(){var Be;m(!0);try{const xt=await ne.functions.invoke("getTalentProfileByEmail",{email:t.email}),yt=((Be=xt==null?void 0:xt.data)==null?void 0:Be.profile)||(xt==null?void 0:xt.profile)||(xt==null?void 0:xt.data)||null;if(u(yt),yt!=null&&yt.id){const dt=await ne.entities.JobApplication.filter({job_id:s.id,talent_profile_id:yt.id}),ee=["pending_verification","submitted","viewed","shortlisted","hired"],fe=(dt||[]).find(ce=>ee.includes(ce.status));fe&&w(fe)}}catch(xt){console.error("Error loading logged candidate data:",xt==null?void 0:xt.message)}finally{m(!1)}}ke();async function Ze(){L(!0),R(!1);try{const Be=await ne.functions.invoke("listMyAttachments",{}),xt=(Be==null?void 0:Be.data)||Be;xt!=null&&xt.success?D(xt.attachments||[]):R(!0)}catch(Be){console.error("Error loading attachments:",Be==null?void 0:Be.message),R(!0)}finally{L(!1)}}Ze()},[n,t==null?void 0:t.email,s==null?void 0:s.id]),g.useEffect(()=>(re?Ve.current=setInterval(()=>{Ne(ke=>(ke+1)%UA.length)},3e3):clearInterval(Ve.current),()=>clearInterval(Ve.current)),[re]),g.useEffect(()=>{te&&at(ke=>({...ke,full_name:te.full_name||ke.full_name,email:te.email||ke.email,phone:te.phone||ke.phone,headline:te.headline||ke.headline,salary_expectation:te.salary_expectation||ke.salary_expectation,skills:te.skills_preview||[],summary_executive:te.summary_executive||ke.summary_executive}))},[te]);function sn(){G(3)}async function Vt(ke){var Ze;if(ke){Q(ke),Qe(null),ae(!0);try{let Be=null;try{const ee=await ne.integrations.Core.UploadFile({file:ke});if(console.log("Upload result:",JSON.stringify(ee)),Be=(ee==null?void 0:ee.url)||(ee==null?void 0:ee.file_url)||(ee==null?void 0:ee.public_url)||(ee==null?void 0:ee.path)||(ee==null?void 0:ee.src)||(ee==null?void 0:ee.link)||(ee==null?void 0:ee.download_url)||(ee==null?void 0:ee.uri)||(typeof ee=="string"?ee:null),!Be&&ee){const fe=Object.keys(ee);console.log("Available keys:",fe);
736for(const ce of fe)if(typeof ee[ce]=="string"&&ee[ce].startsWith("http")){Be=ee[ce];break}}}catch(ee){throw console.error("Upload error:",ee),Qe(`Erro no upload: ${(ee==null?void 0:ee.message)||"Tente novamente"}. Se persistir, tente um arquivo menor.`),ee}if(!Be)throw Qe("Não conseguimos processar seu arquivo. Tente novamente com um PDF ou DOCX."),new Error("no_file_url");le(Be),ae(!1),pe(!0),Ne(0);let xt=null,yt=0;const dt=3;for(;yt<dt;)try{yt++,console.log("extractFromCV attempt:",yt),xt=await ne.functions.invoke("extractFromCV",{cv_file_url:Be,talent_profile_id:K||"pending"}),console.log("extractFromCV response:",(Ze=JSON.stringify(xt))==null?void 0:Ze.substring(0,300));break}catch(ee){if(console.error("Extract error attempt",yt,":",ee==null?void 0:ee.message),yt<dt)await new Promise(fe=>setTimeout(fe,2e3*yt));else{Qe("Não conseguimos processar seu CV agora. Tente novamente."),pe(!1);return}}try{const ee=(xt==null?void 0:xt.data)||xt;ee!=null&&ee.success?(xe(ee.data),$e(new Date().toISOString()),G(4)):Qe((ee==null?void 0:ee.message)||"Não conseguimos ler seu CV. Tente um arquivo PDF ou DOCX.")}finally{pe(!1)}}catch(Be){console.error("Unexpected error:",Be),Qe("Algo deu errado. Tente novamente.")}finally{ae(!1),pe(!1)}}}async function Un(ke){if(!(!ke||!ke.includes("@")))try{const Ze=await ne.entities.TalentProfile.filter({email:ke});Ze&&Ze.length>0?(He(Ze[0]),Re("Você já tem uma conta com este e-mail.")):(He(null),Re(""))}catch{Re("")}}function nr(ke,Ze){return ke.includes(Ze)?ke.filter(Be=>Be!==Ze):[...ke,Ze]}const xr={pending_verification:"Aguardando verificação",submitted:"Enviada",viewed:"Visualizada",shortlisted:"Selecionado",rejected:"Não selecionado",hired:"Contratado",expired:"Expirada"};async function dr(){var ke;v(!0),A("");try{const Ze=await ne.functions.invoke("confirmLoggedApplication",{job_id:s.id,attachment_ids:U}),Be=(Ze==null?void 0:Ze.data)||Ze;Be!=null&&Be.success?(_({campaigns_dispatched:Be.campaigns_dispatched||0,campaigns_reused:Be.campaigns_reused||0}),k(!0)):(Be==null?void 0:Be.error)==="email_is_member"?A(Be.message):(Be==null?void 0:Be.error)==="already_applied"?w(Be.existing_application):(Be==null?void 0:Be.error)==="invalid_attachments"?A("Um ou mais arquivos selecionados não são válidos. Atualize a página e tente novamente."):A((Be==null?void 0:Be.message)||"Algo deu errado. Tente novamente.")}catch(Ze){const Be=((ke=Ze==null?void 0:Ze.response)==null?void 0:ke.data)||(Ze==null?void 0:Ze.data);(Be==null?void 0:Be.error)==="email_is_member"?A(Be.message):(Be==null?void 0:Be.error)==="already_applied"?w(Be.existing_application):(Be==null?void 0:Be.error)==="invalid_attachments"?A("Um ou mais arquivos selecionados não são válidos. Atualize a página e tente novamente."):A("Algo deu errado. Tente novamente.")}finally{v(!1)}}function hs(ke){I(Ze=>Ze.includes(ke)?Ze.filter(Be=>Be!==ke):[...Ze,ke])}function mi(ke){return!ke||ke<=0?"0 B":ke<1024?`${ke} B`:ke<1024*1024?`${(ke/1024).toFixed(1)} KB`:`${(ke/(1024*1024)).toFixed(1)} MB`}function Ur(ke){if(!ke)return"";const Ze=new Date(ke);if(isNaN(Ze.getTime()))return"";const Be=Math.floor((Date.now()-Ze.getTime())/864e5);return Be===0?"hoje":Be===1?"ontem":Be<7?`há ${Be} dias`:Ze.toLocaleDateString("pt-BR",{day:"2-digit",month:"short"}).replace(".","")}function Ue(ke){var xt;const Ze=(ke.file_type||"").toLowerCase(),Be=((xt=(ke.file_name||"").split(".").pop())==null?void 0:xt.toLowerCase())||"";return Ze.startsWith("image/")||["png","jpg","jpeg","webp","gif"].includes(Be)?fS:Ze.includes("pdf")||Ze.includes("word")||Ze.includes("text")||["pdf","doc","docx","txt","rtf","odt"].includes(Be)?ui:d8}async function Et(ke){var Ze;if(ke){N(""),V(!0);try{let Be=null;try{const dt=await ne.integrations.Core.UploadFile({file:ke});if(Be=(dt==null?void 0:dt.url)||(dt==null?void 0:dt.file_url)||(dt==null?void 0:dt.public_url)||(dt==null?void 0:dt.path)||(dt==null?void 0:dt.src)||(dt==null?void 0:dt.link)||(dt==null?void 0:dt.download_url)||(dt==null?void 0:dt.uri)||(typeof dt=="string"?dt:null),!Be&&dt){for(const ee of Object.keys(dt))if(typeof dt[ee]=="string"&&dt[ee].startsWith("http")){Be=dt[ee];break}}}catch(dt){console.error("Attachment upload error:",dt),N("Não foi possível enviar o arquivo. Tente novamente.");return}if(!Be){N("Não foi possível enviar o arquivo. Tente novamente.");return}const xt=await ne.functions.invoke("uploadAttachment",{file_url:Be,file_name:ke.name,file_size_bytes:ke.size,file_type:ke.type}),yt=(xt==null?void 0:xt.data)||xt;if(yt!=null&&yt.success){const dt=yt.attachment||yt.data||{id:yt.id,file_url:Be,file_name:ke.name,file_size_bytes:ke.size,file_type:ke.type,uploaded_at:new Date().toISOString()};
736if(!dt.id){N("Não foi possível registrar o arquivo. Tente novamente.");return}D(ee=>[dt,...ee]),I(ee=>ee.includes(dt.id)?ee:[...ee,dt.id])}else{const dt=yt==null?void 0:yt.error,ee=yt==null?void 0:yt.message;dt==="file_too_large"||dt==="quota_exceeded"||/10\s*MB|30\s*MB|limite|quota/i.test(ee||"")?N(ee||"Arquivo excede o limite permitido (máx. 10 MB por arquivo, 30 MB no total)."):N(ee||"Não foi possível anexar o arquivo. Tente novamente.")}}catch(Be){const xt=((Ze=Be==null?void 0:Be.response)==null?void 0:Ze.data)||(Be==null?void 0:Be.data),yt=xt==null?void 0:xt.error,dt=xt==null?void 0:xt.message;yt==="file_too_large"||yt==="quota_exceeded"||/10\s*MB|30\s*MB|limite|quota/i.test(dt||"")?N(dt||"Arquivo excede o limite permitido (máx. 10 MB por arquivo, 30 MB no total)."):N("Não foi possível anexar o arquivo. Tente novamente.")}finally{V(!1)}}}async function mt(){var ke,Ze,Be;if(!bt){et("Você precisa aceitar os termos para enviar sua candidatura.");return}if(!ze.full_name||!ze.email){et("Preencha nome e e-mail para continuar.");return}if(!ze.salary_expectation||Number(ze.salary_expectation)<=0){et("Informe sua expectativa salarial para continuar.");return}if(be){et(be);return}Ct(!0),et("");try{const xt=await ne.functions.invoke("registerCandidate",{email:ze.email,full_name:ze.full_name,phone:ze.phone,linkedin_url:M||void 0,job_id:s.id,headline:ze.headline||void 0,summary_executive:ze.summary_executive||void 0,experiences:(te==null?void 0:te.experiences)||void 0,education:(te==null?void 0:te.education)||void 0,languages:(te==null?void 0:te.languages)||void 0,certifications:(te==null?void 0:te.certifications)||void 0,cv_text_raw:(te==null?void 0:te.cv_text_raw)||(te==null?void 0:te.raw_text)||void 0,cv_file_url:he||void 0,cv_extracted_at:ge||void 0,skills:ze.skills||[],salary_expectation:ze.salary_expectation?Number(ze.salary_expectation):void 0,contract_type_desired:((ke=ze.contract_type_desired)==null?void 0:ke.length)>0?ze.contract_type_desired:void 0,work_format_desired:((Ze=ze.work_format_desired)==null?void 0:Ze.length)>0?ze.work_format_desired:void 0}),yt=(xt==null?void 0:xt.data)||xt;yt!=null&&yt.success?(yt==null?void 0:yt.email_sent)===!1?et("Candidatura recebida, mas não conseguimos enviar o e-mail de confirmação."):G(5):(yt==null?void 0:yt.error)==="email_is_member"?Re(yt.message):(yt==null?void 0:yt.error)==="email_exists"?(He({full_name:(yt==null?void 0:yt.existing_name)||ze.full_name}),Re("Você já tem uma conta com este e-mail.")):et((yt==null?void 0:yt.message)||"Algo deu errado. Tente novamente.")}catch(xt){const yt=((Be=xt==null?void 0:xt.response)==null?void 0:Be.data)||(xt==null?void 0:xt.data);(yt==null?void 0:yt.error)==="email_is_member"?Re(yt.message):(yt==null?void 0:yt.error)==="email_exists"?(He({full_name:(yt==null?void 0:yt.existing_name)||ze.full_name}),Re("Você já tem uma conta com este e-mail.")):et("Algo deu errado. Tente novamente.")}finally{Ct(!1)}}return a?r.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#F6F9FC"},children:r.jsx("div",{style:{width:36,height:36,border:"3px solid #E2E8F0",borderTopColor:Nn,borderRadius:"50%",animation:"spin 0.8s linear infinite"}})}):l?r.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#F6F9FC",gap:16},children:[r.jsx("p",{style:{color:"#64748B",fontSize:16},children:l}),r.jsx(ut,{to:"/job-board",style:{color:Nn,fontSize:14},children:"← Ver outras vagas"})]}):r.jsxs("div",{style:{minHeight:"100vh",background:"#F6F9FC",fontFamily:"'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"}),r.jsxs("header",{style:{background:"#fff",borderBottom:"1px solid #E3E8EF",padding:"0 32px",height:60,display:"flex",alignItems:"center",justifyContent:"space-between",position:"sticky",top:0,zIndex:30},children:[r.jsxs(ut,{to:"/job-board",style:{textDecoration:"none",display:"flex",alignItems:"center",gap:8,color:"#64748B",fontSize:13},children:[r.jsx(bo,{size:15})," Voltar para vagas"]}),r.jsx("img",{src:Zse,alt:"Summit",style:{height:28}}),r.jsx("div",{style:{minWidth:120,display:"flex",justifyContent:"flex-end"},children:n&&r.jsx(wk,{})})]}),r.jsxs("div",{style:{background:"#fff",borderBottom:"1px solid #E3E8EF",padding:"12px 32px",display:"flex",alignItems:"center",gap:12},children:[r.jsx(jk,{job:s,size:"md"}),r.jsxs("div",{style:{borderLeft:"1px solid #E3E8EF",paddingLeft:12},children:[r.jsx("p",{style:{fontSize:14,fontWeight:600,color:Kn,lineHeight:1.3},children:s.title}),r.jsxs("p",{style:{fontSize:12,color:"#64748B"},children:[s.location_city,s.location_state?`, ${s.location_state}`:""]})]})]}),r.jsxs("div",{style:{maxWidth:520,margin:"0 auto",padding:"40px 24px"},children:[n&&p&&r.jsx("div",{style:{textAlign:"center",padding:"60px 0"},children:r.jsx(rt,{size:28,style:{animation:"spin 0.8s linear infinite",color:Nn,margin:"0 auto"}})}),n&&!p&&x&&r.jsxs("div",{style:{textAlign:"center",padding:"20px 0"},children:[d!=null&&d.avatar_url?r.jsx("img",{src:d.avatar_url,alt:"",style:{width:72,height:72,borderRadius:"50%",objectFit:"cover",margin:"0 auto 20px",display:"block",border:"3px solid #E2E8F0"}}):r.jsx("div",{style:{width:72,height:72,borderRadius:"50%",background:Nn,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:700,fontSize:28,margin:"0 auto 20px"},children:((d==null?void 0:d.full_name)||(t==null?void 0:t.email)||"?")[0].toUpperCase()}),r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Kn,marginBottom:12,letterSpacing:"-0.3px"},children:"Você já se candidatou para esta vaga"}),r.jsxs("p",{style:{fontSize:14,color:"#64748B",marginBottom:8,lineHeight:1.7},children:["Sua candidatura foi enviada em ",r.jsx("strong",{children:new Date(x.applied_at).toLocaleDateString("pt-BR")}),"."]}),r.jsxs("p",{style:{fontSize:14,color:"#64748B",marginBottom:32,lineHeight:1.7},children:["Status atual: ",r.jsx("span",{style:{display:"inline-block",padding:"3px 12px",borderRadius:20,background:"#EDE9FE",color:"#5B21B6",fontWeight:600,fontSize:13},children:xr[x.status]||x.status})]}),r.jsxs("div",{style:{display:"flex",gap:10,justifyContent:"center"},children:[r.jsx(ut,{to:"/meu-perfil",style:{textDecoration:"none"},children:r.jsx("button",{style:{padding:"11px 22px",borderRadius:10,background:Nn,color:"#fff",fontWeight:700,fontSize:14,border:"none",cursor:"pointer"},children:"Ver minhas candidaturas"})}),r.jsx(ut,{to:"/job-board",style:{textDecoration:"none"},children:r.jsx("button",{style:{padding:"11px 22px",borderRadius:10,background:"transparent",color:"#64748B",fontWeight:500,fontSize:14,border:"1px solid #E2E8F0",cursor:"pointer"},children:"Ver outras vagas"})})]})]}),n&&!p&&!x&&!j&&r.jsxs("div",{children:[r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Kn,marginBottom:8,letterSpacing:"-0.3px"},children:"Confirmar candidatura"}),r.jsxs("p",{style:{fontSize:14,color:"#64748B",marginBottom:28,lineHeight:1.7},children:["Vamos enviar suas informações cadastradas para ",r.jsx("strong",{children:(s==null?void 0:s.company_name)||"Empresa Confidencial"})," avaliar."]}),r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:14,padding:"20px 22px",marginBottom:20},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,marginBottom:16,paddingBottom:16,borderBottom:"1px solid #F1F5F9"},children:[d!=null&&d.avatar_url?r.jsx("img",{src:d.avatar_url,alt:"",style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:"2px s
736olid #E2E8F0"}}):r.jsx("div",{style:{width:56,height:56,borderRadius:"50%",background:Nn,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:700,fontSize:22,flexShrink:0},children:((d==null?void 0:d.full_name)||(t==null?void 0:t.email)||"?")[0].toUpperCase()}),r.jsxs("div",{style:{minWidth:0},children:[r.jsx("p",{style:{fontSize:16,fontWeight:700,color:Kn,marginBottom:2},children:(d==null?void 0:d.full_name)||(t==null?void 0:t.name)||(t==null?void 0:t.email)}),(d==null?void 0:d.headline)&&r.jsx("p",{style:{fontSize:13,color:"#64748B"},children:d.headline}),r.jsx("p",{style:{fontSize:12,color:"#94A3B8"},children:(d==null?void 0:d.email)||(t==null?void 0:t.email)})]})]}),(d==null?void 0:d.salary_expectation)&&r.jsxs("div",{style:{fontSize:13,color:"#475569",marginBottom:8},children:[r.jsx("span",{style:{color:"#94A3B8"},children:"Expectativa salarial: "}),r.jsxs("strong",{children:["R$ ",Number(d.salary_expectation).toLocaleString("pt-BR")]})]}),(d==null?void 0:d.current_company)&&r.jsxs("div",{style:{fontSize:13,color:"#475569",marginBottom:8},children:[r.jsx("span",{style:{color:"#94A3B8"},children:"Empresa atual: "}),r.jsx("strong",{children:d.current_company})]}),(d==null?void 0:d.location)&&r.jsxs("div",{style:{fontSize:13,color:"#475569",marginBottom:8},children:[r.jsx("span",{style:{color:"#94A3B8"},children:"Localização: "}),r.jsx("strong",{children:d.location})]}),r.jsx(ut,{to:"/meu-perfil",style:{textDecoration:"none",display:"inline-block",marginTop:8,fontSize:13,color:Nn,fontWeight:600},children:"Editar meu perfil →"})]}),r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:14,padding:"20px 22px",marginBottom:20},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12,marginBottom:4},children:[r.jsxs("div",{style:{minWidth:0},children:[r.jsx("p",{style:{fontSize:15,fontWeight:600,color:Kn,margin:0,marginBottom:4},children:"Anexar arquivos"}),r.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0,lineHeight:1.5},children:"Selecione quais arquivos da sua biblioteca anexar a esta candidatura."})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:6,flexShrink:0},children:[r.jsx("input",{ref:W,type:"file",accept:".pdf,.docx,.doc,.png,.jpg,.jpeg",style:{display:"none"},onChange:ke=>{var Be;const Ze=(Be=ke.target.files)==null?void 0:Be[0];Ze&&Et(Ze),ke.target.value=""}}),r.jsx("button",{type:"button",onClick:()=>{var ke;return(ke=W.current)==null?void 0:ke.click()},disabled:H,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 12px",borderRadius:8,background:H?"#EDE9FE":"#fff",color:Nn,border:`1px solid ${Nn}`,fontSize:12,fontWeight:600,cursor:H?"not-allowed":"pointer",whiteSpace:"nowrap"},children:H?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:13,style:{animation:"spin 0.8s linear infinite"},"aria-hidden":"true"})," Enviando..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Ln,{size:13,"aria-hidden":"true"})," Adicionar arquivo"]})}),r.jsxs("span",{style:{fontSize:11,color:"#94A3B8",fontWeight:500,whiteSpace:"nowrap"},children:[(C.reduce((ke,Ze)=>ke+(Ze.file_size_bytes||0),0)/(1024*1024)).toFixed(1)," de 30 MB"]}),C.length>0&&r.jsx("span",{style:{fontSize:11,color:"#94A3B8",fontWeight:500,whiteSpace:"nowrap"},children:U.length===1?"1 arquivo selecionado":`${U.length} arquivos selecionados`})]})]}),X&&r.jsx("div",{style:{marginTop:12,background:"#FEF2F2",border:"1px solid #FECACA",borderRadius:8,padding:"8px 12px"},children:r.jsx("p",{style:{fontSize:12,color:"#DC2626",margin:0},children:X})}),P?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"12px 0",fontSize:13,color:"#94A3B8"},children:[r.jsx(rt,{size:14,style:{animation:"spin 0.8s linear infinite"},"aria-hidden":"true"}),"Carregando arquivos..."]}):T?r.jsx("p",{style:{fontSize:13,color:"#94A3B8",margin:"16px 0 0"},children:"Não foi possível carregar seus arquivos."}):C.length===0?r.jsx("p",{style:{fontSize:13,color:"#94A3B8",margin:"16px 0 0",lineHeight:1.6},children:'Você ainda não tem arquivos. Use o botão "+ Adicionar arquivo" acima para enviar seu primeiro documento (PDF, DOCX, PNG ou JPG).'}):r.jsx("div",{style:{marginTop:16,maxHeight:320,overflowY:"auto",border:"1px solid #F1F5F9",borderRadius:10},children:C.map((ke,Ze)=>{const Be=Ue(ke),xt=U.includes(ke.id),yt=Ze===C.length-1;return r.jsxs("label",{htmlFor:`att-${ke.id}`,style:{display:"grid",gridTemplateColumns:"20px 20px 1fr 80px",gap:12,alignItems:"center",padding:"10px 14px",borderBottom:yt?"none":"0.5px solid #F1F5F9",cursor:"pointer",background:xt?"#FAFAFF":"transparent",transition:"background 120ms ease"},children:[r.jsx("input",{id:`att-${ke.id}`,type:"checkbox",checked:xt,onChange:()=>hs(ke.id),style:{width:16,height:16,accentColor:Nn,cursor:"pointer",margin:0}}),r.jsx(Be,{size:18,"aria-hidden":"true",style:{color:xt?Nn:"#94A3B8"}}),r.jsxs("div",{style:{minWidth:0},children:[r.jsx("p",{style:{fontSize:13,fontWeight:500,color:Kn,margin:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:ke.file_name}),r.jsx("p",{style:{fontSize:11,color:"#94A3B8",margin:0,marginTop:2},children:mi(ke.file_size_bytes)})]}),r.jsx("span",{style:{fontSize:11,color:"#94A3B8",textAlign:"right"},children:Ur(ke.uploaded_at)})]},ke.id)})})]}),F&&r.jsx("div",{style:{background:"#FEF2F2",border:"1px solid #FECACA",borderRadius:10,padding:"12px 16px",marginBottom:16},children:r.jsx("p",{style:{fontSize:13,color:"#DC2626"},children:F})}),r.jsx("button",{onClick:dr,disabled:y,style:{width:"100%",padding:"13px",borderRadius:10,background:y?"#A5B4FC":Nn,color:"#fff",fontWeight:700,fontSize:15,border:"none",cursor:y?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:8},children:y?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:16,style:{animation:"spin 0.8s linear infinite"}})," Enviando..."]}):"Confirmar candidatura →"})]}),n&&j&&r.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[r.jsx("div",{style:{width:64,height:64,borderRadius:"50%",background:"#EEF2FF",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px"},children:r.jsx(fn,{size:28,color:Nn})}),r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Kn,marginBottom:12,letterSpacing:"-0.3px"},children:"Candidatura enviada!"}),r.jsxs("p",{style:{fontSize:15,color:"#475569",lineHeight:1.7,marginBottom:16},children:["Sua candidatura para ",r.jsx("strong",{children:s==null?void 0:s.title})," em ",r.jsx("strong",{children:(s==null?void 0:s.company_name)||"Empresa Confidencial"})," foi enviada com sucesso."]}),(S==null?void 0:S.campaigns_dispatched)>0&&r.jsx("p",{style:{fontSize:14,color:"#64748B",lineHeight:1.7,marginBottom:8},children:"Em breve você receberá um email com os testes a responder."}),(S==null?void 0:S.campaigns_reused)>0&&r.jsx("p",{style:{fontSize:13,color:"#94A3B8",lineHeight:1.7,marginBottom:24},children:"Suas avaliações anteriores para esta empresa serão aproveitadas."}),r.jsxs("div",{style:{display:"flex",gap:10,justifyContent:"center",marginTop:24},children:[r.jsx(ut,{to:"/meu-perfil",style:{textDecoration:"none"},children:r.jsx("button",{style:{padding:"11px 22px",borderRadius:10,background:Nn,color:"#fff",fontWeight:700,fontSize:14,border:"none",cursor:"pointer"},children:"Ver minhas candidaturas"})}),r.jsx(ut,{to:"/job-board",style:{textDecoration:"none"},children:r.jsx("button",{style:{padding:"11px 22px",borderRadius:10,background:"transparent",color:"#64748B",fontWeight:500,fontSize:14,border:"1px solid #E2E8F0",cursor:"pointer"},children:"Explorar mais vagas"})})]})]}),!n&&r.jsxs(r.Fragment,{children:[O===1&&r.jsxs("div",{children:[r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Kn,marginBottom:8,letterSpacing:"-0.3px"},children:"Vamos começar"}),r.jsx("p",{style:{fontSize:14,color:"#64748B",marginBottom:32,lineHeight:1.6},children:"Cole o link do seu LinkedIn (opcional). Em seguida, envie seu CV."}),r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Kn,display:"block",marginBottom:6},children:"URL do seu LinkedIn"}),r.jsx("input",{value:M,onChange:ke=>z(ke.target.value),placeholder:"linkedin.com/in/seu-perfil",style:{width:"100%",padding:"11px 14px",border:"1px solid #E2E8F0",borderRadius:10,fontSize:14,color:Kn,outline:"none",marginBottom:16,background:"#fff"},onFocus:ke=>ke.target.style.borderColor=Nn,onBlur:ke=>ke.target.style.borderColor="#E2E8F0",onKeyDown:ke=>ke.key==="Enter"&&sn()}),r.jsx("button",{onClick:sn,style:{width:"100%",padding:"12px",borderRadius:10,background:Nn,color:"#fff",fontWeight:700,fontSize:14,border:"none",cursor:"pointer",marginBottom:12},children:"Continuar →"}),r.jsx("button",{onClick:()=>G(3),style:{width:"100%",padding:"12px",borderRadius:10,background:"transparent",color:"#64748B",fontWeight:500,fontSize:13,border:"1px solid #E2E8F0",cursor:"pointer"},children:"Não tenho LinkedIn — continuar com CV"})]}),O===3&&r.jsxs("div",{children:[r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Kn,marginBottom:8,letterSpacing:"-0.3px"},children:"Faça upload do seu CV"}),r.jsx("p",{style:{fontSize:14,color:"#64748B",marginBottom:32,lineHeight:1.6},children:"É a sua chance de mostrar quem você é. Candidatos com CV têm 3x mais chances de ser chamados para entrevistas."}),re?r.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[r.jsx("div",{style:{width:44,height:44,border:"3px solid #E2E8F0",borderTopColor:Nn,borderRadius:"50%",animation:"spin 0.8s linear infinite",margin:"0 auto 20px"}}),r.jsx("p",{style:{fontSize:14,color:Kn,fontWeight:500,marginBottom:6},children:UA[Z]}),r.jsx("p",{style:{fontSize:12,color:"#94A3B8"},children:"Isso pode levar até 30 segundos"})]}):ie?r.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[r.jsx("div",{style:{width:44,height:44,border:"3px solid #E2E8F0",borderTopColor:Nn,borderRadius:"50%",animation:"spin 0.8s linear infinite",margin:"0 auto 20px"}}),r.jsx("p",{style:{fontSize:14,color:"#64748B"},children:"Enviando arquivo..."})]}):r.jsxs(r.Fragment,{children:[r.jsxs("label",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,padding:"40px 24px",border:"2px dashed #C4B5FD",borderRadius:16,background:"#FAFAFF",cursor:"pointer",marginBottom:12},children:[r.jsx(Ha,{size:28,color:Nn}),r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("p",{style:{fontSize:14,fontWeight:600,color:Kn,marginBottom:4},children:J?J.name:"Arraste seu CV aqui ou clique para selecionar"}),r.jsx("p",{style:{fontSize:12,color:"#94A3B8"},children:"PDF ou DOCX"})]}),r.jsx("input",{type:"file",accept:".pdf,.docx",style:{display:"none"},onChange:ke=>ke.target.files[0]&&Vt(ke.target.files[0])})]}),ft&&r.jsxs("div",{style:{background:"#FEF2F2",border:"1px solid #FECACA",borderRadius:10,padding:"12px 16px",marginBottom:12},children:[r.jsx("p",{style:{fontSize:13,color:"#DC2626"},children:ft}),r.jsx("button",{onClick:()=>{Qe(null)},style:{fontSize:12,color:"#DC2626",background:"none",border:"none",cursor:"pointer",marginTop:4,textDecoration:"underline"},children:"Tentar novamente"})]})]})]}),O===4&&r.jsx("div",{children:Xe?r.jsxs("div",{style:{textAlign:"center",padding:"20px 0"},children:[r.jsx("div",{style:{width:64,height:64,borderRadius:"50%",background:Nn,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:700,fontSize:24,margin:"0 auto 16px"},children:(Xe.full_name||"?")[0]}),r.jsxs("h2",{style:{fontSize:20,fontWeight:700,color:Kn,marginBottom:8},children:["Oi, ",(Ht=Xe.full_name)==null?void 0:Ht.split(" ")[0],"! Bem-vindo de volta."]}),r.jsxs("p",{style:{fontSize:14,color:"#64748B",marginBottom:24,lineHeight:1.6},children:["Você já tem uma conta na Summit.",r.jsx("br",{}),"Faça login para aplicar para esta vaga."]}),r.jsx("button",{onClick:()=>ne.auth.redirectToLogin(`/aplicar/${e}`),style:{padding:"12px 32px",borderRadius:10,background:Nn,color:"#fff",fontWeight:700,fontSize:14,border:"none",cursor:"pointer"},children:"Entrar →"}),r.jsx("div",{style:{marginTop:16},children:r.jsx("button",{onClick:()=>He(null),style:{fontSize:13,color:"#94A3B8",background:"none",border:"none",cursor:"pointer"},children:"Não sou eu — usar outro e-mail"})})]}):r.jsxs("div",{children:[r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Kn,marginBottom:8,letterSpacing:"-0.3px"},children:"Seus dados estão corretos?"}),r.jsx("p",{style:{fontSize:14,color:"#64748B",marginBottom:28,lineHeight:1.6},children:"Revise as informações extraídas do seu CV. Você pode editar qualquer campo."}),ze.full_name&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,background:"#F6F9FC",border:"1px solid #E3E8EF",borderRadius:12,padding:"14px 16px",marginBottom:24},children:[r.jsx("div",{style:{width:52,height:52,borderRadius:"50%",background:Nn,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:700,fontSize:20,flexShrink:0},children:(ze.full_name||"?")[0]}),r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:14,fontWeight:700,color:Kn,marginBottom:2},children:ze.full_name||"Candidato"}),ze.headline&&r.jsx("p",{style:{fontSize:12,color:"#64748B"},children:ze.headline})]})]}),r.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:12},children:"Sobre você"}),[{label:"Nome completo",key:"full_name",type:"text",placeholder:"Seu nome"},{label:"E-mail",key:"email",type:"email",placeholder:"[email protected]"},{label:"Telefone",key:"phone",type:"tel",placeholder:"(11) 99999-9999"}].map(({label:ke,key:Ze,type:Be,placeholder:xt})=>r.jsxs("div",{style:{marginBottom:14},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Kn,display:"block",marginBottom:5},children:ke}),r.jsx("input",{type:Be,value:ze[Ze],onChange:yt=>at(dt=>({...dt,[Ze]:yt.target.value})),onBlur:Ze==="email"?yt=>Un(yt.target.value):void 0,placeholder:xt,style:{width:"100%",padding:"10px 14px",border:`1px solid ${Ze==="email"&&be?"#DC2626":"#E2E8F0"}`,borderRadius:10,fontSize:14,color:Kn,outline:"none",background:"#fff"},onFocus:yt=>yt.target.style.borderColor=Nn}),Ze==="email"&&be&&r.jsx("p",{style:{fontSize:12,color:"#DC2626",marginTop:4},children:be})]},Ze)),r.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:12,marginTop:24},children:"Expectativas"}),r.jsxs("div",{style:{marginBottom:14},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Kn,display:"block",marginBottom:5},children:"Expectativa salarial (R$) *"}),r.jsx("input",{type:"number",value:ze.salary_expectation,onChange:ke=>at(Ze=>({...Ze,salary_expectation:ke.target.value})),placeholder:"Ex: 8000",style:{width:"100%",padding:"10px 14px",border:"1px solid #E2E8F0",borderRadius:10,fontSize:14,color:Kn,outline:"none",background:"#fff"},onFocus:ke=>ke.target.style.borderColor=Nn,onBlur:ke=>ke.target.style.borderColor="#E2E8F0"})]}),r.jsxs("div",{style:{marginBottom:14},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Kn,display:"block",marginBottom:8},children:"Regime desejado"}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:Object.entries(eie).map(([ke,Ze])=>{const Be=ze.contract_type_desired.includes(ke);return r.jsx("button",{onClick:()=>at(xt=>({...xt,contract_type_desired:nr(xt.contract_type_desired,ke)})),style:{padding:"5px 12px",borderRadius:9999,border:`1px solid ${Be?Nn:"#E2E8F0"}
736`,background:Be?"#EDE9FE":"#fff",color:Be?"#5B21B6":"#475569",fontSize:12,cursor:"pointer",fontWeight:Be?600:400},children:Ze},ke)})})]}),r.jsxs("div",{style:{marginBottom:14},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Kn,display:"block",marginBottom:8},children:"Formato desejado"}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:Object.entries(tie).map(([ke,Ze])=>{const Be=ze.work_format_desired.includes(ke);return r.jsx("button",{onClick:()=>at(xt=>({...xt,work_format_desired:nr(xt.work_format_desired,ke)})),style:{padding:"5px 12px",borderRadius:9999,border:`1px solid ${Be?Nn:"#E2E8F0"}`,background:Be?"#EDE9FE":"#fff",color:Be?"#5B21B6":"#475569",fontSize:12,cursor:"pointer",fontWeight:Be?600:400},children:Ze},ke)})})]}),ze.summary_executive&&r.jsxs("div",{style:{marginBottom:14},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Kn,display:"block",marginBottom:5},children:"Resumo profissional"}),r.jsx("textarea",{value:ze.summary_executive,onChange:ke=>at(Ze=>({...Ze,summary_executive:ke.target.value})),rows:3,style:{width:"100%",padding:"10px 14px",border:"1px solid #E2E8F0",borderRadius:10,fontSize:13,color:Kn,outline:"none",background:"#fff",resize:"vertical",lineHeight:1.6},onFocus:ke=>ke.target.style.borderColor=Nn,onBlur:ke=>ke.target.style.borderColor="#E2E8F0"})]}),r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Kn,display:"block",marginBottom:8},children:"Skills"}),r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:[ze.skills.map((ke,Ze)=>r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:11,padding:"3px 8px 3px 10px",borderRadius:9999,background:"#EDE9FE",color:"#5B21B6",border:"1px solid #C4B5FD"},children:[ke,r.jsx("button",{onClick:()=>at(Be=>({...Be,skills:Be.skills.filter((xt,yt)=>yt!==Ze)})),style:{background:"none",border:"none",cursor:"pointer",color:"#7C3AED",fontSize:14,lineHeight:1,padding:0,display:"flex",alignItems:"center"},children:"×"})]},Ze)),r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[r.jsx("input",{value:Nt,onChange:ke=>_e(ke.target.value),onKeyDown:ke=>{if(ke.key==="Enter"&&Nt.trim()){ke.preventDefault();const Ze=Nt.trim().toLowerCase();ze.skills.includes(Ze)||at(Be=>({...Be,skills:[...Be.skills,Ze]})),_e("")}},placeholder:"+ adicionar skill",style:{fontSize:12,padding:"3px 10px",borderRadius:9999,border:"1px dashed #C4B5FD",background:"#FAFAFF",color:"#5B21B6",outline:"none",width:140}}),Nt.trim()&&r.jsx("button",{onClick:()=>{const ke=Nt.trim().toLowerCase();ze.skills.includes(ke)||at(Ze=>({...Ze,skills:[...Ze.skills,ke]})),_e("")},style:{fontSize:11,padding:"3px 8px",borderRadius:9999,background:Nn,color:"#fff",border:"none",cursor:"pointer"},children:"+"})]})]}),r.jsx("p",{style:{fontSize:11,color:"#94A3B8"},children:"Pressione Enter ou clique + para adicionar. Clique × para remover."})]}),Se&&r.jsx("div",{style:{background:"#FEF2F2",border:"1px solid #FECACA",borderRadius:10,padding:"12px 16px",marginBottom:16},children:r.jsx("p",{style:{fontSize:13,color:"#DC2626"},children:Se})}),r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,marginBottom:16,marginTop:4},children:[r.jsx("input",{type:"checkbox",id:"terms",checked:bt,onChange:ke=>Ot(ke.target.checked),style:{marginTop:3,width:16,height:16,accentColor:Nn,flexShrink:0,cursor:"pointer"}}),r.jsxs("label",{htmlFor:"terms",style:{fontSize:12,color:"#475569",lineHeight:1.6,cursor:"pointer"},children:["Autorizo a Summit a compartilhar meu perfil e dados, conforme os"," ",r.jsx("a",{href:"https://preview-sandbox--69dc1b168deed8792f4850e5.base44.app/legal",target:"_blank",rel:"noopener noreferrer",style:{color:Nn,textDecoration:"underline"},children:"termos de uso"}),"."]})]}),r.jsx("button",{onClick:mt,disabled:St||!!be||!bt,style:{width:"100%",padding:"13px",borderRadius:10,background:St||!bt?"#A5B4FC":Nn,color:"#fff",fontWeight:700,fontSize:15,border:"none",cursor:St||!bt?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:8,transition:"background 0.15s"},children:St?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:16,style:{animation:"spin 0.8s linear infinite"}})," Enviando..."]}):"Enviar candidatura →"})]})}),O===5&&r.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[r.jsx("div",{style:{width:64,height:64,borderRadius:"50%",background:"#EEF2FF",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px"},children:r.jsx(fn,{size:28,color:Nn})}),r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Kn,marginBottom:8,letterSpacing:"-0.3px"},children:"Quase lá!"}),r.jsxs("p",{style:{fontSize:15,color:"#475569",lineHeight:1.7,marginBottom:8},children:["Enviamos um e-mail para ",r.jsx("strong",{children:ze.email}),"."]}),r.jsx("p",{style:{fontSize:14,color:"#64748B",lineHeight:1.7,marginBottom:28},children:"Clique no link para confirmar seu e-mail e criar sua senha. Sua candidatura chegará ao recrutador assim que você confirmar."}),r.jsx("div",{style:{background:"#F8FAFC",border:"1px solid #E2E8F0",borderRadius:12,padding:"16px 20px",marginBottom:24,textAlign:"left"},children:r.jsx("p",{style:{fontSize:13,color:"#64748B",lineHeight:1.6,margin:0},children:"📧 Não recebeu o e-mail? Verifique sua caixa de spam ou pasta de promoções."})}),r.jsx(ut,{to:"/job-board",style:{textDecoration:"none"},children:r.jsx("button",{style:{padding:"10px 24px",borderRadius:10,background:"transparent",color:"#64748B",fontWeight:500,fontSize:13,border:"1px solid #E2E8F0",cursor:"pointer"},children:"Ver mais vagas"})})]})]})]})]})}const rie="https://i.imgur.com/MVgsUJ5.png",Yo="#6C24F5",Yi="#0A2540";function sie(){var L;const[e]=Um(),t=e.get("token"),[n,s]=g.useState("validating"),[i,a]=g.useState(null),[o,l]=g.useState("invalid"),[c,d]=g.useState(""),[u,p]=g.useState(""),[m,x]=g.useState(!1),[w,y]=g.useState(!1),[v,j]=g.useState(""),[k,S]=g.useState("");In();const[_,F]=g.useState(null);g.useEffect(()=>{if(!t){s("error");return}A()},[t]);async function A(){try{const{data:T}=await ne.functions.invoke("validateToken",{token:t});if(!(T!=null&&T.valid)){l((T==null?void 0:T.reason)||"invalid"),s("error");return}a({email:T.email,full_name:T.full_name,id:T.profile_id}),s("create_password")}catch{l("error"),s("error")}}async function C(){if(!c||c.length<8){j("A senha deve ter pelo menos 8 caracteres.");return}if(c!==u){j("As senhas não são iguais.");return}y(!0),j("");let T=!1,R=null;try{const U=await ne.auth.register({email:i.email,password:c,full_name:i.full_name});R=(U==null?void 0:U.id)||null,F(R)}catch(U){const I=((U==null?void 0:U.message)||String(U)).toLowerCase();if(I.includes("already")||I.includes("exists"))T=!0,console.log("user already exists - proceeding to confirm candidacy");else{console.error("create account error:",U),j("Não foi possível criar sua conta. Tente novamente."),y(!1);return}}if(T){try{const U=await ne.functions.invoke("confirmCandidate",{verification_token:t,email:i.email}),I=(U==null?void 0:U.data)||U;I!=null&&I.success?s("success_existing_user"):j((I==null?void 0:I.message)||"Algo deu errado. Tente novamente.")}catch(U){console.error("confirmCandidate error:",U),j("Algo deu errado ao confirmar sua candidatura. Tente novamente.")}finally{y(!1)}return}y(!1),s("verify_code")}async function D(){var T,R,U,I;if(!k||k.trim().length===0){j("Digite o código de verificação.");return}y(!0),j("");try{if(await ne.auth.verifyOtp({email:i.email,otpCode:k.trim()}),_){const X="Não foi possível concluir seu cadastro de candidato. Fale com o suporte.";let N=null;try{N=await ne.functions.invoke("promoteToCandidate",{userId:_})}catch(W){j(((R=(T=W==null?void 0:W.response)==null?void 0:T.data)==null?void 0:R.message)||X),y(!1);return}if(((U=N==null?void 0:N.data)==null?void 0:U.success)!==!0){j(((I=N==null?void 0:N.data)==null?void 0:I.message)||X),y(!1);return}}const H=await ne.functions.invoke("confirmCandidate",{verification_token:t,email:i.email}),V=(H==null?void 0:H.data)||H;V!=null&&V.success?s("success"):j((V==null?void 0:V.message)||"Algo deu errado. Tente novamente.")}catch(H){const V=((H==null?void 0:H.message)||String(H)).toLowerCase();V.includes("expired")?j("Código expirado. Clique em Reenviar código para receber um novo."):V.includes("invalid")||V.includes("incorrect")?j("Código inválido. Verifique e tente novamente."):j("Não foi possível verificar o código. Tente novamente.")}finally{y(!1)}}async function P(){j("");try{await ne.auth.resendOtp(i.email),j("Novo código enviado para "+(i==null?void 0:i.email)+". Verifique sua caixa de entrada.")}catch(T){console.error("resend code error:",T),j("Não foi possível reenviar o código. Tente novamente.")}}return r.jsxs("div",{style:{minHeight:"100vh",background:"#F6F9FC",fontFamily:"'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",display:"flex",flexDirection:"column"},children:[r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"}),r.jsx("header",{style:{background:"#fff",borderBottom:"1px solid #E3E8EF",padding:"0 32px",height:60,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx("img",{src:rie,alt:"Summit",style:{height:28}})}),r.jsxs("div",{style:{maxWidth:480,margin:"0 auto",padding:"60px 24px",flex:1},children:[n==="validating"&&r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("div",{style:{width:40,height:40,border:"3px solid #E2E8F0",borderTopColor:Yo,borderRadius:"50%",animation:"spin 0.8s linear infinite",margin:"0 auto 16px"}}),r.jsx("p",{style:{color:"#64748B",fontSize:14},children:"Validando seu link..."})]}),n==="create_password"&&r.jsxs("div",{children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:32},children:[r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Yi,marginBottom:8,letterSpacing:"-0.3px"},children:"Crie sua senha"}),r.jsxs("p",{style:{fontSize:14,color:"#64748B",lineHeight:1.6},children:["Olá, ",r.jsx("strong",{children:(L=i==null?void 0:i.full_name)==null?void 0:L.split(" ")[0]}),"! Para finalizar sua candidatura, crie uma senha para acessar seu perfil."]})]}),r.jsxs("div",{style:{background:"#fff",border:"1px solid #E3E8EF",borderRadius:12,padding:"20px",marginBottom:20},children:[r.jsx("p",{style:{fontSize:12,color:"#94A3B8",marginBottom:4},children:"E-mail"}),r.jsx("p",{style:{fontSize:14,fontWeight:600,color:Yi},children:i==null?void 0:i.email})]}),r.jsxs("div",{style:{marginBottom:14,position:"relative"},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Yi,display:"block",marginBottom:5},children:"Senha"}),r.jsx("input",{type:m?"text":"password",value:c,onChange:T=>d(T.target.value),placeholder:"Mínimo 8 caracteres",style:{width:"100%",padding:"11px 40px 11px 14px",border:"1px solid #E2E8F0",borderRadius:10,fontSize:14,color:Yi,outline:"none",background:"#fff"},onFocus:T=>T.target.style.borderColor=Yo,onBlur:T=>T.target.style.borderColor="#E2E8F0"}),r.jsx("button",{onClick:()=>x(T=>!T),style:{position:"absolute",right:12,top:32,background:"none",border:"none",cursor:"pointer",color:"#94A3B8"},children:m?r.jsx(l8,{size:16}):r.jsx(cS,{size:16})})]}),r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Yi,display:"block",marginBottom:5},children:"Confirmar senha"}),r.jsx("input",{type:"password",value:u,onChange:T=>p(T.target.value),placeholder:"Repita a senha",style:{width:"100%",padding:"11px 14px",border:"1px solid #E2E8F0",borderRadius:10,fontSize:14,color:Yi,outline:"none",background:"#fff"},onFocus:T=>T.target.style.borderColor=Yo,onBlur:T=>T.target.style.borderColor="#E2E8F0"}),u&&c!==u&&r.jsx("p",{style:{fontSize:12,color:"#DC2626",marginTop:4},children:"As senhas não são iguais"})]}),v&&r.jsx("div",{style:{background:"#FEF2F2",border:"1px solid #FECACA",borderRadius:10,padding:"12px 16px",marginBottom:16},children:r.jsx("p",{style:{fontSize:13,color:"#DC2626"},children:v})}),r.jsx("button",{onClick:C,disabled:w,style:{width:"100%",padding:"13px",borderRadius:10,background:w?"#A5B4FC":Yo,color:"#fff",fontWeight:700,fontSize:15,border:"none",cursor:w?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:8},children:w?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:16,style:{animation:"spin 0.8s linear infinite"}})," Criando conta..."]}):"Finalizar candidatura →"})]}),n==="verify_code"&&r.jsxs("div",{children:[r.jsxs("div",{style:{textAlign:"center",marginBottom:32},children:[r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Yi,marginBottom:8,letterSpacing:"-0.3px"},children:"Verifique seu e-mail"}),r.jsxs("p",{style:{fontSize:14,color:"#64748B",lineHeight:1.6},children:["Enviamos um código de 6 dígitos para ",r.jsx("strong",{children:i==null?void 0:i.email}),". Digite-o abaixo para ativar sua conta."]})]}),r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:Yi,display:"block",marginBottom:5},children:"Código de verificação"}),r.jsx("input",{type:"text",value:k,onChange:T=>S(T.target.value.replace(/\D/g,"").substring(0,6)),placeholder:"000000",maxLength:6,style:{width:"100%",padding:"11px 14px",border:"1px solid #E2E8F0",borderRadius:10,fontSize:24,fontWeight:700,color:Yi,outline:"none",background:"#fff",textAlign:"center",letterSpacing:"0.3em"},onFocus:T=>T.target.style.borderColor=Yo,onBlur:T=>T.target.style.borderColor="#E2E8F0",onKeyDown:T=>T.key==="Enter"&&D()})]}),v&&r.jsx("div",{style:{background:"#FEF2F2",border:"1px solid #FECACA",borderRadius:10,padding:"12px 16px",marginBottom:16},children:r.jsx("p",{style:{fontSize:13,color:"#DC2626"},children:v})}),r.jsx("button",{onClick:D,disabled:w||k.length<6,style:{width:"100%",padding:"13px",borderRadius:10,background:w||k.length<6?"#A5B4FC":Yo,color:"#fff",fontWeight:700,fontSize:15,border:"none",cursor:w||k.length<6?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:8},children:w?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:16,style:{animation:"spin 0.8s linear infinite"}})," Verificando..."]}):"Confirmar →"}),r.jsx("button",{onClick:P,style:{width:"100%",marginTop:12,padding:"10px",borderRadius:10,background:"transparent",color:"#64748B",fontWeight:500,fontSize:13,border:"1px solid #E2E8F0",cursor:"pointer"},children:"Não recebi o código — Reenviar"})]}),n==="success"&&r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("div",{style:{width:64,height:64,borderRadius:"50%",background:"#ECFDF5",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px"},children:r.jsx(fn,{size:28,color:"#059669"})}),r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Yi,marginBottom:8},children:"Candidatura confirmada!"}),r.jsx("p",{style:{fontSize:14,color:"#64748B",lineHeight:1.7,marginBottom:28},children:"Sua candidatura foi enviada ao recrutador. Faça login para acessar seu perfil."}),r.jsx("button",{onClick:()=>ne.auth.redirectToLogin("/meu-perfil"),style:{padding:"12px 32px",borderRadius:10,background:Yo,color:"#fff",fontWeight:700,fontSize:14,border:"none",cursor:"pointer",margin:"0 auto",display:"block"},children:"Acessar meu perfil →"})]}),n==="success_existing_user"&&r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("div",{style:{width:64,height:64,borderRadius:"50%",background:"#ECFDF5",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px"},children:r.jsx(fn,{size:28,color:"#059669"})}),r.jsx("h1",{style:{fontSize:24,fontWeight:800,color:Yi,marginBottom:8},children:"Candidatura confirmada!"}),r.jsx("p",{style:{fontSize:14,color:"#64748B",lineHeight:1.7,marginBottom:28},children:"Sua candidatura foi enviada ao recrutador. Você já tem uma conta na Summit — faça login para acessar seu perfil."}),r.jsx("button",{onClick:()=>ne.auth.redirectToLogin("/app"),style:{padding:"12px 32px",borderRadius:10,background:Yo,color:"#fff",fontWeight:700,fontSize:14,border:"none",cursor:"pointer"},children:"Fazer login →"})]}),n==="error"&&r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("h1",{style:{fontSize:22,fontWeight:800,color:Yi,marginBottom:8},children:"Link inválido ou expirado"}),r.jsx("p",{style:{fontSize:14,color:"#64748B",lineHeight:1.7,marginBottom:24},children:"Este link de validação não é mais vá
736lido. Tente se candidatar novamente."}),r.jsx(ut,{to:"/job-board",children:r.jsx("button",{style:{padding:"10px 24px",borderRadius:10,background:Yo,color:"#fff",fontWeight:600,fontSize:14,border:"none",cursor:"pointer"},children:"Ver vagas →"})})]})]})]})}const iie=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],aie=["dom","seg","ter","qua","qui","sex","sáb"];function oie(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function lie(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function cie(e,t){const n=new Date(e,t,1),s=new Date(n);s.setDate(n.getDate()-n.getDay());const i=[];for(let a=0;a<42;a++){const o=new Date(s);o.setDate(s.getDate()+a),i.push(o)}return i}function NP({refMonth:e,onPrevMonth:t,onNextMonth:n,availableDays:s,selectedDate:i,onSelectDate:a,brandColor:o,maxDate:l}){const c=g.useMemo(()=>oie(new Date),[]),d=g.useMemo(()=>new Date(c.getFullYear(),c.getMonth(),1),[c]),u=e.getFullYear(),p=e.getMonth(),m=g.useMemo(()=>cie(u,p),[u,p]),x=e.getTime()>d.getTime(),w=new Date(u,p+1,1),y=!l||w.getTime()<=l.getTime(),v=F=>{const A=C=>String(C).padStart(2,"0");return`${F.getFullYear()}-${A(F.getMonth()+1)}-${A(F.getDate())}`},j=360,k=16,S=15,_=12;return r.jsxs("div",{className:"transition-all duration-300 ease-out",style:{width:j,maxWidth:"100%"},children:[r.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[r.jsx("button",{type:"button",onClick:t,disabled:!x,className:"p-2 rounded-md hover:bg-gray-100 text-gray-700 disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Mês anterior",children:r.jsx(Sc,{size:16})}),r.jsxs("div",{className:"font-semibold text-gray-900 text-center flex-1",style:{fontSize:k},children:[iie[p]," ",u]}),r.jsx("button",{type:"button",onClick:n,disabled:!y,className:"p-2 rounded-md hover:bg-gray-100 text-gray-700 disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Próximo mês",children:r.jsx(Qr,{size:16})})]}),r.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:aie.map(F=>r.jsx("div",{className:"text-center text-gray-400 font-medium uppercase",style:{fontSize:_,paddingTop:4,paddingBottom:4},children:F},F))}),r.jsx("div",{className:"grid grid-cols-7 gap-1",children:m.map((F,A)=>{const C=F.getMonth()===p,D=F.getTime()<c.getTime(),P=l?F.getTime()>l.getTime():!1,L=lie(F,c),T=s.includes(F.getDay()),R=C&&!D&&!P&&T,U=i===v(F);let I="aspect-square flex items-center justify-center rounded-full transition relative";C?R?U?I+=" text-white font-semibold cursor-pointer":I+=" text-gray-800 hover:bg-gray-100 cursor-pointer font-medium":I+=" text-gray-300 cursor-not-allowed":I+=" text-gray-300 cursor-default";const H={fontSize:S,...U?{background:o}:{}};return r.jsxs("button",{type:"button",disabled:!R,onClick:()=>R&&a(v(F)),className:I,style:H,children:[F.getDate(),L&&!U&&r.jsx("span",{className:"absolute bottom-1 w-1 h-1 rounded-full",style:{background:o}})]},A)})})]})}const die="#E3E8EE";function uie(e){return typeof e=="string"?e:(e==null?void 0:e.start)||""}function RP({dateHeader:e,loading:t,error:n,slots:s,selectedSlot:i,onSelectSlot:a,brandColor:o}){return r.jsxs("div",{className:"flex flex-col",style:{width:"100%"},children:[e&&r.jsx("div",{className:"font-semibold text-gray-900 mb-3 truncate",style:{fontSize:14},children:e}),r.jsxs("div",{className:"md:overflow-y-auto pr-1 grid grid-cols-3 md:flex md:flex-col gap-1.5 md:max-h-[400px]",children:[t&&r.jsxs("div",{className:"flex items-center justify-center gap-2 text-xs text-gray-400 py-6",children:[r.jsx(rt,{size:12,className:"animate-spin"}),"Buscando..."]}),!t&&n&&r.jsx("div",{className:"text-xs text-red-600 py-2",children:n}),!t&&!n&&(!s||s.length===0)&&r.jsx("div",{className:"text-xs text-gray-400 py-2",children:"Nenhum horário disponível"}),!t&&!n&&s&&s.map((l,c)=>{const d=uie(l);if(!d)return null;const u=i===d,p=u?{background:o,color:"#fff",borderColor:o,minHeight:44,fontSize:15}:{minHeight:44,borderColor:die,fontSize:15};return r.jsx("button",{type:"button",onClick:()=>a(d),className:`w-full font-medium rounded-md border transition ${u?"":"bg-white text-gray-800 hover:bg-gray-50 hover:border-gray-400"}`,style:p,children:d},`${d}-${c}`)})]})]})}const hm="#E3E8EE",cd={phone:{label:"Telefone",type:"tel",placeholder:"(11) 99999-9999"},salary_expectation:{label:"Expectativa salarial",placeholder:"R$ ..."},notes:{label:"Notas / Mensagem",placeholder:"Conte um pouco sobre você ou faça perguntas..."}};function fie(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(e||"").trim())}function a1({children:e,required:t}){return r.jsxs("label",{className:"block font-medium text-gray-700 mb-1.5",style:{fontSize:13},children:[e,t&&r.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]})}function o1({msg:e}){return e?r.jsx("p",{className:"text-xs text-red-600 mt-1",children:e}):null}function Qp({label:e,required:t,value:n,onChange:s,type:i="text",placeholder:a,error:o}){return r.jsxs("div",{children:[r.jsx(a1,{required:t,children:e}),r.jsx("input",{type:i,value:n||"",onChange:l=>s(l.target.value),placeholder:a,className:"w-full rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${o?"#FCA5A5":hm}`,minHeight:44,fontSize:14,padding:"12px 14px"}}),r.jsx(o1,{msg:o})]})}function pie({label:e,required:t,value:n,onChange:s,placeholder:i,error:a}){return r.jsxs("div",{children:[r.jsx(a1,{required:t,children:e}),r.jsx("textarea",{value:n||"",onChange:o=>s(o.target.value),placeholder:i,rows:3,className:"w-full rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${a?"#FCA5A5":hm}`,fontSize:14,padding:"12px 14px",minHeight:80}}),r.jsx(o1,{msg:a})]})}function hie({label:e,required:t,value:n,onChange:s,options:i,error:a}){return r.jsxs("div",{children:[r.jsx(a1,{required:t,children:e}),r.jsxs("select",{value:n||"",onChange:o=>s(o.target.value),className:"w-full rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${a?"#FCA5A5":hm}`,minHeight:44,fontSize:14,padding:"12px 14px"},children:[r.jsx("option",{value:"",children:"Selecione..."}),(i||[]).map(o=>r.jsx("option",{value:o,children:o},o))]}),r.jsx(o1,{msg:a})]})}function mie({required:e,fileUrl:t,fileName:n,onChange:s,error:i}){const[a,o]=g.useState(!1),l=async c=>{var u,p;
736const d=(u=c.target.files)==null?void 0:u[0];if(d){o(!0);try{const m=await ne.integrations.Core.UploadFile({file:d}),x=(m==null?void 0:m.file_url)||((p=m==null?void 0:m.data)==null?void 0:p.file_url);s(x?{url:x,name:d.name}:{url:"",name:"",error:"Falha no upload"})}catch{s({url:"",name:"",error:"Falha no upload"})}o(!1)}};return r.jsxs("div",{children:[r.jsx(a1,{required:e,children:"Upload de CV"}),t?r.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-gray-50",style:{border:`1px solid ${hm}`,minHeight:52,padding:16},children:[r.jsx(ui,{size:16,className:"text-gray-500 flex-shrink-0"}),r.jsx("span",{className:"text-sm text-gray-800 truncate flex-1",children:n}),r.jsx("button",{type:"button",onClick:()=>s({url:"",name:""}),className:"text-gray-400 hover:text-red-600","aria-label":"Remover arquivo",children:r.jsx(Jt,{size:16})})]}):r.jsxs("label",{className:"flex items-center gap-2 rounded-md cursor-pointer hover:bg-gray-50",style:{border:`1px dashed ${i?"#FCA5A5":hm}`,minHeight:52,padding:16},children:[a?r.jsx(rt,{size:16,className:"animate-spin text-gray-500"}):r.jsx(Ha,{size:16,className:"text-gray-500"}),r.jsx("span",{className:"text-sm text-gray-600",children:a?"Enviando...":"Selecionar arquivo (.pdf, .docx)"}),r.jsx("input",{type:"file",accept:".pdf,.docx",className:"hidden",onChange:l,disabled:a})]}),r.jsx(o1,{msg:i})]})}function gie({title:e,formConfig:t,submitting:n,submitError:s,onSubmit:i,brandColor:a}){var y,v,j,k;const o=(t==null?void 0:t.optional)||{},l=(t==null?void 0:t.custom)||[],[c,d]=g.useState({full_name:"",email:"",phone:"",salary_expectation:"",notes:"",cv:{url:"",name:""},custom:{}}),[u,p]=g.useState({}),m=(S,_)=>d(F=>({...F,[S]:_})),x=(S,_)=>d(F=>({...F,custom:{...F.custom,[S]:_}})),w=S=>{var C,D,P,L;S.preventDefault();const _={};c.full_name.trim()||(_.full_name="Campo obrigatório"),c.email.trim()?fie(c.email)||(_.email="Email inválido"):_.email="Campo obrigatório",["phone","salary_expectation","notes"].forEach(T=>{const R=o[T];R!=null&&R.enabled&&(R!=null&&R.required)&&!String(c[T]||"").trim()&&(_[T]="Campo obrigatório")});const F=o.cv;if(F!=null&&F.enabled&&(F!=null&&F.required)&&!c.cv.url&&(_.cv="Anexe seu CV"),l.forEach(T=>{T.required&&!String(c.custom[T.key]||"").trim()&&(_[`custom_${T.key}`]="Campo obrigatório")}),p(_),Object.keys(_).length>0)return;const A={};if((C=o.phone)!=null&&C.enabled&&c.phone&&(A.phone=c.phone.trim()),(D=o.salary_expectation)!=null&&D.enabled&&c.salary_expectation){const T=String(c.salary_expectation).replace(/[^\d,.-]/g,"").replace(",","."),R=Number(T);A.salary_expectation=Number.isFinite(R)&&R>0?R:c.salary_expectation}if(l.length>0){const T={};l.forEach(R=>{const U=c.custom[R.key];U!==void 0&&U!==""&&(T[R.key]=U)}),Object.keys(T).length>0&&(A.custom=T)}i({candidate_name:c.full_name.trim(),candidate_email:c.email.trim(),candidate_notes:(P=o.notes)!=null&&P.enabled?c.notes.trim():"",form_data_json:Object.keys(A).length>0?JSON.stringify(A):"",cv_file_url:(L=o.cv)!=null&&L.enabled?c.cv.url:""})};return r.jsxs("form",{onSubmit:w,className:"space-y-3.5",style:{width:"100%"},children:[e&&r.jsx("div",{className:"mb-2",children:r.jsx("div",{className:"text-gray-900",style:{fontSize:15,fontWeight:500},children:e})}),s&&r.jsx("div",{className:"rounded-md px-3 py-2 text-xs",style:{background:"#FEE2E2",color:"#991B1B",border:"1px solid #FECACA"},children:s}),r.jsx(Qp,{label:"Nome completo",required:!0,value:c.full_name,onChange:S=>m("full_name",S),placeholder:"Seu nome",error:u.full_name}),r.jsx(Qp,{label:"Email",required:!0,type:"email",value:c.email,onChange:S=>m("email",S),placeholder:"[email protected]",error:u.email}),((y=o.phone)==null?void 0:y.enabled)&&r.jsx(Qp,{label:cd.phone.label,required:!!o.phone.required,type:cd.phone.type,value:c.phone,onChange:S=>m("phone",S),placeholder:cd.phone.placeholder,error:u.phone}),((v=o.salary_expectation)==null?void 0:v.enabled)&&r.jsx(Qp,{label:cd.salary_expectation.label,required:!!o.salary_expectation.required,value:c.salary_expectation,onChange:S=>m("salary_expectation",S),placeholder:cd.salary_expectation.placeholder,error:u.salary_expectation}),((j=o.cv)==null?void 0:j.enabled)&&r.jsx(mie,{required:!!o.cv.required,fileUrl:c.cv.url,fileName:c.cv.name,onChange:S=>m("cv",{url:S.url,name:S.name}),error:u.cv}),((k=o.notes)==null?void 0:k.enabled)&&r.jsx(pie,{label:cd.notes.label,required:!!o.notes.required,value:c.notes,onChange:S=>m("notes",S),placeholder:cd.notes.placeholder,error:u.notes}),l.map(S=>{const _=c.custom[S.key],F=u[`custom_${S.key}`];if(S.type==="select")return r.jsx(hie,{label:S.label,required:!!S.required,value:_,onCh
736ange:C=>x(S.key,C),options:S.options||[],error:F},S.key);const A=S.type==="number"?"number":S.type==="date"?"date":"text";return r.jsx(Qp,{label:S.label,required:!!S.required,type:A,value:_,onChange:C=>x(S.key,C),error:F},S.key)}),r.jsxs("button",{type:"submit",disabled:n,className:"w-full text-white rounded-md font-semibold hover:opacity-90 disabled:opacity-50 flex items-center justify-center gap-2 mt-3",style:{background:a,minHeight:48,fontSize:15,padding:"0 20px"},children:[n&&r.jsx(rt,{size:15,className:"animate-spin"}),n?"Agendando...":"Confirmar agendamento"]})]})}const xie=["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],yie=["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"];function vie(e,t){const[n,s]=e.split(":").map(l=>parseInt(l,10)),i=n*60+s+t,a=Math.floor(i/60)%24,o=i%60;return`${String(a).padStart(2,"0")}:${String(o).padStart(2,"0")}`}function bie(e){const[t,n,s]=e.split("-").map(a=>parseInt(a,10)),i=new Date(Date.UTC(t,n-1,s,15,0,0));return`${xie[i.getUTCDay()]}, ${s} de ${yie[n-1]} de ${t}`}function Zp({icon:e,children:t}){return r.jsxs("div",{className:"flex items-center gap-3 py-1.5",children:[r.jsx(e,{size:15,className:"text-gray-500 flex-shrink-0"}),r.jsx("span",{className:"text-sm text-gray-800",children:t})]})}function wie({date:e,startTime:t,duration:n,location:s,recruiterName:i}){const a=vie(t,n);return r.jsxs("div",{className:"text-center max-w-md mx-auto",children:[r.jsx("div",{className:"w-14 h-14 rounded-full mx-auto mb-4 flex items-center justify-center",style:{background:"#DCFCE7"},children:r.jsx(Mi,{size:32,className:"text-green-600"})}),r.jsx("h1",{className:"font-medium text-gray-900 mb-2",style:{fontSize:18},children:"Agendamento confirmado!"}),r.jsx("p",{className:"text-gray-500 mb-6",style:{fontSize:13},children:"Você receberá um email de confirmação"}),r.jsxs("div",{className:"text-left rounded-lg p-4 mx-auto",style:{background:"#F9FAFB",border:"1px solid #E3E8EE"},children:[r.jsx(Zp,{icon:kl,children:bie(e)}),r.jsxs(Zp,{icon:Di,children:[t," – ",a]}),r.jsxs(Zp,{icon:y8,children:[n," minutos"]}),s&&r.jsx(Zp,{icon:ma,children:s}),i&&r.jsx(Zp,{icon:$m,children:i})]}),r.jsx("div",{className:"mt-8 flex justify-center opacity-60",children:r.jsx(Io,{size:"sm",variant:"onLight"})})]})}function jie(){return r.jsxs("div",{className:"min-h-screen bg-white flex flex-col",children:[r.jsx("main",{className:"flex-1 flex items-center justify-center px-4",children:r.jsxs("div",{className:"max-w-md text-center",children:[r.jsx("div",{className:"w-14 h-14 rounded-full mx-auto mb-4 flex items-center justify-center",style:{background:"#F3F4F6"},children:r.jsx(WU,{size:26,className:"text-gray-500"})}),r.jsx("h1",{className:"font-medium text-gray-900 mb-2",style:{fontSize:18},children:"Link de agendamento indisponível"}),r.jsx("p",{className:"text-gray-500",style:{fontSize:13,lineHeight:1.6},children:"Este link não está mais aceitando agendamentos. Entre em contato com quem enviou para receber um novo horário."})]})}),r.jsx("footer",{className:"flex justify-center opacity-60",style:{paddingBottom:24,paddingTop:24,fontSize:13},children:r.jsx(Io,{size:"sm",variant:"onLight"})})]})}const eh="#6C24F5",DP="#E3E8EE",IP=["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],Sie=["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],kie=["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"];function PP(e){const[t,n,s]=e.split("-").map(a=>parseInt(a,10)),i=new Date(Date.UTC(t,n-1,s,15,0,0));return{y:t,m:n,d:s,dow:i.getUTCDay()}}function _ie(e){if(!e)return"";const{m:t,d:n,dow:s}=PP(e);return`${IP[s]}, ${n} de ${Sie[t-1]}`}function Cie(e){if(!e)return"";const{m:t,d:n,dow:s}=PP(e);return`${IP[s]}, ${n} ${kie[t-1]}`}function Eie(e){const{search:t}=Bs();return g.useMemo(()=>new URLSearchParams(t).get(e),[t,e])}function Fie({title:e,message:t}){return r.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center px-4",children:r.jsxs("div",{className:"max-w-md text-center",children:[r.jsx("div",{className:"w-14 h-14 roun
736ded-full mx-auto mb-4 flex items-center justify-center",style:{background:"#F3F4F6"},children:r.jsx(r8,{size:26,className:"text-gray-500"})}),r.jsx("h1",{className:"font-medium text-gray-900 mb-1",style:{fontSize:16},children:e}),r.jsx("p",{className:"text-gray-500",style:{fontSize:13},children:t}),r.jsx("div",{className:"mt-8 opacity-60 flex justify-center",children:r.jsx(Io,{size:"sm",variant:"onLight"})})]})})}function VA(){return r.jsx("div",{className:"w-full h-px md:w-px md:h-auto md:self-stretch flex-shrink-0",style:{background:DP}})}function Aie(){const{slug:e}=Do(),t=Eie("job"),[n,s]=g.useState(!0),[i,a]=g.useState(null),[o,l]=g.useState(null),[c,d]=g.useState(null),[u,p]=g.useState(""),[m,x]=g.useState(null),[w,y]=g.useState(()=>{const Y=new Date;return new Date(Y.getFullYear(),Y.getMonth(),1)}),[v,j]=g.useState(null),[k,S]=g.useState(null),[_,F]=g.useState(!1),[A,C]=g.useState(null),[D,P]=g.useState([]),[L,T]=g.useState(!1),[R,U]=g.useState(null),[I,H]=g.useState(null);g.useEffect(()=>{let Y=!0;return(async()=>{s(!0);try{const J=await ne.functions.invoke("getSchedulingConfig",{slug:e}),Q=(J==null?void 0:J.data)||J;if(!Y)return;if(Q!=null&&Q.success&&Q.data){const ie=Q.data,ae={...ie,id:ie.config_id};d(ae),p(ie.recruiter_name||"");const re=Array.isArray(ie.duration_options)?ie.duration_options:[];x(re[0]||30)}else(Q==null?void 0:Q.error_code)==="workspace_not_entitled"?l("workspace_not_entitled"):a((Q==null?void 0:Q.error)||"Página não encontrada")}catch(J){Y&&a((J==null?void 0:J.message)||"Página não encontrada")}Y&&s(!1)})(),()=>{Y=!1}},[e]);const V=g.useCallback(async()=>{var Y;if(!(!(c!=null&&c.id)||!v||!m)){F(!0),C(null),P([]),S(null);try{const J=await ne.functions.invoke("getRecruiterAvailability",{config_id:c.id,date:v,duration:m}),Q=(J==null?void 0:J.data)||J;if(Q!=null&&Q.success){const ae=(Array.isArray((Y=Q.data)==null?void 0:Y.slots)?Q.data.slots:Array.isArray(Q.slots)?Q.slots:[]).map(re=>typeof re=="string"?re:re==null?void 0:re.start).filter(Boolean);P(ae)}else C((Q==null?void 0:Q.error)||"Erro ao buscar horários")}catch(J){C((J==null?void 0:J.message)||"Erro ao buscar horários")}F(!1)}},[c==null?void 0:c.id,v,m]);g.useEffect(()=>{V()},[V]);const X=g.useCallback(async({candidate_name:Y,candidate_email:J,candidate_notes:Q,form_data_json:ie,cv_file_url:ae})=>{if(!(!(c!=null&&c.id)||!v||!k||!m)){T(!0),U(null);try{const re=await ne.functions.invoke("bookSchedulingSlot",{config_id:c.id,candidate_name:Y,candidate_email:J,date:v,start_time:k,duration:m,candidate_notes:Q,form_data_json:ie,cv_file_url:ae,job_id:t||null}),pe=(re==null?void 0:re.data)||re;if(pe!=null&&pe.success)H({date:v,startTime:k,duration:m,location:c.default_location||"",recruiterName:u});else{const Z=(pe==null?void 0:pe.error)||"Erro ao confirmar agendamento";/no longer available/i.test(Z)?(U("Este horário não está mais disponível. Selecione outro."),S(null),V()):U(Z)}}catch(re){U((re==null?void 0:re.message)||"Erro ao confirmar agendamento")}T(!1)}},[c,v,k,m,t,u,V]);if(n)return r.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center",children:r.jsx(rt,{size:24,className:"animate-spin text-gray-400"})});if(o==="workspace_not_entitled")return r.jsx(jie,{});if(i||!c)return r.jsx(Fie,{title:"Página não encontrada",message:"Esta página de agendamento não está disponível."});if(I)return r.jsx("div",{className:"min-h-screen bg-white flex flex-col",children:r.jsx("main",{className:"flex-1 flex items-center justify-center px-4 py-10",children:r.jsx(wie,{...I})})});const N=Array.isArray(c.duration_options)?c.duration_options:[],W=Array.isArray(c.available_days)?c.available_days:[1,2,3,4,5],O=Number(c.scheduling_window_days)||30,G=(()=>{const Y=new Date;return Y.setHours(23,59,59,999),Y.setDate(Y.getDate()+O),Y})(),M=k?3:v?2:1,z=M===3?`${Cie(v)} · ${k}`:"",K=M===3?`Agende uma conversa · ${m} min`:"Agende uma conversa";return r.jsxs("div",{className:"min-h-screen bg-white flex flex-col",children:[r.jsx("style",{children:`
737        @keyframes sched-slide-in {
738          from { opacity: 0; transform: translateX(8px); }
739          to { opacity: 1; transform: translateX(0); }
740        }
741        .sched-enter { animation: sched-slide-in 0.28s ease-out; }
742      `}),r.jsx("header",{className:"border-b border-gray-100",children:r.jsxs("div",{className:"mx-auto flex flex-wrap items-center justify-between gap-3",style:{maxWidth:1100,padding:"14px 32px"},children:[r.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[r.jsx("span",{className:"font-medium text-gray-900 truncate",style:{fontSize:16},children:u||"Agendamento"}),r.jsx("span",{className:"text-gray-300",children:"·"}),r.jsx("span",{className:"text-gray-500 truncate",style:{fontSize:14},children:K})]}),M!==3&&N.length>0&&r.jsx("div",{className:"flex gap-2 flex-wrap",children:N.map(Y=>{const J=Y===m;return r.jsxs("button",{type:"button",onClick:()=>x(Y),className:"font-medium rounded-full border transition",style:{padding:"6px 16px",fontSize:13,background:J?eh:"#fff",color:J?"#fff":"#374151",borderColor:J?eh:DP},children:[Y," min"]},Y)})})]})}),r.jsx("main",{className:"flex-1 flex justify-center",style:{padding:"24px 16px"},children:r.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-start transition-all duration-300 ease-out w-full",style:{maxWidth:1100,gap:28,justifyContent:"center"},children:[r.jsx("div",{className:"flex justify-center md:justify-start md:flex-shrink-0",children:r.jsx(NP,{refMonth:w,onPrevMonth:()=>y(Y=>new Date(Y.getFullYear(),Y.getMonth()-1,1)),onNextMonth:()=>y(Y=>
742new Date(Y.getFullYear(),Y.getMonth()+1,1)),availableDays:W,selectedDate:v,onSelectDate:Y=>{j(Y),S(null),U(null)},brandColor:eh,maxDate:G})}),v&&r.jsxs(r.Fragment,{children:[r.jsx(VA,{}),r.jsx("div",{className:"sched-enter w-full md:flex-shrink-0 md:w-[180px]",children:r.jsx(RP,{dateHeader:_ie(v),loading:_,error:A,slots:D,selectedSlot:k,onSelectSlot:Y=>{S(Y),U(null)},brandColor:eh})})]}),k&&r.jsxs(r.Fragment,{children:[r.jsx(VA,{}),r.jsx("div",{className:"sched-enter w-full md:flex-1 min-w-0",children:r.jsx(gie,{title:z,formConfig:c.form_fields_config||{},submitting:L,submitError:R,onSubmit:X,brandColor:eh})})]})]})}),r.jsx("footer",{className:"flex justify-center opacity-60",style:{paddingBottom:24,paddingTop:24,fontSize:13},children:r.jsx(Io,{size:"sm",variant:"onLight"})})]})}const Tie=["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],Nie=["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],HA={confirmed:{label:"Confirmado",bg:"#DCFCE7",color:"#15803D"},cancelled_by_candidate:{label:"Cancelado",bg:"#FEE2E2",color:"#991B1B"},cancelled_by_recruiter:{label:"Cancelado pelo recrutador",bg:"#FEE2E2",color:"#991B1B"},rescheduled:{label:"Reagendado",bg:"#FEF3C7",color:"#92400E"},completed:{label:"Concluído",bg:"#F3F4F6",color:"#374151"},no_show:{label:"Não compareceu",bg:"#F3F4F6",color:"#374151"}};function Rie(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":`${Tie[t.getDay()]}, ${t.getDate()} de ${Nie[t.getMonth()]} de ${t.getFullYear()}`}function qA(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function Bu({icon:e,children:t}){return r.jsxs("div",{className:"flex items-start gap-3 py-1.5",children:[r.jsx(e,{size:16,className:"text-gray-500 flex-shrink-0 mt-0.5"}),r.jsx("span",{className:"text-sm text-gray-800",children:t})]})}function Xb({booking:e,location:t,recruiterName:n}){const s=HA[e.status]||HA.confirmed;return r.jsxs("div",{className:"rounded-xl p-5 sm:p-6",style:{background:"#F9FAFB",border:"1px solid #E3E8EE"},children:[r.jsx("div",{className:"mb-3",children:r.jsx("span",{className:"inline-block text-[11px] uppercase font-semibold px-2 py-1 rounded-full",style:{background:s.bg,color:s.color},children:s.label})}),r.jsx(Bu,{icon:kl,children:Rie(e.scheduled_start)}),r.jsxs(Bu,{icon:Di,children:[qA(e.scheduled_start)," – ",qA(e.scheduled_end)]}),r.jsxs(Bu,{icon:y8,children:[e.duration_minutes," minutos"]}),t&&r.jsx(Bu,{icon:ma,children:t}),n&&r.jsx(Bu,{icon:$m,children:n}),e.candidate_notes&&r.jsx(Bu,{icon:mS,children:r.jsx("span",{className:"text-gray-700 whitespace-pre-line",children:e.candidate_notes})})]})}const GA="#E3E8EE",Die="#DC2626";function Iie({onCancel:e,onBack:t,submitting:n,error:s,success:i}){const[a,o]=g.useState("");return i?r.jsxs("div",{className:"text-center py-4",children:[r.jsx("div",{className:"w-14 h-14 rounded-full mx-auto mb-4 flex items-center justify-center",style:{background:"#FEE2E2"},children:r.jsx(yl,{size:28,className:"text-red-600"})}),r.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-1",children:"Agendamento cancelado"}),r.jsx("p",{className:"text-sm text-gray-500",children:"O recrutador será notificado."}),r.jsx("div",{className:"mt-8 flex justify-center opacity-60",children:r.jsx(Io,{size:"sm",variant:"onLight"})})]}):r.jsxs("div",{className:"rounded-xl p-5 sm:p-6",style:{border:`1px solid ${GA}`},children:[r.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:"Cancelar agendamento"}),r.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"Tem certeza? Esta ação não pode ser desfeita."}),r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:"Motivo (opcional)"}),r.jsx("textarea",{value:a,onChange:l=>o(l.target.value),placeholder:"Conte por que não poderá comparecer...",rows:3,className:"w-full text-sm px-3 py-2.5 rounded-md focus:outline-none focus:ring-2 focus:ring-red-100 focus:border-red-400 mb-3",style:{border:`1px solid ${GA}`}}),s&&r.jsx("div",{className:"rounded-md px-3 py-2 mb-3 text-sm",style:{background:"#FEE2E2",color:"#991B1B",border:"1px solid #FECACA"},children:s}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[r.jsxs("button",{type:"button",onClick:()=>e(a),disabled:n,className:"flex-1 text-sm px-4 py-3 text-white rounded-md font-semibold hover:opacity-90 disabled:opacity-50 flex items-center justify-center gap-2",style:{background:Die,minHeight:44},children:[n&&r.jsx(rt,{size:14,className:"animate-spin"}),n?"Cancelando...":"Confirmar cancelamento"]}),r.jsx("button",{type:"button",onClick:t,disabled:n,className:"text-sm px-4 py-3 text-gray-700 rounded-md font-medium hover:bg-gray-50 disabled:opacity-50",style:{minHeight:44},children:"Voltar"})]})]})}const th="#6C24F5",Ju="#E3E8EE",BP=["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],Pie=["janeiro","fevereiro","març
742o","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],Bie=["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"];function OP(e){const[t,n,s]=e.split("-").map(a=>parseInt(a,10)),i=new Date(Date.UTC(t,n-1,s,15,0,0));return{y:t,m:n,d:s,dow:i.getUTCDay()}}function Jb(e){if(!e)return"";const{m:t,d:n,dow:s}=OP(e);return`${BP[s]}, ${n} de ${Pie[t-1]}`}function Oie(e){if(!e)return"";const{m:t,d:n,dow:s}=OP(e);return`${BP[s]}, ${n} ${Bie[t-1]}`}function Mie(e,t){const[n,s]=e.split(":").map(l=>parseInt(l,10)),i=n*60+s+t,a=Math.floor(i/60)%24,o=i%60;return`${String(a).padStart(2,"0")}:${String(o).padStart(2,"0")}`}function KA(){return r.jsx("div",{className:"w-full h-px md:w-px md:h-auto md:self-stretch flex-shrink-0",style:{background:Ju}})}function Lie({config:e,configAvailable:t,initialDuration:n,recruiterName:s,onReschedule:i,onBack:a,submitting:o,error:l,success:c,successData:d}){const u=g.useMemo(()=>Array.isArray(e==null?void 0:e.duration_options)?e.duration_options:[],[e]),p=g.useMemo(()=>Array.isArray(e==null?void 0:e.available_days)?e.available_days:[1,2,3,4,5],[e]),[m,x]=g.useState(n||u[0]||30),[w,y]=g.useState(()=>{const V=new Date;return new Date(V.getFullYear(),V.getMonth(),1)}),[v,j]=g.useState(null),[k,S]=g.useState(null),[_,F]=g.useState(!1),[A,C]=g.useState(null),[D,P]=g.useState([]),L=g.useCallback(async()=>{var V;if(!(!(e!=null&&e.id)||!v||!m)){F(!0),C(null),P([]),S(null);try{const X=await ne.functions.invoke("getRecruiterAvailability",{config_id:e.id,date:v,duration:m}),N=(X==null?void 0:X.data)||X;if(N!=null&&N.success){const O=(Array.isArray((V=N.data)==null?void 0:V.slots)?N.data.slots:Array.isArray(N.slots)?N.slots:[]).map(G=>typeof G=="string"?G:G==null?void 0:G.start).filter(Boolean);P(O)}else C((N==null?void 0:N.error)||"Erro ao buscar horários")}catch(X){C((X==null?void 0:X.message)||"Erro ao buscar horários")}F(!1)}},[e==null?void 0:e.id,v,m]);g.useEffect(()=>{L()},[L]);const T=Number(e==null?void 0:e.scheduling_window_days)||30,R=g.useMemo(()=>{const V=new Date;return V.setHours(23,59,59,999),V.setDate(V.getDate()+T),V},[T]);if(c&&d){const V=Mie(d.start_time,d.duration);return r.jsxs("div",{className:"text-center py-4 max-w-md mx-auto",children:[r.jsx("div",{className:"w-14 h-14 rounded-full mx-auto mb-4 flex items-center justify-center",style:{background:"#DCFCE7"},children:r.jsx(Mi,{size:32,className:"text-green-600"})}),r.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Entrevista reagendada!"}),r.jsxs("div",{className:"text-left rounded-lg p-4 mb-4",style:{background:"#F9FAFB",border:`1px solid ${Ju}`},children:[r.jsx("p",{className:"text-sm text-gray-800 mb-1",children:Jb(d.date)}),r.jsxs("p",{className:"text-sm text-gray-700",children:[d.start_time," – ",V," · ",d.duration," min"]})]}),r.jsx("p",{className:"text-sm text-gray-500",children:"Você receberá um email de confirmação com os novos detalhes."}),r.jsx("div",{className:"mt-8 flex justify-center opacity-60",children:r.jsx(Io,{size:"sm",variant:"onLight"})})]})}if(!t)return r.jsxs("div",{className:"max-w-md mx-auto rounded-xl p-5 sm:p-6",style:{border:`1px solid ${Ju}`},children:[r.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"O agendamento do recrutador não está mais disponível, então não é possível reagendar."}),r.jsx("button",{type:"button",onClick:a,className:"text-sm px-4 py-2 text-gray-700 rounded-md font-medium hover:bg-gray-50",style:{border:`1px solid ${Ju}`},children:"Voltar"})]});const U=k?3:v?2:1,I=U===3?`Escolha um novo horário · ${m} min`:"Escolha um novo horário",H=U===3?`${Oie(v)} · ${k}`:"";return r.jsxs(r.Fragment,{children:[r.jsx("style",{children:`
743        @keyframes sched-slide-in {
744          from { opacity: 0; transform: translateX(8px); }
745          to { opacity: 1; transform: translateX(0); }
746        }
747        .sched-enter { animation: sched-slide-in 0.28s ease-out; }
748      `}),r.jsx("div",{className:"border-b border-gray-100 mb-6",style:{paddingBottom:14},children:r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[r.jsx("span",{className:"font-medium text-gray-900 truncate",style:{fontSize:16},children:s||"Reagendar"}),r.jsx("span",{className:"text-gray-300",children:"·"}),r.jsx("span",{className:"text-gray-500 truncate",style:{fontSize:14},children:I})]}),U!==3&&u.length>0&&r.jsx("div",{className:"flex gap-2 flex-wrap",children:u.map(V=>{const X=V===m;return r.jsxs("button",{type:"button",onClick:()=>x(V),className:"font-medium rounded-full border transition",style:{padding:"6px 16px",fontSize:13,background:X?th:"#fff",color:X?"#fff":"#374151",borderColor:X?th:Ju},children:[V," min"]},V)})})]})}),r.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-start transition-all duration-300 ease-out w-full",style:{gap:28,
748justifyContent:"center"},children:[r.jsx("div",{className:"flex justify-center md:justify-start md:flex-shrink-0",children:r.jsx(NP,{refMonth:w,onPrevMonth:()=>y(V=>new Date(V.getFullYear(),V.getMonth()-1,1)),onNextMonth:()=>y(V=>new Date(V.getFullYear(),V.getMonth()+1,1)),availableDays:p,selectedDate:v,onSelectDate:V=>{j(V),S(null)},brandColor:th,maxDate:R})}),v&&r.jsxs(r.Fragment,{children:[r.jsx(KA,{}),r.jsx("div",{className:"sched-enter w-full md:flex-shrink-0 md:w-[180px]",children:r.jsx(RP,{dateHeader:Jb(v),loading:_,error:A,slots:D,selectedSlot:k,onSelectSlot:S,brandColor:th})})]}),k&&r.jsxs(r.Fragment,{children:[r.jsx(KA,{}),r.jsx("div",{className:"sched-enter w-full md:flex-1 min-w-0",children:r.jsxs("div",{className:"space-y-4",children:[H&&r.jsx("h3",{className:"text-base font-medium text-gray-900",style:{marginBottom:8},children:H}),r.jsx("div",{className:"rounded-md p-3",style:{background:"#EEF2FF",border:"1px solid #C7D2FE"},children:r.jsxs("p",{className:"text-xs text-indigo-900",children:[r.jsx("strong",{children:"Novo horário:"})," ",Jb(v)," às ",k," (",m," min)"]})}),l&&r.jsx("div",{className:"rounded-md px-3 py-2 text-sm",style:{background:"#FEE2E2",color:"#991B1B",border:"1px solid #FECACA"},children:l}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[r.jsxs("button",{type:"button",onClick:()=>i({new_date:v,new_start_time:k,new_duration:m}),disabled:o,className:"flex-1 text-sm px-4 py-3 text-white rounded-md font-semibold hover:opacity-90 disabled:opacity-50 flex items-center justify-center gap-2",style:{background:th,minHeight:44},children:[o&&r.jsx(rt,{size:14,className:"animate-spin"}),o?"Reagendando...":"Reagendar"]}),r.jsx("button",{type:"button",onClick:a,disabled:o,className:"text-sm px-4 py-3 text-gray-700 rounded-md font-medium hover:bg-gray-50 disabled:opacity-50",style:{minHeight:44},children:"Voltar"})]})]})})]})]}),!v&&r.jsx("div",{className:"mt-8 flex justify-end",children:r.jsx("button",{type:"button",onClick:a,className:"text-sm px-4 py-2 text-gray-700 rounded-md font-medium hover:bg-gray-50",style:{border:`1px solid ${Ju}`},children:"Voltar"})})]})}const zie="#E3E8EE",Wie="#DC2626";function $ie(e){const{search:t}=Bs();return g.useMemo(()=>new URLSearchParams(t).get(e),[t,e])}function Uie({title:e,message:t}){return r.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center px-4",children:r.jsxs("div",{className:"max-w-md text-center",children:[r.jsx("div",{className:"w-14 h-14 rounded-full mx-auto mb-4 flex items-center justify-center",style:{background:"#FEE2E2"},children:r.jsx(r8,{size:26,className:"text-red-600"})}),r.jsx("h1",{className:"text-xl font-semibold text-gray-900 mb-1",children:e}),r.jsx("p",{className:"text-sm text-gray-500",children:t}),r.jsx("div",{className:"mt-8 opacity-60 flex justify-center",children:r.jsx(Io,{size:"sm",variant:"onLight"})})]})})}function Vie(){const{token:e}=Do(),t=$ie("action"),[n,s]=g.useState(!0),[i,a]=g.useState(null),[o,l]=g.useState(null),[c,d]=g.useState(null),[u,p]=g.useState(!1),[m,x]=g.useState(""),[w,y]=g.useState("view"),[v,j]=g.useState(null),[k,S]=g.useState(!1),[_,F]=g.useState(null),[A,C]=g.useState(!1),[D,P]=g.useState(!1),[L,T]=g.useState(null),[R,U]=g.useState(!1),[I,H]=g.useState(null),V=M=>{j(M),setTimeout(()=>j(null),3e3)};g.useEffect(()=>{let M=!0;return(async()=>{s(!0);try{const z=await ne.entities.SchedulingBooking.filter({manage_token:e}).catch(()=>[]);if(!M)return;const K=(z||[])[0];if(!K){a("Agendamento não encontrado"),s(!1);return}l(K);let Y=null;try{Y=await ne.entities.SchedulingConfig.get(K.config_id)}catch{Y=null}if(!M)return;const J=!!Y&&Y.is_active!==!1;if(p(J),Y){let Q=[30],ie=[1,2,3,4,5];try{Q=Y.duration_options?JSON.parse(Y.duration_options):[30]}catch{}try{ie=Y.available_days?JSON.parse(Y.available_days):[1,2,3,4,5]}catch{}d({...Y,duration_options:Q,available_days:ie})}t==="cancel"&&K.status==="confirmed"?y("cancel"):t==="reschedule"&&K.status==="confirmed"&&J&&y("reschedule")}catch(z){M&&a((z==null?void 0:z.message)||"Erro ao carregar agendamento")}M&&s(!1)})(),()=>{M=!1}},[e,t]);const X=g.useCallback(async M=>{S(!0),F(null);try{const z=await ne.functions.invoke("cancelOrRescheduleBooking",{manage_token:e,action:"cancel",cancel_reason:M||""}),K=(z==null?void 0:z.data)||z;K!=null&&K.success?(C(!0),l(Y=>Y&&{...Y,status:"cancelled_by_candidate",cancel_reason:M||""})):F((K==null?void 0:K.error)||"Erro ao cancelar agendamento")}catch(z){F((z==null?void 0:z.message)||"Erro ao cancelar agendamento")}S(!1)},[e]),N=g.useCallback(async({new_date:M,new_start_time:z,new_duration:K})=>{P(!0),T(null);try{const Y=await ne.functions.invoke("cancelOrRescheduleBooking",{manage_token:e,action:"reschedule",new_date:M,new_start_time:z,new_duration:K}),J=(Y==null?void 0:Y.data)||Y;if(J!=null&&J.success)U(!0),H({date:M,start_time:z,duration:K});else{const Q=(J==null?void 0:J.error)||"Erro ao reagendar";/no longer available/i.test(Q)?T("Este horário não está mais disponível. Selecione outro."):(T(Q),V(Q))}}catch(Y){const J=(Y==null?void 0:Y.message)||"Erro ao reagendar";T(J),V(J)}P(!1)},[e]);if(n)return r.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center",children:r.jsx(rt,{size:24,className:"animate-spin text-gray-400"})});if(i||!o)return r.jsx(Uie,{title:"Agendamento não encontrado",message:"O link pode ter expirado ou estar incorreto."});const W=o.scheduled_start?new Date(o.scheduled_start).getTime()<Date.now():!1,O=o.status==="confirmed",G=O&&!W;return r.jsxs("div",{className:"min-h-screen bg-white",children:[r.jsx("header",{className:"border-b border-gray-100",children:r.jsx("div",{className:"max-w-3xl mx-auto px-4 py-3 flex items-center justify-between",children:r.jsx(Io,{size:"sm",variant:"onLight"})})}),r.jsxs("main",{className:w==="reschedule"?"mx-auto px-4 py-8 sm:py-10":"max-w-2xl mx-auto px-4 py-8 sm:py-12",style:w==="reschedule"?{maxWidth:1100}:void 0,children:[w==="view"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"text-center mb-6",children:[r.jsx("h1",{className:"text-2xl sm:text-3xl font-semibold text-gray-900 mb-1",children:"Seu agendamento"}),r.jsx("p",{className:"text-sm text-gray-500",children:m?`Com ${m}`:"Detalhes da sua entrevista"})]}),r.jsx(Xb,{booking:o,location:(c==null?void 0:c.default_location)||"",recruiterName:m}),W&&O&&r.jsxs("div",{className:"mt-4 rounded-md px-3 py-2.5 flex items-start gap-2",style:{background:"#F3F4F6",color:"#374151",border:"1px solid #E5E7EB"},children:[r.jsx(_o,{size:14,className:"mt-0.5 flex-shrink-0"}),r.jsx("span",{className:"text-sm",children:"Este agendamento já passou."})]}),!O&&(o.status==="cancelled_by_candidate"||o.status==="cancelled_by_recruiter")&&r.jsx("p",{className:"mt-4 text-sm text-gray-600 text-center",children:"Este agendamento foi cancelado."}),!O&&o.status==="rescheduled"&&r.jsx("p",{className:"mt-4 text-sm text-gray-600 text-center",children:"Este agendamento foi reagendado. Verifique seu email para o novo horário."}),!u&&O&&!W&&r.jsxs("div",{className:"mt-4 rounded-md px-3 py-2.5 flex items-start gap-2",style:{background:"#FEF3C7",color:"#92400E",border:"1px solid #FCD34D"},children:[r.jsx(_o,{size:14,className:"mt-0.5 flex-shrink-0"}),r.jsx("span",{className:"text-sm",children:"O agendamento do recrutador não está mais disponível para reagendamento."})]}),G&&r.jsxs("div",{className:"mt-5 flex flex-col sm:flex-row gap-2",children:[r.jsx("button",{type:"button",onClick:()=>y("reschedule"),disabled:!u,className:"flex-1 text-sm px-4 py-3 bg-white text-gray-800 rounded-md font-medium hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",style:{border:`1px solid ${zie}`,minHeight:44},children:"Reagendar"}),r.jsx("button",{type:"button",onClick:()=>y("cancel"),className:"flex-1 text-sm px-4 py-3 text-white rounded-md font-semibold hover:opacity-90",style:{background:Wie,minHeight:44},children:"Não poderei comparecer"})]})]}),w==="cancel"&&r.jsxs(r.Fragment,{children:[!A&&r.jsx("div",{className:"mb-5",children:r.jsx(Xb,{booking:o,location:(c==null?void 0:c.default_location)||"",recruiterName:m})}),r.jsx(Iie,{onCancel:X,onBack:()=>y("view"),submitting:k,error:_,success:A})]}),w==="reschedule"&&r.jsxs(r.Fragment,{children:[!R&&r.jsx("div",{className:"mb-6 max-w-2xl mx-auto",children:r.jsx(Xb,{booking:o,location:(c==null?void 0:c.default_location)||"",recruiterName:m})}),r.jsx(Lie,{config:c,configAvailable:u,initialDuration:o.duration_minutes,recruiterName:m,onReschedule:N,onBack:()=>y("view"),submitting:D,error:L,success:R,successData:I})]})]}),v&&r.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 px-4 py-2 rounded-lg shadow-lg text-sm font-medium z-50",style:{background:"#1F2937",color:"#FFFFFF"},children:v})]})}function MP(e){var n;if(!e)return"?";const t=e.trim().split(/\s+/);return t.length===1?((n=t[0][0])==null?void 0:n.toUpperCase())||"?":(t[0][0]+t[t.length-1][0]).toUpperCase()}function Ai(e){if(e==null)return"";const t=String(e).trim();return t===""||t.toLowerCase()==="null"||t.toLowerCase()==="undefined"?"":t}function Qm(e){if(!e)return"";const t=String(e).trim();return t?/^https?:\/\//i.test(t)?t:`https://${t}`:""}function Oc(e){if(!e)return null;const t=new Date(e);return isNaN(t.getTime())?e:t.toLocaleDateString("pt-BR",{day:"2-digit",month:"short",year:"numeric"})}const Hie={submitted:"Inscrito",shortlisted:"Selecionado",approved:"Aprovado",standby:"Em espera",rejected:"Reprovado",hired:"Contratado",pending_verification:"Pendente",viewed:"Visualizado",withdrawn:"Retirado",expired:"Expirado",removed_by_recruiter:"Removido",pool:"Pool"},YA={submitted:{bg:"#EBF1FE",text:"#3B6CD4"},shortlisted:{bg:"#E6F7EF",text:"#0E6245"},approved:{bg:"#E6F7EF",text:"#0E6245"},standby:{bg:"#FDF4E0",text:"#92670B"},rejected:{bg:"#FDECEC",text:"#A41C4E"},hired:{bg:"#E6F7EF",text:"#0E6245"},pending_verification:{bg:"#F0F2F5",text:"#697386"},viewed:{bg:"#EBF1FE",text:"#3B6CD4"},withdrawn:{bg:"#F0F2F5",text:"#697386"},expired:{bg:"#F0F2F5",text:"#697386"},removed_by_recruiter:{bg:"#FDECEC",text:"#A41C4E"},pool:{bg:"#F0EBFF",text:"#6C24F5"}},qie={manual:"Manual",csv_import:"Importação CSV",linkedin_url:"LinkedIn",cv_upload:"Upload de CV",job_application:"Candidatura",assessment_invite:"Assessment",ats_application:"ATS",talent_bank:"Banco de Talentos",legacy_import:"Importação Legada",self_signup:"Auto-cadastro",linkedin_extension:"Extensão LinkedIn",jobs_organico:"
748Candidatura Orgânica",sourcing_manual:"Sourcing Manual",import_csv:"Importação CSV",linkedin:"LinkedIn",cv:"Upload de CV"},Qb={clt:"CLT",pj:"PJ",autonomo:"Autônomo",estagio:"Estágio",temporario:"Temporário",cooperado:"Cooperado"},al="'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",lf="#6C24F5",Zb="#F6F8FA";function Gie(e){var n,s;if(!e)return"?";const t=e.trim().split(/\s+/);return(((n=t[0])==null?void 0:n[0])||"")+(((s=t[t.length-1])==null?void 0:s[0])||"")}function LP(e){return e==null?"#E2E8F0":e<=30?"#A32D2D":e<=50?"#BA7517":e<=70?"#EAB308":e<=80?"#639922":e<=90?"#185FA5":"#6C2BD9"}const zP={approved:{bg:"#EAF3DE",border:"#C0DD97",badge:"#639922",badgeBg:"#EAF3DE",label:"Aprovado"},maybe:{bg:"#FAEEDA",border:"#FAC775",badge:"#BA7517",badgeBg:"#FAEEDA",label:"Talvez"},rejected:{bg:"#FCEBEB",border:"#F7C1C1",badge:"#A32D2D",badgeBg:"#FCEBEB",label:"Rejeitado"}};function WP({name:e,avatarUrl:t,size:n=36}){return t?r.jsx("img",{src:t,alt:e,style:{width:n,height:n,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):r.jsx("div",{style:{width:n,height:n,borderRadius:"50%",background:"#EEF2FF",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:n<=36?11:16,fontWeight:600,color:"#4338CA",fontFamily:al},children:Gie(e)})}function _g({children:e}){return r.jsx("div",{style:{fontSize:10,fontWeight:600,letterSpacing:"0.08em",color:"#9CA3AF",marginBottom:10,textTransform:"uppercase"},children:e})}function Kie({exp:e}){return r.jsxs("div",{style:{display:"flex",gap:10,padding:"10px 0",borderBottom:"1px solid #F0F2F5"},children:[r.jsx("div",{style:{width:32,height:32,borderRadius:8,background:"#F3F4F6",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx(On,{size:14,color:"#9CA3AF"})}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36"},children:e.title||e.role||"Cargo"}),r.jsxs("div",{style:{fontSize:12,color:"#6B7280"},children:[e.company||"",e.dates?` · ${e.dates}`:"",e.start_date?` · ${e.start_date}${e.end_date?` – ${e.end_date}`:" – Presente"}`:""]})]})]})}function Yie({edu:e}){return r.jsxs("div",{style:{display:"flex",gap:10,padding:"10px 0",borderBottom:"1px solid #F0F2F5"},children:[r.jsx("div",{style:{width:32,height:32,borderRadius:8,background:"#F3F4F6",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#9CA3AF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M22 10v6M2 10l10-5 10 5-10 5z"}),r.jsx("path",{d:"M6 12v5c0 1.1 2.7 3 6 3s6-1.9 6-3v-5"})]})}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36"},children:e.degree||e.course||"Formação"}),r.jsxs("div",{style:{fontSize:12,color:"#6B7280"},children:[e.institution||"",e.year?` · ${e.year}`:"",e.start_date?` · ${e.start_date}${e.end_date?` – ${e.end_date}`:""}`:""]})]})]})}function Xie(e){if(!e.rating_json)return null;try{return typeof e.rating_json=="string"?JSON.parse(e.rating_json):e.rating_json}catch{return null}}function Jie(){const{token:e}=Do(),[t,n]=g.useState(!0),[s,i]=g.useState(null),[a,o]=g.useState(null),[l,c]=g.useState(0),[d,u]=g.useState(""),[p,m]=g.useState(!1);if(g.useEffect(()=>{if(!e){i("link_not_found"),n(!1);return}ne.functions.invoke("getHiringManagerLinkPublic",{token:e}).then(F=>{const A=(F==null?void 0:F.data)||F;A!=null&&A.success?o(A):i((A==null?void 0:A.error)||"link_not_found")}).catch(()=>i("link_not_found")).finally(()=>n(!1))},[e]),t)return r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",background:Zb,fontFamily:al},children:[r.jsx(rt,{size:24,style:{animation:"spin 1s linear infinite",color:lf}}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]});if(s)return r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",background:Zb,fontFamily:al},children:[r.jsx("div",{style:{width:40,height:40,borderRadius:10,background:lf,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:20,fontWeight:700,marginBottom:20},children:"S"}),r.jsx("h2",{style:{fontSize:18,fontWeight:600,color:"#1A1F36",marginBottom:8},children:s==="link_expired"?"Link expirado":"Link não encontrado"}),r.jsx("p",{style:{fontSize:14,color:"#6B7280",maxWidth:360,textAlign:"center",lineHeight:1.5},children:s==="link_expired"?"Este link de revisão expirou. Solicite um novo link ao recrutador.":"Este link de revisão não existe ou foi revogado. Solicite um novo link ao recrutador."})]});const{job:x,recruiter:w,settings:y,candidates:v}=a,j=(v==null?void 0:v[l])||null,k=v.filter(F=>!F.feedback).length,S=async F=>{if(!j||p)return;m(!0);const A=await ne.functions.invoke("submitHiringManagerFeedback",{token:e,talent_profile_id:j.talent_profile_id,verdict:F,comment:d.trim()}).catch(()=>null),C=(A==null?void 0:A.data)||A;C!=null&&C.success&&(o(D=>({...D,candidates:D.candidates.map((P,L)=>L===l?{...P,feedback:{verdict:F,comment:d.trim()}}:P)})),u("")),m(!1)},_=F=>
748F?`R$ ${Number(F).toLocaleString("pt-BR")}`:null;return r.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:Zb,fontFamily:al},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"12px 24px",background:"#fff",borderBottom:"1px solid #E5E7EB",flexShrink:0},children:[r.jsx("div",{style:{width:30,height:30,borderRadius:8,background:lf,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:15,fontWeight:700},children:"S"}),r.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#1A1F36"},children:"Summit"}),r.jsx("div",{style:{flex:1}}),r.jsxs("span",{style:{fontSize:12,color:"#9CA3AF",background:"#F6F8FA",padding:"4px 12px",borderRadius:999},children:["Compartilhado por ",(w==null?void 0:w.name)||"Recrutador"]})]}),r.jsxs("div",{style:{padding:"20px 24px 16px",background:"#fff",borderBottom:"1px solid #E5E7EB",flexShrink:0},children:[r.jsx("h1",{style:{fontSize:20,fontWeight:600,color:"#1A1F36",margin:0},children:(x==null?void 0:x.title)||"Vaga"}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:6,fontSize:13,color:"#6B7280",flexWrap:"wrap"},children:[(x==null?void 0:x.location)&&r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:3},children:[r.jsx(ma,{size:12})," ",x.location]}),(x==null?void 0:x.work_format)&&r.jsxs("span",{children:["· ",x.work_format==="remoto"?"Remoto":x.work_format==="hibrido"?"Híbrido":"Presencial"]}),(x==null?void 0:x.contract_type)&&r.jsxs("span",{children:["· ",x.contract_type.toUpperCase()]}),(y==null?void 0:y.show_salary)&&(x==null?void 0:x.salary_range_min)&&r.jsxs("span",{children:["· ",_(x.salary_range_min)," – ",_(x.salary_range_max)]}),r.jsxs("span",{style:{marginLeft:8,display:"inline-flex",alignItems:"center",gap:4},children:[r.jsx(Nr,{size:13})," ",v.length," candidato",v.length!==1?"s":"",k>0&&r.jsxs("span",{style:{color:"#BA7517",fontWeight:500},children:[" · ",k," pendente",k!==1?"s":""]})]})]})]}),r.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[r.jsx("div",{style:{width:270,flexShrink:0,borderRight:"1px solid #E5E7EB",background:"#fff",overflowY:"auto",padding:"12px 0"},children:v.map((F,A)=>{const C=F.feedback?zP[F.feedback.verdict]:null,D=A===l;return r.jsxs("div",{onClick:()=>{c(A),u("")},style:{display:"flex",alignItems:"center",gap:10,padding:"10px 16px",cursor:"pointer",background:C?C.bg:D?"#F8F7FF":"#fff",borderLeft:D?`3px solid ${lf}`:"3px solid transparent",borderBottom:`1px solid ${C?C.border:"#F0F2F5"}`,transition:"background 0.15s"},children:[r.jsx(WP,{name:F.full_name,avatarUrl:F.avatar_url,size:36}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F.full_name}),r.jsx("div",{style:{fontSize:10,color:"#9CA3AF",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F.headline||""}),C&&r.jsx("span",{style:{display:"inline-block",marginTop:3,fontSize:10,fontWeight:600,padding:"1px 8px",borderRadius:999,background:C.badge,color:C.badgeBg},children:C.label})]}),(y==null?void 0:y.show_rating)&&F.rating_score!=null&&r.jsx("span",{style:{fontSize:13,fontWeight:600,color:LP(F.rating_score),flexShrink:0},children:F.rating_score})]},F.talent_profile_id)})}),r.jsx("div",{style:{flex:1,overflowY:"auto",padding:"24px 32px 40px"},children:j?r.jsx(Qie,{candidate:j,settings:y,comment:d,setComment:u,submitting:p,onSubmit:S,formatSalary:_}):r.jsx("div",{style:{textAlign:"center",color:"#9CA3AF",paddingTop:80},children:"Selecione um candidato"})})]})]})}function Qie({candidate:e,settings:t,comment:n,setComment:s,submitting:i,onSubmit:a,formatSalary:o}){var m,x,w,y,v;const l=Xie(e),c=e.feedback?zP[e.feedback.verdict]:null,[d,u]=g.useState({}),p=j=>u(k=>({...k,[j]:!k[j]}));return r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:12},children:[r.jsx(WP,{name:e.full_name,avatarUrl:e.avatar_url,size:48}),r.jsxs("div",{style:{flex:1},children:[r.jsx("h2",{style:{fontSize:17,fontWeight:600,color:"#1A1F36",margin:0},children:e.full_name}),r.jsx("div",{style:{fontSize:13,color:"#6B7280",marginTop:2},children:e.headline||""}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:4,fontSize:12,color:"#9
748CA3AF",flexWrap:"wrap"},children:[e.location&&r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:3},children:[r.jsx(ma,{size:11})," ",e.location]}),(t==null?void 0:t.show_salary)&&e.salary_expectation&&r.jsxs("span",{children:["· Pretensão: ",o(e.salary_expectation)]}),e.linkedin_url&&r.jsx("a",{href:Qm(e.linkedin_url),target:"_blank",rel:"noopener noreferrer",style:{color:lf,textDecoration:"none",fontSize:12},children:"LinkedIn ↗"})]})]}),(t==null?void 0:t.show_rating)&&e.rating_score!=null&&r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("div",{style:{fontSize:28,fontWeight:700,color:LP(e.rating_score),fontFamily:"'Geist', monospace"},children:e.rating_score}),r.jsx("div",{style:{fontSize:10,color:"#9CA3AF"},children:"Score"})]})]}),r.jsxs("div",{style:{background:"#fff",border:"1px solid #E5E7EB",borderRadius:10,padding:14,marginBottom:20},children:[c&&r.jsxs("div",{style:{padding:"10px 14px",borderRadius:8,background:c.bg,border:`1px solid ${c.border}`,marginBottom:12},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{fontSize:12,fontWeight:600,padding:"2px 10px",borderRadius:999,background:c.badge,color:c.badgeBg},children:c.label}),r.jsx("span",{style:{fontSize:12,color:"#6B7280"},children:"Seu feedback foi registrado"})]}),e.feedback.comment&&r.jsx("p",{style:{fontSize:13,color:"#374151",marginTop:8,lineHeight:1.5},children:e.feedback.comment})]}),r.jsxs("div",{style:{display:"flex",gap:10,marginBottom:10},children:[r.jsx("button",{onClick:()=>a("approved"),disabled:i,style:{flex:1,padding:"10px 0",fontSize:13,fontWeight:600,borderRadius:8,cursor:"pointer",fontFamily:al,background:"#EAF3DE",border:"1.5px solid #C0DD97",color:"#3B6D11",opacity:i?.6:1},children:"✓ Aprovar"}),r.jsx("button",{onClick:()=>a("maybe"),disabled:i,style:{flex:1,padding:"10px 0",fontSize:13,fontWeight:600,borderRadius:8,cursor:"pointer",fontFamily:al,background:"#FAEEDA",border:"1.5px solid #FAC775",color:"#854F0B",opacity:i?.6:1},children:"? Talvez"}),r.jsx("button",{onClick:()=>a("rejected"),disabled:i,style:{flex:1,padding:"10px 0",fontSize:13,fontWeight:600,borderRadius:8,cursor:"pointer",fontFamily:al,background:"#FCEBEB",border:"1.5px solid #F7C1C1",color:"#A32D2D",opacity:i?.6:1},children:"✗ Rejeitar"})]}),r.jsx("input",{value:n,onChange:j=>s(j.target.value),placeholder:"Deixe um comentário sobre este candidato...",style:{width:"100%",padding:"10px 14px",fontSize:13,borderRadius:8,border:"1px solid #E5E7EB",outline:"none",fontFamily:al,boxSizing:"border-box"},onFocus:j=>j.target.style.borderColor=lf,onBlur:j=>j.target.style.borderColor="#E5E7EB"})]}),e.summary_executive&&r.jsxs("div",{style:{marginBottom:14},children:[r.jsx("div",{style:{fontSize:10,fontWeight:500,color:"#9CA3AF",marginBottom:6,textTransform:"uppercase",letterSpacing:"0.4px"},children:"Resumo"}),r.jsx("p",{style:{fontSize:12,color:"#374151",lineHeight:1.6,margin:0},children:e.summary_executive})]}),e.recruiter_note&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx(_g,{children:"Nota do recrutador"}),r.jsx("div",{style:{padding:"14px 16px",borderRadius:10,background:"rgba(108,36,245,0.04)",border:"1px solid rgba(108,36,245,0.12)"},children:r.jsx("p",{style:{fontSize:13,color:"#374151",lineHeight:1.6,margin:0},children:e.recruiter_note})})]}),(t==null?void 0:t.show_rating)&&(e.rating_score!=null||l)&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsxs(_g,{children:["Análise",e.rating_score!=null?` · ${e.rating_score}`:""]}),r.jsxs("div",{style:{background:"#fff",border:"1px solid #E5E7EB",borderRadius:12,padding:16},children:[(l==null?void 0:l.reasoning)&&r.jsx("p",{style:{fontSize:13,color:"#374151",lineHeight:1.6,marginBottom:14},children:l.reasoning}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16},children:[((m=l==null?void 0:l.strengths)==null?void 0:m.length)>0&&r.jsxs("div",{children:[r.jsxs("div",{style:{fontSize:11,fontWeight:600,color:"#639922",marginBottom:6,display:"flex",alignItems:"center",gap:4},children:[r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#639922",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6L9 17l-5-5"})}),"Pontos fortes"]}),r.jsx("ul",{style:{margin:0,paddingLeft:16,fontSize:12,color:"#374151",lineHeight:1.7},children:l.strengths.map((j,k)=>r.jsx("li",{children:j},k))})]}),((x=l==null?void 0:l.gaps)==null?void 0:x.length)>0&&r.jsxs("div",{children:[r.jsxs("div",{style:{fontSize:11,fontWeight:600,color:"#BA7517",marginBottom:6,display:"flex",alignItems:"center",gap:4},children:[r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#BA7517",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),r.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),"Pontos de atenção"]}),r.jsx("ul",{style:{margin:0,paddingLeft:16,fontSize:12,color:"#374151",lineHeight:1.7},children:l.gaps.map((j,k)=>r.jsx("li",{children:j},k))})]})]})]})]}),((w=e.experiences)==null?void 0:w.length)>0&&r.jsx(XA,{title:"Experiência",count:e.experiences.length,expanded:d.exp!==!1,onToggle:()=>p("exp"),children:e.experiences.map((j,k)=>r.jsx(Kie,{exp:j},k))}),((y=e.education)==null?void 0:y.length)>0&&r.jsx(XA,{title:"Formação",count:e.education.length,expanded:d.edu!==!1,onToggle:()=>p("edu"),children:e.education.map((j,k)=>r.jsx(Yie,{edu:j},k))}),(t==null?void 0:t.show_cv)&&e.cv_url&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx(_g,{children:"Currículo"}),r.jsx("iframe",{src:e.cv_url,style:{width:"100%",height:400,border:"none",borderRadius:8,background:"#fff"},title:"CV"})]}
748),(t==null?void 0:t.show_assessments)&&((v=e.assessments)==null?void 0:v.length)>0&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx(_g,{children:"Avaliações"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:e.assessments.map((j,k)=>r.jsxs("div",{style:{background:"#fff",border:"1px solid #E5E7EB",borderRadius:12,padding:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[r.jsx("span",{style:{fontSize:13,fontWeight:600,color:"#1A1F36"},children:j.name}),j.profile_label&&r.jsx("span",{style:{fontSize:11,padding:"2px 8px",borderRadius:999,background:"#EEF2FF",color:"#4338CA"},children:j.profile_label})]}),j.summary&&r.jsx("p",{style:{fontSize:12,color:"#6B7280",lineHeight:1.5,margin:"0 0 8px"},children:j.summary}),j.dimension_scores&&r.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:Object.entries(j.dimension_scores).map(([S,_])=>r.jsxs("span",{style:{fontSize:11,padding:"2px 8px",borderRadius:6,background:"#F6F8FA",color:"#374151"},children:[S,": ",r.jsx("strong",{children:typeof _=="number"?_.toFixed(0):_})]},S))})]},k))})]})]})}function XA({title:e,count:t,expanded:n,onToggle:s,children:i}){const a=n?Dc:ar;return r.jsxs("div",{style:{marginBottom:20},children:[r.jsxs("button",{onClick:s,style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",cursor:"pointer",padding:0,marginBottom:n?8:0,fontFamily:al},children:[r.jsxs("span",{style:{fontSize:10,fontWeight:600,letterSpacing:"0.08em",color:"#9CA3AF",textTransform:"uppercase"},children:[e," (",t,")"]}),r.jsx(a,{size:12,color:"#9CA3AF"})]}),n&&r.jsx("div",{style:{background:"#fff",border:"1px solid #E5E7EB",borderRadius:12,padding:"4px 16px"},children:i})]})}const Zie=60*1e3;function Xa(){const{user:e}=tr(),t=(e==null?void 0:e.email)||null,[n,s]=g.useState(null),[i,a]=g.useState(null),[o,l]=g.useState(!0),[c,d]=g.useState(null),u=g.useRef({data:null,timestamp:0,workspace_id:null});g.useEffect(()=>{if(!t){s(null);return}let x=!1;return(async()=>{var w;try{const y=await ne.functions.invoke("getWorkspaceId",{user_email:t}),v=((w=y==null?void 0:y.data)==null?void 0:w.workspace_id)||(y==null?void 0:y.workspace_id)||null;x||s(v)}catch(y){x||(console.error("useEntitlements getWorkspaceId error:",y==null?void 0:y.message),s(null))}})(),()=>{x=!0}},[t]);const p=g.useCallback(async(x=!1)=>{if(!n){a(null),l(!1);return}const w=Date.now();if(!x&&u.current.data&&u.current.workspace_id===n&&w-u.current.timestamp<Zie){a(u.current.data),l(!1);return}try{l(!0),d(null);const v=await ne.functions.invoke("getWorkspaceEntitlements",{workspace_id:n}),j=(v==null?void 0:v.data)||v;if(j!=null&&j.success){const k=j.entitlements;u.current={data:k,timestamp:w,workspace_id:n},a(k)}else d((j==null?void 0:j.error)||"Erro ao carregar entitlements")}catch(v){console.error("useEntitlements error:",v==null?void 0:v.message),d((v==null?void 0:v.message)||"Erro ao carregar entitlements")}finally{l(!1)}},[n]);g.useEffect(()=>{p()},[p]);const m=g.useCallback(()=>p(!0),[p]);return t?{entitlements:i,loading:o,error:c,refresh:m}:{entitlements:null,loading:!1,error:null,refresh:()=>{}}}const eae=[{icon:$m,label:"Minha conta",path:"/app/conta/geral"},{icon:Gf,label:"Configurações",path:"/app/conta/geral"},{icon:Nr,label:"Equipe & funções",path:"/app/conta/equipe"},{icon:Ly,label:"Plano e faturamento",path:"/app/conta/plano"},{icon:RU,label:"Módulos",path:"/app/conta/modulos"},{icon:i8,label:"Suporte",path:"/app/suporte"}];function tae(e){var n;if(!e)return"?";const t=e.trim().split(/\s+/);return t.length===1?((n=t[0][0])==null?void 0:n.toUpperCase())||"?":(t[0][0]+t[t.length-1][0]).toUpperCase()}function nae({collapsed:e}){const{user:t}=tr(),n=In(),[s,i]=g.useState(!1),[a,o]=g.useState(""),[l,c]=g.useState(null),d=g.useRef(null),u=g.useRef(null);g.useEffect(()=>{if(!(t!=null&&t.email))return;let C=!0;const D=async()=>{try{const L=await ne.functions.invoke("getWorkspaceId",{user_email:t.email}),T=(L==null?void 0:L.data)||L,R=T==null?void 0:T.workspace_id;
748if(C&&R)try{const U=await ne.entities.Workspace.get(R);C&&o((U==null?void 0:U.name)||"");try{const I=await ne.entities.Membership.filter({workspace_id:R,user_email:t.email});C&&(I==null?void 0:I.length)>0&&I[0].full_name&&c(I[0].full_name)}catch{}}catch{}}catch{}};D();const P=()=>D();return window.addEventListener("workspace-updated",P),()=>{C=!1,window.removeEventListener("workspace-updated",P)}},[t==null?void 0:t.email]),g.useEffect(()=>{if(!s)return;function C(P){var L,T;(L=d.current)!=null&&L.contains(P.target)||(T=u.current)!=null&&T.contains(P.target)||i(!1)}function D(P){P.key==="Escape"&&i(!1)}return document.addEventListener("mousedown",C),document.addEventListener("keydown",D),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",D)}},[s]);const p=C=>{i(!1),n(C)},m=()=>{i(!1);try{ne.auth.logout("/")}catch{window.location.href="/"}},[x,w]=g.useState(null);g.useEffect(()=>{let C=!0;const D=async()=>{try{const L=await ne.auth.me();C&&w(L)}catch{}};D();const P=L=>{L.detail?(w(L.detail),L.detail.name&&c(L.detail.name)):D()};return window.addEventListener("user-updated",P),()=>{C=!1,window.removeEventListener("user-updated",P)}},[]);const y=x||t,v=tae((y==null?void 0:y.full_name)||(y==null?void 0:y.name)),j=l||(y==null?void 0:y.name)||(y==null?void 0:y.email)||"Usuário",k=j.split(" ")[0]||j,S=(y==null?void 0:y.photo_url)||(y==null?void 0:y.avatar_url)||null,_=eae,[F,A]=g.useState(!1);return r.jsxs("div",{style:{position:"relative",padding:e?"6px 4px 4px":"6px 2px 2px"},children:[r.jsxs("button",{ref:d,onClick:()=>i(C=>!C),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:e?"center":"flex-start",gap:e?0:10,padding:e?"7px 0":10,background:e?"transparent":"#FFFFFF",border:e?"none":"1px solid #E3E8EE",borderRadius:10,cursor:"pointer",fontFamily:"'Switzer', sans-serif",textAlign:"left",transition:"box-shadow 0.14s, transform 0.08s",boxShadow:e?"none":F?"0 4px 12px rgba(0,0,0,0.08)":"0 2px 5px -1px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04)",transform:!e&&F?"translateY(-1px)":"none"},children:[r.jsx("span",{style:{width:30,height:30,flex:"0 0 30px",borderRadius:"50%",background:"#6C24F5",color:"#FFFFFF",fontSize:11,fontWeight:600,fontFamily:"'Switzer', sans-serif",display:"grid",placeItems:"center",overflow:"hidden"},children:S?r.jsx("img",{src:S,alt:k,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"50%"}}):v}),!e&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{flex:1,minWidth:0,lineHeight:1.2},children:[r.jsx("div",{style:{fontSize:13,fontWeight:600,color:"#1A1F36",fontFamily:"'Switzer', sans-serif",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:k}),a&&r.jsx("div",{style:{fontSize:11,color:"#A3ACB9",fontFamily:"'Switzer', sans-serif",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:a})]}),r.jsx(rV,{size:13,strokeWidth:1.5,style:{flex:"0 0 14px",color:"#A3ACB9"}})]})]}),s&&r.jsxs("div",{ref:u,style:{position:"absolute",bottom:"calc(100% + 8px)",left:0,right:e?"auto":0,minWidth:e?220:"auto",background:"var(--sv-surface)",border:"1px solid var(--sv-border)",borderRadius:10,boxShadow:"var(--sv-sh-pop)",padding:6,zIndex:50,fontFamily:"var(--sv-font)"},children:[_.map(C=>{const D=C.icon;return r.jsxs("button",{onClick:()=>p(C.path),style:{width:"100%",display:"flex",alignItems:"center",gap:10,padding:"8px 10px",borderRadius:6,background:"transparent",border:"none",fontSize:13,color:"var(--sv-ink)",cursor:"pointer",textAlign:"left",fontFamily:"inherit"},onMouseEnter:P=>{P.currentTarget.style.background="var(--sv-inset)"},onMouseLeave:P=>{P.currentTarget.style.background="transparent"},children:[r.jsx(D,{size:15,strokeWidth:1.6,style:{color:"var(--sv-ink-2)"}}),C.label]},C.path)}),r.jsx("div",{style:{height:1,background:"var(--sv-border)",margin:"6px 4px"}}),r.jsxs("button",{onClick:m,style:{width:"100%",display:"flex",alignItems:"center",gap:10,padding:"8px 10px",borderRadius:6,background:"transparent",border:"none",fontSize:13,color:"var(--sv-red-txt)",cursor:"pointer",textAlign:"left",fontFamily:"inherit"},onMouseEnter:C=>{C.currentTarget.style.background="var(--sv-inset)"},onMouseLeave:C=>{C.currentTarget.style.background="transparent"},children:[r.jsx(p8,{size:15,strokeWidth:1.6}),"Sair"]})]})]})}const $P=g.createContext({collapsed:!1,toggle:()=>{}}),rae=()=>g.useContext($P),sae={visao:pS,vagas:On,pessoas:Nr,avaliacoes:za,empresas:jc,agenda:kl,analises:ts,automacoes:Wx};function iae(e){var c,d,u,p;const t=e||{},n=(c=t.jobs)==null?void 0:c.unlocked,s=(d=t.ats)==null?void 0:d.unlocked,i=(u=t.assessments)==null?void 0:u.unlocked,a=(p=t.talent_bank)==null?void 0:p.unlocked,o=[{key:"visao",label:"Visão geral",path:"/app",exact:!0}];(n||s)&&o.push({key:"vagas",label:"Vagas",path:"/app/vagas"}),(s||a)&&o.push({key:"pessoas",label:"Pessoas",path:"/app/pessoas"}),i&&o.push({key:"avaliacoes",label:"Avaliações",path:"/app/assessments"}),s&&o.push({key:"agenda",label:"Agenda",path:"/app/agenda"});const l=[];return s&&(l.push({key:"analises",label:"Análises",path:"/app/analises"}),l.push({key:"automacoes",label:"Automações",path:"/app/automacoes"})),{recrutamento:o,inteligencia:l}}function JA({item:e,isActive:t,collapsed:n}){const s=sae[e.key]||pS;return r.jsxs(ut,{to:e.path,className:"group flex items-center gap-2.5 w-full text-left no-underline relative",style:{height:36,padding:"0 10px",borderRadius:"var(--sv-r-md)",color:t?"var(--sv-ink)":"var(--sv-ink-2)",fontWeight:t?600:500,fontSize:14,fontFamily:"var(--sv-font)",letterSpacing:"-0.011em"},children:[r.jsx("span",{className:"flex items-center justify-center flex-shrink-0",style:{width:t?30:20,height:t?30:20,borderRadius:t?"var(--sv-r-sm)":0,background:t?"var(--sv-accent-muted)":"transparent",color:t?"var(--sv-accent)":"inherit"},children:r.jsx(s,{size:17,strokeWidth:1.5,style:{color:t?"var(--sv-accent)":void 0}})}),!n&&r.jsx("span",{className:"flex-1 truncate",children:e.label})]})}function aae(){const{collapsed:e,toggle:t}=rae(),n=Bs(),{entitlements:s}=Xa(),{recrutamento:i,inteligencia:a}=iae(s);function o(l){return l.exact?n.pathname===l.path:n.pathname.startsWith(l.path)}return r.jsxs("aside",{className:"fixed left-0 top-0 h-screen flex flex-col z-40",style:{width:e?"var(--sv-rail-w-c)":"var(--sv-rail-w)",background:"var(--sv-surface)",borderRight:"1px solid var(--sv-border)",padding:"0 12px 12px",transition:"width 0.22s cubic-bezier(0.4, 0, 0.2, 1)",fontFamily:"var(--sv-font)"},children:[r.jsxs("div",{className:"flex items-center gap-2 h-[52px]",style:{padding:e?0:"0 10px",justifyContent:e?"center":"flex-start"},children:[r.jsx(ut,{to:"/app",className:"flex items-center gap-2.5 min-w-0 no-underline",style:{flex:e?"none":1},children:e?r.jsx("img",{src:"https://media.base44.com/images/public/69dc1b168deed8792f4850e5/4be6bc5ca_20220405_SUMMIT_LINKEDIN-fotodeperfil-2.png",alt:"Summit",style:{width:28,height:28,objectFit:"contain",display:"block"}}):r.jsx(Io,{size:"sm",variant:"onLight"})}),!e&&r.jsx("button",{onClick:t,style:{width:24,height:24,borderRadius:6,color:"var(--sv-ink-3)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"transform 0.22s"},title:"Recolher",children:r.jsx(Sc,{size:15,strokeWidth:1.8})})]}),e&&r.jsx("button",{onClick:t,style:{width:"100%",height:24,borderRadius:6,color:"var(--sv-ink-3)",display:"flex",alignItems:"center",justifyContent:"center",marginTop:4,transform:"rotate(180deg)"},title:"Expandir",children:r.jsx(Sc,{size:15,strokeWidth:1.8})}),!e&&r.jsx("div",{style:{fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--sv-ink-3)",padding:"10px 12px 8px"},children:"Recrutamento"}),e&&r.jsx("div",{style:{height:12}}),r.jsx("nav",{className:"flex flex-col gap-0.5",children:i.map(l=>r.jsx(JA,{item:l,isActive:o(l),collapsed:e},l.key))}),a.length>0&&r.jsxs(r.Fragment,{children:[!e&&r.jsx("div",{style:{fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--sv-ink-3)",padding:"22px 12px 8px"},children:"Inteligência"}),e&&r.jsx("div",{style:{height:12}}),r.jsx("nav",{className:"flex flex-col gap-0.5",children:a.map(l
748=>r.jsx(JA,{item:l,isActive:o(l),collapsed:e},l.key))})]}),r.jsx("div",{className:"flex-1"}),r.jsx(nae,{collapsed:e})]})}function oae(e){if(!e)return"";const t=new Date(e),n=Math.floor((Date.now()-t.getTime())/1e3);if(n<60)return`há ${Math.max(n,1)}s`;const s=Math.floor(n/60);if(s<60)return`há ${s}min`;const i=Math.floor(s/60);return i<24?`há ${i}h`:`há ${Math.floor(i/24)}d`}function lae(){const e=In(),[t,n]=g.useState(!1),[s,i]=g.useState([]),[a,o]=g.useState(null),[l,c]=g.useState(null),[d,u]=g.useState(!1),p=g.useRef(null);g.useEffect(()=>{(async()=>{var k;try{const S=await ne.auth.me();if(!S)return;c(S.email);const _=await ne.functions.invoke("getWorkspaceId",{user_email:S.email}),F=((k=_==null?void 0:_.data)==null?void 0:k.workspace_id)||(_==null?void 0:_.workspace_id);F&&o(F)}catch{}})()},[]);const m=g.useCallback(async()=>{if(!(!a||!l)){u(!0);try{const k=await ne.entities.AutomationNotification.filter({workspace_id:a,user_id:l},"-created_date",20);i(k||[])}catch{}finally{u(!1)}}},[a,l]);g.useEffect(()=>{if(!a||!l)return;m();const k=setInterval(m,3e4);return()=>clearInterval(k)},[a,l,m]),g.useEffect(()=>{function k(S){p.current&&!p.current.contains(S.target)&&n(!1)}return t&&document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[t]);const x=s.filter(k=>!k.is_read),w=x.length,y=[...x,...s.filter(k=>k.is_read)],v=async()=>{const k=x.map(S=>S.id);k.length!==0&&(i(S=>S.map(_=>({..._,is_read:!0}))),await Promise.all(k.map(S=>ne.entities.AutomationNotification.update(S,{is_read:!0}).catch(()=>{}))))},j=async k=>{k.is_read||(i(S=>S.map(_=>_.id===k.id?{..._,is_read:!0}:_)),ne.entities.AutomationNotification.update(k.id,{is_read:!0}).catch(()=>{})),n(!1),k.action_url&&e(k.action_url)};return r.jsxs("div",{ref:p,style:{position:"relative"},children:[r.jsxs("button",{type:"button",onClick:()=>n(k=>!k),style:{background:"transparent",border:"none",padding:6,cursor:"pointer",color:"#3a4052",position:"relative",display:"flex",alignItems:"center"},"aria-label":"Notificações",children:[r.jsx(n8,{size:18}),w>0&&r.jsx("span",{style:{position:"absolute",top:0,right:-2,background:"#dc2626",color:"#fff",fontSize:9,fontWeight:700,borderRadius:999,minWidth:16,height:16,padding:"0 4px",display:"inline-flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff",lineHeight:1},children:w>99?"99+":w})]}),t&&r.jsxs("div",{style:{position:"absolute",top:38,right:0,width:360,background:"#fff",border:"1px solid #e4e8ef",borderRadius:8,boxShadow:"0 4px 12px rgba(15,23,42,0.08)",zIndex:1e3,overflow:"hidden"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 14px",borderBottom:"1px solid #f1f3f7"},children:[r.jsx("span",{style:{fontSize:13,fontWeight:600,color:"#0f172a"},children:"Notificações"}),w>0&&r.jsx("button",{type:"button",onClick:v,style:{background:"none",border:"none",color:"#6C24F5",fontSize:11,cursor:"pointer",fontWeight:500},children:"Marcar todas como lidas"})]}),r.jsx("div",{style:{maxHeight:400,overflowY:"auto"},children:d&&s.length===0?r.jsx("div",{style:{padding:24,display:"flex",justifyContent:"center"},children:r.jsx(rt,{size:16,className:"animate-spin",color:"#9ca3af"})}):y.length===0?r.jsx("div",{style:{padding:"32px 16px",textAlign:"center",color:"#9ca3af",fontSize:12},children:"Sem notificações"}):y.map(k=>r.jsxs("button",{type:"button",onClick:()=>j(k),style:{display:"block",width:"100%",textAlign:"left",padding:"12px 14px",background:k.is_read?"#fff":"#eef2ff",cursor:"pointer",border:"none",borderBottom:"1px solid #f1f3f7",fontFamily:"inherit"},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:8,alignItems:"flex-start"},children:[r.jsx("span",{style:{fontSize:12,fontWeight:600,color:"#0f172a"},children:k.title}),r.jsx("span",{style:{fontSize:10,color:"#94a3b8",whiteSpace:"nowrap",marginTop:2},children:oae(k.created_date)})]}),r.jsx("p",{style:{fontSize:11,color:"#475569",marginTop:4,lineHeight:1.4},children:k.message})]},k.id))})]})]})}const UP=g.createContext(null);function VP(){return g.useContext(UP)}function cae({children:e}){const[t,n]=g.useState(null),s=g.useCallback(()=>n(null),[]);return r.jsx(UP.Provider,{value:{override:t,setOverride:n,clearOverride:s},children:e})}const QA={"/app":{crumb:["Visão geral"],action:null},"/app/vagas":{crumb:["Vagas"],action:{label:"Nova vaga",path:"/app/vagas?new=1"}},"/app/pessoas":{crumb:["Pessoas"],action:null},"/app/analises":{crumb:["Análises"],action:null},"/app/agenda":{crumb:["Agenda"],action:null},"/app/automacoes":{crumb:["Automações"],action:null},"/app/assessments/results":{crumb:["Avaliações","Resultados"],action:null}};function dae(e){if(QA[e])return QA[e];
748if(e.startsWith("/app/assessments"))return{crumb:["Avaliações"],action:null};if(e.startsWith("/app/candidatos/"))return{crumb:["Pessoas","Candidato"],action:null};if(e.startsWith("/app/vagas"))return{crumb:["Vagas"],action:null};if(e==="/app")return{crumb:["Visão geral"],action:null};const t=e.split("/").filter(Boolean),n=t[t.length-1]||"Visão geral";return{crumb:[n.charAt(0).toUpperCase()+n.slice(1)],action:null}}function ZA({icon:e,disabled:t,onClick:n}){return r.jsx("button",{disabled:t,onClick:n,style:{width:24,height:24,display:"grid",placeItems:"center",background:"var(--sv-surface)",border:"1px solid var(--sv-border)",borderRadius:4,cursor:t?"default":"pointer",color:t?"var(--sv-ink-3)":"var(--sv-ink-2)",opacity:t?.5:1,transition:"background 0.12s",flexShrink:0},onMouseEnter:s=>{t||(s.currentTarget.style.background="var(--sv-inset)")},onMouseLeave:s=>s.currentTarget.style.background="var(--sv-surface)",children:e})}function uae({onOpenCmdk:e}){const t=Bs(),n=In(),s=VP(),i=s==null?void 0:s.override,{crumb:a,action:o}=dae(t.pathname),l=()=>i!=null&&i.crumb?r.jsx("nav",{style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:"var(--sv-ink-2)",minWidth:0},children:i.crumb.map((c,d)=>{const u=d===i.crumb.length-1;return r.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[d>0&&r.jsx(Qr,{size:12,style:{color:"var(--sv-ink-3)",flexShrink:0}}),c.to?r.jsx(ut,{to:c.to,style:{fontWeight:500,color:"var(--sv-ink-2)",textDecoration:"none",whiteSpace:"nowrap"},children:c.label}):r.jsx("span",{style:{fontWeight:u?600:500,color:u?"var(--sv-ink)":"var(--sv-ink-2)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:280},children:c.label})]},d)})}):r.jsx("nav",{style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:"var(--sv-ink-2)",minWidth:0},children:a.map((c,d)=>{const u=d===a.length-1;return r.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[d>0&&r.jsx(Qr,{size:12,style:{color:"var(--sv-ink-3)",flexShrink:0}}),r.jsx("span",{style:{fontWeight:u?600:500,color:u?"var(--sv-ink)":"var(--sv-ink-2)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:280},children:c})]},d)})});return r.jsxs("header",{style:{height:"var(--sv-topline-h)",borderBottom:"1px solid var(--sv-border)",background:"var(--sv-surface)",display:"flex",alignItems:"center",gap:12,padding:"0 28px",fontFamily:"var(--sv-font)",flexShrink:0},children:[l(),(i==null?void 0:i.pagination)&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5,marginLeft:8,flexShrink:0},children:[r.jsx(ZA,{icon:r.jsx(Sc,{size:13}),disabled:i.pagination.current<=0,onClick:()=>{var c,d;return(d=(c=i.pagination).onNavigate)==null?void 0:d.call(c,-1)}}),r.jsxs("span",{style:{fontSize:11,color:"var(--sv-ink-3)",fontFamily:"var(--sv-num)",fontFeatureSettings:'"tnum" 1',whiteSpace:"nowrap"},children:[i.pagination.current+1,"/",i.pagination.total]}),r.jsx(ZA,{icon:r.jsx(Qr,{size:13}),disabled:i.pagination.current>=i.pagination.total-1,onClick:()=>{var c,d;return(d=(c=i.pagination).onNavigate)==null?void 0:d.call(c,1)}})]}),r.jsx("div",{style:{flex:1}}),r.jsxs("button",{onClick:e,style:{display:"flex",alignItems:"center",gap:8,height:32,padding:"0 10px",background:"var(--sv-inset)",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-md)",color:"var(--sv-ink-2)",fontSize:12.5,cursor:"pointer",fontFamily:"inherit",minWidth:220},children:[r.jsx(Ua,{size:13,strokeWidth:1.6}),r.jsx("span",{style:{flex:1,textAlign:"left"},children:"Buscar…"}),r.jsx("kbd",{style:{fontSize:10,fontFamily:"var(--sv-num)",padding:"1px 5px",borderRadius:4,background:"var(--sv-surface)",border:"1px solid var(--sv-border)",color:"var(--sv-ink-2)"},children:"⌘K"})]}),r.jsx(lae,{}),o&&r.jsxs("button",{onClick:()=>n(o.path),style:{display:"flex",alignItems:"center",gap:5,height:32,padding:"0 12px",background:"var(--sv-accent)",color:"#FFFFFF",border:"none",borderRadius:"var(--sv-r-md)",fontSize:13,fontWeight:600,cursor:"pointer",fontFamily:"inherit",letterSpacing:"-0.011em"},children:[r.jsx(Ln,{size:14,strokeWidth:2}),o.label]})]})}function fae(e){var n;const t=e.trim().split(/\s+/);return t.length===1?((n=t[0][0])==null?void 0:n.toUpperCase())||"?":(t[0][0]+t[t.length-1][0]).toUpperCase()}function Md(e){if(e.talent_profile)return e.talent_profile;if(e.snapshot)return e.snapshot;if(e.profile_snapshot_json)try{return JSON.parse(e.profile_snapshot_json)}catch{return{}}return{}}function pae(e){const t=e.updated_date||e.applied_at||e.created_date;if(!t)return null;const n=new Date(t);if(isNaN(n.getTime()))return null;const s=Date.now()-n.getTime();return Math.floor(s/(1e3*60*60*24))}function hae(e){return e==null?null:e<1?"há <1d":`há ${e}d`}function mae(e){return e?String(e).replace(/[^\d]/g,""):""}function xo(e){return typeof e=="string"&&e.endsWith("@summit.internal")}const e3="#E2E8F0",t3=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(e||"").trim());function gae(e){if(!e)return"?";const t=String(e).trim().split(/\s+/);return t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function n3({s:e,onPick:t}){const n=e.type==="team";return r.jsxs("button",{type:"button",onMouseDown:s=>s.preventDefault(),onClick:()=>t(e.email),className:"w-full flex items-center gap-2 hover:bg-gray-50 text-left",style:{padding:"8px 12px",fontSize:13,cursor:"pointer"},children:[r.jsx("div",{className:"flex items-center justify-center flex-shrink-0",style:{width:28,height:28,borderRadius:"50%",background:n?"#EEEDFE":"#F6F8FA",color:n?"#3C3489":"#6B7280",fontSize:11,fontWeight:500},children:gae(e.name)}
748),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"truncate text-gray-900",children:e.name}),r.jsx("div",{className:"truncate text-xs text-gray-500",children:e.email})]})]})}function ry({label:e,list:t,setList:n,inputValue:s,setInputValue:i,suggestions:a}){var v;const[o,l]=g.useState(!1),c=g.useRef(null),d=j=>{const k=String(j||"").trim();if(!k||!t3(k)||t.includes(k)){i("");return}n([...t,k]),i("")},u=()=>{const j=s.trim().replace(/[,;]$/,"");if(j&&t3(j)){if(t.includes(j)){i("");return}n([...t,j]),i("")}},p=j=>{j.key==="Enter"||j.key===","||j.key===";"?(j.preventDefault(),u()):j.key==="Backspace"&&!s&&t.length>0&&n(t.slice(0,-1))},{teamMatches:m,candMatches:x}=g.useMemo(()=>{const j=new Set(t),k=s.trim().toLowerCase(),S=_=>!_.email||j.has(_.email)?!1:k?(_.name||"").toLowerCase().includes(k)||_.email.toLowerCase().includes(k):!0;return{teamMatches:((a==null?void 0:a.team)||[]).filter(S).slice(0,30),candMatches:((a==null?void 0:a.candidates)||[]).filter(S).slice(0,30)}},[a,t,s]),w=(((v=a==null?void 0:a.candidates)==null?void 0:v.length)||0)>0,y=o&&(m.length>0||x.length>0||w);return r.jsxs("div",{className:"relative",children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:e}),r.jsxs("div",{className:"w-full text-sm px-2 py-1.5 rounded-lg flex flex-wrap gap-1.5 items-center bg-white focus-within:ring-2 focus-within:ring-indigo-100 focus-within:border-indigo-400",style:{border:`1px solid ${e3}`,minHeight:38},children:[t.map(j=>r.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md",style:{background:"#EEEDFE",color:"#3C3489",fontSize:12,borderRadius:6},children:[j,r.jsx("button",{type:"button",onClick:()=>n(t.filter(k=>k!==j)),className:"hover:opacity-70",children:r.jsx(Jt,{size:11})})]},j)),r.jsx("input",{type:"text",value:s,onChange:j=>i(j.target.value),onKeyDown:p,onFocus:()=>{c.current&&clearTimeout(c.current),l(!0)},onBlur:()=>{c.current=setTimeout(()=>{l(!1),u()},150)},placeholder:t.length===0?"Adicionar email...":"",className:"flex-1 min-w-[120px] text-sm outline-none bg-transparent"})]}),y&&r.jsxs("div",{className:"absolute left-0 right-0 mt-1 bg-white overflow-y-auto",style:{border:`0.5px solid ${e3}`,borderRadius:8,maxHeight:200,boxShadow:"0 1px 2px rgba(0,0,0,0.05)",zIndex:1e3},children:[m.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"text-gray-500 uppercase font-medium",style:{fontSize:11,padding:"6px 12px"},children:"Equipe"}),m.map(j=>r.jsx(n3,{s:j,onPick:d},`t-${j.email}`))]}),w&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"text-gray-500 uppercase font-medium",style:{fontSize:11,padding:"6px 12px"},children:"Candidatos"}),x.length>0?x.map(j=>r.jsx(n3,{s:j,onPick:d},`c-${j.email}`)):r.jsx("div",{className:"italic text-gray-400",style:{padding:"8px 12px",fontSize:12},children:"Nenhum candidato encontrado"})]})]})]})}const e2="#6C24F5",dd="#E2E8F0",r3=e=>e?`R$ ${Number(e).toLocaleString("pt-BR")}`:"",t2=e=>!!e&&e.toLowerCase().endsWith("@summit.internal");function s3(e){return e?'<div style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333; max-width: 600px;">'+(/<\s*(p|div|br|span|a|h[1-6]|ul|ol|li|table|img|strong|em|b|i)\b/i.test(e)?e:e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").split(/\n\n+/).map(a=>'<p style="margin: 0 0 12px 0;">'+a.replace(/\n/g,"<br>")+"</p>").join(""))+"</div>":""}function i3(e,t){if(!t||typeof t!="string"||!t.trim())return e;const i='<br><br><div style="border-top:1px solid #cccccc;padding-top:12px;margin-top:12px;">'+(/<(p|div|br|img|a|span|strong|em|b|i|h[1-6])\b/i.test(t)?t:t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br>"))+"</div>";return e+i}function Cg(e,t){if(!e)return"";const{candidateProfile:n={},job:s,workspaceName:i,recruiterName:a,calendarLink:o,customFields:l={}}=t,c={candidate_name:n.full_name||"",candidate_first_name:n.first_name||(n.full_name||"").split(" ")[0]||"",candidate_email:n.email||"",candidate_p
748hone:n.phone||"",current_salary:r3(n.salary_current),salary_expectation:r3(n.salary_expectation),job_title:(s==null?void 0:s.title)||"[título da vaga]",company_name:i||"",recruiter_name:a||"",calendar_link:o||""};return e.replace(/\{\{([^}]+)\}\}/g,(d,u)=>{const p=String(u).trim();if(p.startsWith("custom:")){const m=p.slice(7).trim(),x=l[m];return x==null?"":String(x)}return c[p]!=null?c[p]:""})}function Cc({candidateProfile:e,candidates:t,job:n,workspaceId:s,onClose:i,onSent:a,initialSubject:o,initialBody:l}){const{user:c}=tr(),d=Array.isArray(t)&&t.length>0,u=g.useMemo(()=>d?t:[],[d,t]),p=u.length,[m,x]=g.useState([]),[w,y]=g.useState(""),[v,j]=g.useState(o||""),[k,S]=g.useState(l||""),[_,F]=g.useState(!0),[A,C]=g.useState(!1),[D,P]=g.useState(null),[L,T]=g.useState(!1),[R,U]=g.useState(""),[I,H]=g.useState({}),[V,X]=g.useState(!1),[N,W]=g.useState([]),[O,G]=g.useState([]),[M,z]=g.useState(""),[K,Y]=g.useState(""),[J,Q]=g.useState({team:[],candidates:[]}),[ie,ae]=g.useState({current:0,total:0}),[re,pe]=g.useState(null),Z=(e==null?void 0:e.email)||"",Ne=t2(Z),te=(Ve,ze="success")=>{P({msg:Ve,type:ze}),setTimeout(()=>P(null),3500)};g.useEffect(()=>{if(!s)return;let Ve=!0;return(async()=>{F(!0);try{const[ze,at,Nt]=await Promise.all([ne.entities.MessageTemplate.filter({workspace_id:s},"-created_date").catch(()=>[]),ne.entities.Workspace.get(s).catch(()=>null),!d&&(e!=null&&e.id)?ne.entities.WorkspaceTalent.filter({workspace_id:s,talent_profile_id:e.id}).catch(()=>[]):Promise.resolve([])]);if(!Ve)return;x(ze||[]),U((at==null?void 0:at.name)||(at==null?void 0:at.company_name)||"");const _e=(Nt||[])[0];let be={};if(_e!=null&&_e.custom_fields_json)try{be=typeof _e.custom_fields_json=="string"?JSON.parse(_e.custom_fields_json):_e.custom_fields_json}catch{be={}}else _e!=null&&_e.custom_fields&&typeof _e.custom_fields=="object"&&(be=_e.custom_fields);H(be||{})}catch{}Ve&&F(!1)})(),()=>{Ve=!1}},[s,e==null?void 0:e.id,d]),g.useEffect(()=>{if(!s)return;let Ve=!0;return(async()=>{let ze=[];try{const Nt=await ne.entities.Membership.filter({workspace_id:s,status:"active"});ze=await Promise.all((Nt||[]).map(async _e=>{var Xe;const be=_e==null?void 0:_e.user_email;if(!be)return null;let Re=be.split("@")[0];try{const He=await ne.entities.User.filter({email:be});(Xe=He==null?void 0:He[0])!=null&&Xe.full_name&&(Re=He[0].full_name)}catch{}return{name:Re,email:be,type:"team"}})),ze=ze.filter(Boolean)}catch{ze=[]}let at=[];try{const Nt=await ne.entities.WorkspaceTalent.filter({workspace_id:s}),_e=Array.from(new Set((Nt||[]).map(be=>be.talent_profile_id).filter(Boolean)));_e.length>0&&(at=(await ne.entities.TalentProfile.filter({id:{$in:_e}})||[]).filter(Re=>(Re==null?void 0:Re.email)&&!t2(Re.email)).map(Re=>({name:Re.full_name||Re.email.split("@")[0],email:Re.email,type:"candidate"})))}catch{at=[]}Ve&&Q({team:ze,candidates:at})})(),()=>{Ve=!1}},[s]);const xe=g.useCallback(async Ve=>{if(!Ve||!s)return{};try{const at=(await ne.entities.WorkspaceTalent.filter({workspace_id:s,talent_profile_id:Ve})||[])[0];if(at!=null&&at.custom_fields_json)try{return typeof at.custom_fields_json=="string"?JSON.parse(at.custom_fields_json):at.custom_fields_json}catch{return{}}return at!=null&&at.custom_fields&&typeof at.custom_fields=="object"?at.custom_fields:{}}catch{return{}}},[s]),he=g.useCallback(Ve=>{if(d){j(Ve.subject||""),S(Ve.body_html||"");return}const ze={candidateProfile:e,job:n,workspaceName:R,recruiterName:(c==null?void 0:c.full_name)||(c==null?void 0:c.email)||"",calendarLink:(c==null?void 0:c.calendar_link)||"",customFields:I};j(Cg(Ve.subject||"",ze)),S(Cg(Ve.body_html||"",ze))},[d,e,n,R,c,I]),le=Ve=>{if(y(Ve),!Ve)return;const ze=m.find(at=>at.id===Ve);ze&&he(ze)},ft=d?async()=>{if(!v.trim()||!k.trim()||A)return;C(!0),T(!1),pe(null),ae({current:0,total:p});let Ve=n||null;const ze=(n==null?void 0:n.id)||null;if(ze)try{const Re=await ne.entities.Job.get(ze);Re&&(Ve=Re)}catch{}let at=0,Nt=0;const _e=[];let be=!1;for(let Re=0;Re<u.length;Re++){const Xe=u[Re];ae({current:Re+1,total:p});const He=(Xe==null?void 0:Xe.email)||"",St=(Xe==null?void 0:Xe.full_name)||(Xe==null?void 0:Xe.first_name)||He||`Candidato ${Re+1}`;if(!He||t2(He)){Nt++,_e.push({name:St,reason:"sem email real"});continue}const Ct=(Xe==null?void 0:Xe.talent_profile_id)||null,Se=Ct?await xe(Ct):{},et={candidateProfile:Xe,job:Ve,workspaceName:R,recruiterName:(c==null?void 0:c.full_name)||(c==null?void 0:c.email)||"",calendarLink:(c==null?void 0:c.calendar_link)||"",customFields:Se},bt=Cg(v,et).trim(),Ot=Cg(k,et);try{const sn=await ne.functions.invoke("sendEmailToCandidate",{candidate_email:He,talent_profile_id:Ct,job_id:ze,subject:bt,body_html:i3(s3(Ot),c==null?void 0:c.email_signature),cc:N,bcc:O}),Vt=(sn==null?void 0:sn.data)||sn;if(Vt!=null&&Vt.success)at++;else{Nt++;
748const Un=String((Vt==null?void 0:Vt.error)||"erro desconhecido");/no_email_connector|no_connector|not_connected|no_provider/i.test(Un)&&(be=!0),_e.push({name:St,reason:Un})}}catch(sn){Nt++,_e.push({name:St,reason:(sn==null?void 0:sn.message)||"falha"})}}C(!1),pe({sent:at,failed:Nt,failures:_e}),be&&T(!0),a==null||a({sent:at,failed:Nt}),Nt===0&&at>0&&setTimeout(()=>i==null?void 0:i(),2e3)}:async()=>{if(!(!v.trim()||!k.trim()||Ne||A)){C(!0),T(!1);try{const Ve=await ne.functions.invoke("sendEmailToCandidate",{candidate_email:Z,talent_profile_id:e.id,job_id:(n==null?void 0:n.id)||null,subject:v.trim(),body_html:i3(s3(k),c==null?void 0:c.email_signature),cc:N,bcc:O}),ze=(Ve==null?void 0:Ve.data)||Ve;if(ze!=null&&ze.success)te("Email enviado com sucesso"),a==null||a(),setTimeout(()=>i==null?void 0:i(),400);else{const at=String((ze==null?void 0:ze.error)||"Erro desconhecido");/no_email_connector|no_connector|not_connected|no_provider/i.test(at)?T(!0):te(`Erro ao enviar email: ${at}`,"error")}}catch(Ve){te(`Erro ao enviar email: ${(Ve==null?void 0:Ve.message)||"falha"}`,"error")}C(!1)}},Qe=d?v.trim()&&k.trim()&&!A&&p>0:!Ne&&v.trim()&&k.trim()&&!A;return r.jsxs("div",{onClick:()=>!A&&(i==null?void 0:i()),style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:2e3,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:[r.jsxs("div",{onClick:Ve=>Ve.stopPropagation(),style:{background:"#fff",borderRadius:12,width:"90vw",maxWidth:640,maxHeight:"90vh",display:"flex",flexDirection:"column",boxShadow:"0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04)"},children:[r.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",style:{borderBottom:`1px solid ${dd}`},children:[r.jsx("h3",{className:"text-base font-semibold text-gray-900",children:d?`Enviar Email para ${p} candidatos`:"Enviar email"}),r.jsx("button",{type:"button",onClick:i,disabled:A,className:"p-1.5 rounded hover:bg-gray-100 text-gray-500 disabled:opacity-50",children:r.jsx(Jt,{size:18})})]}),r.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-5 space-y-4",children:_?r.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-gray-400 py-10",children:[r.jsx(rt,{size:14,className:"animate-spin"})," Carregando..."]}):r.jsxs(r.Fragment,{children:[L&&r.jsxs("div",{className:"rounded-lg px-3 py-2.5 flex items-start gap-2",style:{background:"#FEF3C7",border:"1px solid #F59E0B",color:"#92400E"},children:[r.jsx(_o,{size:16,className:"mt-0.5 flex-shrink-0"}),r.jsxs("div",{className:"text-xs leading-relaxed flex-1",children:["Nenhuma conta de email conectada. Conecte Gmail ou Outlook em"," ",r.jsxs("a",{href:"/app/conta/integracoes",className:"font-semibold underline inline-flex items-center gap-1",children:["Configurações > Integrações ",r.jsx($a,{size:11})]}),"."]})]}),!d&&r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700",children:"Para"}),r.jsx("button",{type:"button",onClick:()=>X(Ve=>!Ve),className:"text-xs font-medium hover:underline",style:{color:e2},children:V?"Ocultar Cc Bcc":"Cc Bcc"})]}),r.jsx("input",{type:"text",value:Z,readOnly:!0,className:"w-full text-sm px-3 py-2 rounded-lg cursor-default",style:{background:"#F6F8FA",border:`1px solid ${dd}`,color:"#374151"}}),Ne&&r.jsxs("div",{className:"mt-2 rounded-lg px-3 py-2 flex items-start gap-2",style:{background:"#FEF3C7",border:"1px solid #F59E0B",color:"#92400E"},children:[r.jsx(_o,{size:14,className:"mt-0.5 flex-shrink-0"}),r.jsx("span",{className:"text-xs leading-relaxed",children:"Este candidato não possui email cadastrado. Informe o email antes de enviar."})]})]}),d&&r.jsx("div",{className:"flex justify-end",children:r.jsx("button",{type:"button",onClick:()=>X(Ve=>!Ve),className:"text-xs font-medium hover:underline",style:{color:e2},children:V?"Ocultar Cc Bcc":"Cc Bcc"})}),V&&r.jsxs(r.Fragment,{children:[r.jsx(ry,{label:"Cc:",list:N,setList:W,inputValue:M,setInputValue:z,suggestions:J}),r.jsx(ry,{label:"Bcc:",list:O,setList:G,inputValue:K,setInputValue:Y,suggestions:J})]}),d&&A&&r.jsxs("div",{className:"rounded-lg px-3 py-3 flex items-center gap-2",style:{background:"#EEF2FF",border:"1px solid #C7D2FE",color:"#3730A3"},children:[r.jsx(rt,{size:14,className:"animate-spin flex-shrink-0"}),r.jsxs("span",{className:"text-sm font-medium",children:["Enviando ",ie.current," de ",ie.total,"..."]}
748)]}),d&&re&&!A&&r.jsxs("div",{className:"rounded-lg px-3 py-3",style:re.failed===0?{background:"#DCFCE7",border:"1px solid #BBF7D0",color:"#15803D"}:re.sent===0?{background:"#FEE2E2",border:"1px solid #FECACA",color:"#991B1B"}:{background:"#FEF3C7",border:"1px solid #FCD34D",color:"#92400E"},children:[r.jsx("div",{className:"flex items-center gap-2 text-sm font-semibold",children:re.failed===0?r.jsxs(r.Fragment,{children:[r.jsx(Mi,{size:16}),re.sent," email",re.sent>1?"s":""," enviado",re.sent>1?"s":""," com sucesso"]}):re.sent===0?r.jsxs(r.Fragment,{children:[r.jsx(yl,{size:16})," Nenhum email enviado"]}):r.jsxs(r.Fragment,{children:[r.jsx(Mi,{size:14})," ",re.sent," enviado",re.sent>1?"s":""," ·"," ",r.jsx(yl,{size:14})," ",re.failed," falharam"]})}),re.failures.length>0&&r.jsx("ul",{className:"mt-2 text-xs leading-relaxed space-y-0.5 max-h-32 overflow-y-auto",children:re.failures.map((Ve,ze)=>r.jsxs("li",{children:["• ",r.jsx("strong",{children:Ve.name}),": ",Ve.reason]},ze))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Usar modelo"}),r.jsxs("select",{value:w,onChange:Ve=>le(Ve.target.value),className:"w-full text-sm px-3 py-2 rounded-lg bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${dd}`},children:[r.jsx("option",{value:"",children:"Sem modelo"}),m.map(Ve=>r.jsx("option",{value:Ve.id,children:Ve.name},Ve.id))]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Assunto"}),r.jsx("input",{type:"text",value:v,onChange:Ve=>j(Ve.target.value),placeholder:"Assunto do email",className:"w-full text-sm px-3 py-2 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${dd}`}})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Corpo"}),r.jsx("textarea",{value:k,onChange:Ve=>S(Ve.target.value),placeholder:"Escreva sua mensagem...",className:"w-full text-sm px-3 py-2 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${dd}`,minHeight:250,resize:"vertical"}})]})]})}),r.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",style:{borderTop:`1px solid ${dd}`},children:[r.jsx("button",{type:"button",onClick:i,disabled:A,className:"text-sm px-4 py-2 border bg-white text-gray-700 rounded-lg font-medium hover:bg-gray-50 disabled:opacity-50",style:{borderColor:dd},children:d&&re?"Fechar":"Cancelar"}),!(d&&re)&&r.jsxs("button",{type:"button",onClick:ft,disabled:!Qe,className:"text-sm px-4 py-2 text-white rounded-lg font-medium hover:opacity-90 disabled:opacity-50 flex items-center gap-2",style:{background:e2},children:[A&&r.jsx(rt,{size:13,className:"animate-spin"}),d?A?`Enviando ${ie.current} de ${ie.total}...`:`Enviar para ${p} candidatos`:"Enviar"]})]})]}),D&&r.jsx("div",{className:"fixed bottom-6 right-6 px-4 py-2.5 rounded-lg shadow-lg text-sm font-medium",style:{zIndex:3e3,background:D.type==="error"?"#FEE2E2":"#DCFCE7",color:D.type==="error"?"#991B1B":"#15803D",border:`1px solid ${D.type==="error"?"#FECACA":"#BBF7D0"}`},children:D.msg})]})}const n2="#E5E7EB",a3="#111827",nh="#9CA3AF";function xae(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const n=s=>String(s).padStart(2,"0");return`${n(t.getDate())}/${n(t.getMonth()+1)}/${t.getFullYear()} ${n(t.getHours())}:${n(t.getMinutes())}`}function yae({applicationId:e,wsId:t,userEmail:n}){const[s,i]=g.useState([]),[a,o]=g.useState(!1),[l,c]=g.useState(!0),[d,u]=g.useState(""),[p,m]=g.useState(!1),x=g.useCallback(async()=>{if(e){o(!0);try{const v=[...await ne.entities.RecruiterNote.filter({application_id:e,workspace_id:t})||[]].sort((j,k)=>{const S=new Date(j.created_date||0).getTime();return new Date(k.created_date||0).getTime()-S});i(v)}catch{i([])}finally{o(!1)}}},[e,t]);g.useEffect(()=>{x()},[x]);const w=async()=>{const y=d.trim();if(!(!y||p)){m(!0);try{const v=await ne.entities.RecruiterNote.create({workspace_id:t,application_id:e,note_text:y,created_by:n});i(j=>[v,...j]),u("")}catch(v){alert((v==null?void 0:v.message)||"Falha ao salvar nota.")}finally{m(!1)}}};return r.jsxs("div",{style:{borderBottom:`1px solid ${n2}`},children:[r.jsxs("button",{type:"button",onClick:()=>c(y=>!y),style:{width:"100%",padding:"14px 20px",background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",fontFamily:"inherit"},onMouseEnter:y=>{y.currentTarget.style.background="#F9FAFB"},onMouseLeave:y=>{y.currentTarget.style.background="transparent"},children:[r.jsxs("span",{style:{fontSize:11,letterSpacing:.5,color:nh,fontWeight:600,textTransform:"uppercase"},children:["Notas (",s.length,")"]}),l?r.jsx(ar,{size:14,style:{color:nh}}):r.jsx(Qr,{size:14,style:{color:nh}})]}),l&&r.jsxs("div",{style:{padding:"0 20px 16px"},children:[r.jsxs("div",{style:{marginBottom:s.length>0?12:0},children:[r.jsx("textarea",{value:d,onChange:y=>u(y.target.value),rows:2,placeholder:"Adicionar nota...",disabled:p,style:{width:"100%",padding:"8px 10px",fontSize:13,border:`1px solid ${n2}`,borderRadius:6,fontFamily:"inherit",resize:"vertical",background:"#FFFFFF",color:a3,outline:"none"},onFocus:y=>{y.currentTarget.style.borderColor="#93C5FD"},onBlur:y=>{y.currentTarget.style.borderColor=n2}}
vendor: 8,535 bytes, lines 748-749
748),d.trim().length>0&&r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:6},children:r.jsxs("button",{type:"button",onClick:w,disabled:p,style:{padding:"5px 12px",fontSize:12,fontWeight:500,background:"#2563EB",color:"#FFFFFF",border:"none",borderRadius:6,cursor:p?"not-allowed":"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",gap:4},children:[p&&r.jsx(rt,{size:11,style:{animation:"spin 0.8s linear infinite"}}),"Salvar"]})})]}),a?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:nh},children:[r.jsx(rt,{size:12,style:{animation:"spin 1s linear infinite"}}),"Carregando..."]}):s.length===0?null:r.jsx("div",{style:{display:"flex",flexDirection:"column"},children:s.map((y,v)=>r.jsxs("div",{style:{padding:"10px 0",borderTop:v===0?"none":"1px solid #F3F4F6"},children:[r.jsx("div",{style:{fontSize:13,color:a3,lineHeight:1.5,whiteSpace:"pre-wrap"},children:y.note_text}),r.jsxs("div",{style:{fontSize:11,color:nh,marginTop:4},children:["por ",y.created_by||"sistema"," · ",xae(y.created_date)]})]},y.id||v))})]})]})}/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */function o3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n<t;n++)s[n]=e[n];return s}function vae(e){if(Array.isArray(e))return e}function bae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,i,a,o,l=[],c=!0,d=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(s=a.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function wae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
749In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function jae(e,t){return vae(e)||bae(e,t)||Sae(e,t)||wae()}function Sae(e,t){if(e){if(typeof e=="string")return o3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o3(e,t):void 0}}const HP=Object.entries,l3=Object.setPrototypeOf,kae=Object.isFrozen,_ae=Object.getPrototypeOf,Cae=Object.getOwnPropertyDescriptor;let Lr=Object.freeze,ns=Object.seal,Qu=Object.create,qP=typeof Reflect<"u"&&Reflect,oj=qP.apply,lj=qP.construct;Lr||(Lr=function(t){return t});ns||(ns=function(t){return t});oj||(oj=function(t,n){for(var s=arguments.length,i=new Array(s>2?s-2:0),a=2;a<s;a++)i[a-2]=arguments[a];return t.apply(n,i)});lj||(lj=function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];return new t(...s)});const yd=Rr(Array.prototype.forEach),Eae=Rr(Array.prototype.lastIndexOf),c3=Rr(Array.prototype.pop),rh=Rr(Array.prototype.push),Fae=Rr(Array.prototype.splice),mf=Array.isArray,Ah=Rr(String.prototype.toLowerCase),r2=Rr(String.prototype.toString),d3=Rr(String.prototype.match),sh=Rr(String.prototype.replace),u3=Rr(String.prototype.indexOf),Aae=Rr(String.prototype.trim),Tae=Rr(Number.prototype.toString),Nae=Rr(Boolean.prototype.toString),f3=typeof BigInt>"u"?null:Rr(BigInt.prototype.toString),p3=typeof Symbol>"u"?null:Rr(Symbol.prototype.toString),ci=Rr(Object.prototype.hasOwnProperty),ih=Rr(Object.prototype.toString),_s=Rr(RegExp.prototype.test),Gl=Rae(TypeError);function Rr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];return oj(e,t,s)}}function Rae(e){return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return lj(e,n)}}function Cn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ah;if(l3&&l3(e,null),!mf(t))return e;let s=t.length;for(;s--;){let i=t[s];if(typeof i=="string"){const a=n(i);a!==i&&(kae(t)||(t[s]=a),i=a)}e[i]=!0}return e}function Dae(e){for(let t=0;t<e.length;t++)ci(e,t)||(e[t]=null);return e}function _i(e){const t=Qu(null);for(const s of HP(e)){var n=jae(s,2);const i=n[0],a=n[1];ci(e,i)&&(mf(a)?t[i]=Dae(a):a&&typeof a=="object"&&a.constructor===Object?t[i]=_i(a):t[i]=a)}return t}function Iae(e){switch(typeof e){case"string":return e;case"number":return Tae(e);case"boolean":return Nae(e);case"bigint":return f3?f3(e):"0";case"symbol":return p3?p3(e):"Symbol()";case"undefined":return ih(e);case"function":case"object":{if(e===null)return ih(e);const t=e,n=ea(t,"toString");if(typeof n=="function"){const s=n(t);return typeof s=="string"?s:ih(s)}return ih(e)}default:return ih(e)}}function ea(e,t){for(;e!==null;){const s=Cae(e,t);if(s){if(s.get)return Rr(s.get);if(typeof s.value=="function")return Rr(s.value)}e=_ae(e)}function n(){return null}return n}function Pae(e){try{return _s(e,""),!0}catch{return!1}}const h3=Lr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),s2=Lr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),i2=Lr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Bae=Lr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),a2=Lr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Oae=Lr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),m3=Lr(["#text"]),g3=Lr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
749spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),o2=Lr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),x3=Lr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Eg=Lr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Mae=ns(/{{[\w\W]*|^[\w\W]*}}/g),Lae=ns(/<%[\w\W]*|^[\w\W]*%>/g),zae=ns(/\${[\w\W]*/g),Wae=ns(/^data-[\-\w.\u00B7-\uFFFF]+$/),$ae=ns(/^aria-[\-\w]+$/),y3=ns(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Uae=ns(/^(?:\w+script|data):/i),Vae=ns(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hae=ns(/^html$/i),qae=ns(/^[a-z][.\w]*(-[.\w]+)+$/i),v3=ns(/<[/\w!]/g),b3=ns(/<[/\w]/g),Gae=ns(/<\/no(script|embed|frames)/i),Kae=ns(/\/>/i),ji={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},GP=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Yae=Lr(Cn({},GP)),Xae=(function(){const e={};return yd(GP,t=>{e[t]=ns(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Lr(e)})(),Jae=function(){return typeof window>"u"?null:window},Qae=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;
vendor: 4,372 bytes, line 749
749const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(s=n.getAttribute(i));const a="dompurify"+(s?"#"+s:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},w3=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Kl=function(t,n,s,i){return ci(t,n)&&mf(t[n])?Cn(i.base?_i(i.base):{},t[n],i.transform):s},l2=function(t,n,s){const i=ci(t,n)?t[n]:void 0;return i&&typeof i=="object"?_i(i):s()};function KP(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jae();const t=Je=>KP(Je);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==ji.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const s=n,i=s.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,l=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,u=e.trustedTypes,p=l.prototype,m=ea(p,"cloneNode"),x=ea(p,"remove"),w=ea(p,"removeAttributeNode"),y=ea(p,"nextSibling"),v=ea(p,"childNodes"),j=ea(p,"parentNode"),k=ea(p,"shadowRoot"),S=ea(p,"attributes"),_=o&&o.prototype?ea(o.prototype,"nodeType"):null,F=o&&o.prototype?ea(o.prototype,"nodeName"):null,A=o&&o.prototype?ea(o.prototype,"ownerDocument"):null,C=function(oe){return _?_(oe):oe.nodeType},D=function(oe){return F?F(oe):oe.nodeName};if(typeof a=="function"){const Je=n.createElement("template");Je.content&&Je.content.ownerDocument&&(n=Je.content.ownerDocument)}let P,L="",T,R=!1,U=0;const I=function(){if(U>0)throw Gl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},H=function(oe){I(),U++;try{return P.createHTML(oe)}finally{U--}},V=function(oe){I(),U++;try{return P.createScriptURL(oe)}finally{U--}},X=function(){return R||(T=Qae(u,i),R=!0),T},N=n,W=N.implementation,O=N.createNodeIterator,G=N.createDocumentFragment,M=N.getElementsByTagName,z=s.importNode;let K=w3();t.isSupported=typeof HP=="function"&&typeof j=="function"&&W&&W.createHTMLDocument!==void 0;const Y=Mae,J=Lae,Q=zae,ie=Wae,ae=$ae,re=Uae,pe=Vae,Z=qae;let Ne=y3,te=null;const xe=Cn({},[...h3,...s2,...i2,...a2,...m3]);let he=null;const le=Cn({},[...g3,...o2,...x3,...Eg]);let ge=Object.seal(Qu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$e=null,ft=null;const Qe=Object.seal(Qu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ve=!0,ze=!0,at=!1,Nt=!0,_e=!1,be=!0,Re=!1,Xe=!1,He=null,St=null,Ct=!1,Se=!1,et=!1,bt=!1,Ot=!0,sn=!1;const Vt="user-content-";let Un=!0,nr=!1,xr={},dr=null;const hs=Cn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let mi=null;const Ur=Cn({},["audio","video","img","source","image","track"]);let Ue=null;const Et=Cn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mt="http://www.w3.org/1998/Math/MathML",Ht="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml";let Ze=ke,Be=!1,xt=null;const yt=Cn({},[mt,Ht,ke],r2),dt=Lr(["mi","mo","mn","ms","mtext"]);let ee=Cn({},dt);const fe=Lr(["annotation-xml"]);let ce=Cn({},fe);const ue=Cn({},["title","style","font","a","script"]);let de=null;const me=["application/xhtml+xml","text/html"],De="text/html";let Me=null,Fe=null;const Ie=n.createElement("form"),Pe=function(oe){return oe instanceof RegExp||oe instanceof Function},tt=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Fe&&Fe===oe)return;(!oe||typeof oe!="object")&&(oe={}
vendor: 2,926 bytes, line 749
749),oe=_i(oe),de=me.indexOf(oe.PARSER_MEDIA_TYPE)===-1?De:oe.PARSER_MEDIA_TYPE,Me=de==="application/xhtml+xml"?r2:Ah,te=Kl(oe,"ALLOWED_TAGS",xe,{transform:Me}),he=Kl(oe,"ALLOWED_ATTR",le,{transform:Me}),xt=Kl(oe,"ALLOWED_NAMESPACES",yt,{transform:r2}),Ue=Kl(oe,"ADD_URI_SAFE_ATTR",Et,{transform:Me,base:Et}),mi=Kl(oe,"ADD_DATA_URI_TAGS",Ur,{transform:Me,base:Ur}),dr=Kl(oe,"FORBID_CONTENTS",hs,{transform:Me}),$e=Kl(oe,"FORBID_TAGS",_i({}),{transform:Me}),ft=Kl(oe,"FORBID_ATTR",_i({}),{transform:Me}),xr=ci(oe,"USE_PROFILES")?oe.USE_PROFILES&&typeof oe.USE_PROFILES=="object"?_i(oe.USE_PROFILES):oe.USE_PROFILES:!1,Ve=oe.ALLOW_ARIA_ATTR!==!1,ze=oe.ALLOW_DATA_ATTR!==!1,at=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,Nt=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_e=oe.SAFE_FOR_TEMPLATES||!1,be=oe.SAFE_FOR_XML!==!1,Re=oe.WHOLE_DOCUMENT||!1,Se=oe.RETURN_DOM||!1,et=oe.RETURN_DOM_FRAGMENT||!1,bt=oe.RETURN_TRUSTED_TYPE||!1,Ct=oe.FORCE_BODY||!1,Ot=oe.SANITIZE_DOM!==!1,sn=oe.SANITIZE_NAMED_PROPS||!1,Un=oe.KEEP_CONTENT!==!1,nr=oe.IN_PLACE||!1,Ne=Pae(oe.ALLOWED_URI_REGEXP)?oe.ALLOWED_URI_REGEXP:y3,Ze=typeof oe.NAMESPACE=="string"?oe.NAMESPACE:ke,ee=l2(oe,"MATHML_TEXT_INTEGRATION_POINTS",()=>Cn({},dt)),ce=l2(oe,"HTML_INTEGRATION_POINTS",()=>Cn({},fe));const we=l2(oe,"CUSTOM_ELEMENT_HANDLING",()=>Qu(null));if(ge=Qu(null),ci(we,"tagNameCheck")&&Pe(we.tagNameCheck)&&(ge.tagNameCheck=we.tagNameCheck),ci(we,"attributeNameCheck")&&Pe(we.attributeNameCheck)&&(ge.attributeNameCheck=we.attributeNameCheck),ci(we,"allowCustomizedBuiltInElements")&&typeof we.allowCustomizedBuiltInElements=="boolean"&&(ge.allowCustomizedBuiltInElements=we.allowCustomizedBuiltInElements),ns(ge),_e&&(ze=!1),et&&(Se=!0),xr&&(te=Cn({},m3),he=Qu(null),xr.html===!0&&(Cn(te,h3),Cn(he,g3)),xr.svg===!0&&(Cn(te,s2),Cn(he,o2),Cn(he,Eg)),xr.svgFilters===!0&&(Cn(te,i2),Cn(he,o2),Cn(he,Eg)),xr.mathMl===!0&&(Cn(te,a2),Cn(he,x3),Cn(he,Eg))),Qe.tagCheck=null,Qe.attributeCheck=null,ci(oe,"ADD_TAGS")&&(typeof oe.ADD_TAGS=="function"?Qe.tagCheck=oe.ADD_TAGS:mf(oe.ADD_TAGS)&&(te===xe&&(te=_i(te)),Cn(te,oe.ADD_TAGS,Me))),ci(oe,"ADD_ATTR")&&(typeof oe.ADD_ATTR=="function"?Qe.attributeCheck=oe.ADD_ATTR:mf(oe.ADD_ATTR)&&(he===le&&(he=_i(he)),Cn(he,oe.ADD_ATTR,Me))),ci(oe,"ADD_FORBID_CONTENTS")&&mf(oe.ADD_FORBID_CONTENTS)&&(dr===hs&&(dr=_i(dr)),Cn(dr,oe.ADD_FORBID_CONTENTS,Me)),Un&&(te["#text"]=!0),Re&&Cn(te,["html","head","body"]),te.table&&(Cn(te,["tbody"]),delete $e.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const qe=P;P=oe.TRUSTED_TYPES_POLICY;try{L=H("")}catch(st){throw P=qe,st}}else oe.TRUSTED_TYPES_POLICY===null?(P=void 0,L=""):(P===void 0&&(P=X()),P&&typeof L=="string"&&(L=H("")));
vendor: 9,225 bytes, line 749
749Lr&&Lr(oe),Fe=oe},pt=Cn({},[...s2,...i2,...Bae]),_t=Cn({},[...a2,...Oae]),lt=function(oe,we,qe){return we.namespaceURI===ke?oe==="svg":we.namespaceURI===mt?oe==="svg"&&(qe==="annotation-xml"||ee[qe]):!!pt[oe]},ot=function(oe,we,qe){return we.namespaceURI===ke?oe==="math":we.namespaceURI===Ht?oe==="math"&&ce[qe]:!!_t[oe]},Yt=function(oe,we,qe){return we.namespaceURI===Ht&&!ce[qe]||we.namespaceURI===mt&&!ee[qe]?!1:!_t[oe]&&(ue[oe]||!pt[oe])},An=function(oe){let we=j(oe);(!we||!we.tagName)&&(we={namespaceURI:Ze,tagName:"template"});const qe=Ah(oe.tagName),st=Ah(we.tagName);return xt[oe.namespaceURI]?oe.namespaceURI===Ht?lt(qe,we,st):oe.namespaceURI===mt?ot(qe,we,st):oe.namespaceURI===ke?Yt(qe,we,st):!!(de==="application/xhtml+xml"&&xt[oe.namespaceURI]):!1},hn=function(oe){rh(t.removed,{element:oe});try{j(oe).removeChild(oe)}catch{if(x(oe),!j(oe))throw Gl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Wn=function(oe,we,qe){try{w(oe,we)}catch{try{oe.removeAttribute(qe)}catch{}}},ms=function(oe){Vn(oe);const we=v(oe);if(we){const st=[];yd(we,At=>{rh(st,At)}),yd(st,At=>{try{x(At)}catch{}})}const qe=S(oe);if(qe)for(let st=qe.length-1;st>=0;--st){const At=qe[st],qt=At&&At.name;typeof qt=="string"&&Wn(oe,At,qt)}},Dr=function(oe,we,qe){if(!qe)try{qe=we.getAttributeNode(oe)}catch{qe=null}rh(t.removed,{attribute:qe||null,from:we});try{qe?w(we,qe):we.removeAttribute(oe)}catch{try{we.removeAttribute(oe)}catch{}}if(oe==="is")if(Se||et)try{hn(we)}catch{}else try{we.setAttribute(oe,"")}catch{}},gs=function(oe){const we=S(oe);if(we)for(let qe=we.length-1;qe>=0;--qe){const st=we[qe],At=st&&st.name;typeof At!="string"||he[Me(At)]||Wn(oe,st,At)}},Vn=function(oe){const we=[oe];for(;we.length>0;){const qe=we.pop();C(qe)===ji.element&&gs(qe);const st=v(qe);if(st)for(let At=st.length-1;At>=0;--At)we.push(st[At])}},Wi=function(oe,we){return be?oe==="patchsrc"?!0:oe==="for"&&we!=="label"&&we!=="output":!1},Hn=function(oe){if(!be)return;const we=[oe];for(;we.length>0;){const qe=we.pop(),st=C(qe);if(st===ji.processingInstruction||st===ji.comment&&_s(b3,qe.data)){try{x(qe)}catch{}continue}if(st===ji.element){const qt=qe,ln=Me(D(qe));try{qt.hasAttribute&&qt.hasAttribute("patchsrc")&&qt.removeAttribute("patchsrc"),qt.hasAttribute&&qt.hasAttribute("for")&&Wi("for",ln)&&qt.removeAttribute("for")}catch{}}const At=v(qe);if(At)for(let qt=At.length-1;qt>=0;--qt)we.push(At[qt])}},gi=function(oe){let we=null,qe=null;if(Ct)oe="<remove></remove>"+oe;else{const qt=d3(oe,/^[\r\n\t ]+/);qe=qt&&qt[0]}de==="application/xhtml+xml"&&Ze===ke&&(oe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+oe+"</body></html>");const st=P?H(oe):oe;if(Ze===ke)try{we=new d().parseFromString(st,de)}catch{}if(!we||!we.documentElement){we=W.createDocument(Ze,"template",null);try{we.documentElement.innerHTML=Be?L:st}catch{}}const At=we.body||we.documentElement;return oe&&qe&&At.insertBefore(n.createTextNode(qe),At.childNodes[0]||null),Ze===ke?M.call(we,Re?"html":"body")[0]:Re?we.documentElement:At},Hc=function(oe){const we=A?A(oe):oe.ownerDocument;return O.call(we||oe,oe,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Sr=function(oe){return oe=sh(oe,Y," "),oe=sh(oe,J," "),oe=sh(oe,Q," "),oe},xa=function(oe){var we;oe.normalize();const qe=A?A(oe):oe.ownerDocument,st=O.call(qe||oe,oe,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let At=st.nextNode();for(;At;)At.data=Sr(At.data),At=st.nextNode();const qt=(we=oe.querySelectorAll)===null||we===void 0?void 0:we.call(oe,"template");qt&&yd(qt,ln=>{ei(ln.content)&&xa(ln.content)})},xs=function(oe){const we=F?F(oe):null;return typeof we!="string"||Me(we)!=="form"?!1:typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||oe.attributes!==S(oe)||typeof oe.removeAttribute!="function"||typeof oe.removeAttributeNode!="function"||typeof oe.getAttributeNode!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function"||oe.nodeType!==_(oe)||oe.childNodes!==v(oe)},ei=function(oe){if(!_||typeof oe!="object"||oe===null)return!1;try{return _(oe)===ji.documentFragment}catch{return!1}},xi=function(oe){if(!_||typeof oe!="object"||oe===null)return!1;try{return typeof _(oe)=="number"}catch{return!1}};function Ls(Je,oe,we){Je.length!==0&&yd(Je,qe=>{qe.call(t,oe,we,Fe)})}const du=function(oe,we){return!!(be&&oe.hasChildNodes()&&!xi(oe.firstElementChild)&&_s(v3,oe.textContent)&&_s(v3,oe.innerHTML)||be&&oe.namespaceURI===ke&&Yae[we]&&(xi(oe.firstElementChild)||typeof oe.textContent=="string"&&_s(Xae[we],oe.textContent))||oe.nodeType===ji.processingInstruction||be&&oe.nodeType===ji.comment&&_s(b3,oe.data))},ya=function(oe,we){if(oe instanceof RegExp)return _s(oe,we);if(oe instanceof Function){for(var qe=arguments.length,st=new Array(qe>2?qe-2:0),At=2;At<qe;At++)st[At-2]=arguments[At];return!!oe(we,...st)}return!1},qc=function(oe,we,qe){if(!$e[we]&&ht(we)&&ya(ge.tagNameCheck,we))return!1;if(Un&&!dr[we]){const st=j(oe),At=v(oe);if(At&&st){const qt=At.length;for(let ln=qt-1;ln>=0;--ln){const rr=oe===qe?m(At[ln],!0):At[ln];st.insertBefore(rr,y(oe))}}}return hn(oe),!0},Mo=function(oe,we,qe,st){return oe.length===0?we:we===qe||we===st?_i(we):we},zs=function(oe,we){return oe===we||j(oe)!==null?!1:(nr&&Vn(oe),!0)},Gc=function(oe,we){if(Ls(K.beforeSanitizeElements,oe,null),zs(oe,we))return!0;if(xs(oe))return hn(oe),!0;const qe=Me(D(oe));if(te=Mo(K.uponSanitizeElement,te,xe,He),Ls(K.uponSanitizeElement,oe,{tagName:qe,allowedTags:te}),zs(oe,we))return!0;if(du(oe,qe))return hn(oe),!0;if($e[qe]||!(Qe.tagCheck instanceof Function&&Qe.tagCheck(qe))&&!te[qe]){const st=qc(oe,qe,we);return st===!1&&(Ls(K.afterSanitizeElements,oe,null),zs(oe,we))?!0:st}if(C(oe)===ji.element&&!An(oe)||(qe==="noscript"||qe==="noembed"||qe==="noframes")&&_s(Gae,oe.innerHTML))return hn(oe),!0;if(_e&&oe.nodeType===ji.text){const st=Sr(oe.textContent);oe.textContent!==st&&(rh(t.removed,{element:oe.cloneNode()}),oe.textContent=st)}return Ls(K.afterSanitizeElements,oe,null),zs(oe,we)},Ae=function(oe,we,qe){if(ft[we]||Wi(we,oe)||Ot&&(we==="id"||we==="name")&&(qe in n||qe in Ie))return!1;const st=he[we]||Qe.attributeCheck instanceof Function&&Qe.attributeCheck(we,oe);return ze&&_s(ie,we)||Ve&&_s(ae,we)?!0:st?Ue[we]||_s(Ne,sh(qe,pe,""))||(we==="src"||we==="xlink:href"||we==="href")&&oe!=="script"&&u3(qe,"data:")===0&&mi[oe]||at&&!_s(re,sh(qe,pe,""))?!0:!qe:ht(oe)&&ya(ge.tagNameCheck,oe)&&ya(ge.attributeNameCheck,we,oe)||we==="is"&&ge.allowCustomizedBuiltInElements&&ya(ge.tagNameCheck,qe)},Ge=Cn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ht=function(oe){return!Ge[Ah(oe)]&&_s(Z,oe)},Tt=function(oe,we,qe,st){if(P&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!qe)switch(u.getAttributeType(oe,we)){case"TrustedHTML":return H(st);case"TrustedScriptURL":return V(st)}return st},wt=function(oe,we,qe,st){try{return qe?oe.setAttributeNS(qe,we,st):oe.setAttribute(we,st),xs(oe)?(hn(oe),!1):!0}catch{return Dr(we,oe),!1}},It=function(oe,we){if(Ls(K.beforeSanitizeAttributes,oe,null),zs(oe,we))return;const qe=oe.attributes;if(!qe||xs(oe))return;he=Mo(K.uponSanitizeAttribute,he,le,St);const st={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:he,forceKeepAttr:void 0};let At=qe.length;const qt=Me(oe.nodeName);for(;At--;){const ln=qe[At],rr=ln.name,Ws=ln.namespaceURI,Ir=ln.value,Fl=Me(rr),uu=Ir;let kr=rr==="value"?uu:Aae(uu),hp=!1;if(st.attrName=Fl,st.attrValue=kr,st.keepAttr=!0,st.forceKeepAttr=void 0,Ls(K.uponSanitizeAttribute,oe,st),kr=st.attrValue,sn&&(Fl==="id"||Fl==="name")&&u3(kr,Vt)!==0&&(Dr(rr,oe,ln),kr=Vt+kr,hp=!0),be&&_s(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,kr)){Dr(rr,oe,ln);continue}if(Fl==="attributename"&&d3(kr,"href")){Dr(rr,oe,ln);continue}if(!st.forceKeepAttr){if(!st.keepAttr){Dr(rr,oe,ln);continue}if(!Nt&&_s(Kae,kr)){Dr(rr,oe,ln);continue}if(_e&&(kr=Sr(kr)),!Ae(qt,Fl,kr)){Dr(rr,oe,ln);continue}kr=Tt(qt,Fl,Ws,kr),kr!==uu&&wt(oe,rr,Ws,kr)&&hp&&c3(t.removed)}}Ls(K.afterSanitizeAttributes,oe,null),zs(oe,we)},en=function(oe){let we=null;const qe=Hc(oe);for(Ls(K.beforeSanitizeShadowDOM,oe,null);we=qe.nextNode();)if(Ls(K.uponSanitizeShadowNode,we,null),Gc(we,oe),It(we,oe),ei(we.content)&&en(we.content),C(we)===ji.element){const st=k(we);ei(st)&&(wn(st),en(st))}Ls(K.afterSanitizeShadowDOM,oe,null)},wn=function(oe){const we=[{node:oe,shadow:null}];for(;we.length>0;){const qe=we.pop();if(qe.shadow){en(qe.shadow);continue}const st=qe.node,At=C(st)===ji.element,qt=v(st);if(qt)for(let ln=qt.length-1;ln>=0;--ln)we.push({node:qt[ln],shadow:null});if(At){const ln=F?F(st):null;if(typeof ln=="string"&&Me(ln)==="template"){const rr=st.content;ei(rr)&&we.push({node:rr,shadow:null})}}if(At){const ln=k(st);ei(ln)&&we.push({node:null,shadow:ln},{node:ln,shadow:null})}}};return t.sanitize=function(Je){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we=null,qe=null,st=null,At=null;
749if(Be=!Je,Be&&(Je="<!-->"),typeof Je!="string"&&!xi(Je)&&(Je=Iae(Je),typeof Je!="string"))throw Gl("dirty is not a string, aborting");if(!t.isSupported)return Je;Xe?(te=He,he=St):tt(oe),(K.uponSanitizeElement.length>0||K.uponSanitizeAttribute.length>0)&&(te=_i(te)),K.uponSanitizeAttribute.length>0&&(he=_i(he)),t.removed=[];const qt=nr&&typeof Je!="string"&&xi(Je);if(qt){Hn(Je);const Ws=D(Je);if(typeof Ws=="string"){const Ir=Me(Ws);if(!te[Ir]||$e[Ir])throw ms(Je),Gl("root node is forbidden and cannot be sanitized in-place")}if(xs(Je))throw ms(Je),Gl("root node is clobbered and cannot be sanitized in-place");try{wn(Je)}catch(Ir){throw ms(Je),Ir}}else if(xi(Je))we=gi("<!---->"),qe=we.ownerDocument.importNode(Je,!0),qe.nodeType===ji.element&&qe.nodeName==="BODY"||qe.nodeName==="HTML"?we=qe:we.appendChild(qe),wn(we);else{if(!Se&&!_e&&!Re&&Je.indexOf("<")===-1)return P&&bt?H(Je):Je;if(we=gi(Je),!we)return Se?null:bt?L:""}we&&Ct&&hn(we.firstChild);const ln=qt?Je:we;try{const Ws=Hc(ln);for(;st=Ws.nextNode();)Gc(st,ln),It(st,ln),ei(st.content)&&en(st.content)}catch(Ws){throw qt&&(ms(Je),yd(t.removed,Ir=>{Ir.element&&Vn(Ir.element)})),Ws}if(qt){let Ws=!1;if(yd(t.removed,Ir=>{Ir.element&&(Ir.element===Je&&(Ws=!0),Vn(Ir.element))}),Ws)throw Gl("a node selected for removal could not be safely returned; refusing to sanitize in place");return _e&&xa(Je),Je}if(Se){if(_e&&xa(we),et)for(At=G.call(we.ownerDocument);we.firstChild;)At.appendChild(we.firstChild);else At=we;return(he.shadowroot||he.shadowrootmode)&&(At=z.call(s,At,!0)),At}let rr=Re?we.outerHTML:we.innerHTML;return Re&&te["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&&_s(Hae,we.ownerDocument.doctype.name)&&(rr="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
750`+rr),_e&&(rr=Sr(rr)),P&&bt?H(rr):rr},t.setConfig=function(){let Je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tt(Je),Xe=!0,He=te,St=he},t.clearConfig=function(){Fe=null,Xe=!1,He=null,St=null,P=T,L=""},t.isValidAttribute=function(Je,oe,we){Fe||tt({});const qe=Me(Je),st=Me(oe);return Ae(qe,st,we)},t.addHook=function(Je,oe){typeof oe=="function"&&ci(K,Je)&&rh(K[Je],oe)},t.removeHook=function(Je,oe){if(ci(K,Je)){if(oe!==void 0){const we=Eae(K[Je],oe);return we===-1?void 0:Fae(K[Je],we,1)[0]}return c3(K[Je])}},t.removeHooks=function(Je){ci(K,Je)&&(K[Je]=[])},t.removeAllHooks=function(){K=w3()},t}var YP=KP();let cj=!1;YP.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&cj&&e.setAttribute("target","_blank"),e.getAttribute&&e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer")});function Sk(e,{wholeDocument:t=!1}={}){cj=!!t;try{return YP.sanitize(e||"",{USE_PROFILES:{html:!0},WHOLE_DOCUMENT:!!t,ADD_TAGS:t?["style"]:[],ADD_ATTR:["target"]})}finally{cj=!1}}const Zae="<style>body{margin:0;font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:1.6;color:#334155;overflow-wrap:break-word;}img{max-width:100%;height:auto;}</style>";function XP({html:e,height:t=420,title:n="Conteúdo do e-mail"}){const s=g.useMemo(()=>Sk(Zae+(e||""),{wholeDocument:!0}),[e]);return r.jsx("iframe",{title:n,sandbox:"allow-popups allow-popups-to-escape-sandbox",srcDoc:s,style:{width:"100%",height:t,border:"none",display:"block",background:"#fff"}})}const j3="#E3E8EE",c2="#1A1A2E",Xo="#8898AA",eoe="#6C24F5",toe="#10B981",noe="#F7F8FA",roe="#FAFBFC";function soe(e){return e?e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/\s+/g," ").trim():""}function S3(e,t=!1){if(!e)return"";const n=new Date(e);if(isNaN(n.getTime()))return"";const s=["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],i=n.getDate(),a=s[n.getMonth()],o=n.getFullYear(),l=String(n.getHours()).padStart(2,"0"),c=String(n.getMinutes()).padStart(2,"0");return t?`${i} ${a} ${o}, ${l}:${c}`:`${i} ${a} ${o}, ${l}:${c}`}function JP({talentProfileId:e,workspaceId:t,candidateEmail:n}){const[s,i]=g.useState([]),[a,o]=g.useState(!0),[l,c]=g.useState(!1),[d,u]=g.useState(null),[p,m]=g.useState(!1);g.useEffect(()=>{let j=!0;return ne.functions.invoke("checkConnectorStatus",{key:"outlook"}).then(k=>{const S=(k==null?void 0:k.data)||k;j&&m(!!(S!=null&&S.connected))}).catch(()=>{}),()=>{j=!1}},[]);const x=g.useCallback(async()=>
750{if(!(!e||!t))try{const j=await ne.entities.CandidateMessage.filter({talent_profile_id:e,workspace_id:t},"-sent_at");i(Array.isArray(j)?j:[])}catch{}},[e,t]),w=!!(p&&e&&t&&n&&!xo(n)),y=g.useCallback(async()=>{if(w){c(!0);try{await ne.functions.invoke("syncCandidateEmails",{workspace_id:t,candidate_email:n,talent_profile_id:e}),await x()}catch{}c(!1)}},[w,t,n,e,x]);g.useEffect(()=>{if(!e||!t){o(!1);return}let j=!0;return(async()=>(o(!0),await x(),j&&o(!1)))(),()=>{j=!1}},[e,t,n]),g.useEffect(()=>{w&&y()},[w,e,t,n]);const v=j=>{u(k=>k===j?null:j)};return r.jsxs("div",{style:{padding:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[r.jsx("h3",{style:{fontSize:14,fontWeight:600,color:c2,margin:0},children:"Emails"}),r.jsx("span",{style:{fontSize:11,fontWeight:500,padding:"2px 8px",borderRadius:10,background:"#EEF2FF",color:"#4338CA"},children:s.length}),w&&r.jsx("button",{type:"button",onClick:y,disabled:l,title:"Sincronizar emails",style:{marginLeft:"auto",background:"transparent",border:"none",padding:4,cursor:l?"not-allowed":"pointer",color:l?"#9CA3AF":"#6C24F5",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:6},children:l?r.jsx(rt,{size:14,className:"animate-spin"}):r.jsx($y,{size:14})})]}),a&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:Xo,fontSize:13,padding:"24px 0",justifyContent:"center"},children:[r.jsx(rt,{size:14,className:"animate-spin"})," Carregando..."]}),!a&&s.length===0&&r.jsxs("div",{style:{textAlign:"center",padding:"32px 16px",color:Xo},children:[r.jsx(mr,{size:28,style:{color:"#CBD5E1",marginBottom:10}}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#475569",marginBottom:4},children:"Nenhum email registrado"}),r.jsx("div",{style:{fontSize:12,color:Xo},children:"Emails enviados e recebidos com este candidato aparecerão aqui."})]}),!a&&s.length>0&&r.jsx("div",{children:s.map(j=>{const k=j.direction==="sent",S=d===j.id,_=k?eoe:toe,F=soe(j.body_html||j.body_text||"").slice(0,80);return r.jsx("div",{onClick:()=>v(j.id),style:{borderBottom:`1px solid ${j3}`,padding:"12px 0",cursor:"pointer",transition:"background 120ms ease"},onMouseEnter:A=>{A.currentTarget.style.background=noe},onMouseLeave:A=>{A.currentTarget.style.background="transparent"},children:r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[r.jsx("div",{style:{width:24,height:24,borderRadius:"50%",background:k?"rgba(108,36,245,0.1)":"rgba(16,185,129,0.1)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2},children:k?r.jsx(_U,{size:13,style:{color:_}}):r.jsx(xU,{size:13,style:{color:_}})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:14,fontWeight:600,color:c2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:j.subject||"(sem assunto)"}),F&&r.jsx("div",{style:{fontSize:13,color:Xo,marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F}),j.sender_email&&r.jsx("div",{style:{fontSize:11,color:Xo,marginTop:4},children:j.sender_email})]}),r.jsx("div",{style:{fontSize:12,color:Xo,flexShrink:0,whiteSpace:"nowrap"},children:S3(j.sent_at||j.created_date)})]}),S&&r.jsxs("div",{onClick:A=>A.stopPropagation(),style:{marginTop:12,border:`1px solid ${j3}`,borderRadius:8,padding:16,background:roe},children:[r.jsx("div",{style:{fontSize:14,fontWeight:600,color:c2,marginBottom:10},children:j.subject||"(sem assunto)"}),r.jsxs("div",{style:{fontSize:12,color:Xo,marginBottom:4},children:[r.jsx("strong",{style:{color:"#475569",fontWeight:500},children:"De:"})," ",j.sender_email||"—"]}),r.jsxs("div",{style:{fontSize:12,color:Xo,marginBottom:4},children:[r.jsx("strong",{style:{color:"#475569",fontWeight:500},children:"Para:"})," ",j.recipient_email||j.candidate_email||"—"]}),r.jsx("div",{style:{fontSize:12,color:Xo,marginBottom:12},children:S3(j.sent_at||j.created_date,!0)}),j.body_html?r.jsx(XP,{html:j.body_html,height:420}):r.jsx("div",{style:{fontSize:13,color:"#334155",lineHeight:1.6,whiteSpace:"pre-wrap"},children:j.body_text||"(sem conteúdo)"})]})]})]})},j.id)})})]})}function kk({workspaceId:e,onConfirm:t,onCancel:n}){const[s,i]=g.useState([]),[a,o]=g.useState(!0),[l,c]=g.useState(""),[d,u]=g.useState(""),[p,m]=g.useState(!1),[x,w]=g.useState(null);g.useEffect(()=>{if(!e)return;let v=!0;return(async()=>{try{await ne.functions.invoke("ensureDefaultRejectionReasons",{workspace_id:e});const k=(await ne.entities.RejectionReason.filter({workspace_id:e,is_active:!0})||[]).sort((S,_)=>(S.order||0)-(_.order||0));v&&(i(k),o(!1))}catch(j){v&&(w((j==null?void 0:j.message)||"Falha ao carregar motivos"),o(!1))}})(),()=>{v=!1}},[e]);const y=async()=>
750{if(!l){w("Selecione um motivo.");return}m(!0),w(null);try{await t({rejectionReasonId:l,rejectionNotes:d.trim()})}catch(v){w((v==null?void 0:v.message)||"Falha ao reprovar"),m(!1)}};return Ka.createPortal(r.jsx("div",{className:"fixed inset-0 z-[3000] flex items-center justify-center bg-black/40 p-4",onClick:p?void 0:n,children:r.jsxs("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-md p-6",onClick:v=>v.stopPropagation(),children:[r.jsxs("div",{className:"flex items-start justify-between mb-5",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Motivo da reprovação"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Selecione o motivo e adicione notas opcionais."})]}),r.jsx("button",{type:"button",onClick:n,disabled:p,className:"text-gray-400 hover:text-gray-700 disabled:opacity-50","aria-label":"Fechar",children:r.jsx(Jt,{size:18})})]}),a?r.jsx("div",{className:"py-8 flex justify-center",children:r.jsx(rt,{size:18,className:"animate-spin text-gray-400"})}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:["Motivo ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsxs("select",{value:l,onChange:v=>{c(v.target.value),w(null)},disabled:p,className:"w-full text-sm px-3 py-2 rounded-md bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400 disabled:opacity-50",children:[r.jsx("option",{value:"",children:"Selecione um motivo..."}),s.map(v=>r.jsx("option",{value:v.id,children:v.label},v.id))]}),s.length===0&&r.jsx("p",{className:"text-xs text-amber-600 mt-1.5",children:"Nenhum motivo ativo configurado. Acesse Configurações > Motivos de reprovação."})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:"Notas"}),r.jsx("textarea",{value:d,onChange:v=>u(v.target.value),rows:3,disabled:p,placeholder:"Observações adicionais (opcional)...",className:"w-full text-sm px-3 py-2 rounded-md border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400 disabled:opacity-50"})]}),x&&r.jsx("div",{className:"text-xs text-red-600",children:x}),r.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[r.jsx("button",{type:"button",onClick:n,disabled:p,className:"text-sm px-4 py-2 border border-gray-200 bg-white text-gray-700 rounded-md font-medium hover:bg-gray-50 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{type:"button",onClick:y,disabled:p||!l,className:"text-sm px-5 py-2 bg-red-600 text-white rounded-md font-semibold hover:bg-red-700 disabled:opacity-50 flex items-center gap-2",children:[p&&r.jsx(rt,{size:14,className:"animate-spin"}),"Confirmar reprovação"]})]})]})]})}),document.body)}const vd="#E5E7EB",Xi="#111827",oi="#6B7280",Si="#9CA3AF";function ioe(e){var n;const t=e.trim().split(/\s+/);return t.length===1?((n=t[0][0])==null?void 0:n.toUpperCase())||"?":(t[0][0]+t[t.length-1][0]).toUpperCase()}function aoe(e){return!e||e<=0?"":e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function ooe(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const n=s=>String(s).padStart(2,"0");return`${n(t.getDate())}/${n(t.getMonth()+1)}/${t.getFullYear()} ${n(t.getHours())}:${n(t.getMinutes())}`}function Fg({title:e,children:t}){return r.jsxs("div",{style:{padding:"16px 24px",borderBottom:`1px solid ${vd}`},children:[r.jsx("div",{style:{fontSize:11,letterSpacing:.5,color:Si,fontWeight:600,textTransform:"uppercase",marginBottom:12},children:e}),t]})}function QP({open:e,application:t,stages:n,workspaceId:s,onClose:i,onMoved:a,onEdit:o,onSendToJob:l,onRemove:c}){const{user:d}=tr(),[u,p]=g.useState([]),[m,x]=g.useState(!1),[w,y]=g.useState(!1),[v,j]=g.useState(!1),[k,S]=g.useState(!1),[_,F]=g.useState(!1),[A,C]=g.useState(!1),[D,P]=g.useState("profile"),[L,T]=g.useState(0),[R,U]=g.useState(0),[I,H]=g.useState([]),[V,X]=g.useState(!1),N=(()=>
750{if(!t)return{};if(t.talent_profile)return t.talent_profile;if(t.snapshot)return t.snapshot;if(t.profile_snapshot_json)try{return JSON.parse(t.profile_snapshot_json)}catch{return{}}return{}})(),W=N.full_name||"Candidato",O=N.headline||N.current_title||"",G=(t==null?void 0:t.linkedin_url)||N.linkedin_url||"",M=N.email||(t==null?void 0:t.email)||"",z=N.phone||(t==null?void 0:t.phone)||"",K={id:t==null?void 0:t.talent_profile_id,full_name:W,first_name:W.split(" ")[0]||"",email:M,phone:z,salary_current:Number(N.salary_current||0),salary_expectation:Number((t==null?void 0:t.salary_expectation)||N.salary_expectation||0)},Y=n.find(le=>le.id===(t==null?void 0:t.current_stage_id)),J=(t==null?void 0:t.origin)==="jobs_organico",Q=n.find(le=>le.internal_status==="standby"),ie=n.find(le=>le.is_terminal&&le.internal_status==="hired"),ae=n.find(le=>le.is_terminal&&le.internal_status==="rejected");g.useEffect(()=>{if(!e||!(t!=null&&t.id))return;let le=!1;return x(!0),ne.entities.StageTransition.filter({application_id:t.id}).then(ge=>{if(le)return;const $e=[...ge||[]].sort((ft,Qe)=>{const Ve=new Date(ft.moved_at||ft.created_date||0).getTime();return new Date(Qe.moved_at||Qe.created_date||0).getTime()-Ve});p($e)}).catch(()=>{le||p([])}).finally(()=>{le||x(!1)}),()=>{le=!0}},[e,t==null?void 0:t.id]),g.useEffect(()=>{if(!e)return;const le=ge=>{ge.key==="Escape"&&i()};return window.addEventListener("keydown",le),()=>window.removeEventListener("keydown",le)},[e,i]),g.useEffect(()=>{y(!1),j(!1),P("profile")},[t==null?void 0:t.id]),g.useEffect(()=>{if(!e||!(t!=null&&t.talent_profile_id)||!s){T(0);return}let le=!1;return ne.entities.CandidateMessage.filter({talent_profile_id:t.talent_profile_id,workspace_id:s}).then(ge=>{le||T(Array.isArray(ge)?ge.length:0)}).catch(()=>{le||T(0)}),()=>{le=!0}},[e,t==null?void 0:t.talent_profile_id,s]),g.useEffect(()=>{if(!e||!(t!=null&&t.id)){U(0);return}let le=!1;return ne.entities.RecruiterNote.filter({application_id:t.id}).then(ge=>{le||U(Array.isArray(ge)?ge.length:0)}).catch(()=>{le||U(0)}),()=>{le=!0}},[e,t==null?void 0:t.id]),g.useEffect(()=>{if(!e||!(t!=null&&t.talent_profile_id)||!s){H([]);return}let le=!1;return X(!0),ne.entities.JobApplication.filter({talent_profile_id:t.talent_profile_id,workspace_id:s}).then(async ge=>{if(le)return;const $e=Array.isArray(ge)?ge:[],ft=[...new Set($e.map(ze=>ze.job_id).filter(Boolean))],Qe={};if(await Promise.all(ft.map(async ze=>{try{Qe[ze]=await ne.entities.Job.get(ze)}catch{Qe[ze]=null}})),le)return;const Ve=$e.map(ze=>{var at;return{...ze,job:Qe[ze.job_id]||null,stage_name:((at=n.find(Nt=>Nt.id===ze.current_stage_id))==null?void 0:at.name)||null}});H(Ve)}).catch(()=>{le||H([])}).finally(()=>{le||X(!1)}),()=>{le=!0}},[e,t==null?void 0:t.talent_profile_id,s,n]);const re=async({toStageId:le,rejectionReasonId:ge,rejectionNotes:$e})=>{var ft;if(!(!(t!=null&&t.id)||!le)){F(!0);try{const Qe={workspace_id:s,application_id:t.id,to_stage_id:le};ge&&(Qe.rejection_reason_id=ge),$e&&(Qe.rejection_notes=$e);const Ve=await ne.functions.invoke("moveApplicationToStage",Qe),ze=(Ve==null?void 0:Ve.data)||Ve;if(!(ze!=null&&ze.success))throw new Error((ze==null?void 0:ze.error)||"Falha ao mover");a==null||a(t.id,le,(ft=ze.application)==null?void 0:ft.status),i()}catch(Qe){alert((Qe==null?void 0:Qe.message)||"Falha ao mover candidato.")}finally{F(!1)}}},pe=()=>{if(!ie)return alert("Etapa de contratação não encontrada.");window.confirm(`Confirmar contratação de ${W}?`)&&re({toStageId:ie.id})},Z=()=>{if(!Q)return alert("Etapa de espera não encontrada.");re({toStageId:Q.id})},Ne=async({rejectionReasonId:le,rejectionNotes:ge})=>{if(!ae){alert("Etapa de reprovação não encontrada.");return}j(!1),await re({toStageId:ae.id,rejectionReasonId:le,rejectionNotes:ge||void 0})};if(!e||!t)return null;const te=n.filter(le=>!le.is_archived&&le.id!==t.current_stage_id),xe=Array.isArray(t.attachments)?t.attachments:[],he=[{key:"profile",label:"Perfil",count:null},{key:"files",label:"Arquivos",count:xe.length},{key:"jobs",label:"Vagas",count:I.length},{key:"history",label:"Histórico",count:u.length},{key:"emails",label:"Emails",count:L},{key:"notes",label:"Notas",count:R}];return r.jsxs(r.Fragment,{children:[r.jsx("div",{onClick:i,style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.3)",zIndex:900,animation:"fadeIn 200ms ease"}}),r.jsxs("div",{style:{position:"fixed",top:0,right:0,bottom:0,width:"min(680px, 100vw)",background:"#FFFFFF",zIndex:901,display:"flex",flexDirection:"column",boxShadow:"-4px 0 20px rgba(0, 0, 0, 0.1)",animation:"slideInRight 200ms ease"},children:[r.jsxs("div",{style:{padding:"20px 24px",borderBottom:"1px solid #E3E8EE",display:"flex",alignItems:"flex-start",ga
750p:12,flexShrink:0},children:[r.jsx("div",{style:{width:44,height:44,borderRadius:"50%",background:"#EEF2FF",color:"#4338CA",fontSize:14,fontWeight:600,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:ioe(W)}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{fontSize:15,fontWeight:600,color:Xi,lineHeight:1.3,display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:W}),G&&r.jsx("a",{href:Qm(G),target:"_blank",rel:"noopener noreferrer",onClick:le=>le.stopPropagation(),title:"Abrir perfil no LinkedIn",style:{display:"inline-flex",flexShrink:0,lineHeight:0},children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16",fill:"#0A66C2","aria-label":"LinkedIn",children:r.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})})]}),O&&r.jsx("div",{style:{fontSize:12,color:oi,marginTop:2},children:O}),r.jsxs("div",{style:{display:"flex",gap:6,marginTop:8,flexWrap:"wrap"},children:[Y&&r.jsx("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:"#F3F4F6",color:"#374151",fontWeight:500},children:Y.name}),r.jsx("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:J?"#DCFCE7":"#DBEAFE",color:J?"#15803D":"#1D4ED8",fontWeight:500},children:J?"Applied":"Sourced"})]}),M&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:8,minWidth:0},children:[r.jsx(mr,{size:12,style:{color:"#9CA3AF",flexShrink:0}}),r.jsx("button",{type:"button",onClick:le=>{le.stopPropagation(),C(!0)},style:{fontSize:12,color:xo(M)?"#B45309":"#6C24F5",fontStyle:xo(M)?"italic":"normal",background:"transparent",border:"none",padding:0,cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1,textAlign:"left"},onMouseEnter:le=>{le.currentTarget.style.textDecoration="underline"},onMouseLeave:le=>{le.currentTarget.style.textDecoration="none"},title:xo(M)?"Informe o e-mail":M,children:xo(M)?"Informe o e-mail":M}),r.jsx("button",{type:"button",onClick:le=>{le.stopPropagation(),C(!0)},title:"Enviar email",style:{background:"transparent",border:"none",padding:2,cursor:"pointer",color:"#6C24F5",display:"inline-flex",flexShrink:0},children:r.jsx(mr,{size:13})})]})]}),r.jsx("button",{type:"button",onClick:i,"aria-label":"Fechar",style:{background:"transparent",border:"none",cursor:"pointer",padding:6,borderRadius:6,color:oi,display:"flex",flexShrink:0},onMouseEnter:le=>{le.currentTarget.style.background="#F3F4F6"},onMouseLeave:le=>{le.currentTarget.style.background="transparent"},children:r.jsx(Jt,{size:18})})]}),r.jsx("div",{style:{display:"flex",padding:"0 24px",borderBottom:"1px solid #E3E8EE",background:"#FFFFFF",flexShrink:0},children:he.map(le=>{const ge=D===le.key;return r.jsxs("button",{type:"button",onClick:()=>P(le.key),style:{padding:"12px 16px",fontSize:13,fontWeight:500,background:"transparent",border:"none",borderBottom:ge?"2px solid #6C24F5":"2px solid transparent",color:ge?"#6C24F5":"#8898AA",cursor:"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",gap:6,marginBottom:-1,transition:"color 120ms ease, border-color 120ms ease"},children:[le.label,le.count!=null&&le.count>0&&r.jsx("span",{style:{fontSize:11,padding:"1px 7px",borderRadius:999,background:ge?"#EEF2FF":"#F3F4F6",color:ge?"#4338CA":"#6B7280",fontWeight:500},children:le.count})]},le.key)})}),r.jsxs("div",{style:{flex:1,overflowY:"auto"},children:[D==="profile"&&r.jsxs(r.Fragment,{children:[(Number(N.salary_current)>0||Number((t==null?void 0:t.salary_expectation)||N.salary_expectation)>0)&&r.jsx(Fg,{title:"Salário",children:r.jsxs("div",{style:{display:"flex",gap:32,flexWrap:"wrap"},children:[Number(N.salary_current)>0&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,color:oi,marginBottom:2},children:"Atual"}),r.jsxs("div",{style:{fontSize:13,fontWeight:500,color:Xi}
750,children:["R$ ",Number(N.salary_current).toLocaleString("pt-BR")]})]}),Number((t==null?void 0:t.salary_expectation)||N.salary_expectation)>0&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,color:oi,marginBottom:2},children:"Expectativa"}),r.jsxs("div",{style:{fontSize:13,fontWeight:600,color:"#2563EB"},children:["R$ ",Number((t==null?void 0:t.salary_expectation)||N.salary_expectation).toLocaleString("pt-BR")]})]})]})}),N.summary_executive||Array.isArray(N.experiences)&&N.experiences.length>0||Array.isArray(N.education)&&N.education.length>0||Array.isArray(N.skill_names)&&N.skill_names.length>0||Array.isArray(N.languages)&&N.languages.length>0?r.jsxs(Fg,{title:"Perfil",children:[N.summary_executive&&r.jsx("p",{style:{fontSize:13,color:Xi,lineHeight:1.6,margin:"0 0 12px"},children:N.summary_executive}),Array.isArray(N.experiences)&&N.experiences.length>0&&r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("div",{style:{fontSize:11,fontWeight:600,color:oi,marginBottom:6},children:"Experiência"}),N.experiences.slice(0,5).map((le,ge)=>r.jsxs("div",{style:{fontSize:12,color:Xi,marginBottom:4},children:[r.jsx("strong",{style:{fontWeight:500},children:le.title||le.role||"Cargo"}),le.company&&r.jsxs("span",{style:{color:oi},children:[" @ ",le.company]})]},ge))]}),Array.isArray(N.education)&&N.education.length>0&&r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("div",{style:{fontSize:11,fontWeight:600,color:oi,marginBottom:6},children:"Educação"}),N.education.slice(0,5).map((le,ge)=>r.jsxs("div",{style:{fontSize:12,color:Xi,marginBottom:4},children:[r.jsx("strong",{style:{fontWeight:500},children:le.degree||le.field||"Curso"}),le.institution&&r.jsxs("span",{style:{color:oi},children:[" · ",le.institution]})]},ge))]}),Array.isArray(N.skill_names)&&N.skill_names.length>0&&r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("div",{style:{fontSize:11,fontWeight:600,color:oi,marginBottom:6},children:"Skills"}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:N.skill_names.map((le,ge)=>r.jsx("span",{style:{fontSize:11,padding:"3px 9px",borderRadius:999,background:"#EEEDFE",color:"#3D38B5",fontWeight:500},children:le},ge))})]}),Array.isArray(N.languages)&&N.languages.length>0&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,fontWeight:600,color:oi,marginBottom:6},children:"Idiomas"}),N.languages.map((le,ge)=>r.jsx("div",{style:{fontSize:12,color:Xi,marginBottom:2},children:typeof le=="string"?le:`${le.language||""}${le.level?` · ${le.level}`:""}`},ge))]})]}):r.jsx("div",{style:{padding:24,fontSize:13,color:Si,fontStyle:"italic"},children:"Sem dados de perfil registrados."})]}),D==="history"&&r.jsx(Fg,{title:`Histórico (${u.length})`,children:m?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:Si},children:[r.jsx(rt,{size:12,style:{animation:"spin 1s linear infinite"}}),"Carregando..."]}):u.length===0?r.jsx("div",{style:{fontSize:12,color:Si,fontStyle:"italic"},children:"Sem movimentações registradas"}):r.jsxs("div",{style:{position:"relative",paddingLeft:18},children:[r.jsx("div",{style:{position:"absolute",left:5,top:6,bottom:6,width:2,background:"#D1D5DB"}}),u.map((le,ge)=>{var Ve,ze;const $e=le.from_stage_id?((Ve=n.find(at=>at.id===le.from_stage_id))==null?void 0:Ve.name)||"—":null,ft=((ze=n.find(at=>at.id===le.to_stage_id))==null?void 0:ze.name)||"—",Qe=ge===0;return r.jsxs("div",{style:{position:"relative",marginBottom:ge===u.length-1?0:22},children:[r.jsx("div",{style:{position:"absolute",left:-18,top:2,width:12,height:12,borderRadius:"50%",background:Qe?"#3B82F6":"#9CA3AF",border:"2px solid #FFFFFF",boxShadow:Qe?"0 0 0 2px rgba(59, 130, 246, 0.2)":"none"}}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:Xi,lineHeight:1.3},children:ft}),r.jsx("div",{style:{fontSize:11,color:oi,marginTop:2},children:$e?`de ${$e}`:"Entrada no pipeline"}),r.jsx("div",{style:{fontSize:11,color:Si,marginTop:2},children:ooe(le.moved_at||le.created_date)}),le.reason_code&&r.jsx("span",{style:{display:"inline-block",fontSize:10,padding:"2px 7px",borderRadius:999,background:"#F3F4F6",color:"#4B5563",marginTop:6,fontWeight:500},children:le.reason_code}),le.reason_note&&r.jsx("div",{style:{fontSize:11,color:Si,marginTop:4,fontStyle:"italic"},children:le.reason_note})]},le.id||ge)})]})}),D==="files"&&r.jsx(Fg,{title:"Arquivos",children:xe.length===0?r.jsx("div",{style:{fontSize:12,color:Si,fontStyle:"italic"},children:"Nenhum arquivo anexado"}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:xe.map((le,ge)=>r.jsxs("a",{href:le.file_url,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",border:`1px solid ${vd}`,borderRadius:6,fontSize:12,color:Xi,textDecoration:"none"},onMouseEnter:$e=>{$e.currentTarget.style.background="#F9FAFB"},onMouseLeave:$e=>{$e.currentTarget.style.background="transparent"},children:[r.jsx(ui,{size:16,style:{color:oi,flexShrink:0}}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:le.file_name||"arquivo"}
750),le.file_size_bytes?r.jsx("div",{style:{fontSize:10,color:Si},children:aoe(le.file_size_bytes)}):null]}),r.jsx(Wa,{size:14,style:{color:Si,flexShrink:0}})]},le.id||ge))})}),D==="jobs"&&r.jsxs("div",{style:{padding:"16px 24px"},children:[V?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:Si},children:[r.jsx(rt,{size:12,style:{animation:"spin 1s linear infinite"}})," Carregando..."]}):I.length===0?r.jsxs("div",{style:{textAlign:"center",padding:"32px 16px",color:Si},children:[r.jsx(On,{size:28,style:{color:"#CBD5E1",marginBottom:10}}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#475569",marginBottom:4},children:"Sem outras vagas"}),r.jsx("div",{style:{fontSize:12,color:Si},children:"Este candidato não está em outras vagas do workspace."})]}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:I.map(le=>{var ge;return r.jsx("div",{style:{border:`1px solid ${vd}`,borderRadius:8,padding:12,background:le.id===t.id?"#F8FAFF":"#FFFFFF"},children:r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:13,fontWeight:600,color:Xi,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(ge=le.job)!=null&&ge.title?le.job.title:r.jsx("span",{style:{color:"#9CA3AF",fontStyle:"italic",fontSize:13,fontWeight:400},children:"Vaga removida"})}),r.jsxs("div",{style:{display:"flex",gap:6,marginTop:4,flexWrap:"wrap"},children:[le.stage_name&&r.jsx("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:"#F3F4F6",color:"#374151",fontWeight:500},children:le.stage_name}),le.status&&r.jsx("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:"#EEF2FF",color:"#4338CA",fontWeight:500},children:le.status}),le.id===t.id&&r.jsx("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:"#DCFCE7",color:"#15803D",fontWeight:500},children:"Atual"})]})]})})},le.id)})}),l&&r.jsx("div",{style:{marginTop:12},children:r.jsxs("button",{type:"button",onClick:()=>l==null?void 0:l(),style:{width:"100%",padding:"10px 12px",fontSize:13,fontWeight:500,background:"#6C24F5",color:"#FFFFFF",border:"none",borderRadius:6,cursor:"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",justifyContent:"center",gap:6},children:[r.jsx(pa,{size:13})," Enviar pra outra vaga"]})})]}),D==="emails"&&(t==null?void 0:t.talent_profile_id)&&s&&r.jsx(JP,{talentProfileId:t.talent_profile_id,workspaceId:s,candidateEmail:M}),D==="notes"&&r.jsx(yae,{applicationId:t==null?void 0:t.id,wsId:s,userEmail:d==null?void 0:d.email})]}),r.jsxs("div",{style:{padding:"16px 24px",borderTop:"1px solid #E3E8EE",background:"#FFFFFF",display:"flex",flexDirection:"column",gap:8,flexShrink:0},children:[r.jsxs("div",{style:{display:"flex",gap:6,position:"relative"},children:[r.jsxs("button",{type:"button",onClick:()=>y(le=>!le),disabled:_,style:{flex:1,padding:"8px 12px",fontSize:12,fontWeight:500,background:"#FFFFFF",color:Xi,border:`1px solid ${vd}`,borderRadius:6,cursor:_?"not-allowed":"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",justifyContent:"center",gap:4},children:["Mover para... ",r.jsx(ar,{size:12})]}),w&&r.jsxs("div",{style:{position:"absolute",bottom:"calc(100% + 4px)",left:0,right:0,background:"#FFFFFF",border:`1px solid ${vd}`,borderRadius:6,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.12)",maxHeight:220,overflowY:"auto",zIndex:10},children:[te.length===0&&r.jsx("div",{style:{padding:"8px 12px",fontSize:12,color:Si},children:"Nenhuma etapa disponível"}),te.map(le=>r.jsx("button",{type:"button",onClick:()=>{y(!1),re({toStageId:le.id})},style:{display:"block",width:"100%",textAlign:"left",padding:"8px 12px",fontSize:12,color:Xi,background:"transparent",border:"none",cursor:"pointer",fontFamily:"inherit"},onMouseEnter:ge=>{ge.currentTarget.style.background="#F3F4F6"},onMouseLeave:ge=>{ge.currentTarget.style.background="transparent"},children:le.name},le.id))]})]}),r.jsxs("div",{style:{display:"flex",gap:6},children:[r.jsx("button",{type:"button",onClick:()=>j(!0),disabled:_||!ae,style:{flex:1,padding:"8px 12px",fontSize:12,fontWeight:500,background:"transparent",color:"#DC2626",border:"1px solid #FCA5A5",borderRadius:6,cursor:_?"not-allowed":"pointer",fontFamily:"inherit"},children:"Reprovar"}),r.jsx("button",{type:"button",onClick:Z,disabled:_||!Q,style:{flex:1,padding:"8px 12px",fontSize:12,fontWeight:500,background:"transparent",color:"#92400E",border:"1px solid #FCD34D",borderRadius:6,cursor:_?"not-allowed":"pointer",fontFamily:"inherit"},children:"Em espera"}),r.jsx("button",{type:"button",onClick:pe,disabled:_||!ie,style:{flex:1,padding:"8px 12px",fontSize:12,fontWeight:500,background:"#16A34A",color:"#FFFFFF",border:"none",borderRadius:6,cursor:_?"not-allowed":"pointer",fontFamily:"inherit"},children:"Contratar"})]}),(o||l||c)&&r.jsxs("div",{style:{display:"flex",gap:6},children:[o&&r.jsxs("button",{type:"button",onClick:()=>o==null?void 0:o(),disabled:_,style:{flex:1,padding:"8px 12px",fontSize:12,fontWeight:500,background:"transparent",color:"#185FA5",border:"1px solid #93C5FD",borderRadius:6,cursor:_?"not-allowed":"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",justifyContent:"center",gap:4},children:[r.jsx($r,{size:12})," Editar"]}),l&&r.jsxs("button",{type:"button",onClick:()=>l==null?void 0:l(),disabled:_,style:{flex:1,padding:"8px 12px",fontSize:12,fontWeight:500,background:"transparent",color:Xi,border:`1px solid ${vd}`,borderRadius:6,cursor:_?"not-allowed":"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",justifyContent:"center",gap:4},children:[r.jsx(pa,{size:12}
750)," Enviar pra vaga"]}),c&&r.jsxs("button",{type:"button",onClick:()=>S(!0),disabled:_,style:{flex:1,padding:"8px 12px",fontSize:12,fontWeight:500,background:"transparent",color:"#A32D2D",border:"1px solid #FCA5A5",borderRadius:6,cursor:_?"not-allowed":"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",justifyContent:"center",gap:4},children:[r.jsx(zn,{size:12})," Remover"]})]}),k&&r.jsxs("div",{style:{background:"#FEF2F2",border:"1px solid #FECACA",borderRadius:8,padding:12},children:[r.jsx("div",{style:{fontSize:12,fontWeight:600,color:"#991B1B",marginBottom:6},children:"Remover do pipeline?"}),r.jsx("div",{style:{fontSize:12,color:oi,marginBottom:10,lineHeight:1.4},children:"O candidato será removido desta vaga."}),r.jsxs("div",{style:{display:"flex",gap:6,justifyContent:"flex-end"},children:[r.jsx("button",{type:"button",onClick:()=>S(!1),style:{padding:"6px 12px",fontSize:12,background:"transparent",color:oi,border:`1px solid ${vd}`,borderRadius:6,cursor:"pointer",fontFamily:"inherit"},children:"Cancelar"}),r.jsx("button",{type:"button",onClick:()=>{S(!1),c==null||c()},style:{padding:"6px 12px",fontSize:12,fontWeight:500,background:"#A32D2D",color:"#FFFFFF",border:"none",borderRadius:6,cursor:"pointer",fontFamily:"inherit"},children:"Confirmar"})]})]})]})]}),A&&r.jsx(Cc,{candidateProfile:K,job:null,workspaceId:s,onClose:()=>C(!1),onSent:()=>C(!1)}),v&&r.jsx(kk,{workspaceId:s,onConfirm:Ne,onCancel:()=>j(!1)})]})}function loe(e){var n;const t=e.trim().split(/\s+/);return t.length===1?((n=t[0][0])==null?void 0:n.toUpperCase())||"?":(t[0][0]+t[t.length-1][0]).toUpperCase()}function Ag(e){if(!e)return{};if(e.talent_profile)return e.talent_profile;if(e.snapshot)return e.snapshot;if(e.profile_snapshot_json)try{return JSON.parse(e.profile_snapshot_json)}catch{return{}}return{}}function coe(e){return e?String(e).replace(/[^\d]/g,""):""}function doe(e){return!e||e<=0?"":e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function k3(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const n=s=>String(s).padStart(2,"0");return`${n(t.getDate())}/${n(t.getMonth()+1)}/${t.getFullYear()} ${n(t.getHours())}:${n(t.getMinutes())}`}function uoe({size:e=14}){return r.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#25D366",xmlns:"http://www.w3.org/2000/svg",children:r.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.001-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"})})}const d2={submitted:"Inscrito",shortlisted:"Selecionado",approved:"Aprovado",standby:"Em espera",rejected:"Reprovado",hired:"Contratado",pending_verification:"Pendente",viewed:"Visualizado",withdrawn:"Retirado",expired:"Expirado",removed_by_recruiter:"Removido"};function foe(e,t){const n=e?String(e):"",s=t?String(t):"Atual";return!n&&!t?"":`${n}${n||t?" – ":""}${s}`}const no="#E3E8EE",ro="#111827",Ji="#6B7280",$n="#9CA3AF";function poe({candidate:e,allApplications:t=[],jobs:n=[],stages:s=null,workspaceId:i=null,onClose:a}){const[o,l]=g.useState(!1),[c,d]=g.useState("profile"),[u,p]=g.useState([]),[m,x]=g.useState(!1),[w,y]=g.useState(!1),[v,j]=g.useState([]),[k,S]=g.useState(!1),[_,F]=g.useState(0),[A,C]=g.useState(null),D=g.useRef(null),P=(e==null?void 0:e.talent_profile_id)||(e==null?void 0:e.id)||null;g.useEffect(()=>{const te=xe=>{xe.key==="Escape"&&(a==null||a())};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[a]),g.useEffect(()=>{d("profile")},[P]),g.useEffect(()=>{if(!P)return;let te=!1;return x(!0),ne.entities.TalentProfileAttachment.filter({talent_profile_id:P},"-uploaded_at").then(xe=>{te||p(Array.isArray(xe)?xe:[])}).catch(()=>{te||p([])}).finally(()=>{te||x(!1)}),()=>{te=!0}},[P]),g.useEffect(()=>{if(!P||!i){F(0);return}let te=!1;return ne.entities.CandidateMessage.filter({talent_profile_id:P,workspace_id:i}).then(xe=>{te||F(Array.isArray(xe)?xe.length:0)}).catch(()=>{te||F(0)}),()=>{te=!0}},[P,i]);const L=Ag(e),T=L.full_name||"Candidato",R=L.headline||L.current_title||"",U=e.email||L.email||"",I=xo(U)?"":U,H=e.phone||L.phone||"",V=e.linkedin_url||L.linkedin_url||"",X=e.avatar_url||L.avatar_url||"",N=Number(e.salary_expectation||L.salary_expectation||0),W=Number(L.salary_current||e.salary_current||0),O=T.split(" ")[0]||"tudo bem",G={id:P,full_name:T,first_name:O,email:U,phone:H,salary_current:W,salary_expectation:N},M={};
750n.forEach(te=>{M[te.id]=te});const z={};Array.isArray(s)&&s.forEach(te=>{z[te.id]=te});const K=t.filter(te=>{const xe=Ag(te);return L.email&&xe.email===L.email||P&&te.talent_profile_id===P});if(g.useEffect(()=>{if(!e||!P){j([]);return}const te=Ag(e),xe=t.filter(le=>{const ge=Ag(le);return te.email&&ge.email===te.email||P&&le.talent_profile_id===P}).map(le=>le.id).filter(Boolean);if(xe.length===0){j([]);return}let he=!1;return S(!0),Promise.all(xe.map(le=>ne.entities.StageTransition.filter({application_id:le}).catch(()=>[]))).then(le=>{if(he)return;const $e=[...le.flat()].sort((ft,Qe)=>{const Ve=new Date(ft.moved_at||ft.created_date||0).getTime();return new Date(Qe.moved_at||Qe.created_date||0).getTime()-Ve});j($e)}).catch(()=>{he||j([])}).finally(()=>{he||S(!1)}),()=>{he=!0}},[P,t.length,e]),!e)return null;const Y=te=>{var xe;if(te)try{(xe=navigator.clipboard)==null||xe.writeText(te)}catch{}},J=()=>{var te;(te=D.current)==null||te.click()},Q=async te=>{var he;const xe=(he=te.target.files)==null?void 0:he[0];if(te.target.value="",!(!xe||!P)){y(!0);try{const{file_url:le}=await ne.integrations.Core.UploadFile({file:xe}),ge=await ne.entities.TalentProfileAttachment.create({talent_profile_id:P,file_url:le,file_name:xe.name,file_size_bytes:xe.size,file_type:xe.type||"",uploaded_at:new Date().toISOString()});p($e=>[ge,...$e])}catch(le){alert((le==null?void 0:le.message)||"Falha ao enviar arquivo.")}y(!1)}},ie=async te=>{if(te!=null&&te.id&&window.confirm(`Excluir "${te.file_name||"arquivo"}"?`)){C(te.id);try{await ne.entities.TalentProfileAttachment.delete(te.id),p(xe=>xe.filter(he=>he.id!==te.id))}catch(xe){alert((xe==null?void 0:xe.message)||"Falha ao excluir.")}C(null)}},ae=Array.isArray(L.skill_names)?L.skill_names:Array.isArray(L.skills)?L.skills:[],re=Array.isArray(L.languages)?L.languages:[],pe=Array.isArray(L.experiences)?L.experiences:[],Z=Array.isArray(L.education)?L.education:[],Ne=[{key:"profile",label:"Perfil",count:null},{key:"files",label:"Arquivos",count:u.length},{key:"jobs",label:"Vagas",count:K.length},{key:"history",label:"Histórico",count:v.length},{key:"emails",label:"Emails",count:_},{key:"notes",label:"Notas",count:0}];return r.jsxs(r.Fragment,{children:[r.jsx("div",{onClick:a,style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.3)",zIndex:900,animation:"fadeIn 200ms ease"}}),r.jsxs("div",{style:{position:"fixed",top:0,right:0,bottom:0,width:"min(680px, 100vw)",background:"#FFFFFF",zIndex:901,display:"flex",flexDirection:"column",boxShadow:"-4px 0 20px rgba(0, 0, 0, 0.1)",animation:"slideInRight 200ms ease"},onClick:te=>te.stopPropagation(),children:[r.jsxs("div",{style:{padding:"20px 24px",borderBottom:`1px solid ${no}`,background:"#FFFFFF",flexShrink:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12,paddingRight:32,position:"relative"},children:[X?r.jsx("img",{src:X,alt:T,style:{width:44,height:44,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):r.jsx("div",{style:{width:44,height:44,borderRadius:"50%",background:"#EEF2FF",color:"#4338CA",fontSize:14,fontWeight:600,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:loe(T)}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{fontSize:15,fontWeight:600,color:ro,lineHeight:1.3,display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:T}),V&&r.jsx("a",{href:Qm(V),target:"_blank",rel:"noopener noreferrer",onClick:te=>te.stopPropagation(),title:"Abrir perfil no LinkedIn",style:{display:"inline-flex",flexShrink:0,lineHeight:0},children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16",fill:"#0A66C2","aria-label":"LinkedIn",children:r.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})})]}),R&&r.jsx("div",{style:{fontSize:12,color:Ji,marginTop:2},children:R}),r.jsxs("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:4},children:[I?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[r.jsx(mr,{size:12,style:{color:$n,flexShrink:0}}),r.jsx("button",{type:"button",onClick:te=>{te.stopPropagation(),l(!0)},style:{fontSize:12,color:"#6C24F5",background:"transparent",border:"none",padding:0,cursor:"pointer",textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0},onMouseEnter:te=>{te.currentTarget.style.textDecoration="underline"},onMouseLeave:te=>{te.currentTarget.style.textDecoration="none"},title:I,children:I}),r.jsx("button",{type:"button",onClick:te=>{te.stopPropagation(),Y(I)},style:{background:"transparent",border:"none",padding:2,cursor:"pointer",color:$n,flexShrink:0,display:"inline-flex"},title:"Copiar e-mail",children:r.jsx(Js,{size:11})})]}):r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[r.jsx(mr,{size:12,style:{color:$n,flexShrink:0}}),r.jsx("button",{type:"button",onClick:te=>{te.stopPropagation(),l(!0)},style:{fontSize:12,color:"#B45309",fontStyle:"italic",background:"transparent",border:"none",padding:0,cursor:"pointer",textAlign:"left",flex:1},children:"Informe o e-mail"})]}),H&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[r.jsx(xS,{size:12,style:{color:$n,flexShrink:0}}),r.jsx("span",{style:{fontSize:12,color:ro,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0},children:H}),r.jsx("a",{href:`https://wa.me/${coe(H)}?text=${encodeURIComponent(`Oi, ${O}, tudo bem?`)}`,target:"_blank",rel:"noopener noreferrer",onClick:te=>te.stopPropagation(),style:{padding:2,display:"inline-flex",flexShrink:0},title:"Abrir no WhatsApp",children:r.jsx(uoe,{size:13})}),r.jsx("button",{type:"button",onClick:te=>{te.stopPropagation(),Y(H)},style:{background:"transparent",border:"none",padding:2,cursor:"pointer",color:$n,flexShrink:0,display:"inline-flex"},title:"Copiar telefone",children:r.jsx(Js,{size:11})})]})]})]}),r.jsx("button",{type:"button",onClick:a,"aria-label":"Fechar",style:{background:"transparent",border:"none",cursor:"pointer",padding:6,borderRadius:6,color:Ji,position:"absolute",top:0,right:0,display:"flex"},onMouseEnter:te=>{te.currentTarget.style.background="#F3F4F6"},onMouseLeave:te=>{te.currentTarget.style.background="transparent"},children:r.jsx(Jt,{size:18})})]}),K.length>0&&r.jsxs("div",{style:{marginTop:12,display:"flex",gap:6,flexWrap:"wrap"},children:[K.slice(0,3).map(te=>{var ft;const xe=M[te.job_id],he=!xe,le=(xe==null?void 0:xe.title)||"Vaga removida",$e=((ft=z[te.current_stage_id])==null?void 0:ft.name)||d2[te.status]||"—";return r.jsxs("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:"#F3F4F6",color:"#374151",fontWeight:500,display:"inline-flex",alignItems:"center",gap:4,maxWidth:220},title:`${le} · ${$e}`,children:[r.jsx(On,{size:10}),r.jsxs("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}
750,children:[he?r.jsx("span",{style:{fontStyle:"italic",color:"#9CA3AF"},children:"Vaga removida"}):le," · ",$e]})]},te.id)}),K.length>3&&r.jsxs("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:"#EEF2FF",color:"#4338CA",fontWeight:500},children:["+",K.length-3]})]})]}),r.jsx("div",{style:{display:"flex",padding:"0 24px",borderBottom:`1px solid ${no}`,background:"#FFFFFF",flexShrink:0,overflowX:"auto"},children:Ne.map(te=>{const xe=c===te.key;return r.jsxs("button",{type:"button",onClick:()=>d(te.key),style:{padding:"12px 16px",fontSize:13,fontWeight:500,background:"transparent",border:"none",borderBottom:xe?"2px solid #6C24F5":"2px solid transparent",color:xe?"#6C24F5":"#8898AA",cursor:"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",gap:6,marginBottom:-1,whiteSpace:"nowrap",transition:"color 120ms ease, border-color 120ms ease"},children:[te.label,te.count!=null&&te.count>0&&r.jsx("span",{style:{fontSize:11,padding:"1px 7px",borderRadius:999,background:xe?"#EEF2FF":"#F3F4F6",color:xe?"#4338CA":"#6B7280",fontWeight:500},children:te.count})]},te.key)})}),r.jsxs("div",{style:{flex:1,overflowY:"auto"},children:[c==="profile"&&r.jsxs("div",{children:[(W>0||N>0)&&r.jsxs("div",{style:{padding:"16px 24px",borderBottom:`1px solid ${no}`},children:[r.jsx("div",{style:{fontSize:11,letterSpacing:.5,color:$n,fontWeight:600,textTransform:"uppercase",marginBottom:10},children:"Salário"}),r.jsxs("div",{style:{display:"flex",gap:32,flexWrap:"wrap"},children:[W>0&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,color:Ji,marginBottom:2},children:"Atual"}),r.jsxs("div",{style:{fontSize:13,fontWeight:500,color:ro},children:["R$ ",W.toLocaleString("pt-BR")]})]}),N>0&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,color:Ji,marginBottom:2},children:"Expectativa"}),r.jsxs("div",{style:{fontSize:13,fontWeight:600,color:"#2563EB"},children:["R$ ",N.toLocaleString("pt-BR")]})]})]})]}),L.summary_executive&&r.jsxs("div",{style:{padding:"16px 24px",borderBottom:`1px solid ${no}`},children:[r.jsx("div",{style:{fontSize:11,letterSpacing:.5,color:$n,fontWeight:600,textTransform:"uppercase",marginBottom:10},children:"Resumo"}),r.jsx("p",{style:{fontSize:13,color:ro,lineHeight:1.6,margin:0},children:L.summary_executive})]}),r.jsxs("div",{style:{padding:"16px 24px",borderBottom:`1px solid ${no}`},children:[r.jsx("div",{style:{fontSize:11,letterSpacing:.5,color:$n,fontWeight:600,textTransform:"uppercase",marginBottom:10},children:"Experiência"}),pe.length===0?r.jsx("div",{style:{fontSize:13,color:$n,fontStyle:"italic"},children:"Não informado"}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:pe.map((te,xe)=>r.jsxs("div",{children:[r.jsxs("div",{style:{fontSize:13,color:ro},children:[r.jsx("span",{style:{fontWeight:500},children:te.title||te.role||"Cargo"}),te.company&&r.jsxs("span",{style:{color:Ji},children:[" · ",te.company]})]}),(te.start_date||te.end_date)&&r.jsx("div",{style:{fontSize:11,color:Ji,marginTop:2},children:foe(te.start_date,te.end_date)}),te.description&&r.jsx("div",{style:{fontSize:12,color:Ji,marginTop:4,lineHeight:1.5},children:te.description})]},xe))})]}),r.jsxs("div",{style:{padding:"16px 24px",borderBottom:`1px solid ${no}`},children:[r.jsx("div",{style:{fontSize:11,letterSpacing:.5,color:$n,fontWeight:600,textTransform:"uppercase",marginBottom:10},children:"Educação"}),Z.length===0?r.jsx("div",{style:{fontSize:13,color:$n,fontStyle:"italic"},children:"Não informado"}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:Z.map((te,xe)=>{const he=te.start_year||te.end_year?`${te.start_year||""}${te.start_year||te.end_year?" – ":""}${te.end_year||"Atual"}`:"";return r.jsxs("div",{children:[r.jsxs("div",{style:{fontSize:13,color:ro},children:[r.jsx("span",{style:{fontWeight:500},children:te.degree||te.field||"Curso"}),te.institution&&r.jsxs("span",{style:{color:Ji},children:[" · ",te.institution]})]}),(te.field||he)&&r.jsxs("div",{style:{fontSize:11,color:Ji,marginTop:2},children:[te.field&&r.jsx("span",{children:te.field}),te.field&&he&&r.jsx("span",{children:" · "}),he&&r.jsx("span",{children:he})]})]},xe)})})]}),r.jsxs("div",{style:{padding:"16px 24px",borderBottom:`1px solid ${no}`},children:[r.jsx("div",{style:{fontSize:11,letterSpacing:.5,color:$n,fontWeight:600,textTransform:"uppercase",marginBottom:10},children:"Skills"}),ae.length===0?r.jsx("div",{style:{fontSize:13,color:$n,fontStyle:"italic"},children:"Não informado"}):r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:ae.map((te,xe)=>r.jsx("span",{style:{fontSize:11,padding:"3px 9px",borderRadius:999,background:"#EEEDFE",color:"#3D38B5",fontWeight:500},children:typeof te=="string"?te:(te==null?void 0:te.name)||""},xe))})]}),re.length>0&&r.jsxs("div",{style:{padding:"16px 24px",borderBottom:`1px solid ${no}`},children:[r.jsx("div",{style:{fontSize:11,letterSpacing:.5,color:$n,fontWeight:600,textTransform:"uppercase",marginBottom:10},children:"Idiomas"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:re.map((te,xe)=>r.jsx("div",{style:{fontSize:13,color:ro},children:typeof te=="string"?te:`${te.language||""}${te.level?` · ${te.level}`:""}`},xe))})]})]}),c==="files"&&r.jsxs("div",{style:{padding:"16px 24px"},children:[r.jsx("input",{ref:D,type:"file",style:{display:"none"},onChange:Q}),r.jsx("button",{type:"button",onClick:J,disabled:w||!P,style:{width:"100%",padding:"10px 12px",fontSize:13,fontWeight:500,background:"#6C24F5",color:"#FFFFFF",border:"none",borderRadius:6,cursor:w?"not-allowed":"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",justifyContent:"center",gap:6,marginBottom:16,opacity:w?.7:1},children:w?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:13,style:{animation:"spin 1s linear infinite"}})," Enviando..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Ha,{size:13}
750)," Enviar arquivo"]})}),m?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:$n},children:[r.jsx(rt,{size:12,style:{animation:"spin 1s linear infinite"}})," Carregando..."]}):u.length===0?r.jsxs("div",{style:{textAlign:"center",padding:"32px 16px",color:$n},children:[r.jsx(ui,{size:28,style:{color:"#CBD5E1",marginBottom:10}}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#475569",marginBottom:4},children:"Nenhum arquivo"}),r.jsx("div",{style:{fontSize:12,color:$n},children:"Envie CVs e documentos para este candidato."})]}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:u.map(te=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",border:`1px solid ${no}`,borderRadius:6,fontSize:12,color:ro},children:[r.jsx(ui,{size:16,style:{color:Ji,flexShrink:0}}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:te.file_name||"arquivo"}),r.jsxs("div",{style:{fontSize:10,color:$n,display:"flex",gap:6},children:[te.file_size_bytes?r.jsx("span",{children:doe(te.file_size_bytes)}):null,te.uploaded_at&&r.jsxs("span",{children:["· ",k3(te.uploaded_at)]})]})]}),r.jsx("a",{href:te.file_url,target:"_blank",rel:"noopener noreferrer",style:{padding:4,color:Ji,display:"inline-flex",flexShrink:0},title:"Baixar",children:r.jsx(Wa,{size:14})}),r.jsx("button",{type:"button",onClick:()=>ie(te),disabled:A===te.id,style:{background:"transparent",border:"none",padding:4,cursor:"pointer",color:"#DC2626",flexShrink:0,display:"inline-flex",opacity:A===te.id?.5:1},title:"Excluir",children:A===te.id?r.jsx(rt,{size:14,style:{animation:"spin 1s linear infinite"}}):r.jsx(zn,{size:14})})]},te.id))})]}),c==="jobs"&&r.jsx("div",{style:{padding:"16px 24px"},children:K.length===0?r.jsxs("div",{style:{textAlign:"center",padding:"32px 16px",color:$n},children:[r.jsx(On,{size:28,style:{color:"#CBD5E1",marginBottom:10}}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#475569",marginBottom:4},children:"Nenhuma vaga"}),r.jsx("div",{style:{fontSize:12,color:$n},children:"Este candidato não está em nenhuma vaga."})]}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:K.map(te=>{var $e;const xe=M[te.job_id],he=!xe,ge=(($e=z[te.current_stage_id])==null?void 0:$e.name)||d2[te.status]||"—";return r.jsxs("div",{style:{border:`1px solid ${no}`,borderRadius:8,padding:12,background:"#FFFFFF"},children:[r.jsx("div",{style:{fontSize:13,fontWeight:600,color:ro,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:he?r.jsx("span",{style:{color:"#9CA3AF",fontStyle:"italic",fontWeight:400},children:"Vaga removida"}):xe.title}),r.jsxs("div",{style:{display:"flex",gap:6,marginTop:4,flexWrap:"wrap"},children:[r.jsx("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:"#F3F4F6",color:"#374151",fontWeight:500},children:ge}),te.status&&r.jsx("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:"#EEF2FF",color:"#4338CA",fontWeight:500},children:d2[te.status]||te.status})]})]},te.id)})})}),c==="history"&&r.jsxs("div",{style:{padding:"16px 24px"},children:[r.jsxs("div",{style:{fontSize:11,letterSpacing:.5,color:$n,fontWeight:600,textTransform:"uppercase",marginBottom:12},children:["Histórico (",v.length,")"]}),k?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:$n},children:[r.jsx(rt,{size:12,style:{animation:"spin 1s linear infinite"}})," Carregando..."]}):v.length===0?r.jsxs("div",{style:{textAlign:"center",padding:"32px 16px",color:$n},children:[r.jsx(GV,{size:28,style:{color:"#CBD5E1",marginBottom:10}}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#475569",marginBottom:4},children:"Nenhum histórico de movimentação"})]}):r.jsxs("div",{style:{position:"relative",paddingLeft:18},children:[r.jsx("div",{style:{position:"absolute",left:5,top:6,bottom:6,width:2,background:"#D1D5DB"}}),v.map((te,xe)=>{var $e,ft;const he=te.from_stage_id?(($e=z[te.from_stage_id])==null?void 0:$e.name)||"—":null,le=((ft=z[te.to_stage_id])==null?void 0:ft.name)||"—",ge=xe===0;return r.jsxs("div",{style:{position:"relative",marginBottom:xe===v.length-1?0:22},children:[r.jsx("div",{style:{position:"absolute",left:-18,top:2,width:12,height:12,borderRadius:"50%",background:ge?"#3B82F6":"#9CA3AF",border:"2px s
750olid #FFFFFF",boxShadow:ge?"0 0 0 2px rgba(59, 130, 246, 0.2)":"none"}}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:ro,lineHeight:1.3},children:le}),r.jsx("div",{style:{fontSize:11,color:Ji,marginTop:2},children:he?`de ${he}`:"Entrada no pipeline"}),r.jsx("div",{style:{fontSize:11,color:$n,marginTop:2},children:k3(te.moved_at||te.created_date)}),te.reason_code&&r.jsx("span",{style:{display:"inline-block",fontSize:10,padding:"2px 7px",borderRadius:999,background:"#F3F4F6",color:"#4B5563",marginTop:6,fontWeight:500},children:te.reason_code}),te.reason_note&&r.jsx("div",{style:{fontSize:11,color:$n,marginTop:4,fontStyle:"italic"},children:te.reason_note})]},te.id||xe)})]})]}),c==="emails"&&P&&i&&r.jsx(JP,{talentProfileId:P,workspaceId:i,candidateEmail:U}),c==="notes"&&r.jsx("div",{style:{padding:"16px 24px"},children:r.jsxs("div",{style:{textAlign:"center",padding:"32px 16px",color:$n},children:[r.jsx(ui,{size:28,style:{color:"#CBD5E1",marginBottom:10}}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#475569",marginBottom:4},children:"Sem notas"}),r.jsx("div",{style:{fontSize:12,color:$n},children:"Notas privadas do recrutador são vinculadas a uma candidatura específica e podem ser adicionadas no kanban da vaga."})]})})]}),r.jsx("style",{children:`
751          @keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
752          @keyframes slideInRight { from { transform: translateX(100%) } to { transform: translateX(0) } }
753          @keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }
754        `})]}),o&&r.jsx(Cc,{candidateProfile:G,job:null,workspaceId:i,onClose:()=>l(!1),onSent:()=>l(!1)})]})}const ZP=g.createContext(null);function hoe(){const e=g.useContext(ZP);if(!e)throw new Error("useSummitDrawer must be used inside SummitDrawerProvider");return e}const _3={isOpen:!1,talentId:null,jobId:null,applicationId:null,mode:null},Ou={loading:!1,error:null,application:null,profile:null,job:null,stages:[],workspaceId:null};function moe({children:e}){const[t,n]=g.useState(_3),[s,i]=g.useState(Ou),a=g.useCallback(({talentId:l,jobId:c,applicationId:d}={})=>{n({isOpen:!0,talentId:l||null,jobId:c||null,applicationId:d||null,mode:c?"pipeline":"crm"})},[]),o=g.useCallback(()=>{n(_3),i(Ou)},[]);return g.useEffect(()=>{if(!t.isOpen)return;let l=!1;return i({...Ou,loading:!0}),(async()=>{try{if(t.mode==="pipeline"){let c=null;if(t.applicationId)c=await ne.entities.JobApplication.get(t.applicationId);else if(t.talentId&&t.jobId){const y=await ne.entities.JobApplication.filter({talent_profile_id:t.talentId,job_id:t.jobId});c=(y==null?void 0:y[0])||null}if(l)return;if(!c){i({...Ou,error:"Candidatura não encontrada"});return}const d=c.workspace_id||null,u=c.job_id||t.jobId,[p,m,x]=await Promise.all([u?ne.entities.Job.get(u).catch(()=>null):null,d&&u?ne.entities.PipelineStage.filter({job_id:u,is_archived:!1}).catch(()=>[]):Promise.resolve([]),c.talent_profile_id?ne.entities.TalentProfile.get(c.talent_profile_id).catch(()=>null):null]);if(l)return;const w={...c};x&&!w.talent_profile&&(w.talent_profile=x),i({loading:!1,error:null,application:w,profile:x,job:p||null,stages:Array.isArray(m)?m.sort((y,v)=>(y.order||0)-(v.order||0)):[],workspaceId:d})}else{const c=t.talentId?await ne.entities.TalentProfile.get(t.talentId):null;if(l)return;i({...Ou,error:c?null:"Perfil não encontrado",profile:c})}}catch(c){if(l)return;i({...Ou,error:(c==null?void 0:c.message)||"Erro ao carregar dados"})}})(),()=>{l=!0}},[t.isOpen,t.mode,t.talentId,t.jobId,t.applicationId]),r.jsxs(ZP.Provider,{value:{openCandidateDrawer:a,closeCandidateDrawer:o},children:[e,t.isOpen&&s.loading&&r.jsxs(r.Fragment,{children:[r.jsx("div",{onClick:o,style:{position:"fixed",inset:0,zIndex:900,background:"rgba(0,0,0,0.3)"}}),r.jsxs("div",{style:{position:"fixed",top:0,right:0,bottom:0,width:"min(680px, 100vw)",background:"#FFFFFF",zIndex:901,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"-4px 0 20px rgba(0,0,0,0.1)"},children:[r.jsx(rt,{size:24,style:{animation:"spin 1s linear infinite",color:"#6C24F5"}}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg) } }"})]})]}),t.isOpen&&!s.loading&&s.error&&r.jsxs(r.Fragment,{children:[r.jsx("div",{onClick:o,style:{position:"fixed",inset:0,zIndex:900,background:"rgba(0,0,0,0.3)"}}),r.jsxs("div",{style:{position:"fixed",top:0,right:0,bottom:0,width:"min(680px, 100vw)",background:"#FFFFFF",zIndex:901,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,padding:32,boxShadow:"-4px 0 20px rgba(0,0,0,0.1)"},children:[r.jsx("p",{style:{fontSize:14,color:"#697386",margin:0},children:s.error}),r.jsx("button",{onClick:o,style:{fontSize:13,fontWeight:600,color:"#6C24F5",background:"none",border:"none",cursor:"pointer"},children:"Fechar"})]})]}),t.isOpen&&!s.loading&&!s.error&&t.mode==="pipeline"&&s.application&&r.jsx(QP,{open:!0,application:s.application,stages:s.stages,workspaceId:s.workspaceId,onClose:o}),t.isOpen&&!s.loading&&!s.error&&t.mode==="crm"&&s.profile&&r.jsx(poe,{candidate:{talent_profile_id:s.profile.id,talent_profile:s.profile},workspaceId:s.workspaceId,onClose:o})]})}const goe=[{type:"action",label:"Nova vaga",sub:"Criar vaga",path:"/app/vagas",icon:"zap"}
754,{type:"action",label:"Gerenciar módulos",sub:"Conta & Workspace",path:"/app/conta/modulos",icon:"zap"},{type:"action",label:"Equipe & funções",sub:"Conta & Workspace",path:"/app/conta/equipe",icon:"zap"},{type:"action",label:"Configurações",sub:"Conta & Workspace",path:"/app/conta/geral",icon:"zap"}];function xoe({open:e,onClose:t}){const n=In(),s=g.useRef(null),[i,a]=g.useState(""),[o,l]=g.useState(0),[c,d]=g.useState([]),[u,p]=g.useState([]),[m,x]=g.useState(!1);g.useEffect(()=>{e&&!m&&(async()=>{var I;const C=await ne.auth.me().catch(()=>null),D=C!=null&&C.email?await ne.functions.invoke("getWorkspaceId",{user_email:C.email}).catch(()=>null):null,P=((I=D==null?void 0:D.data)==null?void 0:I.workspace_id)||(D==null?void 0:D.workspace_id);if(!P){d([]),p([]),x(!0);return}const[L,T]=await Promise.all([ne.entities.WorkspaceTalent.filter({workspace_id:P},"-created_date",200).catch(()=>[]),ne.entities.Job.filter({workspace_id:P,status:{$ne:"deleted"}},"-created_date",100).catch(()=>[])]),R=[...new Set((L||[]).map(H=>H.talent_profile_id).filter(Boolean))].slice(0,200),U=R.length?await ne.entities.TalentProfile.filter({id:{$in:R}},"-created_date",200).catch(()=>[]):[];d(U||[]),p(T||[]),x(!0)})(),e&&(a(""),l(0),setTimeout(()=>{var C;return(C=s.current)==null?void 0:C.focus()},30)),e||x(!1)},[e]),g.useEffect(()=>{l(0)},[i]);const w=i.trim().toLowerCase(),y=goe.filter(C=>!w||C.label.toLowerCase().includes(w)||C.sub.toLowerCase().includes(w)),v=w.length>=2?c.filter(C=>(C.full_name||"").toLowerCase().includes(w)||(C.current_company||"").toLowerCase().includes(w)||(C.current_title||"").toLowerCase().includes(w)).slice(0,5):[],j=w.length>=2?u.filter(C=>(C.title||"").toLowerCase().includes(w)||(C.company_name||"").toLowerCase().includes(w)).slice(0,5):[],k=[...y.map(C=>({...C,group:"Ações"})),...v.map(C=>({type:"person",label:C.full_name||C.email||"—",sub:`${C.current_title||""} · ${C.current_company||""}`.replace(/^ · | · $/g,""),id:C.id,initials:(C.full_name||"?").split(" ").slice(0,2).map(D=>D[0]).join("").toUpperCase(),group:"Pessoas"})),...j.map(C=>({type:"job",label:C.title||"Vaga",sub:`${C.company_name||"—"} · ${C.applications_count||0} candidaturas`,id:C.id,initial:(C.company_name||C.title||"V")[0].toUpperCase(),group:"Vagas"}))];function S(C){t(),C.type==="action"&&C.path&&n(C.path),C.type==="person"&&C.id&&n(`/app/candidatos/${C.id}`),C.type==="job"&&C.id&&n(`/app/vagas/${C.id}`)}function _(C){C.key==="ArrowDown"?(C.preventDefault(),l(D=>Math.min(D+1,k.length-1))):C.key==="ArrowUp"?(C.preventDefault(),l(D=>Math.max(D-1,0))):C.key==="Enter"?(C.preventDefault(),k[o]&&S(k[o])):C.key==="Escape"&&t()}if(!e)return null;const F=[];let A=null;return k.forEach((C,D)=>{C.group!==A&&(F.push({type:"header",label:C.group}),A=C.group),F.push({...C,flatIndex:D})}),r.jsxs(r.Fragment,{children:[r.jsx("div",{onClick:t,style:{position:"fixed",inset:0,zIndex:70,background:"rgba(0,0,0,.25)",backdropFilter:"blur(3px)"}}),r.jsx("div",{style:{position:"fixed",zIndex:71,top:"15vh",left:0,right:0,display:"flex",justifyContent:"center"},children:r.jsxs("div",{style:{width:560,maxWidth:"92vw",background:"var(--sv-surface)",borderRadius:"var(--sv-r-lg)",boxShadow:"var(--sv-sh-pop)",border:"1px solid var(--sv-border)",overflow:"hidden",fontFamily:"var(--sv-font)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"12px 14px",borderBottom:"1px solid var(--sv-border)"},children:[r.jsx(Ua,{size:17,strokeWidth:1.8,style:{color:"var(--sv-ink-3)",flexShrink:0}}),r.jsx("input",{ref:s,value:i,onChange:C=>a(C.target.value),onKeyDown:_,placeholder:"Busque uma pessoa, vaga, ou ação…",autoComplete:"off",spellCheck:"false",style:{flex:1,background:"transparent",outline:"none",border:"none",fontSize:15,fontFamily:"var(--sv-font)",color:"var(--sv-ink)"}}),r.jsx("span",{style:{fontSize:10,fontWeight:600,color:"var(--sv-ink-3)",border:"1px solid var(--sv-border)",padding:"2px 6px",borderRadius:4},children:"esc"})]}),r.jsxs("div",{style:{maxHeight:"44vh",overflowY:"auto",padding:4},children:[k.length===0&&i.length>0&&r.jsxs("div",{style:{padding:"32px 14px",textAlign:"center",color:"var(--sv-ink-3)",fontSize:13},children:['Nada encontrado para "',i,'"']}),F.map((C,D)=>
754{if(C.type==="header")return r.jsx("div",{style:{fontSize:10,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--sv-ink-3)",padding:"10px 10px 4px"},children:C.label},`h-${D}`);const P=C.flatIndex===o;return r.jsxs("button",{onClick:()=>S(C),onMouseMove:()=>l(C.flatIndex),style:{display:"flex",alignItems:"center",gap:10,padding:"8px 10px",borderRadius:"var(--sv-r-sm)",width:"100%",textAlign:"left",background:P?"var(--sv-inset)":"transparent",border:"none",cursor:"pointer",fontFamily:"var(--sv-font)"},children:[r.jsx("span",{style:{width:28,height:28,borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,background:C.type==="action"?P?"var(--sv-accent)":"var(--sv-accent-muted)":C.type==="person"?"#6C24F5":"#4C82F7",color:C.type==="action"?P?"#fff":"var(--sv-accent)":"#fff",fontSize:10,fontWeight:600},children:C.type==="action"?r.jsx(Wx,{size:14}):C.type==="person"?C.initials||"?":C.initial||"V"}),r.jsxs("span",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:13,fontWeight:550,color:"var(--sv-ink)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C.label}),C.sub&&r.jsx("div",{style:{fontSize:11,color:"var(--sv-ink-3)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C.sub})]}),r.jsx("span",{style:{fontSize:10,color:"var(--sv-ink-3)",opacity:P?1:0},children:"↵"})]},`i-${D}`)})]})]})})]})}const eB="summit_sidebar_collapsed";function yoe(){const e=localStorage.getItem(eB);return e!==null?e==="true":!0}function voe(){const[e,t]=g.useState(yoe),[n,s]=g.useState(!1),i=g.useCallback(()=>{t(c=>{const d=!c;return localStorage.setItem(eB,String(d)),d})},[]),a=g.useCallback(()=>s(!0),[]),o=g.useCallback(()=>s(!1),[]);g.useEffect(()=>{function c(d){(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),s(u=>!u))}return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[]);const l=e?"var(--sv-rail-w-c)":"var(--sv-rail-w)";return r.jsx(moe,{children:r.jsx(cae,{children:r.jsx($P.Provider,{value:{collapsed:e,toggle:i},children:r.jsxs("div",{style:{height:"100vh",overflow:"hidden",background:"var(--sv-bg)",fontFamily:"var(--sv-font)",WebkitFontSmoothing:"antialiased",letterSpacing:"-0.011em",lineHeight:1.5,color:"var(--sv-ink)"},children:[r.jsx(aae,{}),r.jsxs("div",{className:"flex flex-col",style:{height:"100vh",marginLeft:l,transition:"margin-left 0.22s cubic-bezier(0.4, 0, 0.2, 1)"},children:[r.jsx(uae,{onOpenCmdk:a}),r.jsx("main",{className:"flex-1 overflow-y-auto",style:{background:"var(--sv-bg)",minHeight:0,padding:"20px 24px",width:"100%"},children:r.jsx(Gy,{})})]}),r.jsx(xoe,{open:n,onClose:o})]})})})})}const boe={pt:{common:{search:"Buscar"},campaigns:{newCampaign:"Nova Campanha",noCampaigns:"Nenhuma campanha ainda",noCampaignsDesc:"Crie sua primeira campanha de avaliação para começar a avaliar talentos.",completionProgress:"Progresso de conclusão",respondents:"Respondentes",noInvitations:"Nenhum convite ainda.",copyLink:"Copiar link da avaliação",linkCopied:"Link copiado",linkCopiedDesc:"Link da avaliação copiado para a área de transferência.",completedOf:"concluídos",notFound:"Campanha não encontrada.",backToAssessments:"Voltar para Avaliações",viewResult:"Ver resultado",status:{draft:"Rascunho",active:"Ativa",paused:"Pausada",paused_billing:"Pausada (Cobrança)",completed:"Concluída",archived:"Arquivada"},invitationStatus:{pending:"Pendente",sent:"Enviado",opened:"Aberto",started:"Em andamento",completed:"Concluído",expired:"Expirado"}},createCampaign:{title:"Nova Campanha",step:"Passo",of:"de",campaignName:"Nome da campanha",campaignNamePlaceholder:"ex: Desenvolvedores Sênior Q4",description:"Descrição (opcional)",descriptionPlaceholder:"Para que é esta campanha?",noTemplates:"Nenhum modelo publicado disponível.",language:"Idioma da campanha",languageDesc:"Os respondentes verão a avaliação neste idioma.",languagePt:"Português (PT-BR)",languageEn:"Inglês (EN)",confidential:"Vaga Confidencial",confidentialDesc:"Oculta nome e logo da empresa no fluxo do candidato. Substituídos por 'Uma empresa confidencial' e logo Summit.",notificationChannel:"Canal de notificação",notificationChannelDesc:"Como os convites serão enviados aos candidatos.",notificationChannelEmail:"E-mail",notificationChannelWhatsapp:"WhatsApp (Starter+)",continue:"Continuar",addRespondents:"Adicionar respondentes",addRespondentsDesc:"Cada respondente receberá um link único para completar a avaliação.",namePlaceholder:"Nome",emailPlaceholder:"[email protected]",addAnother:"Adicionar outro respondente",createAndSend:"Criar e Enviar Convites",creating:"Criando...",goBack:"Voltar"},results:{noResults:"Nenhum resultado ainda",noResultsDesc:"Os resultados aparecerão aqui assim que os respondentes concluírem suas avaliações.",individualReport:"Relatório Individual",summary:"Resumo",strengths:"Pontos Fortes",communicationStyle:"Estilo de Comunicação",managementTips:"Dicas de Gestão"},team:{title:"Equipe & Funções",subtitle:"Gerencie membros do workspace e permissões de módulos.",inviteMember:"Convidar membro",inviteTitle:"Convidar membro da equipe",emailPlaceholder:"[email protected]",sendInvite:"Env
754iar convite",sending:"Enviando...",members:"Membros",noMembers:"Nenhum membro ainda. Convide seu primeiro membro.",inviteSent:"Convite enviado",roles:{owner:"Proprietário",billing_admin:"Admin de Faturamento",workspace_admin:"Admin do Workspace",member:"Membro"},moduleRoles:{assessments_admin:"Admin de Avaliações",assessor:"Avaliador",hiring_manager:"Gestor de Contratação",viewer:"Visualizador",ats_admin:"Admin ATS",recruiter:"Recrutador",talent_bank_admin:"Admin Banco de Talentos",sourcer:"Sourcer"}},billing:{noBillingEvents:"Nenhum evento de faturamento ainda.",eventTypes:{subscription_created:"Assinatura criada",subscription_renewed:"Assinatura renovada",subscription_cancelled:"Assinatura suspensa",payment_succeeded:"Pagamento confirmado",payment_failed:"Pagamento falhou",trial_started:"Período gratuito iniciado",trial_ended:"Período gratuito encerrado",seats_changed:"Assentos alterados",plan_changed:"Plano alterado"}},settings:{title:"Configurações do Workspace",subtitle:"Configure os detalhes do seu workspace.",tabGeneral:"Geral",tabCompanyProfile:"Perfil da Empresa",slugDesc:"Usado em URLs e referências de API."}}},kt=boe.pt,Xr=g.forwardRef(({className:e,type:t,...n},s)=>r.jsx("input",{type:t,className:pn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:s,...n}));Xr.displayName="Input";var woe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],joe=woe.reduce((e,t)=>{const n=JD(`Primitive.${t}`),s=g.forwardRef((i,a)=>{const{asChild:o,...l}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(c,{...l,ref:a})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),Soe="Label",tB=g.forwardRef((e,t)=>r.jsx(joe.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));tB.displayName=Soe;var nB=tB;const koe=lS("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),la=g.forwardRef(({className:e,...t},n)=>r.jsx(nB,{ref:n,className:pn(koe(),e),...t}));la.displayName=nB.displayName;function u2({active:e,onClick:t,children:n}){return r.jsx("button",{onClick:t,className:`px-4 py-2 text-sm font-medium rounded-md transition-colors ${e?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:n})}function as({label:e,value:t,onChange:n,placeholder:s,disabled:i}){return r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(la,{className:"text-sm font-medium",children:e}),r.jsx(Xr,{value:t||"",onChange:n,className:"h-10",placeholder:s,disabled:i})]})}function rB(){const{toast:e}=Wm(),[t,n]=g.useState("general"),[s,i]=g.useState(!0),[a,o]=g.useState(null),[l,c]=g.useState(!1),[d,u]=g.useState(null),[p,m]=g.useState({name:"",slug:""}),[x,w]=g.useState(!1),[y,v]=g.useState([]),[j,k]=g.useState({}),[S,_]=g.useState(!1),[F,A]=g.useState(null),C=g.useRef(null),[D,P]=g.useState({cnpj:"",razao_social:"",nome_fantasia:"",cnae_principal:"",porte:"",endereco_logradouro:"",endereco_numero:"",endereco_complemento:"",endereco_bairro:"",endereco_municipio:"",endereco_uf:"",endereco_cep:"",telefone:"",email_empresa:"",situacao_cadastral:"",site:"",logo_url:""}),[L,T]=g.useState(!1),[R,U]=g.useState(null),[I,H]=g.useState(null),[V,X]=g.useState(!1),[N,W]=g.useState({full_name:"",job_title:""}),[O,G]=g.useState(null),[M,z]=g.useState(null),[K,Y]=g.useState(!1);g.useEffect(()=>{J()},[]),g.useEffect(()=>{const te=xe=>{C.current&&!C.current.contains(xe.target)&&_(!1)};return document.addEventListener("mousedown",te),()=>document.removeEventListener("mousedown",te)},[]);const J=async()=>{var ze,at,Nt,_e,be,Re,Xe;const te=await ne.auth.me();u(te),W({full_name:(te==null?void 0:te.name)||"",job_title:(te==null?void 0:te.job_title)||""}),te!=null&&te.photo_url&&z(te.photo_url);const xe=await ne.functions.invoke("getWorkspaceId",{user_email:te.email}),he=((ze=xe==null?void 0:xe.data)==null?void 0:ze.workspace_id)||(xe==null?void 0:xe.workspace_id);if(!he){i(!1);return}
754const ge=(await ne.entities.Workspace.filter({id:he}))[0];if(!ge){i(!1);return}o(ge);const $e=ge.owner_email===te.email;let ft=$e;if(!$e){const He=await ne.functions.invoke("getWorkspaceMembers",{workspace_id:he}),Ct=(((at=He==null?void 0:He.data)==null?void 0:at.members)||(He==null?void 0:He.members)||[]).find(Se=>Se.user_email===te.email);ft=(Ct==null?void 0:Ct.global_role)==="workspace_admin"}c(ft);const Qe=await ne.functions.invoke("getWorkspaceMembers",{workspace_id:he}),Ve=((Nt=Qe==null?void 0:Qe.data)==null?void 0:Nt.members)||(Qe==null?void 0:Qe.members)||[];v(Ve.filter(He=>He.status==="active"));try{const He=await ne.functions.invoke("getWorkspaceUsers",{workspace_id:he}),St=((_e=He==null?void 0:He.data)==null?void 0:_e.users)||(He==null?void 0:He.users)||{};k(St);const Ct=ge.responsible_user_email;if(Ct&&St[Ct])A({email:Ct,name:((be=St[Ct])==null?void 0:be.name)||ge.responsible_name||Ct,title:((Re=St[Ct])==null?void 0:Re.job_title)||ge.responsible_title||"",photo_url:((Xe=St[Ct])==null?void 0:Xe.photo_url)||ge.responsible_photo_url||null});else if(ge.responsible_name)A({email:ge.responsible_user_email||ge.owner_email,name:ge.responsible_name,title:ge.responsible_title||"",photo_url:ge.responsible_photo_url||null});else{const Se=St[ge.owner_email];A({email:ge.owner_email,name:(Se==null?void 0:Se.name)||ge.owner_email,title:(Se==null?void 0:Se.job_title)||"",photo_url:(Se==null?void 0:Se.photo_url)||null})}}catch{}m({name:ge.name||"",slug:ge.slug||""}),P({cnpj:ge.cnpj||"",razao_social:ge.razao_social||"",nome_fantasia:ge.nome_fantasia||"",cnae_principal:ge.cnae_principal||"",porte:ge.porte||"",endereco_logradouro:ge.endereco_logradouro||"",endereco_numero:ge.endereco_numero||"",endereco_complemento:ge.endereco_complemento||"",endereco_bairro:ge.endereco_bairro||"",endereco_municipio:ge.endereco_municipio||"",endereco_uf:ge.endereco_uf||"",endereco_cep:ge.endereco_cep||"",telefone:ge.telefone||"",email_empresa:ge.email_empresa||"",situacao_cadastral:ge.situacao_cadastral||"",site:ge.site||"",logo_url:ge.logo_url||""}),ge.logo_url&&H(ge.logo_url),i(!1)},Q=async te=>{var he,le,ge;const xe={email:te.user_email,name:((he=j[te.user_email])==null?void 0:he.name)||te.user_email,title:((le=j[te.user_email])==null?void 0:le.job_title)||"",photo_url:((ge=j[te.user_email])==null?void 0:ge.photo_url)||null};A(xe),_(!1),a&&(await ne.entities.Workspace.update(a.id,{responsible_user_email:xe.email,responsible_name:xe.name,responsible_title:xe.title,responsible_photo_url:xe.photo_url||""}),window.dispatchEvent(new Event("workspace-updated")),e({title:"Responsável atualizado"}))},ie=async()=>{a&&(w(!0),await ne.entities.Workspace.update(a.id,{name:p.name,slug:p.slug}),window.dispatchEvent(new Event("workspace-updated")),o(te=>({...te,name:p.name,slug:p.slug})),e({title:"Configurações salvas"}),w(!1))},ae=async()=>{const te=D.cnpj.replace(/\D/g,"");if(te.length!==14){e({title:"CNPJ inválido",description:"Informe os 14 dígitos do CNPJ.",variant:"destructive"});return}T(!0);try{const he=await(await fetch(`https://brasilapi.com.br/api/cnpj/v1/${te}`)).json();P(le=>({...le,razao_social:he.razao_social||le.razao_social,nome_fantasia:he.nome_fantasia||le.nome_fantasia,cnae_principal:he.cnae_fiscal_descricao||le.cnae_principal,porte:he.porte||le.porte,situacao_cadastral:he.descricao_situacao_cadastral||le.situacao_cadastral,endereco_logradouro:he.logradouro||le.endereco_logradouro,endereco_numero:he.numero||le.endereco_numero,endereco_complemento:he.complemento||le.endereco_complemento,endereco_bairro:he.bairro||le.endereco_bairro,endereco_municipio:he.municipio||le.endereco_municipio,endereco_uf:he.uf||le.endereco_uf,endereco_cep:he.cep||le.endereco_cep,telefone:he.ddd_telefone_1||le.telefone,email_empresa:he.email||le.email_empresa})),e({title:"Dados preenchidos com sucesso"})}catch{e({title:"Erro ao buscar CNPJ",description:"Verifique o CNPJ e tente novamente.",variant:"destructive"})}finally{T(!1)}},re=te=>{const xe=te.target.files[0];if(!xe)return;U(xe);const he=new FileReader;he.onload=le=>H(le.target.result),he.readAsDataURL(xe)},pe=async()=>
754{if(a){X(!0);try{let te=D.logo_url;if(R){const he=await ne.integrations.Core.UploadFile({file:R});te=(he==null?void 0:he.file_url)||(he==null?void 0:he.url)||te,U(null)}const xe={...D,logo_url:te};await ne.entities.Workspace.update(a.id,xe),window.dispatchEvent(new Event("workspace-updated")),P(he=>({...he,logo_url:te})),H(te||I),e({title:"Perfil da empresa salvo"})}catch(te){e({title:"Erro ao salvar",description:(te==null?void 0:te.message)||String(te),variant:"destructive"})}finally{X(!1)}}},Z=te=>{const xe=te.target.files[0];if(!xe)return;G(xe);const he=new FileReader;he.onload=le=>z(le.target.result),he.readAsDataURL(xe)},Ne=async()=>{Y(!0);try{let te=null;if(O){const le=await ne.integrations.Core.UploadFile({file:O});if(te=(le==null?void 0:le.file_url)||(le==null?void 0:le.url)||null,!te){e({title:"Erro no upload",variant:"destructive"}),Y(!1);return}}const xe={};N.full_name.trim()&&(xe.name=N.full_name.trim()),N.job_title.trim()&&(xe.job_title=N.job_title.trim()),te&&(xe.photo_url=te),Object.keys(xe).length>0&&await ne.auth.updateMe(xe);const he=await ne.auth.me();u(he),W({full_name:(he==null?void 0:he.name)||"",job_title:(he==null?void 0:he.job_title)||""}),he!=null&&he.photo_url&&z(he.photo_url),G(null),window.dispatchEvent(new CustomEvent("user-updated",{detail:{...he,name:N.full_name.trim()||(he==null?void 0:he.name),full_name:N.full_name.trim()||(he==null?void 0:he.full_name),job_title:N.job_title.trim()||(he==null?void 0:he.job_title),photo_url:te||(he==null?void 0:he.photo_url)}}));try{a!=null&&a.id&&N.full_name.trim()&&await ne.functions.invoke("updateMemberProfile",{workspace_id:a.id,full_name:N.full_name.trim()})}catch(le){console.error("Erro ao sincronizar Membership:",le)}e({title:"Perfil atualizado",description:"Suas informações foram salvas."})}catch(te){e({title:"Erro ao salvar",description:String((te==null?void 0:te.message)||te),variant:"destructive"})}finally{Y(!1)}};return s?r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):r.jsxs(Jr.div,{initial:{opacity:0}
754,animate:{opacity:1},transition:{duration:.3},children:[r.jsxs("div",{className:"mb-8",children:[r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:kt.settings.title}),r.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:kt.settings.subtitle})]}),r.jsxs("div",{className:"flex gap-2 mb-8 bg-muted p-1 rounded-lg w-fit",children:[r.jsxs(u2,{active:t==="general",onClick:()=>n("general"),children:[r.jsx(jc,{className:"w-4 h-4 inline mr-2"}),kt.settings.tabGeneral]}),r.jsxs(u2,{active:t==="profile",onClick:()=>n("profile"),children:[r.jsx($m,{className:"w-4 h-4 inline mr-2"}),kt.settings.tabCompanyProfile]}),r.jsxs(u2,{active:t==="myprofile",onClick:()=>n("myprofile"),children:[r.jsx(Sh,{className:"w-4 h-4 inline mr-2"}),"Meu Perfil"]})]}),r.jsxs("div",{className:"max-w-xl",children:[t==="general"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-card rounded-xl border border-border p-8 space-y-5",children:[r.jsx("h2",{className:"text-base font-semibold",children:"Worksp
754ace"}),r.jsx(as,{label:"Nome do workspace",value:p.name,onChange:te=>m(xe=>({...xe,name:te.target.value})),placeholder:"Acme Corp",disabled:!l}),r.jsx(as,{label:"Slug",value:p.slug,onChange:te=>m(xe=>({...xe,slug:te.target.value})),placeholder:"acme-corp",disabled:!l}),r.jsx("p",{className:"text-xs text-muted-foreground -mt-1",children:kt.settings.slugDesc}),l&&r.jsxs(on,{onClick:ie,disabled:x,className:"font-medium",size:"sm",children:[x?"Salvando...":"Salvar",!x&&r.jsx(kb,{className:"w-4 h-4 ml-2"})]})]}),r.jsxs("div",{className:"bg-card rounded-xl border border-border p-8",children:[r.jsxs("div",{className:"flex items-center justify-between mb-5",children:[r.jsx("h2",{className:"text-base font-semibold",children:"Responsável"}),l&&r.jsxs("div",{className:"relative",ref:C,children:[r.jsx("button",{onClick:()=>_(te=>!te),className:"p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:r.jsx($r,{className:"w-4 h-4"})}),S&&r.jsxs("div",{className:"absolute right-0 top-9 z-50 bg-card border border-border rounded-xl shadow-lg w-72 overflow-hidden",children:[r.jsx("div",{className:"px-4 py-2.5 border-b border-border",children:r.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Selecionar responsável"})}),r.jsx("div",{className:"max-h-56 overflow-y-auto",children:y.map(te=>{const xe=j[te.user_email]||{};return r.jsxs("button",{onClick:()=>Q(te),className:"flex items-center gap-3 w-full px-4 py-3 hover:bg-muted transition-colors text-left",children:[r.jsx("div",{className:"w-8 h-8 rounded-full bg-muted border border-border overflow-hidden flex-shrink-0 flex items-center justify-center",children:xe.photo_url?r.jsx("img",{src:xe.photo_url,alt:"",className:"w-full h-full object-cover"}):r.jsx(Sh,{className:"w-4 h-4 text-muted-foreground"})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:"text-sm font-medium truncate",children:xe.name||te.user_email}),r.jsx("p",{className:"text-xs text-muted-foreground truncate",children:te.user_email})]})]},te.id)})})]})]})]}),F?r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:"w-14 h-14 rounded-full bg-muted border border-border overflow-hidden flex-shrink-0 flex items-center justify-center",children:F.photo_url?r.jsx("img",{src:F.photo_url,alt:"",className:"w-full h-full object-cover"}):r.jsx(Sh,{className:"w-7 h-7 text-muted-foreground"})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-semibold",children:F.name}),F.title&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:F.title}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:F.email})]})]}):r.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhum responsável definido."})]}),!l&&r.jsx("p",{className:"text-xs text-muted-foreground",children:"Apenas administradores podem editar as configurações do workspace."})]}),t==="profile"&&r.jsxs("div",{className:"bg-card rounded-xl border border-border p-8 space-y-5",children:[r.jsx("h2",{className:"text-base font-semibold",children:"Perfil da Empresa"}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(la,{className:"text-sm font-medium",children:"Logo da empresa"}),r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:"w-16 h-16 rounded-lg bg-muted border border-border overflow-hidden flex items-center justify-center cursor-pointer flex-shrink-0",onClick:()=>document.getElementById("logo-file-input").click(),children:I?r.jsx("img",{src:I,alt:"logo",className:"w-full h-full object-contain"}):r.jsx(jc,{className:"w-6 h-6 text-muted-foreground"})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"JPG ou PNG, até 2MB."}),r.jsx("button",{className:"mt-1.5 text-xs font-medium border border-border rounded-md px-3 py-1.5 hover:bg-muted transition-colors",onClick:()=>document.getElementById("logo-file-input").click(),disabled:!l,children:I?"Trocar logo":"Adicionar logo"})]})]}),r.jsx("input",{id:"logo-file-input",type:"file",accept:"image/*",style:{display:"none"},onChange:re})]}),r.jsx(as,{label:"Site da empresa",value:D.site,onChange:te=>P(xe=>({...xe,site:te.target.value})),placeholder:"acme.com.br",disabled:!l}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(la,{className:"text-sm font-medium",children:"CNPJ"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(Xr,{value:D.cnpj,onChange:te=>P(xe=>({...xe,cnpj:te.target.value})),className:"h-10",placeholder:"00.000.000/0001-00",disabled:!l}),l&&r.jsx(on,{variant:"outline",size:"sm",className:"h-10 px-4 font-medium shrink-0",onClick:ae,disabled:L,children:L?r.jsx("div",{className:"w-4 h-4 border-2 border-muted border-t-foreground rounded-full animate-spin"}):r.jsxs(r.Fragment,{children:[r.jsx(Ua,{className:"w-4 h-4 mr-1.5"}),"Buscar"]})})]})]}
754),r.jsx(as,{label:"Razão Social",value:D.razao_social,onChange:te=>P(xe=>({...xe,razao_social:te.target.value})),disabled:!l}),r.jsx(as,{label:"Nome Fantasia",value:D.nome_fantasia,onChange:te=>P(xe=>({...xe,nome_fantasia:te.target.value})),disabled:!l}),r.jsx(as,{label:"CNAE Principal",value:D.cnae_principal,onChange:te=>P(xe=>({...xe,cnae_principal:te.target.value})),disabled:!l}),r.jsx(as,{label:"Porte",value:D.porte,onChange:te=>P(xe=>({...xe,porte:te.target.value})),disabled:!l}),r.jsx(as,{label:"Situação Cadastral",value:D.situacao_cadastral,onChange:te=>P(xe=>({...xe,situacao_cadastral:te.target.value})),disabled:!l}),r.jsxs("div",{className:"pt-2 border-t border-border",children:[r.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-4",children:"Endereço"}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(as,{label:"CEP",value:D.endereco_cep,onChange:te=>P(xe=>({...xe,endereco_cep:te.target.value})),disabled:!l}),r.jsx(as,{label:"Logradouro",value:D.endereco_logradouro,onChange:te=>P(xe=>({...xe,endereco_logradouro:te.target.value})),disabled:!l}),r.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[r.jsx(as,{label:"Número",value:D.endereco_numero,onChange:te=>P(xe=>({...xe,endereco_numero:te.target.value})),disabled:!l}),r.jsx("div",{className:"col-span-2",children:r.jsx(as,{label:"Complemento",value:D.endereco_complemento,onChange:te=>P(xe=>({...xe,endereco_complemento:te.target.value})),disabled:!l})})]}),r.jsx(as,{label:"Bairro",value:D.endereco_bairro,onChange:te=>P(xe=>({...xe,endereco_bairro:te.target.value})),disabled:!l}),r.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[r.jsx("div",{className:"col-span-2",children:r.jsx(as,{label:"Município",value:D.endereco_municipio,onChange:te=>P(xe=>({...xe,endereco_municipio:te.target.value})),disabled:!l})}),r.jsx(as,{label:"UF",value:D.endereco_uf,onChange:te=>P(xe=>({...xe,endereco_uf:te.target.value})),disabled:!l})]})]})]}),r.jsxs("div",{className:"pt-2 border-t border-border",children:[r.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-4",children:"Contato"}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(as,{label:"Telefone",value:D.telefone,onChange:te=>P(xe=>({...xe,telefone:te.target.value})),disabled:!l}),r.jsx(as,{label:"Email da Empresa",value:D.email_empresa,onChange:te=>P(xe=>({...xe,email_empresa:te.target.value})),disabled:!l})]})]}),l?r.jsxs(on,{onClick:pe,disabled:V,className:"font-medium",size:"sm",children:[V?"Salvando...":"Salvar",!V&&r.jsx(kb,{className:"w-4 h-4 ml-2"})]}):r.jsx("p",{className:"text-xs text-muted-foreground",children:"Apenas administradores podem editar o perfil da empresa."})]}),t==="myprofile"&&r.jsxs("div",{className:"bg-card rounded-xl border border-border p-8 space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:"w-20 h-20 rounded-full bg-muted flex items-center justify-center overflow-hidden cursor-pointer flex-shrink-0 border border-border",onClick:()=>document.getElementById("profile-avatar-input").click(),children:M?r.jsx("img",{src:M,alt:"avatar",className:"w-full h-full object-cover"}):r.jsx(Sh,{className:"w-8 h-8 text-muted-foreground"})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium",children:"Foto de perfil"}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"JPG ou PNG, até 2MB."}),r.jsx("button",{className:"mt-2 text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-muted transition-colors",onClick:()=>document.getElementById("profile-avatar-input").click(),children:M?"Trocar foto":"Adicionar foto"})]}),r.jsx("input",{id:"profile-avatar-input",type:"file",accept:"image/*",style:{display:"none"},onChange:Z})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(la,{className:"text-sm font-medium",children:"Nome completo"}),r.jsx("input",{value:N.full_name,onChange:te=>W(xe=>({...xe,full_name:te.target.value})),className:"flex h-11 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
754ing-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",placeholder:"Rannison Silva"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(la,{className:"text-sm font-medium",children:"Cargo"}),r.jsx("input",{value:N.job_title,onChange:te=>W(xe=>({...xe,job_title:te.target.value})),className:"flex h-11 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",placeholder:"CEO"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(la,{className:"text-sm font-medium",children:"Email"}),r.jsx("input",{value:(d==null?void 0:d.email)||"",disabled:!0,className:"flex h-11 w-full rounded-md border border-input bg-muted px-3 py-2 text-sm text-muted-foreground"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"O email não pode ser alterado aqui."})]}),r.jsxs(on,{onClick:Ne,disabled:K,className:"font-medium",children:[K?"Salvando...":"Salvar perfil",!K&&r.jsx(kb,{className:"w-4 h-4 ml-2"})]})]})]})]})}function C3(e,[t,n]){return Math.min(n,Math.max(t,e))}function $t(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function _oe(e,t){const n=g.createContext(t),s=a=>{const{children:o,...l}=a,c=g.useMemo(()=>l,Object.values(l));return r.jsx(n.Provider,{value:c,children:o})};s.displayName=e+"Provider";function i(a){const o=g.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[s,i]}function Mc(e,t=[]){let n=[];function s(a,o){const l=g.createContext(o),c=n.length;n=[...n,o];const d=p=>{var j;const{scope:m,children:x,...w}=p,y=((j=m==null?void 0:m[e])==null?void 0:j[c])||l,v=g.useMemo(()=>w,Object.values(w));return r.jsx(y.Provider,{value:v,children:x})};d.displayName=a+"Provider";function u(p,m){var y;const x=((y=m==null?void 0:m[e])==null?void 0:y[c])||l,w=g.useContext(x);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,u]}const i=()=>{const a=n.map(o=>g.createContext(o));return function(l){const c=(l==null?void 0:l[e])||a;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[s,Coe(i,...t)]}function Coe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=s.reduce((l,{useScope:c,scopeName:d})=>{const p=c(a)[`__scope${d}`];return{...l,...p}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function E3(e){const t=Eoe(e),n=g.forwardRef((s,i)=>{const{children:a,...o}=s,l=g.Children.toArray(a),c=l.find(Aoe);if(c){const d=c.props.children,u=l.map(p=>p===c?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return r.jsx(t,{...o,ref:i,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return r.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function Eoe(e){const t=g.forwardRef((n,s)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const o=Noe(i),l=Toe(a,i.props);return i.type!==g.Fragment&&(l.ref=s?_l(s,o):o),g.cloneElement(i,l)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Foe=Symbol("radix.slottable");function Aoe(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Foe}function Toe(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Noe(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _k(e){const t=e+"CollectionProvider",[n,s]=Mc(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:v,children:j}=y,k=Rn.useRef(null),S=Rn.useRef(new Map).current;return r.jsx(i,{scope:v,itemMap:S,collectionRef:k,children:j})};o.displayName=t;const l=e+"CollectionSlot",c=E3(l),d=Rn.forwardRef((y,v)=>{const{scope:j,children:k}
vendor: 10,645 bytes, line 754
754=y,S=a(l,j),_=Mn(v,S.collectionRef);return r.jsx(c,{ref:_,children:k})});d.displayName=l;const u=e+"CollectionItemSlot",p="data-radix-collection-item",m=E3(u),x=Rn.forwardRef((y,v)=>{const{scope:j,children:k,...S}=y,_=Rn.useRef(null),F=Mn(v,_),A=a(u,j);return Rn.useEffect(()=>(A.itemMap.set(_,{ref:_,...S}),()=>void A.itemMap.delete(_))),r.jsx(m,{[p]:"",ref:F,children:k})});x.displayName=u;function w(y){const v=a(e+"CollectionConsumer",y);return Rn.useCallback(()=>{const k=v.collectionRef.current;if(!k)return[];const S=Array.from(k.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((A,C)=>S.indexOf(A.ref.current)-S.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:d,ItemSlot:x},w,s]}var Roe=g.createContext(void 0);function Ck(e){const t=g.useContext(Roe);return e||t||"ltr"}function Doe(e){const t=Ioe(e),n=g.forwardRef((s,i)=>{const{children:a,...o}=s,l=g.Children.toArray(a),c=l.find(Boe);if(c){const d=c.props.children,u=l.map(p=>p===c?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return r.jsx(t,{...o,ref:i,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return r.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function Ioe(e){const t=g.forwardRef((n,s)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const o=Moe(i),l=Ooe(a,i.props);return i.type!==g.Fragment&&(l.ref=s?_l(s,o):o),g.cloneElement(i,l)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Poe=Symbol("radix.slottable");function Boe(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Poe}function Ooe(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Moe(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Loe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kn=Loe.reduce((e,t)=>{const n=Doe(`Primitive.${t}`),s=g.forwardRef((i,a)=>{const{asChild:o,...l}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(c,{...l,ref:a})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function sB(e,t){e&&Ka.flushSync(()=>e.dispatchEvent(t))}function Eo(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function zoe(e,t=globalThis==null?void 0:globalThis.document){const n=Eo(e);g.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var Woe="DismissableLayer",dj="dismissableLayer.update",$oe="dismissableLayer.pointerDownOutside",Uoe="dismissableLayer.focusOutside",F3,iB=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),l1=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...c}=e,d=g.useContext(iB),[u,p]=g.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=g.useState({}),w=Mn(t,C=>p(C)),y=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),j=y.indexOf(v),k=u?y.indexOf(u):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,_=k>=j,F=qoe(C=>{const D=C.target,P=[...d.branches].some(L=>L.contains(D));!_||P||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},m),A=Goe(C=>{const D=C.target;[...d.branches].some(L=>L.contains(D))||(a==null||a(C),o==null||o(C),C.defaultPrevented||l==null||l())},m);return zoe(C=>{k===d.layers.size-1&&(s==null||s(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},m),g.useEffect(()=>{if(u)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(F3=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),A3(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=F3)}},[u,m,n,d]),g.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),A3())},[u,d]),g.useEffect(()=>{const C=()=>x({});return document.addEventListener(dj,C),()=>document.removeEventListener(dj,C)},[]),r.jsx(kn.div,{...c,ref:w,style:{pointerEvents:S?_?"auto":"none":void 0,...e.style},onFocusCapture:$t(e.onFocusCapture,A.onFocusCapture),onBlurCapture:$t(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:$t(e.onPointerDownCapture,F.onPointerDownCapture)})});l1.displayName=Woe;var Voe="DismissableLayerBranch",Hoe=g.forwardRef((e,t)=>{const n=g.useContext(iB),s=g.useRef(null),i=Mn(t,s);return g.useEffect(()=>{const a=s.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),r.jsx(kn.div,{...e,ref:i})});Hoe.displayName=Voe;function qoe(e,t=globalThis==null?void 0:globalThis.document){const n=Eo(e),s=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const a=l=>{if(l.target&&!s.current){let c=function(){aB($oe,n,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);s.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function Goe(e,t=globalThis==null?void 0:globalThis.document){const n=Eo(e),s=g.useRef(!1);return g.useEffect(()=>{const i=a=>{a.target&&!s.current&&aB(Uoe,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function A3(){const e=new CustomEvent(dj);document.dispatchEvent(e)}function aB(e,t,n,{discrete:s}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?sB(i,a):i.dispatchEvent(a)}var f2=0;function Ek(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??T3()),document.body.insertAdjacentElement("beforeend",e[1]??T3()),f2++,()=>{f2===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),f2--}},[])}function T3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var p2="focusScope.autoFocusOnMount",h2="focusScope.autoFocusOnUnmount",N3={bubbles:!1,cancelable:!0},Koe="FocusScope",c1=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,c]=g.useState(null),d=Eo(i),u=Eo(a),p=g.useRef(null),m=Mn(t,y=>c(y)),x=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(s){let y=function(S){if(x.paused||!l)return;const _=S.target;l.contains(_)?p.current=_:ec(p.current,{select:!0})},v=function(S){if(x.paused||!l)return;const _=S.relatedTarget;_!==null&&(l.contains(_)||ec(p.current,{select:!0}))},j=function(S){if(document.activeElement===document.body)for(const F of S)F.removedNodes.length>0&&ec(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",v);const k=new MutationObserver(j);return l&&k.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",v),k.disconnect()}}},[s,l,x.paused]),g.useEffect(()=>{if(l){D3.add(x);const y=document.activeElement;if(!l.contains(y)){const j=new CustomEvent(p2,N3);l.addEventListener(p2,d),l.dispatchEvent(j),j.defaultPrevented||(Yoe(ele(oB(l)),{select:!0}),document.activeElement===y&&ec(l))}return()=>{l.removeEventListener(p2,d),setTimeout(()=>{const j=new CustomEvent(h2,N3);l.addEventListener(h2,u),l.dispatchEvent(j),j.defaultPrevented||ec(y??document.body,{select:!0}),l.removeEventListener(h2,u),D3.remove(x)},0)}}},[l,d,u,x]);const w=g.useCallback(y=>{if(!n&&!s||x.paused)return;const v=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,j=document.activeElement;if(v&&j){const k=y.currentTarget,[S,_]=Xoe(k);S&&_?!y.shiftKey&&j===_?(y.preventDefault(),n&&ec(S,{select:!0})):y.shiftKey&&j===S&&(y.preventDefault(),n&&ec(_,{select:!0})):j===k&&y.preventDefault()}},[n,s,x.paused]);return r.jsx(kn.div,{tabIndex:-1,...o,ref:m,onKeyDown:w})});c1.displayName=Koe;function Yoe(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(ec(s,{select:t}),document.activeElement!==n)return}function Xoe(e){const t=oB(e),n=R3(t,e),s=R3(t.reverse(),e);return[n,s]}function oB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function R3(e,t){for(const n of e)if(!Joe(n,{upTo:t}))return n}function Joe(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 Qoe(e){return e instanceof HTMLInputElement&&"select"in e}function ec(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qoe(e)&&t&&e.select()}}var D3=Zoe();function Zoe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=I3(e,t),e.unshift(t)},remove(t){var n;e=I3(e,t),(n=e[0])==null||n.resume()}}}function I3(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function ele(e){return e.filter(t=>t.tagName!=="A")}var Is=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},tle=My[" useId ".trim().toString()]||(()=>{}),nle=0;function pl(e){const[t,n]=g.useState(tle());return Is(()=>{n(s=>s??String(nle++))},[e]),t?`radix-${t}`:""}const rle=["top","right","bottom","left"],Ec=Math.min,Ci=Math.max,sy=Math.round,Tg=Math.floor,ko=e=>({x:e,y:e}
vendor: 11,482 bytes, line 754
754),sle={left:"right",right:"left",bottom:"top",top:"bottom"},ile={start:"end",end:"start"};function uj(e,t,n){return Ci(e,Ec(t,n))}function wl(e,t){return typeof e=="function"?e(t):e}function jl(e){return e.split("-")[0]}function tp(e){return e.split("-")[1]}function Fk(e){return e==="x"?"y":"x"}function Ak(e){return e==="y"?"height":"width"}const ale=new Set(["top","bottom"]);function yo(e){return ale.has(jl(e))?"y":"x"}function Tk(e){return Fk(yo(e))}function ole(e,t,n){n===void 0&&(n=!1);const s=tp(e),i=Tk(e),a=Ak(i);let o=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=iy(o)),[o,iy(o)]}function lle(e){const t=iy(e);return[fj(e),t,fj(t)]}function fj(e){return e.replace(/start|end/g,t=>ile[t])}const P3=["left","right"],B3=["right","left"],cle=["top","bottom"],dle=["bottom","top"];function ule(e,t,n){switch(e){case"top":case"bottom":return n?t?B3:P3:t?P3:B3;case"left":case"right":return t?cle:dle;default:return[]}}function fle(e,t,n,s){const i=tp(e);let a=ule(jl(e),n==="start",s);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(fj)))),a}function iy(e){return e.replace(/left|right|bottom|top/g,t=>sle[t])}function ple(e){return{top:0,right:0,bottom:0,left:0,...e}}function lB(e){return typeof e!="number"?ple(e):{top:e,right:e,bottom:e,left:e}}function ay(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}function O3(e,t,n){let{reference:s,floating:i}=e;const a=yo(t),o=Tk(t),l=Ak(o),c=jl(t),d=a==="y",u=s.x+s.width/2-i.width/2,p=s.y+s.height/2-i.height/2,m=s[l]/2-i[l]/2;let x;switch(c){case"top":x={x:u,y:s.y-i.height};break;case"bottom":x={x:u,y:s.y+s.height};break;case"right":x={x:s.x+s.width,y:p};break;case"left":x={x:s.x-i.width,y:p};break;default:x={x:s.x,y:s.y}}switch(tp(t)){case"start":x[o]-=m*(n&&d?-1:1);break;case"end":x[o]+=m*(n&&d?-1:1);break}return x}async function hle(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:a,rects:o,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:m=!1,padding:x=0}=wl(t,e),w=lB(x),v=l[m?p==="floating"?"reference":"floating":p],j=ay(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),k=p==="floating"?{x:s,y:i,width:o.floating.width,height:o.floating.height}:o.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),_=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},F=ay(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:S,strategy:c}):k);return{top:(j.top-F.top+w.top)/_.y,bottom:(F.bottom-j.bottom+w.bottom)/_.y,left:(j.left-F.left+w.left)/_.x,right:(F.right-j.right+w.right)/_.x}}const mle=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,l=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:p}=O3(d,s,c),m=s,x={},w=0;for(let v=0;v<l.length;v++){var y;const{name:j,fn:k}=l[v],{x:S,y:_,data:F,reset:A}=await k({x:u,y:p,initialPlacement:s,placement:m,strategy:i,middlewareData:x,rects:d,platform:{...o,detectOverflow:(y=o.detectOverflow)!=null?y:hle},elements:{reference:e,floating:t}});u=S??u,p=_??p,x={...x,[j]:{...x[j],...F}},A&&w<=50&&(w++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(d=A.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:u,y:p}=O3(d,m,c)),v=-1)}return{x:u,y:p,placement:m,strategy:i,middlewareData:x}},gle=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:a,platform:o,elements:l,middlewareData:c}=t,{element:d,padding:u=0}=wl(e,t)||{};if(d==null)return{};const p=lB(u),m={x:n,y:s},x=Tk(i),w=Ak(x),y=await o.getDimensions(d),v=x==="y",j=v?"top":"left",k=v?"bottom":"right",S=v?"clientHeight":"clientWidth",_=a.reference[w]+a.reference[x]-m[x]-a.floating[w],F=m[x]-a.reference[x],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let C=A?A[S]:0;(!C||!await(o.isElement==null?void 0:o.isElement(A)))&&(C=l.floating[S]||a.floating[w]);const D=_/2-F/2,P=C/2-y[w]/2-1,L=Ec(p[j],P),T=Ec(p[k],P),R=L,U=C-y[w]-T,I=C/2-y[w]/2+D,H=uj(R,I,U),V=!c.arrow&&tp(i)!=null&&I!==H&&a.reference[w]/2-(I<R?L:T)-y[w]/2<0,X=V?I<R?I-R:I-U:0;return{[x]:m[x]+X,data:{[x]:H,centerOffset:I-H-X,...V&&{alignmentOffset:X}},reset:V}}}),xle=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...v}=wl(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const j=jl(i),k=yo(l),S=jl(l)===l,_=await(c.isRTL==null?void 0:c.isRTL(d.floating)),F=m||(S||!y?[iy(l)]:lle(l)),A=w!=="none";!m&&A&&F.push(...fle(l,y,w,_));const C=[l,...F],D=await c.detectOverflow(t,v),P=[];let L=((s=a.flip)==null?void 0:s.overflows)||[];if(u&&P.push(D[j]),p){const I=ole(i,o,_);P.push(D[I[0]],D[I[1]])}if(L=[...L,{placement:i,overflows:P}],!P.every(I=>I<=0)){var T,R;const I=(((T=a.flip)==null?void 0:T.index)||0)+1,H=C[I];if(H&&(!(p==="alignment"?k!==yo(H):!1)||L.every(N=>yo(N.placement)===k?N.overflows[0]>0:!0)))return{data:{index:I,overflows:L},reset:{placement:H}};let V=(R=L.filter(X=>X.overflows[0]<=0).sort((X,N)=>X.overflows[1]-N.overflows[1])[0])==null?void 0:R.placement;if(!V)switch(x){case"bestFit":{var U;const X=(U=L.filter(N=>{if(A){const W=yo(N.placement);return W===k||W==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(W=>W>0).reduce((W,O)=>W+O,0)]).sort((N,W)=>N[1]-W[1])[0])==null?void 0:U[0];X&&(V=X);break}case"initialPlacement":V=l;break}if(i!==V)return{reset:{placement:V}}}return{}}}};function M3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function L3(e){return rle.some(t=>e[t]>=0)}const yle=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:i="referenceHidden",...a}=wl(e,t);switch(i){case"referenceHidden":{const o=await s.detectOverflow(t,{...a,elementContext:"reference"}),l=M3(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:L3(l)}}}case"escaped":{const o=await s.detectOverflow(t,{...a,altBoundary:!0}),l=M3(o,n.floating);return{data:{escapedOffsets:l,escaped:L3(l)}}}default:return{}}}}},cB=new Set(["left","top"]);async function vle(e,t){const{placement:n,platform:s,elements:i}=e,a=await(s.isRTL==null?void 0:s.isRTL(i.floating)),o=jl(n),l=tp(n),c=yo(n)==="y",d=cB.has(o)?-1:1,u=a&&c?-1:1,p=wl(t,e);let{mainAxis:m,crossAxis:x,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof w=="number"&&(x=l==="end"?w*-1:w),c?{x:x*u,y:m*d}:{x:m*d,y:x*u}}const ble=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:i,y:a,placement:o,middlewareData:l}=t,c=await vle(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},wle=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:j=>{let{x:k,y:S}=j;return{x:k,y:S}}},...d}=wl(e,t),u={x:n,y:s},p=await a.detectOverflow(t,d),m=yo(jl(i)),x=Fk(m);let w=u[x],y=u[m];if(o){const j=x==="y"?"top":"left",k=x==="y"?"bottom":"right",S=w+p[j],_=w-p[k];w=uj(S,w,_)}if(l){const j=m==="y"?"top":"left",k=m==="y"?"bottom":"right",S=y+p[j],_=y-p[k];y=uj(S,y,_)}const v=c.fn({...t,[x]:w,[m]:y});return{...v,data:{x:v.x-n,y:v.y-s,enabled:{[x]:o,[m]:l}}}}}},jle=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:i,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=wl(e,t),u={x:n,y:s},p=yo(i),m=Fk(p);let x=u[m],w=u[p];const y=wl(l,t),v=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const S=m==="y"?"height":"width",_=a.reference[m]-a.floating[S]+v.mainAxis,F=a.reference[m]+a.reference[S]-v.mainAxis;x<_?x=_:x>F&&(x=F)}if(d){var j,k;const S=m==="y"?"width":"height",_=cB.has(jl(i)),F=a.reference[p]-a.floating[S]+(_&&((j=o.offset)==null?void 0:j[p])||0)+(_?0:v.crossAxis),A=a.reference[p]+a.reference[S]+(_?0:((k=o.offset)==null?void 0:k[p])||0)-(_?v.crossAxis:0);w<F?w=F:w>A&&(w=A)}return{[m]:x,[p]:w}}}},Sle=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:i,rects:a,platform:o,elements:l}=t,{apply:c=()=>{},...d}=wl(e,t),u=await o.detectOverflow(t,d),p=jl(i),m=tp(i),x=yo(i)==="y",{width:w,height:y}=a.floating;let v,j;p==="top"||p==="bottom"?(v=p,j=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(j=p,v=m==="end"?"top":"bottom");const k=y-u.top-u.bottom,S=w-u.left-u.right,_=Ec(y-u[v],k),F=Ec(w-u[j],S),A=!t.middlewareData.shift;let C=_,D=F;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=S),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(C=k),A&&!m){const L=Ci(u.left,0),T=Ci(u.right,0),R=Ci(u.top,0),U=Ci(u.bottom,0);x?D=w-2*(L!==0||T!==0?L+T:Ci(u.left,u.right)):C=y-2*(R!==0||U!==0?R+U:Ci(u.top,u.bottom))}await c({...t,availableWidth:D,availableHeight:C});const P=await o.getDimensions(l.floating);return w!==P.width||y!==P.height?{reset:{rects:!0}}:{}}}};function d1(){return typeof window<"u"}function np(e){return dB(e)?(e.nodeName||"").toLowerCase():"#document"}function Pi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Po(e){var t;return(t=(dB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dB(e){return d1()?e instanceof Node||e instanceof Pi(e).Node:!1}function qa(e){return d1()?e instanceof Element||e instanceof Pi(e).Element:!1}function Fo(e){return d1()?e instanceof HTMLElement||e instanceof Pi(e).HTMLElement:!1}function z3(e){return!d1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pi(e).ShadowRoot}const kle=new Set(["inline","contents"]);function Zm(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=Ga(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!kle.has(i)}const _le=new Set(["table","td","th"]);function Cle(e){return _le.has(np(e))}const Ele=[":popover-open",":modal"];function u1(e){return Ele.some(t=>{try{return e.matches(t)}catch{return!1}})}const Fle=["transform","translate","scale","rotate","perspective"],Ale=["transform","translate","scale","rotate","perspective","filter"],Tle=["paint","layout","strict","content"];function Nk(e){const t=Rk(),n=qa(e)?Ga(e):e;return Fle.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Ale.some(s=>(n.willChange||"").includes(s))||Tle.some(s=>(n.contain||"").includes(s))}function Nle(e){let t=Fc(e);for(;Fo(t)&&!zf(t);){if(Nk(t))return t;if(u1(t))return null;t=Fc(t)}return null}function Rk(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}
vendor: 9,567 bytes, line 754
754const Rle=new Set(["html","body","#document"]);function zf(e){return Rle.has(np(e))}function Ga(e){return Pi(e).getComputedStyle(e)}function f1(e){return qa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fc(e){if(np(e)==="html")return e;const t=e.assignedSlot||e.parentNode||z3(e)&&e.host||Po(e);return z3(t)?t.host:t}function uB(e){const t=Fc(e);return zf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fo(t)&&Zm(t)?t:uB(t)}function mm(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=uB(e),a=i===((s=e.ownerDocument)==null?void 0:s.body),o=Pi(i);if(a){const l=pj(o);return t.concat(o,o.visualViewport||[],Zm(i)?i:[],l&&n?mm(l):[])}return t.concat(i,mm(i,[],n))}function pj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fB(e){const t=Ga(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=Fo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:s,l=sy(n)!==a||sy(s)!==o;return l&&(n=a,s=o),{width:n,height:s,$:l}}function Dk(e){return qa(e)?e:e.contextElement}function gf(e){const t=Dk(e);if(!Fo(t))return ko(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:a}=fB(t);let o=(a?sy(n.width):n.width)/s,l=(a?sy(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Dle=ko(0);function pB(e){const t=Pi(e);return!Rk()||!t.visualViewport?Dle:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ile(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pi(e)?!1:t}function Vd(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Dk(e);let o=ko(1);t&&(s?qa(s)&&(o=gf(s)):o=gf(e));const l=Ile(a,n,s)?pB(a):ko(0);let c=(i.left+l.x)/o.x,d=(i.top+l.y)/o.y,u=i.width/o.x,p=i.height/o.y;if(a){const m=Pi(a),x=s&&qa(s)?Pi(s):s;let w=m,y=pj(w);for(;y&&s&&x!==w;){const v=gf(y),j=y.getBoundingClientRect(),k=Ga(y),S=j.left+(y.clientLeft+parseFloat(k.paddingLeft))*v.x,_=j.top+(y.clientTop+parseFloat(k.paddingTop))*v.y;c*=v.x,d*=v.y,u*=v.x,p*=v.y,c+=S,d+=_,w=Pi(y),y=pj(w)}}return ay({width:u,height:p,x:c,y:d})}function p1(e,t){const n=f1(e).scrollLeft;return t?t.left+n:Vd(Po(e)).left+n}function hB(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-p1(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function Ple(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const a=i==="fixed",o=Po(s),l=t?u1(t.floating):!1;if(s===o||l&&a)return n;let c={scrollLeft:0,scrollTop:0},d=ko(1);const u=ko(0),p=Fo(s);if((p||!p&&!a)&&((np(s)!=="body"||Zm(o))&&(c=f1(s)),Fo(s))){const x=Vd(s);d=gf(s),u.x=x.x+s.clientLeft,u.y=x.y+s.clientTop}const m=o&&!p&&!a?hB(o,c):ko(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+u.x+m.x,y:n.y*d.y-c.scrollTop*d.y+u.y+m.y}}function Ble(e){return Array.from(e.getClientRects())}function Ole(e){const t=Po(e),n=f1(e),s=e.ownerDocument.body,i=Ci(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),a=Ci(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let o=-n.scrollLeft+p1(e);const l=-n.scrollTop;return Ga(s).direction==="rtl"&&(o+=Ci(t.clientWidth,s.clientWidth)-i),{width:i,height:a,x:o,y:l}}const W3=25;function Mle(e,t){const n=Pi(e),s=Po(e),i=n.visualViewport;let a=s.clientWidth,o=s.clientHeight,l=0,c=0;if(i){a=i.width,o=i.height;const u=Rk();(!u||u&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const d=p1(s);if(d<=0){const u=s.ownerDocument,p=u.body,m=getComputedStyle(p),x=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(s.clientWidth-p.clientWidth-x);w<=W3&&(a-=w)}else d<=W3&&(a+=d);return{width:a,height:o,x:l,y:c}}const Lle=new Set(["absolute","fixed"]);function zle(e,t){const n=Vd(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,a=Fo(e)?gf(e):ko(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=i*a.x,d=s*a.y;return{width:o,height:l,x:c,y:d}}function $3(e,t,n){let s;if(t==="viewport")s=Mle(e,n);else if(t==="document")s=Ole(Po(e));else if(qa(t))s=zle(t,n);else{const i=pB(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ay(s)}function mB(e,t){const n=Fc(e);return n===t||!qa(n)||zf(n)?!1:Ga(n).position==="fixed"||mB(n,t)}function Wle(e,t){const n=t.get(e);if(n)return n;let s=mm(e,[],!1).filter(l=>qa(l)&&np(l)!=="body"),i=null;const a=Ga(e).position==="fixed";let o=a?Fc(e):e;for(;qa(o)&&!zf(o);){const l=Ga(o),c=Nk(o);!c&&l.position==="fixed"&&(i=null),(a?!c&&!i:!c&&l.position==="static"&&!!i&&Lle.has(i.position)||Zm(o)&&!c&&mB(e,o))?s=s.filter(u=>u!==o):i=l,o=Fc(o)}return t.set(e,s),s}function $le(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const o=[...n==="clippingAncestors"?u1(t)?[]:Wle(t,this._c):[].concat(n),s],l=o[0],c=o.reduce((d,u)=>{const p=$3(t,u,i);return d.top=Ci(p.top,d.top),d.right=Ec(p.right,d.right),d.bottom=Ec(p.bottom,d.bottom),d.left=Ci(p.left,d.left),d},$3(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ule(e){const{width:t,height:n}=fB(e);return{width:t,height:n}}function Vle(e,t,n){const s=Fo(t),i=Po(t),a=n==="fixed",o=Vd(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=ko(0);function d(){c.x=p1(i)}if(s||!s&&!a)if((np(t)!=="body"||Zm(i))&&(l=f1(t)),s){const x=Vd(t,!0,a,t);c.x=x.x+t.clientLeft,c.y=x.y+t.clientTop}else i&&d();a&&!s&&i&&d();const u=i&&!s&&!a?hB(i,l):ko(0),p=o.left+l.scrollLeft-c.x-u.x,m=o.top+l.scrollTop-c.y-u.y;return{x:p,y:m,width:o.width,height:o.height}}function m2(e){return Ga(e).position==="static"}function U3(e,t){if(!Fo(e)||Ga(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Po(e)===n&&(n=n.ownerDocument.body),n}function gB(e,t){const n=Pi(e);if(u1(e))return n;if(!Fo(e)){let i=Fc(e);for(;i&&!zf(i);){if(qa(i)&&!m2(i))return i;i=Fc(i)}return n}let s=U3(e,t);for(;s&&Cle(s)&&m2(s);)s=U3(s,t);return s&&zf(s)&&m2(s)&&!Nk(s)?n:s||Nle(e)||n}const Hle=async function(e){const t=this.getOffsetParent||gB,n=this.getDimensions,s=await n(e.floating);return{reference:Vle(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function qle(e){return Ga(e).direction==="rtl"}const Gle={convertOffsetParentRelativeRectToViewportRelativeRect:Ple,getDocumentElement:Po,getClippingRect:$le,getOffsetParent:gB,getElementRects:Hle,getClientRects:Ble,getDimensions:Ule,getScale:gf,isElement:qa,isRTL:qle};function xB(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kle(e,t){let n=null,s;const i=Po(e);function a(){var l;clearTimeout(s),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const d=e.getBoundingClientRect(),{left:u,top:p,width:m,height:x}=d;if(l||t(),!m||!x)return;const w=Tg(p),y=Tg(i.clientWidth-(u+m)),v=Tg(i.clientHeight-(p+x)),j=Tg(u),S={rootMargin:-w+"px "+-y+"px "+-v+"px "+-j+"px",threshold:Ci(0,Ec(1,c))||1};let _=!0;function F(A){const C=A[0].intersectionRatio;if(C!==c){if(!_)return o();C?o(!1,C):s=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!xB(d,e.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(F,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(F,S)}n.observe(e)}return o(!0),a}function Yle(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,d=Dk(e),u=i||a?[...d?mm(d):[],...mm(t)]:[];u.forEach(j=>{i&&j.addEventListener("scroll",n,{passive:!0}),a&&j.addEventListener("resize",n)});const p=d&&l?Kle(d,n):null;let m=-1,x=null;o&&(x=new ResizeObserver(j=>{let[k]=j;k&&k.target===d&&x&&(x.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=x)==null||S.observe(t)})),n()}),d&&!c&&x.observe(d),x.observe(t));let w,y=c?Vd(e):null;c&&v();function v(){const j=Vd(e);y&&!xB(y,j)&&n(),y=j,w=requestAnimationFrame(v)}return n(),()=>{var j;u.forEach(k=>{i&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),p==null||p(),(j=x)==null||j.disconnect(),x=null,c&&cancelAnimationFrame(w)}}const Xle=ble,Jle=wle,Qle=xle,Zle=Sle,ece=yle,V3=gle,tce=jle,nce=(e,t,n)=>{const s=new Map,i={platform:Gle,...n},a={...i.platform,_c:s};return mle(e,t,{...i,platform:a})};var rce=typeof document<"u",sce=function(){},Rx=rce?g.useLayoutEffect:sce;function oy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!oy(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const a=i[s];if(!(a==="_owner"&&e.$$typeof)&&!oy(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function yB(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function H3(e,t){const n=yB(e);return Math.round(t*n)/n}function g2(e){const t=g.useRef(e);return Rx(()=>{t.current=e}),t}function ice(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,p]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,x]=g.useState(s);oy(m,s)||x(s);const[w,y]=g.useState(null),[v,j]=g.useState(null),k=g.useCallback(N=>{N!==A.current&&(A.current=N,y(N))},[]),S=g.useCallback(N=>{N!==C.current&&(C.current=N,j(N))},[]),_=a||w,F=o||v,A=g.useRef(null),C=g.useRef(null),D=g.useRef(u),P=c!=null,
vendor: 1,991 bytes, line 754
754L=g2(c),T=g2(i),R=g2(d),U=g.useCallback(()=>{if(!A.current||!C.current)return;const N={placement:t,strategy:n,middleware:m};T.current&&(N.platform=T.current),nce(A.current,C.current,N).then(W=>{const O={...W,isPositioned:R.current!==!1};I.current&&!oy(D.current,O)&&(D.current=O,Ka.flushSync(()=>{p(O)}))})},[m,t,n,T,R]);Rx(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(N=>({...N,isPositioned:!1})))},[d]);const I=g.useRef(!1);Rx(()=>(I.current=!0,()=>{I.current=!1}),[]),Rx(()=>{if(_&&(A.current=_),F&&(C.current=F),_&&F){if(L.current)return L.current(_,F,U);U()}},[_,F,U,L,P]);const H=g.useMemo(()=>({reference:A,floating:C,setReference:k,setFloating:S}),[k,S]),V=g.useMemo(()=>({reference:_,floating:F}),[_,F]),X=g.useMemo(()=>{const N={position:n,left:0,top:0};if(!V.floating)return N;const W=H3(V.floating,u.x),O=H3(V.floating,u.y);return l?{...N,transform:"translate("+W+"px, "+O+"px)",...yB(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:O}},[n,l,V.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:U,refs:H,elements:V,floatingStyles:X}),[u,U,H,V,X])}const ace=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:i}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?V3({element:s.current,padding:i}).fn(n):{}:s?V3({element:s,padding:i}).fn(n):{}}}},oce=(e,t)=>({...Xle(e),options:[e,t]}),lce=(e,t)=>({...Jle(e),options:[e,t]}),cce=(e,t)=>({...tce(e),options:[e,t]}),dce=(e,t)=>({...Qle(e),options:[e,t]}),uce=(e,t)=>({...Zle(e),options:[e,t]}),fce=(e,t)=>({...ece(e),options:[e,t]}),pce=(e,t)=>({...ace(e),options:[e,t]});var hce="Arrow",vB=g.forwardRef((e,t)=>{const{children:n,width:s=10,height:i=5,...a}=e;return r.jsx(kn.svg,{...a,ref:t,width:s,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});vB.displayName=hce;var mce=vB;function gce(e){const[t,n]=g.useState(void 0);return Is(()=>
vendor: 10,677 bytes, line 754
754{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,l;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;o=d.inlineSize,l=d.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var Ik="Popper",[bB,h1]=Mc(Ik),[xce,wB]=bB(Ik),jB=e=>{const{__scopePopper:t,children:n}=e,[s,i]=g.useState(null);return r.jsx(xce,{scope:t,anchor:s,onAnchorChange:i,children:n})};jB.displayName=Ik;var SB="PopperAnchor",kB=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...i}=e,a=wB(SB,n),o=g.useRef(null),l=Mn(t,o),c=g.useRef(null);return g.useEffect(()=>{const d=c.current;c.current=(s==null?void 0:s.current)||o.current,d!==c.current&&a.onAnchorChange(c.current)}),s?null:r.jsx(kn.div,{...i,ref:l})});kB.displayName=SB;var Pk="PopperContent",[yce,vce]=bB(Pk),_B=g.forwardRef((e,t)=>{var Q,ie,ae,re,pe,Z;const{__scopePopper:n,side:s="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:x="optimized",onPlaced:w,...y}=e,v=wB(Pk,n),[j,k]=g.useState(null),S=Mn(t,Ne=>k(Ne)),[_,F]=g.useState(null),A=gce(_),C=(A==null?void 0:A.width)??0,D=(A==null?void 0:A.height)??0,P=s+(a!=="center"?"-"+a:""),L=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},T=Array.isArray(d)?d:[d],R=T.length>0,U={padding:L,boundary:T.filter(wce),altBoundary:R},{refs:I,floatingStyles:H,placement:V,isPositioned:X,middlewareData:N}=ice({strategy:"fixed",placement:P,whileElementsMounted:(...Ne)=>Yle(...Ne,{animationFrame:x==="always"}),elements:{reference:v.anchor},middleware:[oce({mainAxis:i+D,alignmentAxis:o}),c&&lce({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?cce():void 0,...U}),c&&dce({...U}),uce({...U,apply:({elements:Ne,rects:te,availableWidth:xe,availableHeight:he})=>{const{width:le,height:ge}=te.reference,$e=Ne.floating.style;$e.setProperty("--radix-popper-available-width",`${xe}px`),$e.setProperty("--radix-popper-available-height",`${he}px`),$e.setProperty("--radix-popper-anchor-width",`${le}px`),$e.setProperty("--radix-popper-anchor-height",`${ge}px`)}}),_&&pce({element:_,padding:l}),jce({arrowWidth:C,arrowHeight:D}),m&&fce({strategy:"referenceHidden",...U})]}),[W,O]=FB(V),G=Eo(w);Is(()=>{X&&(G==null||G())},[X,G]);const M=(Q=N.arrow)==null?void 0:Q.x,z=(ie=N.arrow)==null?void 0:ie.y,K=((ae=N.arrow)==null?void 0:ae.centerOffset)!==0,[Y,J]=g.useState();return Is(()=>{j&&J(window.getComputedStyle(j).zIndex)},[j]),r.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:X?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(re=N.transformOrigin)==null?void 0:re.x,(pe=N.transformOrigin)==null?void 0:pe.y].join(" "),...((Z=N.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(yce,{scope:n,placedSide:W,onArrowChange:F,arrowX:M,arrowY:z,shouldHideArrow:K,children:r.jsx(kn.div,{"data-side":W,"data-align":O,...y,ref:S,style:{...y.style,animation:X?void 0:"none"}})})})});_B.displayName=Pk;var CB="PopperArrow",bce={top:"bottom",right:"left",bottom:"top",left:"right"},EB=g.forwardRef(function(t,n){const{__scopePopper:s,...i}=t,a=vce(CB,s),o=bce[a.placedSide];return r.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:r.jsx(mce,{...i,ref:n,style:{...i.style,display:"block"}})})});EB.displayName=CB;function wce(e){return e!==null}var jce=e=>({name:"transformOrigin",options:e,fn(t){var v,j,k;const{placement:n,rects:s,middlewareData:i}=t,o=((v=i.arrow)==null?void 0:v.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[d,u]=FB(n),p={start:"0%",center:"50%",end:"100%"}[u],m=(((j=i.arrow)==null?void 0:j.x)??0)+l/2,x=(((k=i.arrow)==null?void 0:k.y)??0)+c/2;let w="",y="";return d==="bottom"?(w=o?p:`${m}px`,y=`${-c}px`):d==="top"?(w=o?p:`${m}px`,y=`${s.floating.height+c}px`):d==="right"?(w=`${-c}px`,y=o?p:`${x}px`):d==="left"&&(w=`${s.floating.width+c}px`,y=o?p:`${x}px`),{data:{x:w,y}}}});function FB(e){const[t,n="center"]=e.split("-");return[t,n]}var AB=jB,TB=kB,NB=_B,RB=EB,Sce="Portal",m1=g.forwardRef((e,t)=>{var l;const{container:n,...s}=e,[i,a]=g.useState(!1);Is(()=>a(!0),[]);const o=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Y8.createPortal(r.jsx(kn.div,{...s,ref:t}),o):null});m1.displayName=Sce;function kce(e){const t=_ce(e),n=g.forwardRef((s,i)=>{const{children:a,...o}=s,l=g.Children.toArray(a),c=l.find(Ece);if(c){const d=c.props.children,u=l.map(p=>p===c?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return r.jsx(t,{...o,ref:i,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return r.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function _ce(e){const t=g.forwardRef((n,s)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const o=Ace(i),l=Fce(a,i.props);return i.type!==g.Fragment&&(l.ref=s?_l(s,o):o),g.cloneElement(i,l)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cce=Symbol("radix.slottable");function Ece(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cce}function Fce(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Ace(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Tce=My[" useInsertionEffect ".trim().toString()]||Is;function gm({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,a,o]=Nce({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:i;{const u=g.useRef(e!==void 0);g.useEffect(()=>{const p=u.current;p!==l&&console.warn(`${s} is changing from ${p?"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,s])}const d=g.useCallback(u=>{var p;if(l){const m=Rce(u)?u(e):u;m!==e&&((p=o.current)==null||p.call(o,m))}else a(u)},[l,e,a,o]);return[c,d]}function Nce({defaultProp:e,onChange:t}){const[n,s]=g.useState(e),i=g.useRef(n),a=g.useRef(t);return Tce(()=>{a.current=t},[t]),g.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,s,a]}function Rce(e){return typeof e=="function"}function Dce(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var DB=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"}),Ice="VisuallyHidden",Pce=g.forwardRef((e,t)=>r.jsx(kn.span,{...e,ref:t,style:{...DB,...e.style}}));Pce.displayName=Ice;var Bce=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mu=new WeakMap,Ng=new WeakMap,Rg={},x2=0,IB=function(e){return e&&(e.host||IB(e.parentNode))},Oce=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=IB(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Mce=function(e,t,n,s){var i=Oce(t,Array.isArray(e)?e:[e]);Rg[n]||(Rg[n]=new WeakMap);var a=Rg[n],o=[],l=new Set,c=new Set(i),d=function(p){!p||l.has(p)||(l.add(p),d(p.parentNode))};i.forEach(d);var u=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))u(m);else try{var x=m.getAttribute(s),w=x!==null&&x!=="false",y=(Mu.get(m)||0)+1,v=(a.get(m)||0)+1;Mu.set(m,y),a.set(m,v),o.push(m),y===1&&w&&Ng.set(m,!0),v===1&&m.setAttribute(n,"true"),w||m.setAttribute(s,"true")}catch(j){console.error("aria-hidden: cannot operate on ",m,j)}})};return u(t),l.clear(),x2++,function(){o.forEach(function(p){var m=Mu.get(p)-1,x=a.get(p)-1;Mu.set(p,m),a.set(p,x),m||(Ng.has(p)||p.removeAttribute(s),Ng.delete(p)),x||p.removeAttribute(n)}),x2--,x2||(Mu=new WeakMap,Mu=new WeakMap,Ng=new WeakMap,Rg={})}},Bk=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=Bce(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),Mce(s,i,n,"aria-hidden")):function(){return null}},ho=function(){return ho=Object.assign||function(t){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ho.apply(this,arguments)};function PB(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]]);return n}function Lce(e,t,n){if(n||arguments.length===2)for(var s=0,i=t.length,a;s<i;s++)(a||!(s in t))&&(a||(a=Array.prototype.slice.call(t,0,s)),a[s]=t[s]);return e.concat(a||Array.prototype.slice.call(t))}var Dx="right-scroll-bar-position",Ix="width-before-scroll-bar",zce="with-scroll-bars-hidden",Wce="--removed-body-scroll-bar-size";function y2(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $ce(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var i=n.value;i!==s&&(n.value=s,n.callback(s,i))}}}})[0];return n.callback=t,n.facade}var Uce=typeof window<"u"?g.useLayoutEffect:g.useEffect,q3=new WeakMap;function Vce(e,t){var n=$ce(null,function(s){return e.forEach(function(i){return y2(i,s)})});return Uce(function(){var s=q3.get(n);if(s){var i=new Set(s),a=new Set(e),o=n.current;
vendor: 4,224 bytes, lines 754-769
754i.forEach(function(l){a.has(l)||y2(l,null)}),a.forEach(function(l){i.has(l)||y2(l,o)})}q3.set(n,e)},[e]),n}function Hce(e){return e}function qce(e,t){t===void 0&&(t=Hce);var n=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,s);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(s=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){s=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(a),o=n}var c=function(){var u=o;o=[],u.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(u){o.push(u),d()},filter:function(u){return o=o.filter(u),n}}}};return i}function Gce(e){e===void 0&&(e={});var t=qce(null);return t.options=ho({async:!0,ssr:!1},e),t}var BB=function(e){var t=e.sideCar,n=PB(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return g.createElement(s,ho({},n))};BB.isSideCarExport=!0;function Kce(e,t){return e.useMedium(t),BB}var OB=Gce(),v2=function(){},g1=g.forwardRef(function(e,t){var n=g.useRef(null),s=g.useState({onScrollCapture:v2,onWheelCapture:v2,onTouchMoveCapture:v2}),i=s[0],a=s[1],o=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,p=e.shards,m=e.sideCar,x=e.noRelative,w=e.noIsolation,y=e.inert,v=e.allowPinchZoom,j=e.as,k=j===void 0?"div":j,S=e.gapMode,_=PB(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),F=m,A=Vce([n,t]),C=ho(ho({},_),i);return g.createElement(g.Fragment,null,u&&g.createElement(F,{sideCar:OB,removeScrollBar:d,shards:p,noRelative:x,noIsolation:w,inert:y,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:S}),o?g.cloneElement(g.Children.only(l),ho(ho({},C),{ref:A})):g.createElement(k,ho({},C,{className:c,ref:A}),l))});g1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};g1.classNames={fullWidth:Ix,zeroRight:Dx};var Yce=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xce(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Yce();return t&&e.setAttribute("nonce",t),e}function Jce(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qce(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Zce=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xce())&&(Jce(t,n),Qce(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ede=function(){var e=Zce();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},MB=function(){var e=ede(),t=function(n){var s=n.styles,i=n.dynamic;return e(s,i),null};return t},tde={left:0,top:0,right:0,gap:0},b2=function(e){return parseInt(e||"",10)||0},nde=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[b2(n),b2(s),b2(i)]},rde=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tde;var t=nde(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},sde=MB(),xf="data-scroll-locked",ide=function(e,t,n,s){var i=e.left,a=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
755  .`.concat(zce,` {
756   overflow: hidden `).concat(s,`;
757   padding-right: `).concat(l,"px ").concat(s,`;
758  }
759  body[`).concat(xf,`] {
760    overflow: hidden `).concat(s,`;
761    overscroll-behavior: contain;
762    `).concat([t&&"position: relative ".concat(s,";"),n==="margin"&&`
763    padding-left: `.concat(i,`px;
764    padding-top: `).concat(a,`px;
765    padding-right: `).concat(o,`px;
766    margin-left:0;
767    margin-top:0;
768    margin-right: `).concat(l,"px ").concat(s,`;
769    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(s,";
769")].filter(Boolean).join(""),`
770  }
771  
772  .`).concat(Dx,` {
773    right: `).concat(l,"px ").concat(s,`;
774  }
775  
776  .`).concat(Ix,` {
777    margin-right: `).concat(l,"px ").concat(s,`;
778  }
779  
780  .`).concat(Dx," .").concat(Dx,` {
781    right: 0 `).concat(s,`;
782  }
783  
784  .`).concat(Ix," .").concat(Ix,` {
785    margin-right: 0 `).concat(s,`;
786  }
787  
788  body[`).concat(xf,`] {
789    `).concat(Wce,": ").concat(l,`px;
790  }
791`)},G3=function(){var e=parseInt(document.body.getAttribute(xf)||"0",10);return isFinite(e)?e:0},ade=function(){g.useEffect(function(){return document.body.setAttribute(xf,(G3()+1).toString()),function(){var e=G3()-1;e<=0?document.body.removeAttribute(xf):document.body.setAttribute(xf,e.toString())}},[])},ode=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;ade();var a=g.useMemo(function(){return rde(i)},[i]);return g.createElement(sde,{styles:ide(a,!t,i,n?"":"!important")})},hj=!1;if(typeof window<"u")try{var Dg=Object.defineProperty({},"passive",{get:function(){return hj=!0,!0}});window.addEventListener("test",Dg,Dg),window.removeEventListener("test",Dg,Dg)}catch{hj=!1}var Lu=hj?{passive:!1}:!1,lde=function(e){return e.tagName==="TEXTAREA"},LB=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lde(e)&&n[t]==="visible")},cde=function(e){return LB(e,"overflowY")},dde=function(e){return LB(e,"overflowX")},K3=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=zB(e,s);if(i){var a=WB(e,s),o=a[1],l=a[2];if(o>l)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},ude=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},fde=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},zB=function(e,t){return e==="v"?cde(t):dde(t)},WB=function(e,t){return e==="v"?ude(t):fde(t)},pde=function(e,t){return e==="h"&&t==="rtl"?-1:1},hde=function(e,t,n,s,i){var a=pde(e,window.getComputedStyle(t).direction),o=a*s,l=n.target,c=t.contains(l),d=!1,u=o>0,p=0,m=0;do{if(!l)break;var x=WB(e,l),w=x[0],y=x[1],v=x[2],j=y-v-a*w;(w||j)&&zB(e,l)&&(p+=j,m+=w);var k=l.parentNode;l=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(u&&Math.abs(p)<1||!u&&Math.abs(m)<1)&&(d=!0),d},Ig=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Y3=function(e){return[e.deltaX,e.deltaY]},X3=function(e){return e&&"current"in e?e.current:e},mde=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gde=function(e){return`
792  .block-interactivity-`.concat(e,` {pointer-events: none;}
793  .allow-interactivity-`).concat(e,` {pointer-events: all;}
794`)},xde=0,zu=[];function yde(e){var t=g.useRef([]),n=g.useRef([0,0]),s=g.useRef(),i=g.useState(xde++)[0],a=g.useState(MB)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=Lce([e.lockRef.current],(e.shards||[]).map(X3),!0).filter(Boolean);return y.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(y,v){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var j=Ig(y),k=n.current,S="deltaX"in y?y.deltaX:k[0]-j[0],_="deltaY"in y?y.deltaY:k[1]-j[1],F,A=y.target,C=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in y&&C==="h"&&A.type==="range")return!1;var D=window.getSelection(),P=D&&D.anchorNode,L=P?P===A||P.contains(A):!1;if(L)return!1;var T=K3(C,A);if(!T)return!0;if(T?F=C:(F=C==="v"?"h":"v",T=K3(C,A)),!T)return!1;if(!s.current&&"changedTouches"in y&&(S||_)&&(s.current=F),!F)return!0;var R=s.current||F;return hde(R,v,y,R==="h"?S:_)},[]),c=g.useCallback(function(y){var v=y;if(!(!zu.length||zu[zu.length-1]!==a)){var j="deltaY"in v?Y3(v):Ig(v),k=t.current.filter(function(F){return F.name===v.type&&(F.target===v.target||v.target===F.shadowParent)&&mde(F.delta,j)})[0];if(k&&k.should){v.cancelable&&v.preventDefault();return}
vendor: 4,235 bytes, line 794
794if(!k){var S=(o.current.shards||[]).map(X3).filter(Boolean).filter(function(F){return F.contains(v.target)}),_=S.length>0?l(v,S[0]):!o.current.noIsolation;_&&v.cancelable&&v.preventDefault()}}},[]),d=g.useCallback(function(y,v,j,k){var S={name:y,delta:v,target:j,should:k,shadowParent:vde(j)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),u=g.useCallback(function(y){n.current=Ig(y),s.current=void 0},[]),p=g.useCallback(function(y){d(y.type,Y3(y),y.target,l(y,e.lockRef.current))},[]),m=g.useCallback(function(y){d(y.type,Ig(y),y.target,l(y,e.lockRef.current))},[]);g.useEffect(function(){return zu.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Lu),document.addEventListener("touchmove",c,Lu),document.addEventListener("touchstart",u,Lu),function(){zu=zu.filter(function(y){return y!==a}),document.removeEventListener("wheel",c,Lu),document.removeEventListener("touchmove",c,Lu),document.removeEventListener("touchstart",u,Lu)}},[]);var x=e.removeScrollBar,w=e.inert;return g.createElement(g.Fragment,null,w?g.createElement(a,{styles:gde(i)}):null,x?g.createElement(ode,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vde(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bde=Kce(OB,yde);var x1=g.forwardRef(function(e,t){return g.createElement(g1,ho({},e,{ref:t,sideCar:bde}))});x1.classNames=g1.classNames;var wde=[" ","Enter","ArrowUp","ArrowDown"],jde=[" ","Enter"],Hd="Select",[y1,v1,Sde]=_k(Hd),[rp]=Mc(Hd,[Sde,h1]),b1=h1(),[kde,Lc]=rp(Hd),[_de,Cde]=rp(Hd),$B=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:i,onOpenChange:a,value:o,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:p,disabled:m,required:x,form:w}=e,y=b1(t),[v,j]=g.useState(null),[k,S]=g.useState(null),[_,F]=g.useState(!1),A=Ck(d),[C,D]=gm({prop:s,defaultProp:i??!1,onChange:a,caller:Hd}),[P,L]=gm({prop:o,defaultProp:l,onChange:c,caller:Hd}),T=g.useRef(null),R=v?w||!!v.closest("form"):!0,[U,I]=g.useState(new Set),H=Array.from(U).map(V=>V.props.value).join(";");return r.jsx(AB,{...y,children:r.jsxs(kde,{required:x,scope:t,trigger:v,onTriggerChange:j,valueNode:k,onValueNodeChange:S,valueNodeHasChildren:_,onValueNodeHasChildrenChange:F,contentId:pl(),value:P,onValueChange:L,open:C,onOpenChange:D,dir:A,triggerPointerDownPosRef:T,disabled:m,children:[r.jsx(y1.Provider,{scope:t,children:r.jsx(_de,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(V=>{I(X=>new Set(X).add(V))},[]),onNativeOptionRemove:g.useCallback(V=>{I(X=>{const N=new Set(X);return N.delete(V),N})},[]),children:n})}),R?r.jsxs(fO,{"aria-hidden":!0,required:x,tabIndex:-1,name:u,autoComplete:p,value:P,onChange:V=>L(V.target.value),disabled:m,form:w,children:[P===void 0?r.jsx("option",{value:""}):null,Array.from(U)]},H):null]})})};$B.displayName=Hd;var UB="SelectTrigger",VB=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...i}=e,a=b1(n),o=Lc(UB,n),l=o.disabled||s,c=Mn(t,o.onTriggerChange),d=v1(n),u=g.useRef("touch"),[p,m,x]=hO(y=>{const v=d().filter(S=>!S.disabled),j=v.find(S=>S.value===o.value),k=mO(v,y,j);k!==void 0&&o.onValueChange(k.value)}),w=y=>{l||(o.onOpenChange(!0),x()),y&&(o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return r.jsx(TB,{asChild:!0,...a,children:r.jsx(kn.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":pO(o.value)?"":void 0,...i,ref:c,onClick:$t(i.onClick,y=>{y.currentTarget.focus(),u.current!=="mouse"&&w(y)}),onPointerDown:$t(i.onPointerDown,y=>{u.current=y.pointerType;const v=y.target;v.hasPointerCapture(y.pointerId)&&v.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(w(y),y.preventDefault())}),onKeyDown:$t(i.onKeyDown,y=>{const v=p.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&m(y.key),!(v&&y.key===" ")&&wde.includes(y.key)&&(w(),y.preventDefault())})})})});VB.displayName=UB;var HB="SelectValue",qB=g.forwardRef((e,t)=>
vendor: 16,835 bytes, line 794
794{const{__scopeSelect:n,className:s,style:i,children:a,placeholder:o="",...l}=e,c=Lc(HB,n),{onValueNodeHasChildrenChange:d}=c,u=a!==void 0,p=Mn(t,c.onValueNodeChange);return Is(()=>{d(u)},[d,u]),r.jsx(kn.span,{...l,ref:p,style:{pointerEvents:"none"},children:pO(c.value)?r.jsx(r.Fragment,{children:o}):a})});qB.displayName=HB;var Ede="SelectIcon",GB=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...i}=e;return r.jsx(kn.span,{"aria-hidden":!0,...i,ref:t,children:s||"▼"})});GB.displayName=Ede;var Fde="SelectPortal",KB=e=>r.jsx(m1,{asChild:!0,...e});KB.displayName=Fde;var qd="SelectContent",YB=g.forwardRef((e,t)=>{const n=Lc(qd,e.__scopeSelect),[s,i]=g.useState();if(Is(()=>{i(new DocumentFragment)},[]),!n.open){const a=s;return a?Ka.createPortal(r.jsx(XB,{scope:e.__scopeSelect,children:r.jsx(y1.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),a):null}return r.jsx(JB,{...e,ref:t})});YB.displayName=qd;var Aa=10,[XB,zc]=rp(qd),Ade="SelectContentImpl",Tde=kce("SelectContent.RemoveScroll"),JB=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:p,collisionBoundary:m,collisionPadding:x,sticky:w,hideWhenDetached:y,avoidCollisions:v,...j}=e,k=Lc(qd,n),[S,_]=g.useState(null),[F,A]=g.useState(null),C=Mn(t,Q=>_(Q)),[D,P]=g.useState(null),[L,T]=g.useState(null),R=v1(n),[U,I]=g.useState(!1),H=g.useRef(!1);g.useEffect(()=>{if(S)return Bk(S)},[S]),Ek();const V=g.useCallback(Q=>{const[ie,...ae]=R().map(Z=>Z.ref.current),[re]=ae.slice(-1),pe=document.activeElement;for(const Z of Q)if(Z===pe||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===ie&&F&&(F.scrollTop=0),Z===re&&F&&(F.scrollTop=F.scrollHeight),Z==null||Z.focus(),document.activeElement!==pe))return},[R,F]),X=g.useCallback(()=>V([D,S]),[V,D,S]);g.useEffect(()=>{U&&X()},[U,X]);const{onOpenChange:N,triggerPointerDownPosRef:W}=k;g.useEffect(()=>{if(S){let Q={x:0,y:0};const ie=re=>{var pe,Z;Q={x:Math.abs(Math.round(re.pageX)-(((pe=W.current)==null?void 0:pe.x)??0)),y:Math.abs(Math.round(re.pageY)-(((Z=W.current)==null?void 0:Z.y)??0))}},ae=re=>{Q.x<=10&&Q.y<=10?re.preventDefault():S.contains(re.target)||N(!1),document.removeEventListener("pointermove",ie),W.current=null};return W.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",ae,{capture:!0})}}},[S,N,W]),g.useEffect(()=>{const Q=()=>N(!1);return window.addEventListener("blur",Q),window.addEventListener("resize",Q),()=>{window.removeEventListener("blur",Q),window.removeEventListener("resize",Q)}},[N]);const[O,G]=hO(Q=>{const ie=R().filter(pe=>!pe.disabled),ae=ie.find(pe=>pe.ref.current===document.activeElement),re=mO(ie,Q,ae);re&&setTimeout(()=>re.ref.current.focus())}),M=g.useCallback((Q,ie,ae)=>{const re=!H.current&&!ae;(k.value!==void 0&&k.value===ie||re)&&(P(Q),re&&(H.current=!0))},[k.value]),z=g.useCallback(()=>S==null?void 0:S.focus(),[S]),K=g.useCallback((Q,ie,ae)=>{const re=!H.current&&!ae;(k.value!==void 0&&k.value===ie||re)&&T(Q)},[k.value]),Y=s==="popper"?mj:QB,J=Y===mj?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:p,collisionBoundary:m,collisionPadding:x,sticky:w,hideWhenDetached:y,avoidCollisions:v}:{};return r.jsx(XB,{scope:n,content:S,viewport:F,onViewportChange:A,itemRefCallback:M,selectedItem:D,onItemLeave:z,itemTextRefCallback:K,focusSelectedItem:X,selectedItemText:L,position:s,isPositioned:U,searchRef:O,children:r.jsx(x1,{as:Tde,allowPinchZoom:!0,children:r.jsx(c1,{asChild:!0,trapped:k.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:$t(i,Q=>{var ie;(ie=k.trigger)==null||ie.focus({preventScroll:!0}),Q.preventDefault()}),children:r.jsx(l1,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:r.jsx(Y,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:Q=>Q.preventDefault(),...j,...J,onPlaced:()=>I(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:$t(j.onKeyDown,Q=>{const ie=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!ie&&Q.key.length===1&&G(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let re=R().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const pe=Q.target,Z=re.indexOf(pe);re=re.slice(Z+1)}setTimeout(()=>V(re)),Q.preventDefault()}})})})})})})});JB.displayName=Ade;var Nde="SelectItemAlignedPosition",QB=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...i}=e,a=Lc(qd,n),o=zc(qd,n),[l,c]=g.useState(null),[d,u]=g.useState(null),p=Mn(t,C=>u(C)),m=v1(n),x=g.useRef(!1),w=g.useRef(!0),{viewport:y,selectedItem:v,selectedItemText:j,focusSelectedItem:k}=o,S=g.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&d&&y&&v&&j){const C=a.trigger.getBoundingClientRect(),D=d.getBoundingClientRect(),P=a.valueNode.getBoundingClientRect(),L=j.getBoundingClientRect();if(a.dir!=="rtl"){const pe=L.left-D.left,Z=P.left-pe,Ne=C.left-Z,te=C.width+Ne,xe=Math.max(te,D.width),he=window.innerWidth-Aa,le=C3(Z,[Aa,Math.max(Aa,he-xe)]);l.style.minWidth=te+"px",l.style.left=le+"px"}else{const pe=D.right-L.right,Z=window.innerWidth-P.right-pe,Ne=window.innerWidth-C.right-Z,te=C.width+Ne,xe=Math.max(te,D.width),he=window.innerWidth-Aa,le=C3(Z,[Aa,Math.max(Aa,he-xe)]);l.style.minWidth=te+"px",l.style.right=le+"px"}const T=m(),R=window.innerHeight-Aa*2,U=y.scrollHeight,I=window.getComputedStyle(d),H=parseInt(I.borderTopWidth,10),V=parseInt(I.paddingTop,10),X=parseInt(I.borderBottomWidth,10),N=parseInt(I.paddingBottom,10),W=H+V+U+N+X,O=Math.min(v.offsetHeight*5,W),G=window.getComputedStyle(y),M=parseInt(G.paddingTop,10),z=parseInt(G.paddingBottom,10),K=C.top+C.height/2-Aa,Y=R-K,J=v.offsetHeight/2,Q=v.offsetTop+J,ie=H+V+Q,ae=W-ie;if(ie<=K){const pe=T.length>0&&v===T[T.length-1].ref.current;l.style.bottom="0px";const Z=d.clientHeight-y.offsetTop-y.offsetHeight,Ne=Math.max(Y,J+(pe?z:0)+Z+X),te=ie+Ne;l.style.height=te+"px"}else{const pe=T.length>0&&v===T[0].ref.current;l.style.top="0px";const Ne=Math.max(K,H+y.offsetTop+(pe?M:0)+J)+ae;l.style.height=Ne+"px",y.scrollTop=ie-K+y.offsetTop}l.style.margin=`${Aa}px 0`,l.style.minHeight=O+"px",l.style.maxHeight=R+"px",s==null||s(),requestAnimationFrame(()=>x.current=!0)}},[m,a.trigger,a.valueNode,l,d,y,v,j,a.dir,s]);Is(()=>S(),[S]);const[_,F]=g.useState();Is(()=>{d&&F(window.getComputedStyle(d).zIndex)},[d]);const A=g.useCallback(C=>{C&&w.current===!0&&(S(),k==null||k(),w.current=!1)},[S,k]);return r.jsx(Dde,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:x,onScrollButtonChange:A,children:r.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:r.jsx(kn.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});QB.displayName=Nde;var Rde="SelectPopperPosition",mj=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:i=Aa,...a}=e,o=b1(n);return r.jsx(NB,{...o,...a,ref:t,align:s,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});mj.displayName=Rde;var[Dde,Ok]=rp(qd,{}),gj="SelectViewport",ZB=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...i}=e,a=zc(gj,n),o=Ok(gj,n),l=Mn(t,a.onViewportChange),c=g.useRef(0);return r.jsxs(r.Fragment,{children:[r.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:s}),r.jsx(y1.Slot,{scope:n,children:r.jsx(kn.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:$t(i.onScroll,d=>{const u=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&p){const x=Math.abs(c.current-u.scrollTop);if(x>0){const w=window.innerHeight-Aa*2,y=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),j=Math.max(y,v);if(j<w){const k=j+x,S=Math.min(w,k),_=k-S;p.style.height=S+"px",p.style.bottom==="0px"&&(u.scrollTop=_>0?_:0,p.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});ZB.displayName=gj;var eO="SelectGroup",[Ide,Pde]=rp(eO),Bde=g.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=pl();return r.jsx(Ide,{scope:n,id:i,children:r.jsx(kn.div,{role:"group","aria-labelledby":i,...s,ref:t})})});Bde.displayName=eO;var tO="SelectLabel",nO=g.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=Pde(tO,n);return r.jsx(kn.div,{id:i.id,...s,ref:t})});nO.displayName=tO;var ly="SelectItem",[Ode,rO]=rp(ly),sO=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:i=!1,textValue:a,...o}=e,l=Lc(ly,n),c=zc(ly,n),d=l.value===s,[u,p]=g.useState(a??""),[m,x]=g.useState(!1),w=Mn(t,k=>{var S;return(S=c.itemRefCallback)==null?void 0:S.call(c,k,s,i)}),y=pl(),v=g.useRef("touch"),j=()=>{i||(l.onValueChange(s),l.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(Ode,{scope:n,value:s,disabled:i,textId:y,isSelected:d,onItemTextChange:g.useCallback(k=>{p(S=>S||((k==null?void 0:k.textContent)??"").trim())},[]),children:r.jsx(y1.ItemSlot,{scope:n,value:s,disabled:i,textValue:u,children:r.jsx(kn.div,{role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:w,onFocus:$t(o.onFocus,()=>x(!0)),onBlur:$t(o.onBlur,()=>x(!1)),onClick:$t(o.onClick,()=>{v.current!=="mouse"&&j()}),onPointerUp:$t(o.onPointerUp,()=>{v.current==="mouse"&&j()}),onPointerDown:$t(o.onPointerDown,k=>{v.current=k.pointerType}),onPointerMove:$t(o.onPointerMove,k=>{var S;v.current=k.pointerType,i?(S=c.onItemLeave)==null||S.call(c):v.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$t(o.onPointerLeave,k=>{var S;k.currentTarget===document.activeElement&&((S=c.onItemLeave)==null||S.call(c))}),onKeyDown:$t(o.onKeyDown,k=>{var _;((_=c.searchRef)==null?void 0:_.current)!==""&&k.key===" "||(jde.includes(k.key)&&j(),k.key===" "&&k.preventDefault())})})})})});sO.displayName=ly;var Th="SelectItemText",iO=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:i,...a}=e,o=Lc(Th,n),l=zc(Th,n),c=rO(Th,n),d=Cde(Th,n),[u,p]=g.useState(null),m=Mn(t,j=>p(j),c.onItemTextChange,j=>{var k;return(k=l.itemTextRefCallback)==null?void 0:k.call(l,j,c.value,c.disabled)}),x=u==null?void 0:u.textContent,w=g.useMemo(()=>r.jsx("option",{value:c.value,disabled:c.disabled,children:x},c.value),[c.disabled,c.value,x]),{onNativeOptionAdd:y,onNativeOptionRemove:v}=d;return Is(()=>(y(w),()=>v(w)),[y,v,w]),r.jsxs(r.Fragment,{children:[r.jsx(kn.span,{id:c.textId,...a,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ka.createPortal(a.children,o.valueNode):null]})});iO.displayName=Th;var aO="SelectItemIndicator",oO=g.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return rO(aO,n).isSelected?r.jsx(kn.span,{"aria-hidden":!0,...s,ref:t}):null});oO.displayName=aO;var xj="SelectScrollUpButton",lO=g.forwardRef((e,t)=>{const n=zc(xj,e.__scopeSelect),s=Ok(xj,e.__scopeSelect),[i,a]=g.useState(!1),o=Mn(t,s.onScrollButtonChange);return Is(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollTop>0;a(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?r.jsx(dO,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});lO.displayName=xj;var yj="SelectScrollDownButton",cO=g.forwardRef((e,t)=>{const n=zc(yj,e.__scopeSelect),s=Ok(yj,e.__scopeSelect),[i,a]=g.useState(!1),o=Mn(t,s.onScrollButtonChange);return Is(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<d;a(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?r.jsx(dO,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});cO.displayName=yj;var dO=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...i}=e,a=zc("SelectScrollButton",n),o=g.useRef(null),l=v1(n),c=g.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),Is(()=>{var u;const d=l().find(p=>p.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[l]),r.jsx(kn.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:$t(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(s,50))}),onPointerMove:$t(i.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),o.current===null&&(o.current=window.setInterval(s,50))}),onPointerLeave:$t(i.onPointerLeave,()=>{c()})})}),Mde="SelectSeparator",uO=g.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return r.jsx(kn.div,{"aria-hidden":!0,...s,ref:t})});uO.displayName=Mde;var vj="SelectArrow",Lde=g.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=b1(n),a=Lc(vj,n),o=zc(vj,n);return a.open&&o.position==="popper"?r.jsx(RB,{...i,...s,ref:t}):null});Lde.displayName=vj;var zde="SelectBubbleInput",fO=g.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const i=g.useRef(null),a=Mn(s,i),o=Dce(t);return g.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&u){const p=new Event("change",{bubbles:!0});u.call(l,t),l.dispatchEvent(p)}},[o,t]),r.jsx(kn.select,{...n,style:{...DB,...n.style},ref:a,defaultValue:t})});fO.displayName=zde;function pO(e){return e===""||e===void 0}function hO(e){const t=Eo(e),n=g.useRef(""),s=g.useRef(0),i=g.useCallback(o=>{const l=n.current+o;t(l),(function c(d){n.current=d,window.clearTimeout(s.current),d!==""&&(s.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),a=g.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,i,a]}function mO(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=Wde(e,Math.max(a,0));i.length===1&&(o=o.filter(d=>d!==n));const c=o.find(d=>d.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function Wde(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var $de=$B,gO=VB,Ude=qB,Vde=GB,Hde=KB,xO=YB,qde=ZB,yO=nO,vO=sO,Gde=iO,Kde=oO,bO=lO,wO=cO,jO=uO;const cf=$de,df=Ude,_d=g.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(gO,{ref:s,className:pn("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,r.jsx(Vde,{asChild:!0,children:r.jsx(ar,{className:"h-4 w-4 opacity-50"})})]}));_d.displayName=gO.displayName;const SO=g.forwardRef(({className:e,...t},n)=>r.jsx(bO,{ref:n,className:pn("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Dc,{className:"h-4 w-4"})}));SO.displayName=bO.displayName;const kO=g.forwardRef(({className:e,...t},n)=>r.jsx(wO,{ref:n,className:pn("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(ar,{className:"h-4 w-4"})}));kO.displayName=wO.displayName;const Cd=g.forwardRef(({className:e,children:t,position:n="popper",...s},i)=>r.jsx(Hde,{children:r.jsxs(xO,{ref:i,className:pn("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]:sli
794de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[r.jsx(SO,{}),r.jsx(qde,{className:pn("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(kO,{})]})}));Cd.displayName=xO.displayName;const Yde=g.forwardRef(({className:e,...t},n)=>r.jsx(yO,{ref:n,className:pn("px-2 py-1.5 text-sm font-semibold",e),...t}));Yde.displayName=yO.displayName;const ol=g.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(vO,{ref:s,className:pn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(Kde,{children:r.jsx(fn,{className:"h-4 w-4"})})}),r.jsx(Gde,{children:t})]}));ol.displayName=vO.displayName;const Xde=g.forwardRef(({className:e,...t},n)=>r.jsx(jO,{ref:n,className:pn("-mx-1 my-1 h-px bg-muted",e),...t}));Xde.displayName=jO.displayName;const Jde={owner:"Proprietário",workspace_admin:"Administrador",billing_admin:"Admin Financeiro",member:"Membro"},Qde={ats_admin:"Admin ATS",recruiter:"Recrutador",hiring_manager:"Gestor",viewer:"Visualizador",sourcer:"Sourcer",assessments_admin:"Admin de Avaliações",assessor:"Avaliador",talent_bank_admin:"Admin Talent"},Zde=["ats","jobs","assessments"],eue={ats:"ATS",jobs:"Jobs",assessments:"Assessments"};function _O({member:e={},user:t=null,moduleAccess:n=[],subscriptions:s=[],filterProductKey:i=null,showEditButton:a=!1,onEdit:o,showRemoveButton:l=!1,onRemove:c}){const d=(e==null?void 0:e.user_email)||"",u=(e==null?void 0:e.full_name)||(t==null?void 0:t.full_name)||(t==null?void 0:t.name)||d,p=(e==null?void 0:e.job_title)||(t==null?void 0:t.job_title)||(t==null?void 0:t.title)||"",m=(t==null?void 0:t.photo_url)||(t==null?void 0:t.avatar_url)||(e==null?void 0:e.photo_url)||"",x=(u||d||"  ").slice(0,2).toUpperCase(),w=(e==null?void 0:e.global_role)||"member",y=(e==null?void 0:e.status)||"active",v=n.filter(A=>A.user_email===d&&A.status==="active"),j=i?v.filter(A=>A.product_key===i):v,k=[...new Map(j.map(A=>[A.module_role,A])).values()],S=!i,F=(i?[i]:Zde).filter(A=>{const C=v.some(P=>P.product_key===A),D=s.some(P=>P.product_key===A&&["active","trial","past_due"].includes(P.status)&&P.seats_purchased>0);return C&&D});return r.jsxs("div",{style:{padding:"12px 14px",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flex:1,minWidth:0},children:[m?r.jsx("img",{src:m,alt:u,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):r.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:"#7F77DD",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:14,flexShrink:0},children:x}),r.jsxs("div",{style:{minWidth:0,flex:1},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",marginBottom:3},children:[r.jsx("span",{style:{fontSize:13.5,fontWeight:600,color:"#1A1F36"},children:u}),S&&r.jsx("span",{style:{fontSize:10.5,padding:"2px 8px",borderRadius:999,background:"#EEEDFE",color:"#3C3489",fontWeight:500},children:Jde[w]||w}),k.map(A=>r.jsx("span",{style:{fontSize:10.5,padding:"2px 8px",borderRadius:999,background:"#F1F5F9",color:"#475569",fontWeight:500},children:Qde[A.module_role]||A.module_role},A.id||A.module_role))]}),p&&r.jsx("div",{style:{fontSize:12,color:"#697386",lineHeight:1.3},children:p}),r.jsx("div",{style:{fontSize:12,color:"#697386",lineHeight:1.3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d})]})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[F.map(A=>r.jsxs("span",{style:{fontSize:10.5,padding:"3px 8px",borderRadius:4,background:"#F9F7FF",color:"#6C24F5",fontWeight:500,whiteSpace:"nowrap"},children:["1 seat ",eue[A]||A]},A)),r.jsx("span",{style:{fontSize:11,padding:"3px 10px",borderRadius:999,background:y==="active"?"#ECFDF5":"#FEF3C7",color:y==="active"?"#065F46":"#92400E",fontWeight:500},children:y==="active"?"Ativo":"Convidado"}),a&&o&&r.jsx("button",{type:"button",onClick:()=>
794o(e),style:{background:"none",border:"none",color:"#A3ACB9",cursor:"pointer",padding:4,borderRadius:4},"aria-label":"Editar membro",children:r.jsx(m8,{size:16})}),l&&c&&r.jsx("button",{type:"button",onClick:()=>c(e),style:{background:"none",border:"none",color:"#A3ACB9",cursor:"pointer",padding:4,borderRadius:4},"aria-label":"Remover membro",children:r.jsx(zn,{size:16})})]})]})}const tue=kt.team.roles,nue=["workspace_admin","member"],J3=()=>Object.entries(tue).filter(([e])=>nue.includes(e)),Q3=kt.team.moduleRoles,Z3=["ats","jobs","assessments"],rue={ats:"Summit ATS",jobs:"Summit Jobs",assessments:"Summit Assessments"},sue={ats:["recruiter","ats_admin","hiring_manager","viewer","sourcer"],assessments:["assessor","assessments_admin","hiring_manager","viewer"],jobs:["viewer"],talent_bank:["talent_bank_admin"]},iue={ats:"Summit ATS",jobs:"Summit Jobs",assessments:"Summit Assessments",talent_bank:"Summit Talent"};function aue(){var O;const{toast:e}=Wm(),[t,n]=g.useState([]),[s,i]=g.useState([]),[a,o]=g.useState([]),[l,c]=g.useState(!0),[d,u]=g.useState(!1),[p,m]=g.useState({name:"",email:"",globalRole:"member",moduleRole:"viewer"}),[x,w]=g.useState(!1),[y,v]=g.useState(null),[j,k]=g.useState(null),[S,_]=g.useState({global_role:"",module_role:"",user_email:"",invited_name:""}),[F,A]=g.useState(!1),[C,D]=g.useState(null),[P,L]=g.useState(null),[T,R]=g.useState({}),U=(O=t.find(G=>{var M,z;return((M=G.user_email)==null?void 0:M.toLowerCase())===((z=C==null?void 0:C.email)==null?void 0:z.toLowerCase())}))==null?void 0:O.global_role,I=U==="owner"||U==="workspace_admin";g.useEffect(()=>{H()},[]);const H=async()=>{var ie,ae,re,pe,Z,Ne,te;const G=await ne.auth.me(),M=await ne.functions.invoke("getWorkspaceId",{user_email:G.email}),z=((ie=M==null?void 0:M.data)==null?void 0:ie.workspace_id)||(M==null?void 0:M.workspace_id);L(z);const K=z?await ne.functions.invoke("getWorkspaceMembers",{workspace_id:z}):{data:{members:[]}},Y=((ae=K==null?void 0:K.data)==null?void 0:ae.members)||(K==null?void 0:K.members)||[],J=z?await ne.entities.UserModuleAccess.filter({workspace_id:z}):[],Q=z?await ne.entities.WorkspaceSubscription.filter({workspace_id:z}):[];n(Y),i(J),o(Q),D(G);try{const xe=await ne.functions.invoke("getWorkspaceUsers",{workspace_id:z}),he=((re=xe==null?void 0:xe.data)==null?void 0:re.users)||(xe==null?void 0:xe.users)||{};G!=null&&G.email&&(he[G.email]={name:G.name||G.full_name||((pe=he[G.email])==null?void 0:pe.name)||null,full_name:G.full_name||G.name||((Z=he[G.email])==null?void 0:Z.full_name)||null,photo_url:G.photo_url||((Ne=he[G.email])==null?void 0:Ne.photo_url)||null,job_title:G.job_title||((te=he[G.email])==null?void 0:te.job_title)||null}),R(he)}catch{}c(!1)},V=async G=>{try{await ne.functions.invoke("removeWorkspaceMember",{membership_id:G.id,workspace_id:P})}catch{}v(null),H()},X=async()=>{var z;if(w(!0),t.find(K=>K.user_email===p.email)){e({title:"Membro já existe",description:`${p.email} já é membro deste workspace.`,variant:"destructive"}),w(!1);return}let M=null;try{const K=await ne.functions.invoke("inviteWorkspaceMember",{email:p.email,full_name:p.name,global_role:p.globalRole,product_key:"assessments",module_role:p.moduleRole});M=K==null?void 0:K.data}catch(K){M=((z=K==null?void 0:K.response)==null?void 0:z.data)||{error:K==null?void 0:K.message}}if((M==null?void 0:M.success)!==!0){e({title:"Erro ao convidar",description:(M==null?void 0:M.error)||"Não foi possível enviar o convite.",variant:"destructive"}),w(!1);return}e({title:kt.team.inviteSent,description:`Convite enviado para ${p.email}. Se o e-mail estiver errado, apague este convite na lista de membros e envie um novo com o e-mail correto.`}),m({name:"",email:"",globalRole:"member",moduleRole:"viewer"}),u(!1),w(!1),H()},N=G=>{var Y;const M=s.filter(J=>J.user_email===G.user_email&&J.status==="active"),z={};M.forEach(J=>{z[J.product_key]=J.module_role});const K=((Y=T[G.user_email])==null?void 0:Y.name)||"";_({global_role:G.global_role,module_roles:z,user_email:G.user_email,invited_name:K}),k(G)},W=async()=>{if(!j)return;A(!0);const G=await ne.functions.invoke("updateMemberRole",{membership_id:j.id,global_role:S.global_role}),M=(G==null?void 0:G.data)||G;if(M!=null&&M.error||(M==null?void 0:M.success)===!1){e({title:"Erro ao salvar",description:(M==null?void 0:M.error)||"Não foi possível alterar o papel.",variant:"destructive"}),A(!1);return}const z=s.filter(Y=>Y.user_email===j.user_email&&Y.status==="active"),K=S.module_roles||{};
794for(const Y of Object.keys(K)){const J=z.find(ie=>ie.product_key===Y);if(!J)continue;const Q={module_role:K[Y]};await ne.entities.UserModuleAccess.update(J.id,Q)}k(null),A(!1),H()};return l?r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):r.jsxs(Jr.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:[r.jsxs("div",{className:"flex items-center justify-between mb-8",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:kt.team.title}),r.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:kt.team.subtitle})]}),r.jsxs(on,{onClick:()=>u(!d),className:"font-medium",children:[r.jsx(Ln,{className:"w-4 h-4 mr-2"}),kt.team.inviteMember]})]}),d&&r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6 mb-6 space-y-4",children:[r.jsx("h3",{className:"font-semibold",children:kt.team.inviteTitle}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[r.jsx(Xr,{placeholder:"Nome do convidado",value:p.name,onChange:G=>m({...p,name:G.target.value}),className:"h-10"}),r.jsxs("div",{children:[r.jsx(Xr,{placeholder:kt.team.emailPlaceholder,value:p.email,onChange:G=>m({...p,email:G.target.value}),className:"h-10"}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1.5",children:"Confira o e-mail antes de enviar. Depois de enviado, o convite não pode ter o e-mail alterado. Se precisar corrigir, apague este convite na lista de membros e envie um novo com o e-mail correto."})]}),r.jsxs(cf,{value:p.globalRole,onValueChange:G=>m({...p,globalRole:G}),children:[r.jsx(_d,{className:"h-10",children:r.jsx(df,{})}),r.jsx(Cd,{children:J3().map(([G,M])=>r.jsx(ol,{value:G,children:M},G))})]}),r.jsxs(cf,{value:p.moduleRole,onValueChange:G=>m({...p,moduleRole:G}),children:[r.jsx(_d,{className:"h-10",children:r.jsx(df,{})}),r.jsx(Cd,{children:Object.entries(Q3).map(([G,M])=>r.jsx(ol,{value:G,children:M},G))})]}),r.jsx(on,{onClick:X,disabled:!p.email||x,className:"font-medium",children:x?kt.team.sending:kt.team.sendInvite})]})]}),a.filter(G=>Z3.includes(G.product_key)&&["active","trial","past_due"].includes(G.status)&&G.seats_purchased>0).length>0&&r.jsxs("div",{className:"bg-card rounded-xl border border-border p-5 mb-4",children:[r.jsx("div",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium mb-3",children:"Assentos por módulo"}),a.filter(G=>Z3.includes(G.product_key)&&["active","trial","past_due"].includes(G.status)&&G.seats_purchased>0).map(G=>{const M=s.filter(K=>K.product_key===G.product_key&&K.status==="active").length,z=G.seats_purchased>0?Math.min(M/G.seats_purchased*100,100):0;return r.jsxs("div",{className:"mb-3 last:mb-0",children:[r.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[r.jsx("span",{className:"text-sm font-medium",children:rue[G.product_key]||G.product_key}),r.jsx("span",{className:"text-sm text-muted-foreground",children:r.jsxs("span",{className:"text-foreground font-medium",children:[M," de ",G.seats_purchased]})})]}),r.jsx("div",{className:"h-1.5 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full",style:{width:z+"%",background:"#6C24F5"}})})]},G.id)})]}),r.jsxs("div",{className:"bg-card rounded-xl border border-border overflow-hidden",children:[r.jsx("div",{className:"px-6 py-4 border-b border-border",children:r.jsxs("h3",{className:"font-semibold",children:[kt.team.members," (",t.length,")"]})}),t.length===0?r.jsxs("div",{className:"px-6 py-12 text-center",children:[r.jsx(Nr,{className:"w-10 h-10 text-muted-foreground mx-auto mb-3"}),r.jsx("p",{className:"text-muted-foreground text-sm",children:kt.team.noMembers})]}):r.jsx("div",{className:"divide-y divide-border",children:t.map(G=>{const M=G.user_email===(C==null?void 0:C.email);return r.jsx(_O,{member:G,user:T[G.user_email],moduleAccess:s,subscriptions:a,showEditButton:!0,onEdit:N,showRemoveButton:!M,onRemove:v},G.id)})})]}),y&&r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:()=>v(null),children:r.jsxs("div",{className:"bg-card rounded-xl border border-border shadow-xl p-6 w-full max-w-md",onClick:G=>G.stopPropagation(),children:[r.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Remover membro"}),r.jsxs("p",{className:"text-sm text-muted-foreground mb-6",children:["Tem certeza que deseja remover ",r.jsx("strong",{children:y.user_email})," do workspace? Esta ação não pode ser desfeita."]}),r.jsxs("div",{className:"flex justify-end gap-2",children:[r.jsx(on,{variant:"outline",size:"sm",onClick:()=>v(null),children:"Cancelar"}),r.jsx(on,{size:"sm",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>V(y),children:"Remover"})]})]})}),j&&r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:()=>k(null),children:r.jsxs("div",{className:"bg-card rounded-xl border border-border shadow-xl p-6 w-full max-w-md",onClick:G=>G.stopPropagation(),children:[r.jsx("h2",{className:"text-lg font-semibold mb-1",children:"Editar membro"}),r.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:j.user_email}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Papel global"}),r.jsxs(cf,{value:S.global_role,onValueChange:G=>_(M=>({...M,global_role:G})),children:[r.jsx(_d,{className:"h-10",children:r.jsx(df,{})}),r.jsx(Cd,{children:J3().map(([G,M])=>r.jsx(ol,{value:G,children:M},G))})]})]}),Object.keys(S.module_roles||{}).map(G=>r.jsxs("div",{children:[r.jsxs("label",{className:"text-sm font-medium block mb-1.5",children:["Papel em ",iue[G]||G]}),r.jsxs(cf,{value:S.module_roles[G],onValueChange:M=>_(z=>({...z,module_roles:{...z.module_roles,[G]:M}})),children:[r.jsx(_d,{className:"h-10",children:r.jsx(df,{})}),r.jsx(Cd,{children:(sue[G]||[]).map(M=>r.jsx(ol,{value:M,children:Q3[M]||M},M))})]})]},G)),j.status==="invited"&&r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Nome do convidado"}),r.jsx(Xr,{value:S.invited_name,onChange:G=>_(M=>({...M,invited_name:G.target.value})),placeholder:"Nome completo",className:"h-10"})]})]}),r.jsxs("div",{className:"flex justify-between items-center mt-6",children:[r.jsx("div",{children:j.status==="invited"&&I&&r.jsx(on,{variant:"outline",size:"sm",onClick:async()=>{var G,M,z,K,Y;try{const J=await ne.functions.invoke("sendTeamInvite",{invited_email:j.user_email,invited_name:S.invited_name||j.user_email,workspace_id:P,role:S.global_role}),Q=(J==null?void 0:J.data)??J;if((Q==null?void 0:Q.success)===!1||(Q==null?void 0:Q.status)==="error")throw{message:(Q==null?void 0:Q.error)||(Q==null?void 0:Q.message)};e({title:"Convite reenviado",description:`Email reenviado para ${j.user_email}.`})}catch(J){const ie=((J==null?void 0:J.status)||((G=J==null?void 0:J.response)==null?void 0:G.status))===403?"Apenas o dono ou administradores do workspace podem reenviar convites.":((z=(M=J==null?void 0:J.response)==null?void 0:M.data)==null?void 0:z.error)||((Y=(K=J==null?void 0:J.response)==null?void 0:K.data)==null?void 0:Y.message)||(J==null?void 0:J.message)||"Não foi possível reenviar o convite.";e({title:"Erro ao reenviar",description:ie,variant:"destructive"})}},children:"Reenviar convite"})}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(on,{variant:"outline",size:"sm",onClick:()=>k(null),children:"Cancelar"}),r.jsx(on,{size:"sm",disabled:F,onClick:W,children:F?"Salvando...":"Salvar"})]})]})]})})]})}
794const oue={jobs:"Summit Jobs",assessments:"Summit Assessments",ats:"Summit ATS",talent_bank:"Summit Talent"};function lue(e){return oue[e]||e}function cue({tier:e}){const t=(e||"").toLowerCase();return t==="starter"?r.jsx("span",{style:{fontSize:11.5,fontWeight:600,letterSpacing:"0.02em",padding:"3px 10px",borderRadius:4,background:"linear-gradient(135deg, #EEF0FF 0%, #E8ECFF 100%)",color:"#4F46E5",border:"1px solid rgba(79,70,229,0.15)"},children:"Starter"}):t==="growth"?r.jsx("span",{style:{fontSize:11.5,fontWeight:600,letterSpacing:"0.03em",padding:"3px 10px",borderRadius:4,background:"#0F172A",color:"#94A3FF",border:"none"},children:"Growth"}):t==="enterprise"?r.jsx("span",{style:{fontSize:11.5,fontWeight:600,letterSpacing:"0.02em",padding:"3px 10px",borderRadius:4,background:"#0F172A",color:"#FCD34D",border:"none"},children:"Enterprise"}):r.jsx("span",{style:{fontSize:11.5,fontWeight:600,letterSpacing:"0.02em",padding:"3px 10px",borderRadius:4,background:"#FFFFFF",color:"#0F172A",border:"1px solid #C4CAD4",boxShadow:"0 1px 2px rgba(0,0,0,0.06)"},children:"Gratuito"})}function w2({icon:e,label:t,onClick:n}){return r.jsxs("button",{onClick:n,style:{flex:1,padding:"8px 0",fontSize:12.5,fontWeight:500,color:"#1A1F36",background:"#FFFFFF",border:"1px solid #D8DEE4",borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center",gap:6,cursor:"pointer",fontFamily:"'Switzer', sans-serif",transition:"background 0.15s"},onMouseEnter:s=>{s.currentTarget.style.background="#F6F8FA"},onMouseLeave:s=>{s.currentTarget.style.background="#FFFFFF"},children:[r.jsx(e,{size:14,strokeWidth:1.5}),t]})}function due({icon:e,name:t,tier:n,hasCredits:s,creditsBar:i,cycle:a,renewDate:o,statusActive:l,onChangePlan:c,onBuyCredits:d,onManage:u,seatsInfo:p,productKey:m,onAddSeat:x,userMap:w={},moduleAccess:y=[],subscriptions:v=[],canManageBilling:j=!1,noPermissionMessage:k}){const[S,_]=g.useState(!1);return r.jsxs("div",{style:{background:"#FFFFFF",border:"1px solid #E3E8EE",borderRadius:12,marginBottom:8,overflow:"hidden"},children:[r.jsxs("button",{onClick:()=>_(F=>!F),style:{width:"100%",padding:"14px 20px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",background:"none",border:"none",fontFamily:"'Switzer', sans-serif"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[r.jsx(e,{size:18,strokeWidth:1.5,style:{color:"#6C24F5",flexShrink:0}}),r.jsx("span",{style:{fontSize:14,fontWeight:500,color:"#1A1F36"},children:t}),r.jsx(cue,{tier:n})]}),r.jsx(ar,{size:16,style:{color:"#A3ACB9",flexShrink:0,transition:"transform 0.2s ease",transform:S?"rotate(180deg)":"rotate(0deg)"}})]}),r.jsx("div",{style:{maxHeight:S?2e3:0,overflow:"hidden",transition:"max-height 0.3s ease"},children:r.jsxs("div",{style:{borderTop:"1px solid #E3E8EE",padding:"16px 20px 20px"},children:[s&&i&&r.jsx("div",{style:{marginBottom:16},children:i}),p&&r.jsxs("div",{style:{marginBottom:16},children:[r.jsxs("div",{style:{background:"#F9F7FF",border:"1px solid #E8E4FF",borderRadius:8,padding:"12px 14px",marginBottom:10},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[r.jsx("span",{style:{fontSize:12,color:"#6C24F5",fontWeight:500},children:"Assentos do módulo"}),r.jsxs("span",{style:{fontSize:12.5,color:"#1A1F36",fontFamily:"'Geist', monospace"},children:[r.jsx("strong",{style:{fontWeight:500},children:p.used})," de ",r.jsx("strong",{style:{fontWeight:500},children:p.purchased})," usados"]})]}),r.jsx("div",{style:{height:5,background:"#E3E8EE",borderRadius:999,overflow:"hidden"},children:r.jsx("div",{style:{width:(p.purchased>0?Math.min(p.used/p.purchased*100,100):0)+"%",height:"100%",background:"#6C24F5"}})})]}),r.jsxs("div",{style:{border:"1px solid #E3E8EE",borderRadius:8,overflow:"hidden"},children:[r.jsx("div",{style:{padding:"8px 14px",background:"#FAFBFC",borderBottom:"1px solid #E3E8EE"},children:r.jsx("span",{style:{fontSize:11,color:"#A3ACB9",letterSpacing:"0.04em",textTransform:"uppercase",fontWeight:500},children:"Membros alocados"})}),p.allocatedMembers.map((F,A)=>r.jsx("div",{style:{borderTop:A>0?"1px solid #E3E8EE":"none"},children:r.jsx(_O,{member:F,user:w[F.user_email],moduleAccess:y,subscriptions:v,filterProductKey:m})},F.user_email)),Array.from({length:Math.max(0,p.purchased-p.used)}).map((F,A)=>r.jsxs("button",{type:"button",onClick:()=>x&&x(m),disabled:!x,style:{padding:"10px 14px",display:"flex",alignItems:"center",gap:10,borderTop:p.allocatedMembers.length>0||A>0?"1px solid #E3E8EE":"none",borderLeft:"none",borderRight:"none",borderBottom:"none",background:"transparent",width:"100%",textAlign:"left",cursor:x?"pointer":"default",color:"#697386",transition:"background 120ms ease"},onMouseEnter:C=>{x&&(C.currentTarget.style.background="#F9F7FF")},onMouseLeave:C=>{C.currentTarget.style.background="transparent"},children:[r.jsx("div",{style:{width:32,height:32,borderRadius:"50%",border:"1.5px dashed #A3ACB9",display:"flex",alignItems:"center",justifyContent:"center",fontSize:16,color:"#A3A
794CB9",flexShrink:0},children:"+"}),r.jsx("div",{style:{fontSize:12.5,color:"#697386"},children:"Adicionar membro neste assento"})]},"empty-"+A))]})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:16,borderTop:s?"1px solid #E3E8EE":"none",paddingTop:s?16:0},children:[r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em",color:"#A3ACB9",marginBottom:4,fontFamily:"'Switzer', sans-serif"},children:"CICLO"}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36",fontFamily:"'Switzer', sans-serif"},children:a||"N/A"})]}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em",color:"#A3ACB9",marginBottom:4,fontFamily:"'Switzer', sans-serif"},children:"RENOVA EM"}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36",fontFamily:"'Switzer', sans-serif"},children:o||"—"})]}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em",color:"#A3ACB9",marginBottom:4,fontFamily:"'Switzer', sans-serif"},children:"STATUS"}),r.jsx("div",{style:{fontSize:13,fontWeight:500,color:l?"#1EA672":"#697386",fontFamily:"'Switzer', sans-serif"},children:l?"Módulo ativo":"Inativo"})]})]}),r.jsx("div",{style:{borderTop:"1px solid #E3E8EE",paddingTop:16,marginTop:20,display:"flex",gap:8},children:j?r.jsxs(r.Fragment,{children:[r.jsx(w2,{icon:vU,label:"Alterar plano",onClick:c}),s&&r.jsx(w2,{icon:Ln,label:"Adquirir créditos",onClick:d}),r.jsx(w2,{icon:Gf,label:"Gerenciar assinatura",onClick:u})]}):r.jsx("p",{style:{margin:0,fontSize:12.5,color:"#697386"},children:k})})]})})]})}const uue={"Summit ATS":[{key:"starter",label:"Starter",price:349,unit:"/seat/mês"},{key:"growth",label:"Growth",price:549,unit:"/seat/mês"}],"Summit Assessments":[{key:"starter",label:"Starter",price:399,unit:"/mês"},{key:"growth",label:"Growth",price:799,unit:"/mês"}],"Summit Jobs":[{key:"starter",label:"Starter",price:149,unit:"/seat/mês"},{key:"growth",label:"Growth",price:399,unit:"/seat/mês"}]},eT={"Summit ATS":"ats","Summit Assessments":"assessments","Summit Jobs":"jobs"},fue=["ats","jobs"],pue=[{key:"starter",label:"Starter",price:349,unit:"/mês"},{key:"growth",label:"Growth",price:549,unit:"/mês"}],hue=[{key:"monthly",label:"Mensal",discount:null},{key:"annual",label:"Anual",discount:"2 meses grátis"}];function mue({moduleName:e,currentTier:t,workspaceId:n,onClose:s}){const[i,a]=g.useState(1),[o,l]=g.useState(t==="growth"?"growth":"starter"),[c,d]=g.useState("monthly"),[u,p]=g.useState(!1),[m,x]=g.useState(null),w=eT[e],y=fue.includes(w),v=uue[e]||pue,j=v.find(D=>D.key===o),k=(j==null?void 0:j.price)||0,S=c==="annual"?10/12:1,F=Math.round(k*(y?i:1)*S),A=y?`${j==null?void 0:j.label} × ${i} seat${i>1?"s":""} × ${c==="annual"?"Anual":"Mensal"}`:`${j==null?void 0:j.label} × ${c==="annual"?"Anual":"Mensal"}`,C=async()=>{var D,P;p(!0),x(null);try{const L=eT[e];if(!L){x("Módulo não suportado para assinatura."),p(!1);return}const T=await ne.functions.invoke("createCheckoutSession",{workspace_id:n,product_key:L,plan_name:o,cycle:c==="annual"?"yearly":"monthly",seats:i}),R=((D=T==null?void 0:T.data)==null?void 0:D.checkout_url)||(T==null?void 0:T.checkout_url);R?(window.top||window).location.href=R:x("Erro ao criar sessão de checkout.")}catch(L){console.error("Checkout error:",L);const T=((P=L==null?void 0:L.response)==null?void 0:P.status)??(L==null?void 0:L.status);x(T===403?"Fale com o dono ou o administrador de cobrança do workspace para alterar o plano.":L.message||"Erro ao processar. Tente novamente.")}p(!1)};return r.jsx("div",{onClick:s,style:{position:"fixed",inset:0,zIndex:9999,background:"rgba(0,0,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsxs("div",{onClick:D=>D.stopPropagation(),style:{background:"#FFFFFF",borderRadius:12,width:420,maxHeight:"90vh",overflowY:"auto",fontFamily:"'Switzer', sans-serif"},children:[r.jsxs("div",{style:{padding:"20px 24px 0",display:"flex",alignItems:"flex-start",justifyContent:"space-between"},children:[r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:16,fontWeight:500,color:"#1A1F36"},children:"Gerenciar assinatura"}),r.jsx("div",{style:{fontSize:13,color:"#697386",marginTop:2},children:e})]}),r.jsx("button",{onClick:s,style:{background:"none",border:"none",cursor:"pointer",color:"#A3A
794CB9",padding:4},children:r.jsx(Jt,{size:18})})]}),r.jsxs("div",{style:{padding:"20px 24px"},children:[y&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36",marginBottom:8},children:"Assentos (seats)"}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:0},children:[r.jsx("button",{onClick:()=>a(D=>Math.max(1,D-1)),style:{width:36,height:36,borderRadius:"6px 0 0 6px",border:"1px solid #D8DEE4",background:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"#1A1F36"},children:r.jsx(vH,{size:14})}),r.jsx("div",{style:{width:48,height:36,border:"1px solid #D8DEE4",borderLeft:"none",borderRight:"none",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:600,color:"#1A1F36",fontFamily:"'Geist', monospace"},children:i}),r.jsx("button",{onClick:()=>a(D=>D+1),style:{width:36,height:36,borderRadius:"0 6px 6px 0",border:"1px solid #D8DEE4",background:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"#1A1F36"},children:r.jsx(Ln,{size:14})})]}),r.jsx("div",{style:{fontSize:11.5,color:"#A3ACB9",marginTop:4},children:"usuários incluídos"})]}),r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36",marginBottom:8},children:"Plano"}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:v.map(D=>{const P=o===D.key;return r.jsxs("button",{onClick:()=>l(D.key),style:{padding:"12px 14px",borderRadius:8,textAlign:"left",border:P?"2px solid #6C24F5":"1px solid #E3E8EE",background:P?"#F9F7FF":"#FFFFFF",cursor:"pointer",fontFamily:"'Switzer', sans-serif"},children:[r.jsx("div",{style:{fontSize:13,fontWeight:600,color:"#1A1F36"},children:D.label}),r.jsxs("div",{style:{fontSize:12,color:"#697386",marginTop:2},children:["R$ ",D.price,D.unit]})]},D.key)})})]}),r.jsxs("div",{style:{marginBottom:20},children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36",marginBottom:8},children:"Ciclo de faturamento"}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:hue.map(D=>{const P=c===D.key;return r.jsxs("button",{onClick:()=>d(D.key),style:{padding:"12px 14px",borderRadius:8,textAlign:"left",border:P?"2px solid #6C24F5":"1px solid #E3E8EE",background:P?"#F9F7FF":"#FFFFFF",cursor:"pointer",fontFamily:"'Switzer', sans-serif",display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{fontSize:13,fontWeight:600,color:"#1A1F36"},children:D.label}),D.discount&&r.jsx("span",{style:{fontSize:10,fontWeight:700,color:"#065F46",background:"#D1FAE5",padding:"2px 6px",borderRadius:20},children:D.discount})]},D.key)})})]}),r.jsxs("div",{style:{background:"#F0F2F5",borderRadius:8,padding:"12px 14px"},children:[r.jsx("div",{style:{fontSize:12,color:"#697386"},children:A}),r.jsxs("div",{style:{fontSize:18,fontWeight:500,color:"#1A1F36",marginTop:4,fontFamily:"'Geist', monospace"},children:["Total mensal R$ ",F.toLocaleString("pt-BR")]})]})]}),m&&r.jsx("div",{style:{padding:"0 24px 12px"},children:r.jsx("div",{style:{fontSize:12,color:"#DC2626",background:"#FEF2F2",padding:"8px 12px",borderRadius:6},children:m})}),r.jsxs("div",{style:{padding:"0 24px 20px",display:"flex",gap:8},children:[r.jsx("button",{onClick:s,style:{flex:1,padding:"10px 0",fontSize:13,fontWeight:500,color:"#1A1F36",background:"#FFFFFF",border:"1px solid #D8DEE4",borderRadius:8,cursor:"pointer",fontFamily:"'Switzer', sans-serif"},children:"Cancelar"}),r.jsx("button",{onClick:C,disabled:u,style:{flex:1,padding:"10px 0",fontSize:13,fontWeight:600,color:"#FFFFFF",background:u?"#A78BFA":"#6C24F5",border:"none",borderRadius:8,cursor:u?"not-allowed":"pointer",fontFamily:"'Switzer', sans-serif",opacity:u?.7:1},children:u?"Processando...":"Assinar"})]})]})})}const gue=[{value:"member",label:"Membro"},{value:"workspace_admin",label:"Administrador"},{value:"billing_admin",label:"Admin Financeiro"}],tT=[{value:"ats",label:"Summit ATS"},{value:"assessments",label:"Summit Assessments"},{value:"jobs",label:"Summit Jobs"}],nT={ats:[{value:"recruiter",label:"Recrutador"},{value:"ats_admin",label:"Admin ATS"},{value:"hiring_manager",label:"Gestor"},{value:"viewer",label:"Visualizador"}],assessments:[{value:"assessor",label:"Avaliador"},{value:"assessments_admin",label:"Admin de Avaliações"},{value:"hiring_manager",label:"Gestor"},{value:"viewer",label:"Visualizador"}],jobs:[{value:"viewer",label:"Visualizador"}]},j2={ats:"recruiter",assessments:"assessor",jobs:"viewer"};
794function xue({isOpen:e,onClose:t,onInvited:n,defaultProductKey:s="ats",subscriptions:i=[],moduleAccess:a=[]}){var U;const[o,l]=g.useState(""),[c,d]=g.useState(""),[u,p]=g.useState(s),[m,x]=g.useState("member"),[w,y]=g.useState(j2[s]||"viewer"),[v,j]=g.useState(!1),[k,S]=g.useState("");if(g.useEffect(()=>{e&&(l(""),d(""),p(s),x("member"),y(j2[s]||"viewer"),S(""),j(!1))},[e,s]),g.useEffect(()=>{y(j2[u]||"viewer")},[u]),g.useEffect(()=>{if(!e)return;const I=H=>{H.key==="Escape"&&!v&&t()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[e,v,t]),!e)return null;const _=i.find(I=>I.product_key===u&&["active","trial","past_due"].includes(I.status)),F=_&&_.seats_purchased>0?_.seats_purchased:null,A=a.filter(I=>I.product_key===u&&I.status==="active").length,C=F!==null&&A>=F,D=A+1,P=nT[u]||nT.ats,L=((U=tT.find(I=>I.value===u))==null?void 0:U.label)||"ATS",T=c.trim().length>0&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c.trim())&&!v&&!C,R=async()=>{if(T){j(!0),S("");try{const I=await ne.functions.invoke("inviteWorkspaceMember",{email:c.trim(),full_name:o.trim(),global_role:m,product_key:u,module_role:w}),H=(I==null?void 0:I.data)||I;if(!(H!=null&&H.success)){S((H==null?void 0:H.error)||"Erro ao enviar convite"),j(!1);return}n==null||n(),t()}catch(I){S((I==null?void 0:I.message)||"Erro ao enviar convite"),j(!1)}}};return r.jsx("div",{onClick:()=>!v&&t(),style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.5)",zIndex:1600,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:I=>I.stopPropagation(),className:"bg-white rounded-xl shadow-2xl max-w-md w-full p-6",children:[r.jsxs("div",{className:"flex items-start justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Convidar membro"}),r.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Envie um convite para acessar o ",L,"."]})]}),r.jsx("button",{onClick:t,disabled:v,className:"p-1 rounded hover:bg-gray-100 text-gray-500 disabled:opacity-50",children:r.jsx(Jt,{size:18})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Nome"}),r.jsx("input",{type:"text",value:o,onChange:I=>l(I.target.value),placeholder:"Ex: Renata Blak",className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none",autoFocus:!0})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:["Email ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"email",value:c,onChange:I=>d(I.target.value),placeholder:"[email protected]",className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Módulo"}),r.jsx("select",{value:u,onChange:I=>p(I.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none bg-white",children:tT.map(I=>r.jsx("option",{value:I.value,children:I.label},I.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Função no workspace"}),r.jsx("select",{value:m,onChange:I=>x(I.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none bg-white",children:gue.map(I=>r.jsx("option",{value:I.value,children:I.label},I.value))})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:["Função no ",L]}),r.jsx("select",{value:w,onChange:I=>y(I.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none bg-white",children:P.map(I=>r.jsx("option",{value:I.value,children:I.label},I.value))})]}),F!==null&&r.jsx("div",{className:"text-xs rounded px-3 py-2",style:{background:C?"#FEF2F2":"#F9F7FF",border:C?"1px solid #FCA5A5":"1px solid #E8E4FF",color:C?"#991B1B":"#1A1F36"},children:C?"Sem assentos disponíveis. Aumente os assentos ou revogue acessos antes de convidar.":r.jsxs(r.Fragment,{children:["Após este convite: ",r.jsx("strong",{style:{fontWeight:500},children:D})," de ",r.jsx("strong",{style:{fontWeight:500},children:F})," assentos ocupados."]})}),k&&r.jsx("div",{className:"text-xs text-red-600 bg-red-50 border border-red-100 rounded px-3 py-2",children:k}),r.jsxs("div",{className:"flex justify-end gap-2 pt-3 border-t border-gray-100",children:[r.jsx("button",{onClick:t,disabled:v,className:"text-sm px-4 py-2 text-gray-600 hover:text-gray-900 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{onClick:R,disabled:!T,className:"text-sm px-4 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed flex items-center gap-2",children:[v&&r.jsx(rt,{size:13,className:"animate-spin"}),"Enviar convite"]})]})]})]})})}const yue={monthly:"Mensal",yearly:"Anual",annual:"Anual"},vue={subscription_created:"Assinatura criada",subscription_renewed:"Renovação de assinatura",subscription_cancelled:"Assinatura cancelada",payment_succeeded:"Pagamento confirmado",payment_failed:"Falha no pagamento",trial_started:"Período gratuito iniciado",trial_ended:"Período gratuito encerrado",seats_changed:"Assentos alterados",plan_changed:"Plano alterado",addon_purchased:"Add-on adquirido",subscription_started:"Assinatura criada",renewal:"Renovação de assinatura"},bue=e=>{var t;return vue[e]||((t=kt.billing.eventTypes)==null?void 0:t[e])||e.replace(/_/g," ")};function wue({used:e,planCredits:t,addonCredits:n}){const s=(t||0)+(n||0),i=s>0?Math.min(e/s*100,100):0,a=i>
794=90?"bg-red-500":i>=70?"bg-amber-500":"bg-primary";return r.jsxs("div",{children:[r.jsxs("div",{className:"flex justify-between text-sm mb-1.5",children:[r.jsx("span",{className:"text-muted-foreground",children:"Créditos disponíveis"}),r.jsxs("span",{className:"font-medium",children:[e||0," / ",s," usados"]})]}),r.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:`h-full rounded-full transition-all ${a}`,style:{width:`${i}%`}})})]})}const jue=[{key:"assessments",name:"Summit Assessments",icon:za,hasCredits:!0},{key:"jobs",name:"Summit Jobs",icon:On,hasCredits:!0},{key:"ats",name:"Summit ATS",icon:a8,hasCredits:!1},{key:"talent_bank",name:"Summit Talent",icon:Nr,hasCredits:!1}],Sue=["ats","jobs","assessments"],kue=["owner","billing_admin","workspace_admin"],rT="Fale com o dono ou o administrador de cobrança do workspace para alterar o plano.",_ue=e=>{var t;return(((t=e==null?void 0:e.response)==null?void 0:t.status)??(e==null?void 0:e.status))===403};function Cue(){var ae;const[e,t]=g.useState([]),[n,s]=g.useState([]),[i,a]=g.useState([]),[o,l]=g.useState(!0),[c,d]=g.useState({plan_credits:30,addon_credits:0,credits_used:0}),[u,p]=g.useState(null),[m,x]=g.useState(null),[w,y]=g.useState(!1),[v,j]=g.useState(!1),[k,S]=g.useState(0),[_,F]=g.useState(!1),[A,C]=g.useState([]),[D,P]=g.useState([]),[L,T]=g.useState({}),[R,U]=g.useState(null),[I,H]=g.useState(null),[V,X]=g.useState(null),[N,W]=g.useState(null);In(),g.useEffect(()=>{(async()=>{var ze,at,Nt,_e,be,Re,Xe;const pe=await ne.auth.me(),Z=await ne.functions.invoke("getWorkspaceId",{user_email:pe.email}),Ne=((ze=Z==null?void 0:Z.data)==null?void 0:ze.workspace_id)||(Z==null?void 0:Z.workspace_id);if(p(Ne),X(pe),!Ne){l(!1);return}const[te,xe,he,le,ge,$e]=await Promise.all([ne.entities.WorkspaceSubscription.filter({workspace_id:Ne}),ne.entities.WorkspaceEntitlement.filter({workspace_id:Ne}),ne.entities.BillingEvent.filter({workspace_id:Ne}),ne.functions.invoke("getWorkspaceMembers",{workspace_id:Ne}),ne.entities.WorkspaceCredits.filter({workspace_id:Ne,product_key:"assessments"}),ne.entities.UserModuleAccess.filter({workspace_id:Ne})]),ft=((at=le==null?void 0:le.data)==null?void 0:at.members)||(le==null?void 0:le.members)||[];t(te),s(xe),C($e),P(ft);try{const He=await ne.functions.invoke("getWorkspaceUsers",{workspace_id:Ne}),St=((Nt=He==null?void 0:He.data)==null?void 0:Nt.users)||(He==null?void 0:He.users)||{};try{const Ct=await ne.auth.me();Ct!=null&&Ct.email&&(St[Ct.email]={name:Ct.name||Ct.full_name||((_e=St[Ct.email])==null?void 0:_e.name)||null,full_name:Ct.full_name||Ct.name||((be=St[Ct.email])==null?void 0:be.full_name)||null,photo_url:Ct.photo_url||((Re=St[Ct.email])==null?void 0:Re.photo_url)||null,job_title:Ct.job_title||((Xe=St[Ct.email])==null?void 0:Xe.job_title)||null})}catch{}T(St)}catch(He){console.error("Failed to load users:",He)}a(he.filter(He=>!["trial_started","trial_ended"].includes(He.event_type)));const Qe=ft.filter(He=>He.status==="active").length;S(Qe);const Ve=ge[0]||{plan_credits:30,addon_credits:0,credits_used:0};sessionStorage.setItem("workspaceCredits",JSON.stringify(Ve)),d(Ve),l(!1)})()},[]);const O=async(re,pe)=>{var Z,Ne;x(re);try{const te=await ne.functions.invoke("createCheckoutSession",{workspace_id:u,price_id:re,billing_type:pe}),xe=((Z=te==null?void 0:te.data)==null?void 0:Z.redirect_url)||(te==null?void 0:te.redirect_url);if(xe){window.location.href=xe;return}const he=((Ne=te==null?void 0:te.data)==null?void 0:Ne.checkout_url)||(te==null?void 0:te.checkout_url);he&&(window.location.href=he)}catch(te){console.error("Checkout error:",te),_ue(te)&&W(rT)}finally{x(null),y(!1)}};if(o)return r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:256},children:[r.jsx("div",{style:{width:24,height:24,border:"3px solid #E3E8EE",borderTopColor:"#6C24F5",borderRadius:"50%",animation:"spin 0.8s linear infinite"}}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg) } }"})]});const G=(ae=D.find(re=>re.status==="active"&&(re.user_email||"").toLowerCase()===((V==null?void 0:V.email)||"").toLowerCase()))==null?void 0:ae.global_role,M=(V==null?void 0:V.role)==="admin"||kue.includes(G);e.find(re=>["active","trial","past_due"].includes(re.status));const z=n.filter(re=>["active","trial"].includes(re.status)),K=re=>{const pe=e.find(Ne=>Ne.product_key===re&&["active","trial","past_due"].includes(Ne.status));if(pe!=null&&pe.plan_name&&pe.plan_name!=="free")return pe.plan_name;const Z=z.find(Ne=>Ne.product_key===re);return Z!=null&&Z.plan_key&&Z.plan_key!=="free"?Z.plan_key:"gratuito"},Y=re=>!!z.find(pe=>pe.product_key===re),J=re=>{const pe=e.find(Z=>Z.product_key===re&&["active","trial","past_due"].includes(Z.status));return!pe||pe.status==="trial"||pe.plan_name==="free"?"N/A":yue[pe.billing_cycle]||"—"},Q=re=>{const pe=e.find(Z=>Z.product_key===re&&["active","trial","past_due"].includes(Z.status));return pe!=null&&pe.current_period_end?new Date(pe.current_period_end).toLocaleDateString("pt-BR"):"—"},ie=re=>{if(!Sue.includes(re))return null;const pe=e.find(te=>te.product_key===re&&["active","trial","past_due"].includes(te.status));if(!pe||!pe.seats_purchased||pe.seats_purchased<=0)return null;
794const Z=A.filter(te=>te.product_key===re&&te.status==="active"),Ne=Z.map(te=>D.find(he=>he.user_email===te.user_email)||{user_email:te.user_email,status:"active"});return{purchased:pe.seats_purchased,used:Z.length,allocatedMembers:Ne}};return r.jsxs("div",{style:{fontFamily:"'Switzer', sans-serif"},children:[r.jsxs("div",{style:{marginBottom:28},children:[r.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#1A1F36",letterSpacing:"-0.02em",margin:0},children:"Faturamento & Assinatura"}),r.jsx("p",{style:{fontSize:13,color:"#697386",marginTop:2},children:"Gerencie seu plano, assentos e histórico de pagamentos."})]}),r.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",color:"#A3ACB9",marginBottom:12},children:"Módulos contratados"}),N&&r.jsx("div",{style:{fontSize:12,color:"#DC2626",background:"#FEF2F2",padding:"8px 12px",borderRadius:6,marginBottom:12},children:N}),jue.map(re=>r.jsx(due,{icon:re.icon,name:re.name,tier:K(re.key),hasCredits:re.hasCredits,creditsBar:re.hasCredits?r.jsx(wue,{used:c.credits_used,planCredits:c.plan_credits,addonCredits:c.addon_credits}):null,cycle:J(re.key),renewDate:Q(re.key),statusActive:Y(re.key),onChangePlan:()=>H({moduleName:re.name,tier:K(re.key)}),onBuyCredits:()=>y(!0),onManage:()=>H({moduleName:re.name,tier:K(re.key)}),seatsInfo:ie(re.key),productKey:re.key,onAddSeat:pe=>U({productKey:pe}),userMap:L,moduleAccess:A,subscriptions:e,canManageBilling:M,noPermissionMessage:rT},re.key)),r.jsx("div",{style:{height:24}}),r.jsxs("div",{style:{background:"#FFFFFF",border:"1px solid #E3E8EE",borderRadius:12,overflow:"hidden"},children:[r.jsxs("button",{onClick:()=>F(re=>!re),style:{width:"100%",padding:"18px 20px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",background:"none",border:"none",fontFamily:"'Switzer', sans-serif"},children:[r.jsx("span",{style:{fontSize:15,fontWeight:600,color:"#1A1F36"},children:"Histórico de faturamento"}),r.jsx(ar,{size:18,style:{color:"#A3ACB9",transition:"transform 0.2s ease",transform:_?"rotate(180deg)":"rotate(0deg)"}})]}),r.jsx("div",{style:{maxHeight:_?1200:0,overflow:"hidden",transition:"max-height 0.3s ease"},children:r.jsx("div",{style:{borderTop:"1px solid #E3E8EE"},children:i.length===0?r.jsxs("div",{style:{padding:"48px 24px",textAlign:"center"},children:[r.jsx(kl,{size:40,style:{color:"#A3ACB9",margin:"0 auto 12px"}}),r.jsx("p",{style:{fontSize:13,color:"#697386"},children:kt.billing.noBillingEvents})]}):r.jsx("div",{children:i.map((re,pe)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 20px",borderTop:pe>0?"1px solid #E3E8EE":"none"},children:[r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36"},children:bue(re.event_type)}),r.jsx("div",{style:{fontSize:12,color:"#697386",marginTop:2},children:re.description||(re.product_key?lue(re.product_key):"")})]}),r.jsxs("div",{style:{textAlign:"right",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:2},children:[re.amount?r.jsxs("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36"},children:["R$",re.amount.toLocaleString("pt-BR")]}):null,r.jsx("div",{style:{fontSize:12,color:"#A3ACB9"},children:new Date(re.created_date).toLocaleDateString("pt-BR")}),re.stripe_invoice_url&&r.jsx("a",{href:re.stripe_invoice_url,target:"_blank",rel:"noopener noreferrer",style:{fontSize:12,color:"#6C24F5",textDecoration:"underline"},children:"Ver fatura"})]})]},re.id))})})})]}),w&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{position:"fixed",inset:0,zIndex:9998},onClick:()=>y(!1)}),r.jsxs("div",{style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:9999,background:"#fff",border:"1px solid #E3E8EE",borderRadius:12,boxShadow:"0 8px 32px rgba(0,0,0,0.12)",minWidth:320,overflow:"hidden",fontFamily:"'Switzer', sans-serif"},children:[r.jsxs("div",{style:{padding:"16px 20px 10px",borderBottom:"1px solid #E3E8EE"},children:[r.jsx("p",{style:{margin:0,fontSize:14,fontWeight:600,color:"#1A1F36"},children:"Adquirir créditos"}),r.jsx("p",{style:{margin:"2px 0 0",fontSize:12,color:"#697386"},children:"Escolha um pacote"})]}),[{label:"Mini",credits:"50 créditos",price:"R$ 119,90",priceId:"price_1TNYmlPOfpA2o0OTPhrzGxYI"},{label:"Básico",credits:"100 créditos",price:"R$ 239,90",priceId:"price_1TNYnDPOfpA2o0OTRCD5hfua"},{label:"Médio",credits:"200 créditos",price:"R$ 479,90",priceId:"price_1TNZ2tPOfpA2o0OT3cyorPjI"},{label:"Avançado",credits:"500 créditos",price:"R$ 1.199,90",priceId:"price_1TNM3SPOfpA2o0OTzgBRtCkq"},{label:"Volume",credits:"1.000 créditos",price:"R$ 2.199,90",priceId:"price_1TNM4mPOfpA2o0OT89J844E3"}].map(re=>r.jsxs("button",{onClick:()=>O(re.priceId,"one_time"),disabled:m===re.priceId,style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"12px 20px",fontSize:13,color:"#1A1F36",background:"none",border:"none",cursor:"pointer",transition:"background 0.15s",fontFamily:"'Switzer', sans-serif"},onMouseEnter:pe=>pe.currentTarget.style.background="#F6F8FA",onMouseLeave:pe=>pe.currentTarget.style.background="none",children:[r.jsxs("div",{style:{textAlign:"left"},children:[r.jsx("span",{style:{fontWeight:600,display:"block"},children:re.label}
794),r.jsx("span",{style:{fontSize:12,color:"#A3ACB9"},children:re.credits})]}),r.jsx("span",{style:{fontWeight:600,color:"#1A1F36",fontSize:13},children:re.price})]},re.label)),r.jsx("div",{style:{borderTop:"1px solid #E3E8EE"},children:r.jsx("a",{href:"mailto:[email protected]",style:{textDecoration:"none"},onClick:()=>y(!1),children:r.jsxs("button",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"12px 20px",fontSize:13,color:"#6C24F5",background:"none",border:"none",cursor:"pointer",transition:"background 0.15s",fontFamily:"'Switzer', sans-serif"},onMouseEnter:re=>re.currentTarget.style.background="#F6F8FA",onMouseLeave:re=>re.currentTarget.style.background="none",children:[r.jsxs("div",{style:{textAlign:"left"},children:[r.jsx("span",{style:{fontWeight:600,display:"block"},children:"Escala"}),r.jsx("span",{style:{fontSize:12,color:"#A3ACB9"},children:"Personalizado"})]}),r.jsx("span",{style:{fontWeight:600,color:"#6C24F5",fontSize:12},children:"Falar com vendas →"})]})})})]})]}),I&&r.jsx(mue,{moduleName:I.moduleName,currentTier:I.tier,workspaceId:u,onClose:()=>H(null)}),r.jsx(xue,{isOpen:!!R,onClose:()=>U(null),onInvited:()=>window.location.reload(),defaultProductKey:(R==null?void 0:R.productKey)||"ats",subscriptions:e,moduleAccess:A})]})}const Eue=[{key:"jobs",name:"Summit Jobs",icon:On,desc:"Publique vagas e receba candidaturas com uma página de carreiras profissional.",iconBg:"rgba(59,130,246,0.08)",iconColor:"#3B82F6"},{key:"ats",name:"Summit ATS",icon:a8,desc:"Pipeline visual, candidatos, agenda, agendamento e automações.",iconBg:"rgba(108,36,245,0.08)",iconColor:"#6C24F5"},{key:"assessments",name:"Summit Assessments",icon:za,desc:"Testes comportamentais, cognitivos e de idiomas cientificamente validados.",iconBg:"rgba(229,153,62,0.08)",iconColor:"#E5993E"},{key:"talent_bank",name:"Summit Talent",icon:Nr,desc:"Banco de talentos com busca, matching e captura via LinkedIn.",iconBg:"rgba(30,166,114,0.08)",iconColor:"#1EA672"}],Fue=[{key:"crm",name:"Summit CRM",icon:jc,desc:"Gestão de empresas-cliente, contatos e contratos.",iconBg:"rgba(237,108,110,0.08)",iconColor:"#ED6C6E"},{key:"folha",name:"Summit Folha",icon:c8,desc:"Admissão, folha e gestão do ciclo de vida do colaborador.",iconBg:"rgba(14,165,233,0.08)",iconColor:"#0EA5E9"}];function Aue({mod:e,onManage:t}){const n=e.icon;return r.jsxs("div",{style:{background:"#FFFFFF",border:"1px solid #E3E8EE",borderRadius:12,padding:20,display:"flex",flexDirection:"column",minHeight:180,fontFamily:"'Switzer', sans-serif"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[r.jsx("div",{style:{width:36,height:36,borderRadius:8,background:e.iconBg||"#F0F2F5",display:"grid",placeItems:"center",flexShrink:0},children:r.jsx(n,{size:18,strokeWidth:1.5,style:{color:e.iconColor||"#6C24F5"}})}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"#1A1F36"},children:e.name}),r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,marginTop:1},children:[r.jsx("div",{style:{width:5,height:5,borderRadius:"50%",background:"#1EA672"}}),r.jsx("span",{style:{fontSize:10.5,color:"#1EA672",fontWeight:600},children:"Ativo"})]})]})]}),r.jsx("div",{style:{fontSize:13,color:"#697386",lineHeight:1.5,marginTop:12,flex:1},children:e.desc}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"auto",paddingTop:12,borderTop:"1px solid #E3E8EE"},children:[r.jsx("span",{style:{fontSize:12,color:"#A3ACB9",fontWeight:500},children:"Incluído"}),r.jsx("button",{onClick:t,style:{fontSize:12.5,fontWeight:600,color:"#1A1F36",background:"#FFFFFF",border:"1px solid #D8DEE4",borderRadius:6,padding:"6px 14px",cursor:"pointer",fontFamily:"'Switzer', sans-serif",transition:"background 0.15s"},onMouseEnter:s=>{s.currentTarget.style.background="#F6F8FA"},onMouseLeave:s=>{s.currentTarget.style.background="#FFFFFF"},children:"Gerenciar"})]})]})}function Tue({mod:e}){const t=e.icon;return r.jsxs("div",{style:{background:"#FFFFFF",border:"1px solid #E3E8EE",borderRadius:12,padding:20,display:"flex",flexDirection:"column",minHeight:180,fontFamily:"'Switzer', sans-serif",opacity:.85},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",ga
794p:12},children:[r.jsx("div",{style:{width:36,height:36,borderRadius:8,background:e.iconBg||"#F0F2F5",display:"grid",placeItems:"center",flexShrink:0},children:r.jsx(t,{size:18,strokeWidth:1.5,style:{color:e.iconColor||"#6C24F5"}})}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"#1A1F36"},children:e.name}),r.jsx("div",{style:{marginTop:1},children:r.jsx("span",{style:{fontSize:10.5,color:"#A3ACB9",fontWeight:600},children:"Em breve"})})]})]}),r.jsx("div",{style:{fontSize:13,color:"#697386",lineHeight:1.5,marginTop:12,flex:1},children:e.desc}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"auto",paddingTop:12,borderTop:"1px solid #E3E8EE"},children:[r.jsx("span",{style:{fontSize:12,color:"#A3ACB9",fontWeight:500},children:"Incluído"}),r.jsx("button",{style:{fontSize:12.5,fontWeight:600,color:"#6C24F5",background:"#FFFFFF",border:"1px solid #D8DEE4",borderRadius:6,padding:"6px 14px",cursor:"pointer",fontFamily:"'Switzer', sans-serif",transition:"background 0.15s"},onMouseEnter:n=>{n.currentTarget.style.background="#F6F8FA"},onMouseLeave:n=>{n.currentTarget.style.background="#FFFFFF"},children:"Avisar-me"})]})]})}function Nue(){const e=In();return r.jsxs("div",{style:{fontFamily:"'Switzer', sans-serif"},children:[r.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:Eue.map(t=>r.jsx(Aue,{mod:t,onManage:()=>e("/app/conta/plano")},t.key))}),r.jsx("div",{style:{fontSize:13,fontWeight:600,color:"#697386",textTransform:"uppercase",letterSpacing:"0.04em",marginTop:24,marginBottom:12},children:"Expandir"}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:Fue.map(t=>r.jsx(Tue,{mod:t},t.key))})]})}function Rue({size:e=32}){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 32 32",children:[r.jsx("path",{fill:"#ea4435",d:"M16.58,19.1068l-12.69-8.0757A3,3,0,0,1,7.1109,5.97l9.31,5.9243L24.78,6.0428A3,3,0,0,1,28.22,10.9579Z"}),r.jsx("path",{fill:"#00ac47",d:"M25.5,5.5h4a0,0,0,0,1,0,0v18a3,3,0,0,1-3,3h0a3,3,0,0,1-3-3V7.5a2,2,0,0,1,2-2Z",transform:"rotate(180 26.5 16)"}),r.jsx("path",{fill:"#ffba00",d:"M29.4562,8.0656c-.0088-.06-.0081-.1213-.0206-.1812-.0192-.0918-.0549-.1766-.0823-.2652a2.9312,2.9312,0,0,0-.0958-.2993c-.02-.0475-.0508-.0892-.0735-.1354A2.9838,2.9838,0,0,0,28.9686,6.8c-.04-.0581-.09-.1076-.1342-.1626a3.0282,3.0282,0,0,0-.2455-.2849c-.0665-.0647-.1423-.1188-.2146-.1771a3.02,3.02,0,0,0-.24-.1857c-.0793-.0518-.1661-.0917-.25-.1359-.0884-.0461-.175-.0963-.267-.1331-.0889-.0358-.1837-.0586-.2766-.0859s-.1853-.06-.2807-.0777a3.0543,3.0543,0,0,0-.357-.036c-.0759-.0053-.1511-.0186-.2273-.018a2.9778,2.9778,0,0,0-.4219.0425c-.0563.0084-.113.0077-.1689.0193a33.211,33.211,0,0,0-.5645.178c-.0515.022-.0966.0547-.1465.0795A2.901,2.901,0,0,0,23.5,8.5v5.762l4.72-3.3043a2.8878,2.8878,0,0,0,1.2359-2.8923Z"}),r.jsx("path",{fill:"#4285f4",d:"M5.5,5.5h0a3,3,0,0,1,3,3v18a0,0,0,0,1,0,0h-4a2,2,0,0,1-2-2V8.5a3,3,0,0,1,3-3Z"}),r.jsx("path",{fill:"#c52528",d:"M2.5439,8.0656c.0088-.06.0081-.1213.0206-.1812.0192-.0918.0549-.1766.0823-.2652A2.9312,2.9312,0,0,1,2.7426,7.32c.02-.0475.0508-.0892.0736-.1354A2.9719,2.9719,0,0,1,3.0316,6.8c.04-.0581.09-.1076.1342-.1626a3.0272,3.0272,0,0,1,.2454-.2849c.0665-.0647.1423-.1188.2147-.
7941771a3.0005,3.0005,0,0,1,.24-.1857c.0793-.0518.1661-.0917.25-.1359A2.9747,2.9747,0,0,1,4.3829,5.72c.089-.0358.1838-.0586.2766-.0859s.1853-.06.2807-.0777a3.0565,3.0565,0,0,1,.357-.036c.076-.0053.1511-.0186.2273-.018a2.9763,2.9763,0,0,1,.4219.0425c.0563.0084.113.0077.169.0193a2.9056,2.9056,0,0,1,.286.0888,2.9157,2.9157,0,0,1,.2785.0892c.0514.022.0965.0547.1465.0795a2.9745,2.9745,0,0,1,.3742.21A2.9943,2.9943,0,0,1,8.5,8.5v5.762L3.78,10.9579A2.8891,2.8891,0,0,1,2.5439,8.0656Z"})]})}function CO({size:e=32}){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:e,height:e,viewBox:"0 0 190 165",preserveAspectRatio:"xMidYMid meet",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"ol_o",x1:"83.848%",y1:"17.27%",y2:"29.467%",children:[r.jsx("stop",{offset:"0%",stopColor:"#0052B2"}),r.jsx("stop",{offset:"100%",stopColor:"#0052B2"})]}),r.jsxs("linearGradient",{id:"ol_t",x1:"104.505%",x2:"5.953%",y1:"2.109%",y2:"2.109%",children:[r.jsx("stop",{offset:"0%",stopColor:"#004CA9"}),r.jsx("stop",{offset:"100%",stopColor:"#003D88"})]}),r.jsxs("linearGradient",{id:"ol_x",x1:"3.848%",x2:"103.648%",y1:"0%",y2:"100%",children:[r.jsx("stop",{offset:"3.008%",stopColor:"#004DA6"}),r.jsx("stop",{offset:"100%",stopColor:"#005ACB"})]}),r.jsxs("linearGradient",{id:"ol_B",x1:"6.85%",x2:"103.648%",y1:"3.008%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:"#05448D"}),r.jsx("stop",{offset:"97.561%",stopColor:"#004BB7"})]}),r.jsxs("linearGradient",{id:"ol_F",x1:"11.155%",x2:"100.481%",y1:"7.321%",y2:"96.827%",children:[r.jsx("stop",{offset:"0%",stopColor:"#012557"}),r.jsx("stop",{offset:"100%",stopColor:"#0040A7"})]}),r.jsxs("linearGradient",{id:"ol_J",x1:"103.648%",x2:"4.908%",y1:"100%",y2:"1.061%",children:[r.jsx("stop",{offset:"0%",stopColor:"#009CE9"}),r.jsx("stop",{offset:"100%",stopColor:"#007FC4"})]}),r.jsxs("linearGradient",{id:"ol_N",x1:"3.848%",x2:"103.648%",y1:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:"#0057C8"}),r.jsx("stop",{offset:"100%",stopColor:"#0071E8"})]}),r.jsxs("linearGradient",{id:"ol_R",x1:"3.848%",x2:"103.648%",y1:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:"#004CB7"}),r.jsx("stop",{offset:"100%",stopColor:"#0062D1"})]}),r.jsxs("linearGradient",{id:"ol_V",x1:"103.648%",x2:"3.848%",y1:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#00DFFF"}),r.jsx("stop",{offset:"100%",stopColor:"#00B3E8"})]}),r.jsxs("linearGradient",{id:"ol_Z",x1:"103.648%",x2:"3.848%",y1:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#00C2FF"}),r.jsx("stop",{offset:"100%",stopColor:"#00A1ED"})]}),r.jsxs("linearGradient",{id:"ol_ad",x1:"3.848%",x2:"103.648%",y1:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:"#0061CC"}),r.jsx("stop",{offset:"100%",stopColor:"#0173EF"})]}),r.jsxs("linearGradient",{id:"ol_ah",x1:"96.375%",x2:"-2.72%",y1:"87.174%",y2:"39.981%",children:[r.jsx("stop",{offset:"0%",stopColor:"#00E2FF"}),r.jsx("stop",{offset:"100%",stopColor:"#00B9FF"}),r.jsx("stop",{offset:"100%",stopColor:"#00E3FF"})]}),r.jsxs("linearGradient",{id:"ol_al",x1:"12.047%",y1:"39.087%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:"#009CE6"}),r.jsx("stop",{offset:"100%",stopColor:"#00F3FF"})]}),r.jsxs("linearGradient",{id:"ol_at",x1:"2.151%",x2:"113.177%",y1:"9.713%",y2:"104.673%",children:[r.jsx("stop",{offset:"0%",stopColor:"#00438D"}),r.jsx("stop",{offset:"96.954%",stopColor:"#0071D5"})]}),r.jsxs("linearGradient",{id:"ol_aB",x1:"29.468%",x2:"97.963%",y1:"50%",y2:"50%",children:[r.jsx("stop",{offset:"0%",stopColor:"#F0F0F0"}),r.jsx("stop",{offset:"100%",stopColor:"#FFF"})]}),r.jsxs("radialGradient",{id:"ol_au",cx:"86.601%",cy:"84.21%",r:"62.398%",fx:"86.601%",fy:"84.21%",children:[r.jsx("stop",{offset:"0%",stopColor:"#004F9D"}),r.jsx("stop",{offset:"100%",stopColor:"#004F9D",stopOpacity:"0"})]})]}),r.jsxs("g",{fill:"none",fillRule:"evenodd",children:[r.jsxs("g",{transform:"translate(47)",children:[r.jsx("path",{d:"M6.83089478,76.3574944 L72,58 L137.169105,76.3574944 C140.617783,77.3289531 143,80.4749263 143,84.057818 L143,153.45459 L1,153.45459 L1,84.057818 C1,80.4749263 3.38221667,77.3289531 6.83089478,76.3574944 Z",fill:"url(#ol_o)"}),r.jsxs("g",{transform:"translate(9)",children:[r.jsx("rect",{width:"126",height:"165",rx:"8",fill:"url(#ol_t)"}),r.jsx("rect",{width:"42",height:"37",y:"13",fill:"url(#ol_x)"}),r.jsx("rect",{width:"42",height:"37",x:"42",y:"13",fill:"url(#ol_J)"}),r.jsx("rect",{width:"42",height:"37",x:"84",y:"13",fill:"url(#ol_V)"}),r.jsx("rect",{width:"42",height:"37",y:"50",fill:"url(#ol_B)"}),r.jsx("rect",{width:"42",height:"37",x:"42",y:"50",fill:"url(#ol_N)"}),r.jsx("rect",{width:"42",height:"37",x:"84",y:"50",fill:"url(#ol_Z)"}),r.jsx("rect",{width:"42",height:"37",y:"87",fill:"url(#ol_F)"}),r.jsx("rect",{width:"42",height:"37",x:"42",y:"87",fill:"url(#ol_R)"}),r.jsx("rect",{width:"42",height:"37",x:"84",y:"87",fill:"url(#ol_ad)"})]}),r.jsxs("g",{transform:"translate(0 84)",children:[r.jsx("path",{d:"M139.001618,79.7135614 L68.0768433,38.8391724 C70.5536209,40.2677574 73.6257262,40.1283034 76.100745,38.6966732 L143,-1.42108547e-14 L143,72.9044369 C143,77.3227149 139.071808,79.675766 139.001618,79.7135614 Z",fill:"url(#ol_ah)"}),r.jsx("path",{d:"M0.8,-1.687539e-14 L139.001618,79.7135614 C137.780536,80.4686426 136.34116,80.9044369 134.8,80.9044369 L8.8,80.9044369 C4.381722,80.9044369 0.8,77.3227149 0.8,72.9044369 L0.8,-1.42108547e-14 Z",fill:"url(#ol_al)"})]})]}),r.jsxs("g",{transform:"translate(0 34)",children:[r.jsx("rect",{width:"96",height:"96",rx:"8",fill:"url(#ol_at)"}),r.jsx("rect",{width:"96",height:"96",rx:"8",fill:"url(#ol_au)"}),r.jsx("path",{d:"M47.7890625,73.6884766 C40.7707982,73.6884766 35.0514544,71.404157 30.6308594,66.8354492 C26.2102644,62.2667415 24,56.3138388 24,48.9765625 C24,41.2291279 26.2444437,34.9629146 30.7333984,30.1777344 C35.2223532,25.3925542 41.1695593,23 48.5751953,23 C55.570673,23 61.2273547,25.2900162 65.5454102,29.8701172 C69.8634656,34.4502182 72.0224609,40.4885693 72.0224609,47.9853516 C72.0224609,55.687213 69.7837138,61.8964608 65.3061523,66.6132812 C60.8285909,71.3301017 54.9896193,73.6884766 47.7890625,73.6884766 Z M48.2882678,31.5019531 C44.1019053,31.5019531 40.7774908,33.0463671 38.3149246,36.1352413 C35.8523584,39.2241154 34.6210938,43.31227 34.6210938,48.3998275 C34.6210938,53.5600644 35.8523584,57.6421624 38.3149246,60.6462439 C40.7774908,63.6503255 44.0034041,65.1523438 47.9927613,65.1523438 C52.1052469,65.1523438 55.3680981,63.6927212 57.781413,60.7734322 C60.1947279,57.8541433 61.4013672,53.8023279 61.4013672,48.6178646 C61.4013672,43.215363 60.2316658,39.0121345 57.8922279,36.0080529 C55.55279,33.0039714 52.351502,31.5019531 48.2882678,31.5019531 Z",fill:"url(#ol_aB)"})]})]})]})}function EO({size:e=32}){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 32 32",children:[r.jsx("path",{fill:"#4285f4",d:"M22,4.5v6H10v11H4V6.5a2.0059,2.0059,0,0,1,2-2Z"}),r.jsx("polygon",{fill:"#ea4435",points:"22 27.5 22 21.5 28 21.5 22 27.5"}),r.jsx("rect",{width:"6",height:"12",x:"22",y:"9.5",fill:"#ffba00"}),r.jsx("rect",{width:"6",height:"12",x:"13",y:"18.5",fill:"#00ac47",transform:"rotate(90 16 24.5)"}),r.jsx("path",{fill:"#0066da",d:"M28,6.5v4H22v-6h4A2.0059,2.0059,0,0,1,28,6.5Z"}),r.jsx("path",{fill:"#188038",d:"M10,21.5v6H6a2.0059,2.0059,0,0,1-2-2v-4Z"}),r.jsx("path",{fill:"#4285f4",d:"M15.69,17.09c0,.89-.66,1.79-2.15,1.79a3.0026,3.0026,0,0,1-1.52-.39l-.08-.06.29-.82.13.08a2.3554,2.3554,0,0,0,1.17.34,1.191,1.191,0,0,0,.88-.31.8586.8586,0,0,0,.25-.65c-.01-.73-.68-.99-1.31-.99h-.54v-.81h.54c.45,0,1.12-.22,1.12-.82,0-.45-.31-.71-.85-.71a1.8865,1.8865,0,0,0-1.04.34l-.14.1-.28-.79.07-.06a2.834,2.834,0,0,1,1.53-.45c1.19,0,1.72.73,1.72,1.45a1.4369,1.4369,0,0,1-.81,1.3A1.52,1.52,0,0,1,15.69,17.09Z"}),r.jsx("polygon",{fill:"#4285f4",points:"18.71 12.98 18.71 18.79 17.73 18.79 17.73 14 16.79 14.51 16.58 13.69 17.95 12.98 18.71 12.98"})]})}const sT="#6C24F5";function S2({icon:e,title:t,connected:n,statusText:s,statusMuted:i=!1,open:a,onToggle:o,showConnectButton:l=!1,children:c}){return r.jsxs("div",{children:[r.jsxs("div",{onClick:o,className:"flex items-center gap-3 px-5 py-4 cursor-pointer hover:bg-gray-50",children:[r.jsxs("div",{className:"flex items-center gap-2.5 flex-1 min-w-0",children:[e,r.jsx("span",{className:"text-sm font-semibold text-gray-900",children:t})]}),n?r.jsx("span",{className:"text-xs font-medium",style:{color:"#085041"},children:s}):l?r.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),a||o()},className:"text-xs px-3 py-1.5 bg-white rounded-lg font-semibold hover:bg-purple-50",style:{border:`1px solid ${sT}`,color:sT},children:"Conectar"}):r.jsx("span",{className:`text-xs ${i?"text-gray-400":"text-gray-500"}`,children:s}),r.jsx("span",{className:"text-gray-400 flex-shrink-0",children:a?r.jsx(Dc,{size:16}):r.jsx(ar,{size:16})})]}),a&&r.jsx("div",{className:"px-5 pb-6",children:c})]})}const Due="6a2899a5a5e4039fd6dfaadb",Iue="6a28c1459d464c64b0947340",Pue="6a289afb7c0c54631662da48",bj="#6C24F5",k2=40,iT="outlook_connect_source",ah=[{key:"gmail",connectorId:Due,name:"Gmail",description:"Envie emails aos candidatos pela sua conta Gmail. Os emails enviados ficam registrados no histórico do candidato.",Logo:Rue},{key:"outlook",connectorId:Iue,name:"Outlook",description:"Conecte sua conta Microsoft 365 para enviar emails e gerenciar entrevistas.",Logo:CO},{key:"googlecalendar",connectorId:Pue,name:"Google Agenda",description:"Agende entrevistas e consulte disponibilidade direto pelo seu calendário Google.",Logo:EO}];function Pg({provider:e,status:t,busy:n,onConnect:s,onDisconnect:i,sharedNote:a}){const{name:o,description:l,Logo:c}=e,d=!!(t!=null&&t.connected),u=t==null?void 0:t.email;return r.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-5 flex items-start gap-4",children:[r.jsx("div",{className:"flex items-center justify-center flex-shrink-0",style:{height:k2,minWidth:k2},children:r.jsx(c,{size:k2})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:o}),d&&r.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-green-50 text-green-700 border border-green-100",children:[r.jsx(Mi,{size:10})," Conectado"]})]}),r.jsx("p",{className:"text-xs text-gray-500 leading-relaxed mb-3",children:l}),d&&r.jsxs("div",{className:"text-xs text-gray-600 mb-1",children:["Conectado",u?r.jsxs(r.Fragment,{children:[" — ",r.jsx("span",{className:"font-medium text-gray-900",children:u})]}):""]}),d&&a&&r.jsx("div",{className:"text-[11px] text-gray-400 mb-3",children:a}),d&&!a&&r.jsx("div",{className:"mb-2"}),r.jsx("div",{className:"flex gap-2",children:d?r.jsxs("button",{type:"button",onClick:i,disabled:n,className:"text-xs px-3 py-1.5 border border-gray-200 bg-white text-gray-700 rounded-lg font-medium hover:bg-gray-50 disabled:opacity-50 flex items-center gap-1.5",children:[n?r.jsx(rt,{size:12,className:"animate-spin"}):r.jsx(nq,{size:12}),"Desconectar"]}):r.jsxs("button",{type:"button",onClick:s,disabled:n,className:"text-xs px-3 py-1.5 text-white rounded-lg font-medium hover:opacity-90 disabled:opacity-50 flex items-center gap-1.5",style:{background:bj},children:[n?r.jsx(rt,{size:12,className:"animate-spin"}):r.jsx($a,{size:12}),"Conectar"]})})]})]})}function Bue(){const e=In(),{user:t}=tr(),[n,s]=g.useState({}),[i,a]=g.useState(!0),[o,l]=g.useState(null),[c,d]=g.useState(null),[u,p]=g.useState(null),[m,x]=g.useState(()=>{try{return localStorage.getItem(iT)||"email"}catch{return"email"}}),[w,y]=g.useState(!1),v=(N,W="success")=>{d({msg:N,type:W}),setTimeout(()=>d(null),3e3)},j=g.useCallback(async N=>{try{const W=await ne.functions.invoke("checkConnectorStatus",{key:N}),O=(W==null?void 0:W.data)||W;return O!=null&&O.connected?{connected:!0,email:O.email||null}:{connected:!1}}catch{return{connected:!1}}},[]),k=g.useCallback(async N=>{const W=await j(N);return s(O=>({...O,[N]:W})),W},[j]),S=g.useCallback(async()=>{a(!0);const N=await Promise.all(ah.map(O=>j(O.key))),W={};
794ah.forEach((O,G)=>{W[O.key]=N[G]}),s(W),a(!1)},[j]);g.useEffect(()=>{S()},[S]),g.useEffect(()=>{if(!(t!=null&&t.id))return;let N=!0;return(async()=>{try{const[W,O,G]=await Promise.all([ne.functions.invoke("getGoogleSchedulingStatus",{}).catch(()=>null),ne.functions.invoke("getMicrosoftSchedulingStatus",{}).catch(()=>null),ne.entities.SchedulingConfig.filter({user_id:t.id}).catch(()=>[])]);if(!N)return;const M=(W==null?void 0:W.data)||W,z=(O==null?void 0:O.data)||O,K=!!(M!=null&&M.connected)||!!(z!=null&&z.connected),Y=(G||[]).some(J=>J.is_active);y(K&&Y)}catch{N&&y(!1)}})(),()=>{N=!1}},[t==null?void 0:t.id]);const _=async(N,W)=>{l(N.key);try{const O=await ne.connectors.connectAppUser(N.connectorId),G=window.open(O,"oauth_"+N.key,"width=500,height=650,popup=yes");let M=!1;const z=async()=>{if(M)return;if(M=!0,document.removeEventListener("visibilitychange",K),clearInterval(Y),await new Promise(Q=>setTimeout(Q,1500)),(await k(N.key)).connected){if(N.key==="outlook"&&W){try{localStorage.setItem(iT,W)}catch{}x(W)}v(`${N.name} conectado!`)}else v("Conexão não concluída. Tente novamente.","error");l(null)},K=()=>{document.visibilityState==="visible"&&z()};document.addEventListener("visibilitychange",K);const Y=setInterval(()=>{try{if(G&&!G.closed)return}catch{}z()},1e3)}catch(O){v((O==null?void 0:O.message)||"Erro ao conectar","error"),l(null)}},F=async N=>{l(N.key);try{await ne.connectors.disconnectAppUser(N.connectorId),s(W=>({...W,[N.key]:{connected:!1}})),v(`${N.name} desconectado`)}catch(W){v((W==null?void 0:W.message)||"Erro ao desconectar","error")}l(null)},A=ah.find(N=>N.key==="gmail"),C=ah.find(N=>N.key==="outlook"),D=ah.find(N=>N.key==="googlecalendar"),P=n.gmail,L=n.outlook,T=n.googlecalendar,R=!!(P!=null&&P.connected)||!!(L!=null&&L.connected),U=!!(T!=null&&T.connected)||!!(L!=null&&L.connected),I=P!=null&&P.connected?"Gmail conectado":"Outlook conectado",H=T!=null&&T.connected?"Google Agenda conectado":"Outlook conectado",V=L!=null&&L.connected?m==="agenda"?"Conexão feita em Agenda · vale para Email":"Conexão feita em Email · vale para Agenda":null,X=N=>p(W=>W===N?null:N);return r.jsxs("div",{className:"px-6 py-6",children:[r.jsx("div",{className:"flex items-center gap-1.5 text-sm text-gray-500 mb-6",children:r.jsx("span",{className:"font-medium text-gray-700",children:"Integrações"})}),r.jsx("h1",{className:"text-xl font-semibold text-gray-900 mb-1",children:"Integrações"}),r.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Conecte seu email e calendário para enviar mensagens e agendar entrevistas pelo Summit."}),i?r.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 py-10 justify-center",children:[r.jsx(rt,{size:14,className:"animate-spin"})," Carregando..."]}):r.jsxs("div",{className:"max-w-4xl bg-white border border-gray-200 rounded-xl divide-y divide-gray-200 overflow-hidden",children:[r.jsxs(S2,{icon:r.jsx(mr,{size:16,className:"text-gray-500"}),title:"Email",connected:R,statusText:I,open:u==="email",onToggle:()=>X("email"),showConnectButton:!0,children:[r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Conta usada para enviar mensagens aos candidatos (templates, automações, comunicação individual)."}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[r.jsx(Pg,{provider:A,status:P,busy:o==="gmail",onConnect:()=>_(A,"email"),onDisconnect:()=>F(A)}),r.jsx(Pg,{provider:C,status:L,busy:o==="outlook",onConnect:()=>_(C,"email"),onDisconnect:()=>F(C),sharedNote:V})]})]}),r.jsxs(S2,{icon:r.jsx(kl,{size:16,className:"text-gray-500"}),title:"Agenda",connected:U,statusText:H,open:u==="agenda",onToggle:()=>X("agenda"),showConnectButton:!0,children:[r.jsxs("p",{className:"text-sm text-gray-500 mb-4",children:["Sincroniza seus eventos para visualização em ",r.jsx("code",{className:"text-xs bg-gray-100 px-1.5 py-0.5 rounded",children:"/app/agenda"}),"."]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[r.jsx(Pg,{provider:D,status:T,busy:o==="googlecalendar",onConnect:()=>_(D,"agenda"),onDisconnect:()=>F(D)}),r.jsx(Pg,{provider:C,status:L,busy:o==="outlook",onConnect:()=>_(C,"agenda"),onDisconnect:()=>F(C),sharedNote:V})]})]}),r.jsxs(S2,{icon:r.jsx(f8,{size:16,className:"text-gray-500"}),title:"Link de agendamento",connected:w,statusText:w?"Ativo":"Não ativado",statusMuted:!w,open:u==="link",onToggle:()=>
794X("link"),children:[r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Ative na página da Agenda, conectando o calendário das entrevistas."}),r.jsx("button",{type:"button",onClick:()=>e("/app/agenda?tab=links"),className:"text-xs px-3 py-2 bg-white rounded-lg font-semibold hover:bg-purple-50",style:{border:`1px solid ${bj}`,color:bj},children:"Ir para Agenda →"})]})]}),c&&r.jsx("div",{className:"fixed bottom-6 left-1/2 transform -translate-x-1/2 px-4 py-2 rounded-lg shadow-lg text-sm font-medium z-50",style:{background:c.type==="error"?"#DC2626":"#1F2937",color:"#FFFFFF"},children:c.msg})]})}const Oue="#6C24F5",oh="#E3E8EE";function Mue({onToast:e}){const{user:t}=tr(),n=g.useRef(null),[s,i]=g.useState(""),[a,o]=g.useState(""),[l,c]=g.useState(!0),[d,u]=g.useState(!1),[p,m]=g.useState(!1),[x,w]=g.useState(!1),y=g.useRef(null),v=g.useRef(null);g.useEffect(()=>{if(!t)return;const L=t.email_signature||"";i(L),o(L),n.current&&(n.current.innerHTML=L),c(!1)},[t]),g.useEffect(()=>{!l&&x&&n.current&&n.current.innerHTML!==s&&(n.current.innerHTML=s)},[l,x]);const j=()=>{n.current&&i(n.current.innerHTML)},k=L=>{var T;(T=n.current)==null||T.focus(),document.execCommand(L,!1,null),j()},S=()=>{var T,R;const L=(T=window.getSelection)==null?void 0:T.call(window);if(L&&L.rangeCount>0){const U=L.getRangeAt(0);(R=n.current)!=null&&R.contains(U.commonAncestorContainer)&&(v.current=U.cloneRange())}},_=()=>{var T;const L=(T=window.getSelection)==null?void 0:T.call(window);L&&v.current&&(L.removeAllRanges(),L.addRange(v.current))},F=()=>{var L;S(),(L=y.current)==null||L.click()},A=L=>{var U;const T=(U=L.target.files)==null?void 0:U[0];if(!T)return;const R=new FileReader;R.onload=I=>{var X,N;const H=(X=I.target)==null?void 0:X.result;if(!H)return;(N=n.current)==null||N.focus(),_();const V=`<img src="${H}" style="max-width:200px;height:auto;" />`;document.execCommand("insertHTML",!1,V),j()},R.readAsDataURL(T),L.target.value=""},C=async()=>{var L;if(!d){u(!0);try{const T=((L=n.current)==null?void 0:L.innerHTML)||"";await ne.auth.updateMe({email_signature:T}),o(T),i(T),e==null||e("Assinatura salva com sucesso")}catch(T){e==null||e((T==null?void 0:T.message)||"Erro ao salvar assinatura","error")}u(!1)}},D=async()=>{if(!p){m(!0);try{await ne.auth.updateMe({email_signature:""}),n.current&&(n.current.innerHTML=""),i(""),o(""),e==null||e("Assinatura removida")}catch(L){e==null||e((L==null?void 0:L.message)||"Erro ao limpar assinatura","error")}m(!1)}},P=s!==a;return r.jsxs("div",{className:"bg-white rounded-lg max-w-4xl overflow-hidden",style:{border:`1px solid ${oh}`},children:[r.jsxs("button",{type:"button",onClick:()=>w(L=>!L),className:"w-full flex items-center gap-3 px-6 py-4 hover:bg-gray-50 text-left",children:[r.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"#F3F4F6",border:"1px solid #E5E7EB"},children:r.jsx(m8,{size:15,className:"text-gray-700"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("h2",{className:"text-sm font-semibold text-gray-900",children:"Assinatura de email"}),r.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:"Aparece automaticamente no final de todos os emails enviados."})]}),r.jsx(Qr,{size:16,className:"text-gray-400 flex-shrink-0 transition-transform",style:{transform:x?"rotate(90deg)":"rotate(0deg)"}})]}),x?l?r.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400 px-6 pb-6",children:[r.jsx(rt,{size:14,className:"animate-spin"})," Carregando..."]}):r.jsxs("div",{className:"px-6 pb-6",style:{borderTop:`1px solid ${oh}`,paddingTop:20},children:[r.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5 rounded-t-md",style:{border:`1px solid ${oh}`,borderBottom:"none",background:"#FAFBFC"},children:[r.jsx("button",{type:"button",onMouseDown:L=>L.preventDefault(),onClick:()=>k("bold"),className:"p-1.5 rounded hover:bg-gray-200 text-gray-700",title:"Negrito",children:r.jsx(FU,{size:13})}),r.jsx("button",{type:"button",onMouseDown:L=>L.preventDefault(),onClick:()=>k("italic"),className:"p-1.5 rounded hover:bg-gray-200 text-gray-700",title:"Itálico",children:r.jsx(QV,{size:13})}),r.jsx("div",{className:"w-px h-4 bg-gray-200 mx-1"}),r.jsxs("button",{type:"button",onMouseDown:L=>L.preventDefault(),onClick:F,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700 text-xs flex items-center gap-1",title:"Inserir imagem",children:[r.jsx(fS,{size:13})," Inserir Imagem"]}),r.jsx("input",{ref:y,type:"file",accept:"image/*",style:{display:"none"},onChange:A})]}),r.jsx("div",{ref:n,contentEditable:!0,suppressContentEditableWarning:!0,onInput:j,className:"rounded-b-md focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${oh}`,padding:12,minHeight:120,fontFamily:"Arial, Helvetica, sans-serif",fontSize:14,lineHeight:1.5,color:"#1F2937",outline:"none",background:"#fff",overflow:"auto"}}),r.jsx("p",{className:"text-[11px] text-gray-500 mt-1.5",children:"Copie e cole sua assinatura do Gmail ou Outlook, ou use os botões acima para formatar e inserir imagens."}),r.jsxs("div",{className:"mt-4",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 mb-1.5",children:"Pré-visualização:"}),r.jsx("div",{className:"rounded-lg p-4",style:{background:"#F7F8FA",border:`1px solid ${oh}`},children:s&&s.replace(/<[^>]*>/g,"").trim()?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"text-xs text-gray-400 mb-2",children:"—"}),r.jsx("div",{className:"text-sm text-gray-700",style:{fontFamily:"Arial, Helvetica, sans-serif",lineHeight:1.5},dangerouslySetInnerHTML:{__html:Sk(s)}})]}):r.jsx("div",{className:"text-xs text-gray-400 italic",children:"Sua assinatura aparecerá aqui."})})]}),r.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[r.jsxs("button",{type:"button",onClick:C,disabled:d||p||!P,className:"text-sm px-4 py-2.5 text-white rounded-md font-medium hover:opacity-90 disabled:opacity-50 flex items-center justify-center gap-2",style:{background:Oue},children:[d&&r.jsx(rt,{size:13,className:"animate-spin"}),"Salvar"]}),a&&r.jsxs("button",{type:"button",onClick:D,disabled:d||p,className:"text-xs text-gray-500 hover:text-gray-700 underline disabled:opacity-50 flex items-center gap-1.5",children:[p&&r.jsx(rt,{size:11,className:"animate-spin"}),"Limpar assinatura"]})]})]}):null]})}const FO=[{key:"interview",label:"Entrevista",bg:"#DBEAFE",color:"#1E40AF"},{key:"rejection",label:"Rejeição",bg:"#FEE2E2",color:"#991B1B"},{key:"offer",label:"Proposta",bg:"#D1FAE5",color:"#065F46"},{key:"follow_up",label:"Acompanhamento",bg:"#FEF3C7",color:"#92400E"},{key:"scheduling",label:"Agendamento",bg:"#E0E7FF",color:"#3730A3"},{key:"general",label:"Geral",bg:"#F3F4F6",color:"#374151"}],aT=FO.reduce((e,t)=>
794(e[t.key]=t,e),{}),cy="#6C24F5",Lue=/\{\{[^}]+\}\}/g,zue=e=>{if(!e)return"—";try{return new Date(e).toLocaleDateString("pt-BR",{day:"2-digit",month:"short",year:"numeric"})}catch{return"—"}};function AO({category:e}){const t=aT[e]||aT.general;return r.jsx("span",{className:"text-[11px] font-medium px-2 py-0.5 rounded-full",style:{background:t.bg,color:t.color},children:t.label})}function TO(){return r.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider px-2 py-0.5 rounded-full ml-2",style:{background:"#EDE9FE",color:"#5B21B6"},children:"Padrão"})}function Wue({text:e}){return e?e.split(/(\{\{[^}]+\}\})/g).map((n,s)=>/^\{\{[^}]+\}\}$/.test(n)?r.jsx("span",{style:{background:"#EEEDFE",color:"#3D38B5",borderRadius:4,padding:"2px 6px",fontSize:12,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",display:"inline-block",margin:"0 1px"},children:n},s):r.jsx("span",{children:n},s)):null}function $ue(e){return e?e.replace(Lue,t=>`<span style="background:#EEEDFE;color:#3D38B5;border-radius:4px;padding:2px 6px;font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;display:inline-block;margin:0 1px;">${t}</span>`):""}function NO({items:e,align:t="right"}){const[n,s]=g.useState(!1),[i,a]=g.useState({top:0,left:0}),o=g.useRef(null),l=g.useRef(null);g.useEffect(()=>{if(!n)return;const d=p=>{var m,x;(m=l.current)!=null&&m.contains(p.target)||(x=o.current)!=null&&x.contains(p.target)||s(!1)},u=()=>s(!1);return window.addEventListener("mousedown",d),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),()=>{window.removeEventListener("mousedown",d),window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u)}},[n]);const c=d=>{var p;d.stopPropagation();const u=(p=o.current)==null?void 0:p.getBoundingClientRect();u&&a({top:u.bottom+4,left:t==="right"?Math.max(8,u.right-180):u.left}),s(m=>!m)};return r.jsxs(r.Fragment,{children:[r.jsx("button",{ref:o,type:"button",onClick:c,className:"p-1.5 rounded hover:bg-gray-100 text-gray-500",children:r.jsx(No,{size:16})}),n&&Ka.createPortal(r.jsx("div",{ref:l,onClick:d=>d.stopPropagation(),style:{position:"fixed",top:i.top,left:i.left,minWidth:180,background:"#fff",border:"1px solid #e5e7eb",borderRadius:8,boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05)",padding:"4px 0",zIndex:1e4},children:e.map((d,u)=>r.jsxs("button",{type:"button",onClick:p=>{var m;p.stopPropagation(),s(!1),(m=d.onClick)==null||m.call(d)},className:`w-full text-left flex items-center gap-2 px-4 py-2 ${d.danger?"hover:bg-red-50":"hover:bg-gray-50"}`,style:{fontSize:14,color:d.danger?"#dc2626":"#374151"},children:[r.jsx(d.icon,{size:14})," ",d.label]},u))}),document.body)]})}function Uue({checked:e,onChange:t}){return r.jsx("button",{type:"button",onClick:()=>t(!e),className:"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",style:{background:e?cy:"#D1D5DB"},children:r.jsx("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white transition-transform shadow",style:{transform:e?"translateX(18px)":"translateX(2px)"}})})}function oT({open:e,onClose:t,onInsert:n,hasCalendarLink:s,customFields:i}){const a=g.useRef(null);if(g.useEffect(()=>{if(!e)return;const p=x=>{var w;(w=a.current)!=null&&w.contains(x.target)||t()},m=setTimeout(()=>{window.addEventListener("mousedown",p)},0);return()=>{clearTimeout(m),window.removeEventListener("mousedown",p)}},[e,t]),!e)return null;const o=({title:p,items:m})=>r.jsxs("div",{className:"py-1",children:[r.jsx("div",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-gray-400",children:p}),m.map(x=>r.jsxs("button",{type:"button",onMouseDown:w=>{w.preventDefault(),w.stopPropagation()},onClick:w=>{w.stopPropagation(),n(x.token)},className:"w-full text-left px-3 py-1.5 hover:bg-gray-50 text-sm text-gray-700 flex justify-between items-center gap-2",children:[r.jsx("span",{className:"truncate",children:x.label}),r.jsx("span",{className:"text-[11px] text-gray-400 font-mono truncate",children:x.token})]},x.token))]}),l=[{label:"Nome completo",token:"{{candidate_name}}"},{label:"Primeiro nome",token:"{{candidate_first_name}}"},{label:"Email",token:"{{candidate_email}}"}
794,{label:"Telefone",token:"{{candidate_phone}}"},{label:"Salário atual",token:"{{current_salary}}"},{label:"Expectativa salarial",token:"{{salary_expectation}}"}],c=[{label:"Título da vaga",token:"{{job_title}}"},{label:"Empresa",token:"{{company_name}}"}],d=[{label:"Nome do recrutador",token:"{{recruiter_name}}"},...s?[{label:"Link de agendamento",token:"{{calendar_link}}"}]:[]],u=(i||[]).map(p=>({label:p.field_label||p.field_key,token:`{{custom:${p.field_key}}}`}));return r.jsxs("div",{ref:a,onClick:p=>p.stopPropagation(),onMouseDown:p=>p.stopPropagation(),style:{position:"absolute",top:"100%",right:0,marginTop:4,width:320,maxHeight:320,overflowY:"auto",background:"#fff",border:"1px solid #e5e7eb",borderRadius:8,boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05)",zIndex:9999},children:[r.jsx(o,{title:"Candidato",items:l}),r.jsx("div",{className:"border-t border-gray-100"}),r.jsx(o,{title:"Vaga",items:c}),r.jsx("div",{className:"border-t border-gray-100"}),r.jsx(o,{title:"Recrutador",items:d}),u.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"border-t border-gray-100"}),r.jsx(o,{title:"Campos Personalizados",items:u})]})]})}function Vue({isOpen:e,template:t,onClose:n,onSave:s,saving:i,hasCalendarLink:a,customFields:o}){const[l,c]=g.useState(""),[d,u]=g.useState("general"),[p,m]=g.useState(!1),[x,w]=g.useState(""),[y,v]=g.useState(""),[j,k]=g.useState("body"),[S,_]=g.useState(null),[F,A]=g.useState({}),C=g.useRef(null),D=g.useRef(null);g.useEffect(()=>{e&&(c((t==null?void 0:t.name)||""),u((t==null?void 0:t.category)||"general"),m(!!(t!=null&&t.is_default)),w((t==null?void 0:t.subject)||""),v((t==null?void 0:t.body_html)||""),k("body"),_(null),A({}))},[e,t]);const P=T=>{if(j==="subject"){const R=C.current,U=(R==null?void 0:R.selectionStart)??x.length,I=(R==null?void 0:R.selectionEnd)??x.length,H=x.slice(0,U)+T+x.slice(I);w(H),setTimeout(()=>{R==null||R.focus();const V=U+T.length;R==null||R.setSelectionRange(V,V)},0)}else{const R=D.current,U=(R==null?void 0:R.selectionStart)??y.length,I=(R==null?void 0:R.selectionEnd)??y.length,H=y.slice(0,U)+T+y.slice(I);v(H),setTimeout(()=>{R==null||R.focus();const V=U+T.length;R==null||R.setSelectionRange(V,V)},0)}_(null)},L=()=>{const T={};if(l.trim()||(T.name="Nome é obrigatório"),x.trim()||(T.subject="Assunto é obrigatório"),Object.keys(T).length>0){A(T);return}s({name:l.trim(),category:d,is_default:p,subject:x.trim(),body_html:y})};return e?r.jsx("div",{onClick:()=>!i&&n(),style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:2e3,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:T=>T.stopPropagation(),className:"bg-white rounded-xl shadow-xl",style:{maxWidth:640,width:"100%",maxHeight:"90vh",overflowY:"auto"},children:[r.jsx("div",{className:"px-6 py-4 border-b border-gray-100",children:r.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:t?"Editar modelo":"Novo modelo"})}),r.jsxs("div",{className:"px-6 py-5 space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Nome do modelo *"}),r.jsx("input",{type:"text",value:l,onChange:T=>{c(T.target.value),F.name&&A({...F,name:null})},placeholder:"Ex: Convite para entrevista",className:`w-full text-sm px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 ${F.name?"border-red-300 focus:ring-red-100":"border-gray-200 focus:ring-indigo-100 focus:border-indigo-400"}`}),F.name&&r.jsx("div",{className:"text-xs text-red-600 mt-1",children:F.name})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Categoria"}),r.jsx("select",{value:d,onChange:T=>u(T.target.value),className:"w-full text-sm px-3 py-2 border border-gray-200 rounded-lg bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",children:FO.map(T=>r.jsx("option",{value:T.key,children:T.label},T.key))})]}),r.jsxs("div",{className:"flex items-end pb-2 gap-2",children:[r.jsx(Uue,{checked:p,onChange:m}),r.jsx("span",{className:"text-sm text-gray-700",children:"Usar como padrão"})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-1 relative",children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700",children:"Assu
794nto *"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsxs("button",{type:"button",onClick:T=>{T.stopPropagation(),k("subject"),_(S==="subject"?null:"subject")},className:"text-xs text-indigo-600 hover:text-indigo-700 font-medium flex items-center gap-1",children:["Inserir variável ",r.jsx(ar,{size:12})]}),r.jsx(oT,{open:S==="subject",onClose:()=>_(null),onInsert:P,hasCalendarLink:a,customFields:o})]})]}),r.jsx("input",{ref:C,type:"text",value:x,onChange:T=>{w(T.target.value),F.subject&&A({...F,subject:null})},onFocus:()=>k("subject"),placeholder:"Ex: Convite para entrevista — {{job_title}}",className:`w-full text-sm px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 ${F.subject?"border-red-300 focus:ring-red-100":"border-gray-200 focus:ring-indigo-100 focus:border-indigo-400"}`}),F.subject&&r.jsx("div",{className:"text-xs text-red-600 mt-1",children:F.subject})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700",children:"Corpo da mensagem"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsxs("button",{type:"button",onClick:T=>{T.stopPropagation(),k("body"),_(S==="body"?null:"body")},className:"text-xs text-indigo-600 hover:text-indigo-700 font-medium flex items-center gap-1",children:["Inserir variável ",r.jsx(ar,{size:12})]}),r.jsx(oT,{open:S==="body",onClose:()=>_(null),onInsert:P,hasCalendarLink:a,customFields:o})]})]}),r.jsx("textarea",{ref:D,value:y,onChange:T=>v(T.target.value),onFocus:()=>k("body"),placeholder:`Olá {{candidate_first_name}},
795
796Gostaríamos de convidá-lo(a) para a vaga de {{job_title}}...`,className:"w-full text-sm px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400 font-mono",style:{minHeight:200,resize:"vertical"}})]})]}),r.jsxs("div",{className:"px-6 py-4 border-t border-gray-100 flex justify-end gap-2",children:[r.jsx("button",{type:"button",onClick:n,disabled:i,className:"text-sm px-4 py-2 border border-gray-200 bg-white text-gray-700 rounded-lg font-medium hover:bg-gray-50 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{type:"button",onClick:L,disabled:i,className:"text-sm px-4 py-2 text-white rounded-lg font-medium hover:opacity-90 disabled:opacity-50 flex items-center gap-2",style:{background:cy},children:[i&&r.jsx(rt,{size:13,className:"animate-spin"}),"Salvar"]})]})]})}):null}function Hue({template:e,onClose:t,onEdit:n,onDuplicate:s,onDelete:i}){const a=!!e;return g.useEffect(()=>{if(!a)return;const o=l=>{l.key==="Escape"&&t()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[a,t]),r.jsxs(r.Fragment,{children:[r.jsx("div",{onClick:t,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.3)",zIndex:999,opacity:a?1:0,pointerEvents:a?"auto":"none",transition:"opacity 200ms ease"}}),r.jsx("div",{style:{position:"fixed",top:0,right:0,width:480,maxWidth:"100vw",height:"100vh",background:"#fff",boxShadow:"-8px 0 24px rgba(0,0,0,0.08)",zIndex:1e3,transform:a?"translateX(0)":"translateX(100%)",transition:"transform 200ms ease",display:"flex",flexDirection:"column"},children:e&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"px-5 py-4 border-b border-gray-100 flex items-center justify-between",children:[r.jsx("h3",{className:"text-base font-semibold text-gray-900",children:"Preview do Modelo"}),r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(NO,{items:[{label:"Editar",icon:$r,onClick:()=>n(e)},{label:"Duplicar",icon:Js,onClick:()=>s(e)},{label:"Excluir",icon:zn,danger:!0,onClick:()=>i(e)}]}),r.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded hover:bg-gray-100 text-gray-500",children:r.jsx(Jt,{size:18})})]})]}),r.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-5 space-y-5",children:[r.jsx("div",{children:r.jsxs("div",{className:"text-lg font-semibold text-gray-900 flex items-center",children:[e.name,e.is_default&&r.jsx(TO,{})]})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-2",children:"Categoria"}),r.jsx(AO,{category:e.category})]}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-2",children:"Assu
796nto"}),r.jsx("div",{className:"text-sm text-gray-900 leading-relaxed",children:r.jsx(Wue,{text:e.subject})})]}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-2",children:"Corpo da mensagem"}),r.jsx("div",{style:{border:"1px solid #E3E8EE",borderRadius:8,padding:16,background:"#FAFBFC",fontSize:13,color:"#1F2937",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:Sk($ue(e.body_html||""))}})]}),r.jsxs("div",{className:"pt-3 border-t border-gray-100",children:[r.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-2",children:"Criado por"}),r.jsx("div",{className:"text-sm text-gray-700",children:e.created_by||"—"}),r.jsx("div",{className:"text-xs text-gray-400 mt-0.5",children:zue(e.created_date)})]})]})]})})]})}function que(){const{user:e}=tr();In();const[t,n]=g.useState(null),[s,i]=g.useState([]),[a,o]=g.useState([]),[l,c]=g.useState(!0),[d,u]=g.useState(!1),[p,m]=g.useState(null),[x,w]=g.useState(!1),[y,v]=g.useState(null),[j,k]=g.useState(null),[S,_]=g.useState(!1),[F,A]=g.useState(null),C=!!(e!=null&&e.calendar_link&&e.calendar_link.trim()),D=(V,X="success")=>{A({msg:V,type:X}),setTimeout(()=>A(null),3e3)},P=g.useCallback(async V=>{if(V)try{const X=await ne.entities.MessageTemplate.filter({workspace_id:V},"-created_date").catch(()=>[]);i(X||[])}catch{i([])}},[]),L=g.useCallback(async V=>{if(V)try{const X=await ne.entities.CustomFieldDefinition.filter({workspace_id:V}).catch(()=>[]);o((X||[]).filter(N=>N.is_native!==!0))}catch{o([])}},[]);g.useEffect(()=>{e!=null&&e.email&&(async()=>{var V;c(!0);try{const X=await ne.functions.invoke("getWorkspaceId",{user_email:e.email}),N=((V=X==null?void 0:X.data)==null?void 0:V.workspace_id)||(X==null?void 0:X.workspace_id);N&&(n(N),await Promise.all([P(N),L(N)]))}catch{}c(!1)})()},[e==null?void 0:e.email,P,L]);const T=()=>{m(null),u(!0)},R=V=>{v(null),m(V),u(!0)},U=async V=>{if(t){w(!0);try{if(V.is_default){const X=(s||[]).filter(N=>N.category===V.category&&N.is_default&&(!p||N.id!==p.id));await Promise.all(X.map(N=>ne.entities.MessageTemplate.update(N.id,{is_default:!1}).catch(()=>null)))}p?(await ne.entities.MessageTemplate.update(p.id,V),D("Modelo atualizado")):(await ne.entities.MessageTemplate.create({...V,workspace_id:t,created_by:e.email}),D("Modelo criado")),u(!1),m(null),await P(t)}catch(X){D((X==null?void 0:X.message)||"Erro ao salvar","error")}w(!1)}},I=async V=>{w(!0);try{await ne.entities.MessageTemplate.create({workspace_id:t,name:`Cópia de ${V.name}`,subject:V.subject,body_html:V.body_html,category:V.category,is_default:!1,created_by:e.email}),v(null),D("Modelo duplicado"),await P(t)}catch(X){D((X==null?void 0:X.message)||"Erro ao duplicar","error")}w(!1)},H=async()=>{if(j){_(!0);try{await ne.entities.MessageTemplate.delete(j.id),v(null),D("Modelo excluído"),await P(t)}catch(V){D((V==null?void 0:V.message)||"Erro ao excluir","error")}_(!1),k(null)}};return r.jsxs("div",{className:"px-6 py-6",children:[r.jsx("div",{className:"flex items-center gap-1.5 text-sm text-gray-500 mb-6",children:r.jsx("span",{className:"font-medium text-gray-700",children:"Modelos de Mensagem"})}),r.jsxs("div",{className:"flex items-start justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold text-gray-900 mb-1",children:"Modelos de Mensagem"}),r.jsx("p",{className:"text-sm text-gray-500",children:"Crie e gerencie templates de email para comunicação com candidatos."})]}),r.jsxs("button",{type:"button",onClick:T,className:"text-sm px-4 py-2 text-white rounded-lg font-medium hover:opacity-90 flex items-center gap-2",style:{background:cy},children:[r.jsx(Ln,{size:14})," Modelo"]})]}),r.jsx("div",{className:"bg-white border border-gray-200 rounded-lg overflow-visible",children:l?r.jsxs("div",{className:"px-6 py-16 flex items-center justify-center gap-2 text-sm text-gray-400",children:[r.jsx(rt,{size:14,className:"animate-spin"})," Carregando..."]}):s.length===0?r.jsxs("div",{className:"px-6 py-16 flex flex-col items-center text-center",children:[r.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-3",children:r.jsx(mr,{size:22,className:"text-gray-400"})}),r.jsx("div",{className:"text-sm font-semibold text-gray-900 mb-1",children:"Nenhum modelo criado ainda"}),r.jsx("p",{className:"text-sm text-gray-500 max-w-sm mb-4",children:"Crie seu primeiro modelo de mensagem para agilizar a comunicação com candidatos."}),r.jsxs("button",{type:"button",onClick:T,className:"text-sm px-4 py-2 text-white rounded-lg font-medium hover:opacity-90 flex items-center gap-2",style:{background:cy},children:[r.jsx(Ln,{size:14})," Criar primeiro modelo"]})]}):r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-gray-100 bg-gray-50",children:[r.jsx("th",{className:"text-left text-[10px] font-semibold uppercase tracking-wider text-gray-500 px-5 py-3",children:"Nome"}),r.jsx("th",{className:"text-left text-[10px] font-semibold uppercase tracking-wider text-gray-500 px-5 py-3",children:"Categoria"}),r.jsx("th",{className:"text-right text-[10px] font-semibold uppercase tracking-wider text-gray-500 px-5 py-3 w-20",children:"Ações"})]})}),r.jsx("tbody",{children:s.map(V=>r.jsxs("tr",{onClick:()=>v(V),className:"border-b border-gray-50 last:border-b-0 hover:bg-gray-50/50 cursor-pointer",children:[r.jsx("td",{className:"px-5 py-3",children:r.jsxs("div",{className:"flex items-center",children:[r.jsx("span",{className:"text-sm text-gray-900 font-medium",children:V.name}),V.is_default&&r.jsx(TO,{})]})}),r.jsx("td",{className:"px-5 py-3",children:r.jsx(AO,{category:V.category})}),r.jsx("td",{className:"px-5 py-3 text-right",onClick:X=>X.stopPropagation(),children:r.jsx(NO,{items:[{label:"Editar",icon:$r,onClick:()=>R(V)},{label:"Duplicar",icon:Js,onClick:()=>I(V)},{label:"Excluir",icon:zn,danger:!0,onClick:()=>k(V)}]})})]},V.id))})]})}),r.jsx("div",{className:"mt-6",children:r.jsx(Mue,{onToast:(V,X)=>D(V,X)})}),r.jsx(Hue,{template:y,onClose:()=>v(null),onEdit:V=>R(V),onDuplicate:V=>I(V),onDelete:V=>k(V)}),r.jsx(Vue,{isOpen:d,template:p,onClose:()=>{x||(u(!1),m(null))},onSave:U,saving:x,hasCalendarLink:C,customFields:a}),j&&r.jsx("div",{onClick:()=>!S&&k(null),style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:2100,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:V=>V.stopPropagation(),className:"bg-white rounded-xl shadow-xl p-6",style:{maxWidth:420,width:"100%"},children:[r.jsx("div",{className:"flex justify-center",children:r.jsx("div",{className:"w-12 h-12 rounded-full bg-red-50 flex items-center justify-center",children:r.jsx(_o,{size:28,className:"text-red-600"})})}),r.jsx("h3",{className:"text-lg font-semibold text-gray-900 mt-4 text-center",children:"Excluir modelo"}),r.jsxs("p",{className:"text-sm text-gray-600 mt-2 text-center",children:["Tem certeza que deseja excluir o modelo"," ",r.jsxs("span",{className:"font-medium text-gray-900",children:['"',j.name,'"']}),"?"]}),r.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[r.jsx("button",{type:"button",onClick:()=>k(null),disabled:S,className:"text-sm px-4 py-2 border border-gray-200 bg-white text-gray-700 rounded-lg font-medium hover:bg-gray-50 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{type:"button",onClick:H,disabled:S,className:"text-sm px-4 py-2 bg-red-600 text-white rounded-lg font-medium hover:bg-red-700 disabled:opacity-50 flex items-center gap-2",children:[S&&r.jsx(rt,{size:13,className:"animate-spin"}),"Excluir"]})]})]})}),F&&r.jsx("div",{className:"fixed bottom-6 right-6 px-4 py-2.5 rounded-lg shadow-lg text-sm font-medium z-[3000]",style:{background:F.type==="error"?"#FEE2E2":"#DCFCE7",color:F.type==="error"?"#991B1B":"#15803D",border:`1px solid ${F.type==="error"?"#FECACA":"#BBF7D0"}`},children:F.msg})]})}function Gue(){const{user:e}=tr();In();const[t,n]=g.useState(null),[s,i]=g.useState([]),[a,o]=g.useState(!0),[l,c]=g.useState(null),[d,u]=g.useState(""),[p,m]=g.useState(null),x=g.useCallback(async _=>{const A=(await ne.entities.RejectionReason.filter({workspace_id:_})||[]).sort((C,D)=>(C.order||0)-(D.order||0));i(A)},[]);g.useEffect(()=>{e!=null&&e.email&&(async()=>{var _;o(!0);try{const F=await ne.functions.invoke("getWorkspaceId",{user_email:e.email}),A=((_=F==null?void 0:F.data)==null?void 0:_.workspace_id)||(F==null?void 0:F.workspace_id);if(!A)return;n(A),await ne.functions.invoke("ensureDefaultRejectionReasons",{workspace_id:A}),await x(A)}finally{o(!1)}})()},[e==null?void 0:e.email,x]);const w=_=>{c(_.id),u(_.label)},y=async()=>{const _=d.trim();if(!_){c(null);return}const F=s.find(A=>A.id===l);F&&F.label!==_&&(await ne.entities.RejectionReason.update(l,{label:_}),i(A=>A.map(C=>C.id===l?{...C,label:_}:C))),c(null)},v=async _=>{const F=!_.is_active;await ne.entities.RejectionReason.update(_.id,{is_active:F}),i(A=>A.map(C=>C.id===_.id?{...C,is_active:F}:C))},j=async(_,F)=>{const A=_+F;if(A<0||A>=s.length)return;const C=s[_],D=s[A],P=[...s];P[_]=D,P[A]=C;const L=P.map((T,R)=>({...T,order:R+1}));i(L),await Promise.all([ne.entities.RejectionReason.update(C.id,{order:A+1}),ne.entities.RejectionReason.update(D.id,{order:_+1})])},k=async()=>{var A;if(!t)return;const _=(((A=s[s.length-1])==null?void 0:A.order)||s.length)+1,F=await ne.entities.RejectionReason.create({workspace_id:t,label:"Novo motivo",is_default:!1,is_active:!0,order:_});i(C=>[...C,F]),c(F.id),u(F.label)},S=async _=>{await ne.entities.RejectionReason.delete(_),i(F=>F.filter(A=>A.id!==_)),m(null)};return r.jsxs("div",{className:"px-6 py-6",children:[r.jsx("div",{className:"flex items-center gap-1.5 text-sm text-gray-500 mb-6",children:r.jsx("span",{className:"font-medium text-gray-700",children:"Motivos de reprovação"})}),r.jsx("h1",{className:"text-xl font-semibold text-gray-900 mb-1",children:"Motivos de reprovação"}),r.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Gerencie os motivos disponíveis ao reprovar candidatos no pipeline."}),r.jsx("div",{className:"bg-white border border-gray-200 rounded-lg max-w-2xl",children:a?r.jsx("div",{className:"py-12 flex justify-center",children:r.jsx(rt,{size:20,className:"animate-spin text-gray-400"})}):r.jsxs("div",{className:"divide-y divide-gray-100",children:[s.map((_,F)=>r.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[r.jsxs("div",{className:"flex flex-col",children:[r.jsx("button",{type:"button",onClick:()=>j(F,-1),disabled:F===0,className:"text-gray-400 hover:text-gray-700 disabled:opacity-30 disabled:cursor-not-allowed",children:r.jsx(Dc,{size:14})}),r.jsx("button",{type:"button",onClick:()=>j(F,1),disabled:F===s.length-1,className:"text-gray-400 hover:text-gray-700 disabled:opacity-30 disabled:cursor-not-allowed",children:r.jsx(ar,{size:14})})]}),r.jsx("div",{className:"flex-1 min-w-0",children:l===_.id?r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("input",{autoFocus:!0,t
796ype:"text",value:d,onChange:A=>u(A.target.value),onKeyDown:A=>{A.key==="Enter"&&y(),A.key==="Escape"&&c(null)},className:"flex-1 text-sm px-2 py-1 rounded-md border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400"}),r.jsx("button",{type:"button",onClick:y,className:"text-green-600 hover:text-green-700","aria-label":"Salvar",children:r.jsx(fn,{size:16})}),r.jsx("button",{type:"button",onClick:()=>c(null),className:"text-gray-400 hover:text-gray-700","aria-label":"Cancelar",children:r.jsx(Jt,{size:16})})]}):r.jsxs("button",{type:"button",onClick:()=>w(_),className:"flex items-center gap-2 group text-left",children:[r.jsx("span",{className:`text-sm ${_.is_active?"text-gray-900":"text-gray-400 line-through"}`,children:_.label}),r.jsx($r,{size:12,className:"text-gray-300 opacity-0 group-hover:opacity-100 transition-opacity"})]})}),_.is_default&&r.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full",children:"Padrão"}),r.jsx("button",{type:"button",onClick:()=>v(_),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors ${_.is_active?"bg-indigo-600":"bg-gray-200"}`,title:_.is_active?"Ativo":"Inativo","aria-label":_.is_active?"Desativar":"Ativar",children:r.jsx("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white transition-transform ${_.is_active?"translate-x-5":"translate-x-1"}`})}),_.is_default?r.jsx("div",{style:{width:14}}):r.jsx("button",{type:"button",onClick:()=>m(_.id),className:"text-gray-400 hover:text-red-600","aria-label":"Excluir",children:r.jsx(zn,{size:14})})]},_.id)),r.jsx("div",{className:"px-4 py-3",children:r.jsxs("button",{type:"button",onClick:k,className:"text-sm text-indigo-600 hover:text-indigo-700 font-medium inline-flex items-center gap-1.5",children:[r.jsx(Ln,{size:14})," Adicionar motivo"]})})]})}),p&&r.jsx("div",{className:"fixed inset-0 z-[3000] flex items-center justify-center bg-black/40 p-4",onClick:()=>m(null),children:r.jsxs("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-sm p-6",onClick:_=>_.stopPropagation(),children:[r.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-2",children:"Excluir motivo?"}),r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Esta ação não pode ser desfeita."}),r.jsxs("div",{className:"flex justify-end gap-2",children:[r.jsx("button",{type:"button",onClick:()=>m(null),className:"text-sm px-4 py-2 border border-gray-200 bg-white text-gray-700 rounded-md font-medium hover:bg-gray-50",children:"Cancelar"}),r.jsx("button",{type:"button",onClick:()=>S(p),className:"text-sm px-4 py-2 bg-red-600 text-white rounded-md font-semibold hover:bg-red-700",children:"Excluir"})]})]})})]})}const _2=[{key:"geral",label:"Geral",icon:Gf,Component:rB},{key:"equipe",label:"Equipe & Funções",icon:Nr,Component:aue},{key:"plano",label:"Plano e Faturamento",icon:Ly,Component:Cue},{key:"modulos",label:"Módulos",icon:UV,Component:Nue},{key:"integracoes",label:"Integrações",icon:aH,Component:Bue},{key:"templates",label:"Templates de Email",icon:ui,Component:que},{key:"rejeicao",label:"Motivos de Rejeição",icon:yl,Component:Gue}];function lT(){var l;const{section:e}=Do(),t=In(),{user:n}=tr(),[s,i]=g.useState(""),a=_2.find(c=>c.key===e)?e:"geral",o=((l=_2.find(c=>c.key===a))==null?void 0:l.Component)||rB;return g.useEffect(()=>{if(!(n!=null&&n.email))return;let c=!0;return(async()=>{try{const d=await ne.functions.invoke("getWorkspaceId",{user_email:n.email}),u=(d==null?void 0:d.data)||d,p=u==null?void 0:u.workspace_id;if(c&&p)try{const m=await ne.entities.Workspace.get(p);c&&i((m==null?void 0:m.name)||"")}catch{}}catch{}})(),()=>{c=!1}},[n==null?void 0:n.email]),r.jsxs("div",{style:{display:"flex",minHeight:"calc(100vh - var(--sv-topline-h))",fontFamily:"'Switzer', sans-serif",background:"#F6F8FA"},children:[r.jsxs("aside",{style:{width:220,flexShrink:0,padding:"32px 12px",borderRight:"1px solid #E3E8EE",background:"#FFFFFF"},children:[r.jsxs("div",{style:{padding:"0 8px 20px"},children:[r.jsx("h2",{style:{fontSize:15,fontWeight:700,color:"#1A1F36",margin:0,fontFamily:"'Switzer', sans-serif"}
796,children:"Conta & Workspace"}),s&&r.jsx("div",{style:{fontSize:12,color:"#A3ACB9",fontWeight:400,marginTop:4,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontFamily:"'Switzer', sans-serif"},children:s})]}),r.jsx("nav",{style:{display:"flex",flexDirection:"column",gap:2},children:_2.map(c=>{const d=c.icon,u=c.key===a;return r.jsxs("button",{onClick:()=>t(`/app/conta/${c.key}`),style:{display:"flex",alignItems:"center",gap:8,width:"100%",textAlign:"left",padding:"8px 12px",borderRadius:8,border:"none",background:u?"#F0EBFF":"transparent",color:u?"#6C24F5":"#697386",fontSize:13,fontWeight:u?600:500,fontFamily:"'Switzer', sans-serif",cursor:"pointer",transition:"background 0.15s"},onMouseEnter:p=>{u||(p.currentTarget.style.background="#F0F2F5")},onMouseLeave:p=>{u||(p.currentTarget.style.background="transparent")},children:[r.jsx(d,{size:16,strokeWidth:1.5}),c.label]},c.key)})})]}),r.jsx("main",{style:{flex:1,padding:"32px 40px",minWidth:0},children:r.jsx(o,{})})]})}const C2="#E5E7EB",Bg="#6C24F5",Og="#111827",Kue="#6B7280";function Yue(){const[e,t]=g.useState([{id:"welcome",role:"assistant",text:"Olá! Como podemos ajudar? Descreva seu problema e responderemos o mais breve possível."}]),[n,s]=g.useState(""),i=g.useRef(null);g.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]);const a=()=>{const l=n.trim();l&&(t(c=>[...c,{id:`m-${Date.now()}`,role:"user",text:l}]),s(""))},o=l=>{l.key==="Enter"&&!l.shiftKey&&(l.preventDefault(),a())};return r.jsxs("div",{style:{fontFamily:"var(--sv-font)",color:Og},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16,marginBottom:24},children:[r.jsxs("div",{children:[r.jsx("h1",{style:{fontSize:22,fontWeight:500,color:Og,lineHeight:1.2,margin:0},children:"Suporte"}),r.jsx("p",{style:{fontSize:14,color:Kue,marginTop:4,margin:0},children:"Como podemos te ajudar?"})]}),r.jsx("button",{type:"button",onClick:a,style:{background:Bg,color:"#FFFFFF",fontSize:13,fontWeight:600,padding:"8px 16px",borderRadius:8,border:"none",cursor:"pointer",whiteSpace:"nowrap"},children:"Abrir chamado"})]}),r.jsxs("div",{style:{background:"#FFFFFF",border:`1px solid ${C2}`,borderRadius:12,display:"flex",flexDirection:"column",height:520,overflow:"hidden"},children:[r.jsx("div",{ref:i,style:{flex:1,overflowY:"auto",padding:"20px 24px",display:"flex",flexDirection:"column",gap:12},children:e.map(l=>r.jsxs("div",{style:{display:"flex",justifyContent:l.role==="user"?"flex-end":"flex-start"},children:[l.role==="assistant"&&r.jsx("div",{style:{width:28,height:28,borderRadius:"50%",background:"#F3F0FF",color:Bg,display:"flex",alignItems:"center",justifyContent:"center",marginRight:8,flexShrink:0},children:r.jsx(i8,{size:15})}),r.jsx("div",{style:{maxWidth:"75%",background:l.role==="user"?Bg:"#F3F4F6",color:l.role==="user"?"#FFFFFF":Og,fontSize:13,lineHeight:1.5,padding:"10px 14px",borderRadius:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:l.text})]},l.id))}),r.jsxs("div",{style:{borderTop:`1px solid ${C2}`,padding:"12px 16px",display:"flex",alignItems:"center",gap:8,background:"#FAFAFA"},children:[r.jsx("input",{type:"text",value:n,onChange:l=>s(l.target.value),onKeyDown:o,placeholder:"Descreva seu problema ou dúvida...",style:{flex:1,border:`1px solid ${C2}`,borderRadius:8,padding:"10px 14px",fontSize:13,outline:"none",background:"#FFFFFF",fontFamily:"inherit",color:Og}}),r.jsxs("button",{type:"button",onClick:a,disabled:!n.trim(),style:{background:Bg,color:"#FFFFFF",border:"none",borderRadius:8,padding:"10px 14px",cursor:n.trim()?"pointer":"not-allowed",opacity:n.trim()?1:.5,display:"flex",alignItems:"center",gap:6,fontSize:13,fontWeight:600},children:[r.jsx(pa,{size:14}),"Enviar"]})]})]})]})}function Hs(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Xue=typeof Symbol=="function"&&Symbol.observable||"@@observable",cT=Xue,dT=()=>Math.random().toString(36).substring(7).split("").join("."),Jue={INIT:`@@redux/INIT${dT()}`,REPLACE:`@@redux/REPLACE${dT()}`},uT=Jue;function Que(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function RO(e,t,n){if(typeof e!="function")throw new Error(Hs(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Hs(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hs(1));return n(RO)(e,t)}let s=e,i=t,a=new Map,o=a,l=0,c=!1;function d(){o===a&&(o=new Map,a.forEach((v,j)=>{o.set(j,v)}))}function u(){if(c)throw new Error(Hs(3));return i}function p(v){if(typeof v!="function")throw new Error(Hs(4));if(c)throw new Error(Hs(5));let j=!0;d();const k=l++;return o.set(k,v),function(){if(j){if(c)throw new Error(Hs(6));j=!1,d(),o.delete(k),a=null}}}function m(v){if(!Que(v))throw new Error(Hs(7));if(typeof v.type>"u")throw new Error(Hs(8));if(typeof v.type!="string")throw new Error(Hs(17));if(c)throw new Error(Hs(9));try{c=!0,i=s(i,v)}finally{c=!1}
796return(a=o).forEach(k=>{k()}),v}function x(v){if(typeof v!="function")throw new Error(Hs(10));s=v,m({type:uT.REPLACE})}function w(){const v=p;return{subscribe(j){if(typeof j!="object"||j===null)throw new Error(Hs(11));function k(){const _=j;_.next&&_.next(u())}return k(),{unsubscribe:v(k)}},[cT](){return this}}}return m({type:uT.INIT}),{dispatch:m,subscribe:p,getState:u,replaceReducer:x,[cT]:w}}function fT(e,t){return function(...n){return t(e.apply(this,n))}}function pT(e,t){if(typeof e=="function")return fT(e,t);if(typeof e!="object"||e===null)throw new Error(Hs(16));const n={};for(const s in e){const i=e[s];typeof i=="function"&&(n[s]=fT(i,t))}return n}function DO(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...s)=>t(n(...s)))}function Zue(...e){return t=>(n,s)=>{const i=t(n,s);let a=()=>{throw new Error(Hs(15))};const o={getState:i.getState,dispatch:(c,...d)=>a(c,...d)},l=e.map(c=>c(o));return a=DO(...l)(i.dispatch),{...i,dispatch:a}}}var E2={exports:{}},F2={};/**
797 * @license React
798 * use-sync-external-store-with-selector.production.js
799 *
800 * Copyright (c) Meta Platforms, Inc. and affiliates.
801 *
802 * This source code is licensed under the MIT license found in the
803 * LICENSE file in the root directory of this source tree.
804 */var hT;function efe(){if(hT)return F2;hT=1;var e=Oy();function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:t,s=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return F2.useSyncExternalStoreWithSelector=function(c,d,u,p,m){var x=i(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=o(function(){function v(F){if(!j){if(j=!0,k=F,F=p(F),m!==void 0&&w.hasValue){var A=w.value;if(m(A,F))return S=A}return S=F}if(A=S,n(k,F))return A;var C=p(F);return m!==void 0&&m(A,C)?(k=F,A):(k=F,S=C)}var j=!1,k,S,_=u===void 0?null:u;return[function(){return v(d())},_===null?void 0:function(){return v(_())}]},[d,u,p,m]);var y=s(c,x[0],x[1]);return a(function(){w.hasValue=!0,w.value=y},[y]),l(y),y},F2}var mT;function tfe(){return mT||(mT=1,E2.exports=efe()),E2.exports}tfe();var nfe=g.version.startsWith("19"),rfe=Symbol.for(nfe?"react.transitional.element":"react.element"),sfe=Symbol.for("react.portal"),ife=Symbol.for("react.fragment"),afe=Symbol.for("react.strict_mode"),ofe=Symbol.for("react.profiler"),lfe=Symbol.for("react.consumer"),cfe=Symbol.for("react.context"),IO=Symbol.for("react.forward_ref"),dfe=Symbol.for("react.suspense"),ufe=Symbol.for("react.suspense_list"),Mk=Symbol.for("react.memo"),ffe=Symbol.for("react.lazy"),pfe=IO,hfe=Mk;function mfe(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case rfe:switch(e=e.type,e){case ife:case ofe:case afe:case dfe:case ufe:return e;default:switch(e=e&&e.$$typeof,e){case cfe:case IO:case ffe:case Mk:return e;case lfe:return e;default:return t}}case sfe:return t}}}function gfe(e){return mfe(e)===Mk}function xfe(e,t,n,s,{areStatesEqual:i,areOwnPropsEqual:a,areStatePropsEqual:o}){let l=!1,c,d,u,p,m;function x(k,S){return c=k,d=S,u=e(c,d),p=t(s,d),m=n(u,p,d),l=!0,m}function w(){return u=e(c,d),t.dependsOnOwnProps&&(p=t(s,d)),m=n(u,p,d),m}function y(){return e.dependsOnOwnProps&&(u=e(c,d)),t.dependsOnOwnProps&&(p=t(s,d)),m=n(u,p,d),m}function v(){const k=e(c,d),S=!o(k,u);return u=k,S&&(m=n(u,p,d)),m}function j(k,S){const _=!a(S,d),F=!i(k,c,S,d);return c=k,d=S,_&&F?w():_?y():F?v():m}return function(S,_){return l?j(S,_):x(S,_)}}function yfe(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:s,...i}){const a=t(e,i),o=n(e,i),l=s(e,i);return xfe(a,o,l,e,i)}function vfe(e,t){const n={};for(const s in e){const i=e[s];typeof i=="function"&&(n[s]=(...a)=>t(i(...a)))}return n}function wj(e){return function(n){const s=e(n);function i(){return s}return i.dependsOnOwnProps=!1,i}}function gT(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function PO(e,t){return function(s,{displayName:i}){const a=function(l,c){return a.dependsOnOwnProps?a.mapToProps(l,c):a.mapToProps(l,void 0)};return a.dependsOnOwnProps=!0,a.mapToProps=function(l,c){a.mapToProps=e,a.dependsOnOwnProps=gT(e);let d=a(l,c);return typeof d=="function"&&(a.mapToProps=d,a.dependsOnOwnProps=gT(d),d=a(l,c)),d},a}}function Lk(e,t){return(n,s)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${s.wrappedComponentName}.`)}}function bfe(e){return e&&typeof e=="object"?wj(t=>vfe(e,t)):e?typeof e=="function"?PO(e):Lk(e,"mapDispatchToProps"):wj(t=>({dispatch:t}))}function wfe(e){return e?typeof e=="function"?PO(e):Lk(e,"mapStateToProps"):wj(()=>({}))}function jfe(e,t,n){return{...n,...e,...t}}function Sfe(e){return function(n,{displayName:s,areMergedPropsEqual:i}){let a=!1,o;return function(c,d,u){const p=e(c,d,u);return a?i(p,o)||(o=p):(a=!0,o=p),o}}}function kfe(e){return e?typeof e=="function"?Sfe(e):Lk(e,"mergeProps"):()=>jfe}function _fe(e){e()}function Cfe(){let e=null,t=null;return{clear(){e=null,t=null},notify(){_fe(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let s=e;for(;s;)n.push(s),s=s.next;return n},subscribe(n){let s=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!s||e===null||(s=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var xT={notify(){},get:()=>[]};function BO(e,t){let n,s=xT,i=0,a=!1;function o(y){u();const v=s.subscribe(y);let j=!1;return()=>{j||(j=!0,v(),p())}}function l(){s.notify()}function c(){w.onStateChange&&w.onStateChange()}function d(){return a}function u(){i++,n||(n=t?t.addNestedSub(c):e.subscribe(c),s=Cfe())}function p(){i--,n&&i===0&&(n(),n=void 0,s.clear(),s=xT)}function m(){a||(a=!0,u())}function x(){a&&(a=!1,p())}const w={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:d,trySubscribe:m,tryUnsubscribe:x,getListeners:()=>s};return w}var Efe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ffe=Efe(),Afe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Tfe=Afe(),Nfe=()=>Ffe||Tfe?g.useLayoutEffect:g.useEffect,dy=Nfe();function yT(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function A2(e,t){if(yT(e,t))return!0;
804if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!yT(e[n[i]],t[n[i]]))return!1;return!0}var Rfe={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Dfe={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ife={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},OO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Pfe={[pfe]:Ife,[hfe]:OO};function vT(e){return gfe(e)?OO:Pfe[e.$$typeof]||Rfe}var Bfe=Object.defineProperty,Ofe=Object.getOwnPropertyNames,bT=Object.getOwnPropertySymbols,Mfe=Object.getOwnPropertyDescriptor,Lfe=Object.getPrototypeOf,wT=Object.prototype;function jj(e,t){if(typeof t!="string"){if(wT){const a=Lfe(t);a&&a!==wT&&jj(e,a)}let n=Ofe(t);bT&&(n=n.concat(bT(t)));const s=vT(e),i=vT(t);for(let a=0;a<n.length;++a){const o=n[a];if(!Dfe[o]&&!(i&&i[o])&&!(s&&s[o])){const l=Mfe(t,o);try{Bfe(e,o,l)}catch{}}}}return e}var T2=Symbol.for("react-redux-context"),N2=typeof globalThis<"u"?globalThis:{};function zfe(){if(!g.createContext)return{};const e=N2[T2]??(N2[T2]=new Map);let t=e.get(g.createContext);return t||(t=g.createContext(null),e.set(g.createContext,t)),t}var MO=zfe(),Wfe=[null,null];function $fe(e,t,n){dy(()=>e(...t),n)}function Ufe(e,t,n,s,i,a){e.current=s,n.current=!1,i.current&&(i.current=null,a())}function Vfe(e,t,n,s,i,a,o,l,c,d,u){if(!e)return()=>{};let p=!1,m=null;const x=()=>{if(p||!l.current)return;const y=t.getState();let v,j;try{v=s(y,i.current)}catch(k){j=k,m=k}j||(m=null),v===a.current?o.current||d():(a.current=v,c.current=v,o.current=!0,u())};return n.onStateChange=x,n.trySubscribe(),x(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,m)throw m}}function Hfe(e,t){return e===t}function qfe(e,t,n,{pure:s,areStatesEqual:i=Hfe,areOwnPropsEqual:a=A2,areStatePropsEqual:o=A2,areMergedPropsEqual:l=A2,forwardRef:c=!1,context:d=MO}={}){const u=d,p=wfe(e),m=bfe(t),x=kfe(n),w=!!e;return v=>{const j=v.displayName||v.name||"Component",k=`Connect(${j})`,S={shouldHandleStateChanges:w,displayName:k,wrappedComponentName:j,WrappedComponent:v,initMapStateToProps:p,initMapDispatchToProps:m,initMergeProps:x,areStatesEqual:i,areStatePropsEqual:o,areOwnPropsEqual:a,areMergedPropsEqual:l};function _(C){const[D,P,L]=g.useMemo(()=>{const{reactReduxForwardedRef:Z,...Ne}=C;return[C.context,Z,Ne]},[C]),T=g.useMemo(()=>{let Z=u;return D!=null&&D.Consumer,Z},[D,u]),R=g.useContext(T),U=!!C.store&&!!C.store.getState&&!!C.store.dispatch,I=!!R&&!!R.store,H=U?C.store:R.store,V=I?R.getServerState:H.getState,X=g.useMemo(()=>yfe(H.dispatch,S),[H]),[N,W]=g.useMemo(()=>{if(!w)return Wfe;const Z=BO(H,U?void 0:R.subscription),Ne=Z.notifyNestedSubs.bind(Z);return[Z,Ne]},[H,U,R]),O=g.useMemo(()=>U?R:{...R,subscription:N},[U,R,N]),G=g.useRef(void 0),M=g.useRef(L),z=g.useRef(void 0),K=g.useRef(!1),Y=g.useRef(!1),J=g.useRef(void 0);dy(()=>(Y.current=!0,()=>{Y.current=!1}),[]);const Q=g.useMemo(()=>()=>z.current&&L===M.current?z.current:X(H.getState(),L),[H,L]),ie=g.useMemo(()=>Ne=>N?Vfe(w,H,N,X,M,G,K,Y,z,W,Ne):()=>{},[N]);$fe(Ufe,[M,G,K,L,z,W]);let ae;try{ae=g.useSyncExternalStore(ie,Q,V?()=>X(V(),L):Q)}catch(Z){throw J.current&&(Z.message+=`
805The error may be correlated with this previous error:
806${J.current.stack}
807
808`),Z}dy(()=>{J.current=void 0,z.current=void 0,G.current=ae});const re=g.useMemo(()=>g.createElement(v,{...ae,ref:P}),[P,v,ae]);return g.useMemo(()=>w?g.createElement(T.Provider,{value:O},re):re,[T,re,O])}const A=g.memo(_);if(A.WrappedComponent=v,A.displayName=_.displayName=k,c){const D=g.forwardRef(function(L,T){return g.createElement(A,{...L,reactReduxForwardedRef:T})});return D.displayName=k,D.WrappedComponent=v,jj(D,v)}return jj(A,v)}}var LO=qfe;function Gfe(e){const{children:t,context:n,serverState:s,store:i}=e,a=g.useMemo(()=>{const c=BO(i);return{store:i,subscription:c,getServerState:s?()=>s:void 0}},[i,s]),o=g.useMemo(()=>i.getState(),[i]);dy(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==i.get
808State()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,o]);const l=n||MO;return g.createElement(l.Provider,{value:a},t)}var Kfe=Gfe;function Yfe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function zO(e,t){var n=g.useState(function(){return{inputs:t,result:e()}})[0],s=g.useRef(!0),i=g.useRef(n),a=s.current||!!(t&&i.current.inputs&&Yfe(t,i.current.inputs)),o=a?i.current:{inputs:t,result:e()};return g.useEffect(function(){s.current=!1,i.current=o},[o]),o.result}function Xfe(e,t){return zO(function(){return e},t)}var En=zO,Ut=Xfe,Jfe="Invariant failed";function Qfe(e,t){throw new Error(Jfe)}var Ba=function(t){var n=t.top,s=t.right,i=t.bottom,a=t.left,o=s-a,l=i-n,c={top:n,right:s,bottom:i,left:a,width:o,height:l,x:a,y:n,center:{x:(s+a)/2,y:(i+n)/2}};return c},zk=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},jT=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Zfe=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},R2={top:0,right:0,bottom:0,left:0},Wk=function(t){var n=t.borderBox,s=t.margin,i=s===void 0?R2:s,a=t.border,o=a===void 0?R2:a,l=t.padding,c=l===void 0?R2:l,d=Ba(zk(n,i)),u=Ba(jT(n,o)),p=Ba(jT(u,c));return{marginBox:d,borderBox:Ba(n),paddingBox:u,contentBox:p,margin:i,border:o,padding:c}},Qi=function(t){var n=t.slice(0,-2),s=t.slice(-2);if(s!=="px")return 0;var i=Number(n);return isNaN(i)&&Qfe(),i},epe=function(){return{x:window.pageXOffset,y:window.pageYOffset}},uy=function(t,n){var s=t.borderBox,i=t.border,a=t.margin,o=t.padding,l=Zfe(s,n);return Wk({borderBox:l,border:i,margin:a,padding:o})},fy=function(t,n){return n===void 0&&(n=epe()),uy(t,n)},WO=function(t,n){var s={top:Qi(n.marginTop),right:Qi(n.marginRight),bottom:Qi(n.marginBottom),left:Qi(n.marginLeft)},i={top:Qi(n.paddingTop),right:Qi(n.paddingRight),bottom:Qi(n.paddingBottom),left:Qi(n.paddingLeft)},a={top:Qi(n.borderTopWidth),right:Qi(n.borderRightWidth),bottom:Qi(n.borderBottomWidth),left:Qi(n.borderLeftWidth)};return Wk({borderBox:t,margin:s,padding:i,border:a})},$O=function(t){var n=t.getBoundingClientRect(),s=window.getComputedStyle(t);return WO(n,s)},ST=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function tpe(e,t){return!!(e===t||ST(e)&&ST(t))}function npe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!tpe(e[n],t[n]))return!1;return!0}function Zr(e,t){t===void 0&&(t=npe);var n=null;function s(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var o=e.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return s.clear=function(){n=null},s}var xm=function(t){var n=[],s=null,i=function(){for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];n=l,!s&&(s=requestAnimationFrame(function(){s=null,t.apply(void 0,n)}))};return i.cancel=function(){s&&(cancelAnimationFrame(s),s=null)},i};function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},py.apply(null,arguments)}function UO(e,t){}UO.bind(null,"warn");UO.bind(null,"error");function yc(){}function rpe(e,t){return{...e,...t}}function ca(e,t,n){const s=t.map(i=>{const a=rpe(n,i.options);return e.addEventListener(i.eventName,i.fn,a),function(){e.removeEventListener(i.eventName,i.fn,a)}});return function(){s.forEach(a=>{a()})}}const spe="Invariant failed";class hy extends Error{}hy.prototype.toString=function(){return this.message};function jt(e,t){throw new hy(spe)}class ipe extends Rn.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=yc,this.onWindowError=n=>{const s=this.getCallbacks();s.isDragging()&&s.tryAbort(),n.error instanceof hy&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=ca(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof hy){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const ape=`
809  Press space bar to start a drag.
810  When dragging you can use the arrow keys to move the item around and escape to cancel.
811  Some screen readers may require you to be in focus mode or to use your pass through key
812`,my=e=>e+1,ope=e=>`
813  You have lifted an item in position ${my(e.source.index)}
814`,VO=(e,t)=>
814{const n=e.droppableId===t.droppableId,s=my(e.index),i=my(t.index);return n?`
815      You have moved the item from position ${s}
816      to position ${i}
817    `:`
818    You have moved the item from position ${s}
819    in list ${e.droppableId}
820    to list ${t.droppableId}
821    in position ${i}
822  `},HO=(e,t,n)=>t.droppableId===n.droppableId?`
823      The item ${e}
824      has been combined with ${n.draggableId}`:`
825      The item ${e}
826      in list ${t.droppableId}
827      has been combined with ${n.draggableId}
828      in list ${n.droppableId}
829    `,lpe=e=>{const t=e.destination;if(t)return VO(e.source,t);const n=e.combine;return n?HO(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},kT=e=>`
830  The item has returned to its starting position
831  of ${my(e.index)}
832`,cpe=e=>{if(e.reason==="CANCEL")return`
833      Movement cancelled.
834      ${kT(e.source)}
835    `;const t=e.destination,n=e.combine;return t?`
836      You have dropped the item.
837      ${VO(e.source,t)}
838    `:n?`
839      You have dropped the item.
840      ${HO(e.draggableId,e.source,n)}
841    `:`
842    The item has been dropped while not over a drop area.
843    ${kT(e.source)}
844  `},Px={dragHandleUsageInstructions:ape,onDragStart:ope,onDragUpdate:lpe,onDragEnd:cpe},rs={x:0,y:0},us=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Ni=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),vc=(e,t)=>e.x===t.x&&e.y===t.y,sp=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),Gd=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},ym=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),_T=(e,t)=>Math.min(...t.map(n=>ym(e,n))),qO=e=>t=>({x:e(t.x),y:e(t.y)});var dpe=(e,t)=>{const n=Ba({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const e0=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),CT=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],upe={top:0,right:0,bottom:0,left:0},fpe=(e,t)=>t?e0(e,t.scroll.diff.displacement):e,ppe=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,hpe=(e,t)=>t&&t.shouldClipSubject?dpe(t.pageMarginBox,e):Ba(e);var Wf=({page:e,withPlaceholder:t,axis:n,frame:s})=>{const i=fpe(e.marginBox,s),a=ppe(i,n,t),o=hpe(a,s);return{page:e,withPlaceholder:t,active:o}},$k=(e,t)=>{e.frame||jt();const n=e.frame,s=Ni(t,n.scroll.initial),i=sp(s),a={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:s,displacement:i},max:n.scroll.max}},o=Wf({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a});return{...e,frame:a,subject:o}};const GO=Zr(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),KO=Zr(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),w1=Zr(e=>Object.values(e)),mpe=Zr(e=>Object.values(e));var ip=Zr((e,t)=>mpe(t).filter(s=>e===s.descriptor.droppableId).sort((s,i)=>s.descriptor.index-i.descriptor.index));function Uk(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function j1(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var S1=Zr((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),gpe=({isMovingForward:e,draggable:t,destination:n,insideDestination:s,previousImpact:i})=>{if(!n.isCombineEnabled||!Uk(i))return null;function o(x){const w={type:"COMBINE",combine:{draggableId:x,droppableId:n.descriptor.id}};return{...i,at:w}}const l=i.displaced.all,c=l.length?l[0]:null;if(e)return c?o(c):null;const d=S1(t,s);if(!c){if(!d.length)return null;const x=d[d.length-1];return o(x.descriptor.id)}const u=d.findIndex(x=>x.descriptor.id===c);u===-1&&jt();const p=u-1;if(p<0)return null;const m=d[p];return o(m.descriptor.id)},ap=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const YO={point:rs,value:0},vm={invisible:{},visible:{},all:[]},xpe={displaced:vm,displacedBy:YO,at:null};var ua=(e,t)=>n=>e<=n&&n<=t,XO=e=>{const t=ua(e.top,e.bottom),n=ua(e.left,e.right);return s=>{if(t(s.top)&&t(s.bottom)&&n(s.left)&&n(s.right))return!0;const a=t(s.top)||t(s.bottom),o=n(s.left)||n(s.right);if(a&&o)return!0;const c=s.top<e.top&&s.bottom>e.bottom,d=s.left<e.left&&s.right>e.right;return c&&d?!0:c&&o||d&&a}},ype=e=>{const t=ua(e.top,e.bottom),n=ua(e.left,e.right);return s=>t(s.top)&&t(s.bottom)&&n(s.left)&&n(s.right)};const Vk={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},JO={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var vpe=e=>t=>{const n=ua(t.top,t.bottom),s=ua(t.left,t.right);return i=>e===Vk?n(i.top)&&n(i.bottom):s(i.left)&&s(i.right)};const bpe=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:rs;return e0(e,n)},wpe=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,jpe=(e,t,n)=>n(t)(e),Hk=({target:e,destination:t,viewport:n,withDroppableDisplacement:s,isVisibleThroughFrameFn:i})=>{const a=s?bpe(e,t):e;return wpe(a,t,i)&&jpe(a,n,i)},Spe=e=>Hk({...e,isVisibleThroughFrameFn:XO}),QO=e=>Hk({...e,isVisibleThroughFrameFn:ype}),kpe=e=>Hk({...e,isVisibleThroughFrameFn:vpe(e.destination.axis)}),_pe=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;
844const{invisible:s,visible:i}=t;if(s[e])return!1;const a=i[e];return a?a.shouldAnimate:!0};function Cpe(e,t){const n=e.page.marginBox,s={top:t.point.y,right:0,bottom:0,left:t.point.x};return Ba(zk(n,s))}function bm({afterDragging:e,destination:t,displacedBy:n,viewport:s,forceShouldAnimate:i,last:a}){return e.reduce(function(l,c){const d=Cpe(c,n),u=c.descriptor.id;if(l.all.push(u),!Spe({target:d,destination:t,viewport:s,withDroppableDisplacement:!0}))return l.invisible[c.descriptor.id]=!0,l;const m=_pe(u,a,i),x={draggableId:u,shouldAnimate:m};return l.visible[u]=x,l},{all:[],visible:{},invisible:{}})}function Epe(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function ET({insideDestination:e,inHomeList:t,displacedBy:n,destination:s}){const i=Epe(e,{inHomeList:t});return{displaced:vm,displacedBy:n,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:i}}}}function gy({draggable:e,insideDestination:t,destination:n,viewport:s,displacedBy:i,last:a,index:o,forceShouldAnimate:l}){const c=ap(e,n);if(o==null)return ET({insideDestination:t,inHomeList:c,displacedBy:i,destination:n});const d=t.find(w=>w.descriptor.index===o);if(!d)return ET({insideDestination:t,inHomeList:c,displacedBy:i,destination:n});const u=S1(e,t),p=t.indexOf(d),m=u.slice(p);return{displaced:bm({afterDragging:m,destination:n,displacedBy:i,last:a,viewport:s.frame,forceShouldAnimate:l}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function Ac(e,t){return!!t.effected[e]}var Fpe=({isMovingForward:e,destination:t,draggables:n,combine:s,afterCritical:i})=>{if(!t.isCombineEnabled)return null;const a=s.draggableId,l=n[a].descriptor.index;return Ac(a,i)?e?l:l-1:e?l+1:l},Ape=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:s})=>{if(!n.length)return null;const i=s.index,a=e?i+1:i-1,o=n[0].descriptor.index,l=n[n.length-1].descriptor.index,c=t?l:l+1;return a<o||a>c?null:a},Tpe=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:s,destination:i,insideDestination:a,previousImpact:o,viewport:l,afterCritical:c})=>{const d=o.at;if(d||jt(),d.type==="REORDER"){const p=Ape({isMovingForward:e,isInHomeList:t,location:d.destination,insideDestination:a});return p==null?null:gy({draggable:n,insideDestination:a,destination:i,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:p})}const u=Fpe({isMovingForward:e,destination:i,displaced:o.displaced,draggables:s,combine:d.combine,afterCritical:c});return u==null?null:gy({draggable:n,insideDestination:a,destination:i,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:u})},Npe=({displaced:e,afterCritical:t,combineWith:n,displacedBy:s})=>{const i=!!(e.visible[n]||e.invisible[n]);return Ac(n,t)?i?rs:sp(s.point):i?s.point:rs},Rpe=({afterCritical:e,impact:t,draggables:n})=>{const s=j1(t);s||jt();const i=s.draggableId,a=n[i].page.borderBox.center,o=Npe({displaced:t.displaced,afterCritical:e,combineWith:i,displacedBy:t.displacedBy});return us(a,o)};const ZO=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Dpe=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,qk=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,FT=({axis:e,moveRelativeTo:t,isMoving:n})=>Gd(e.line,t.marginBox[e.end]+ZO(e,n),qk(e,t.marginBox,n)),AT=({axis:e,moveRelativeTo:t,isMoving:n})=>Gd(e.line,t.marginBox[e.start]-Dpe(e,n),qk(e,t.marginBox,n)),Ipe=({axis:e,moveInto:t,isMoving:n})=>Gd(e.line,t.contentBox[e.start]+ZO(e,n),qk(e,t.contentBox,n));var Ppe=({impact:e,draggable:t,draggables:n,droppable:s,afterCritical:i})=>{const a=ip(s.descriptor.id,n),o=t.page,l=s.axis;if(!a.length)return Ipe({axis:l,moveInto:s.page,isMoving:o});const{displaced:c,displacedBy:d}=e,u=c.all[0];if(u){const m=n[u];if(Ac(u,i))return AT({axis:l,moveRelativeTo:m.page,isMoving:o});const x=uy(m.page,d.point);return AT({axis:l,moveRelativeTo:x,isMoving:o})}const p=a[a.length-1];if(p.descriptor.id===t.descriptor.id)return o.borderBox.center;if(Ac(p.descriptor.id,i)){const m=uy(p.page,sp(i.displacedBy.point));return FT({axis:l,moveRelativeTo:m,isMoving:o})}return FT({axis:l,moveRelativeTo:p.page,isMoving:o})},Sj=(e,t)=>{const n=e.frame;return n?us(t,n.scroll.diff.displacement):t};const Bpe=({impact:e,draggable:t,droppable:n,draggables:s,afterCritical:i})=>{const a=t.page.borderBox.center,o=e.at;return!n||!o?a:o.type==="REORDER"?Ppe({impact:e,draggable:t,draggables:s,droppable:n,afterCritical:i}):Rpe({impact:e,draggables:s,afterCritical:i})};var k1=e=>{const t=Bpe(e),n=e.droppable;return n?Sj(n,t):t},eM=(e,t)=>{const n=Ni(t,e.scroll.initial),s=sp(n);return{frame:Ba({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:s}}}};function TT(e,t){return e.map(n=>t[n])}function Ope(e,t){for(let n=0;n<t.length;n++){const s=t[n].visible[e];if(s)return s}return null}var Mpe=({impact:e,viewport:t,destination:n,draggables:s,maxScrollChange:i})=>{const a=eM(t,us(t.scroll.current,i)),o=n.frame?$k(n,us(n.frame.scroll.current,i)):n,l=e.displaced,c=bm({afterDragging:TT(l.all,s),destination:n,displacedBy:e.displacedBy,viewport:
844a.frame,last:l,forceShouldAnimate:!1}),d=bm({afterDragging:TT(l.all,s),destination:o,displacedBy:e.displacedBy,viewport:t.frame,last:l,forceShouldAnimate:!1}),u={},p={},m=[l,c,d];return l.all.forEach(w=>{const y=Ope(w,m);if(y){p[w]=y;return}u[w]=!0}),{...e,displaced:{all:l.all,invisible:u,visible:p}}},Lpe=(e,t)=>us(e.scroll.diff.displacement,t),Gk=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const s=Lpe(n,e),i=Ni(s,t.page.borderBox.center);return us(t.client.borderBox.center,i)},tM=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:s,withDroppableDisplacement:i,onlyOnMainAxis:a=!1})=>{const o=Ni(n,e.page.borderBox.center),c={target:e0(e.page.borderBox,o),destination:t,withDroppableDisplacement:i,viewport:s};return a?kpe(c):QO(c)},zpe=({isMovingForward:e,draggable:t,destination:n,draggables:s,previousImpact:i,viewport:a,previousPageBorderBoxCenter:o,previousClientSelection:l,afterCritical:c})=>{if(!n.isEnabled)return null;const d=ip(n.descriptor.id,s),u=ap(t,n),p=gpe({isMovingForward:e,draggable:t,destination:n,insideDestination:d,previousImpact:i})||Tpe({isMovingForward:e,isInHomeList:u,draggable:t,draggables:s,destination:n,insideDestination:d,previousImpact:i,viewport:a,afterCritical:c});if(!p)return null;const m=k1({impact:p,draggable:t,droppable:n,draggables:s,afterCritical:c});if(tM({draggable:t,destination:n,newPageBorderBoxCenter:m,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Gk({pageBorderBoxCenter:m,draggable:t,viewport:a}),impact:p,scrollJumpRequest:null};const w=Ni(m,o),y=Mpe({impact:p,viewport:a,destination:n,draggables:s,maxScrollChange:w});return{clientSelection:l,impact:y,scrollJumpRequest:w}};const Vs=e=>{const t=e.subject.active;return t||jt(),t};var Wpe=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:s,viewport:i})=>{const a=n.subject.active;if(!a)return null;const o=n.axis,l=ua(a[o.start],a[o.end]),c=w1(s).filter(u=>u!==n).filter(u=>u.isEnabled).filter(u=>!!u.subject.active).filter(u=>XO(i.frame)(Vs(u))).filter(u=>{const p=Vs(u);return e?a[o.crossAxisEnd]<p[o.crossAxisEnd]:p[o.crossAxisStart]<a[o.crossAxisStart]}).filter(u=>{const p=Vs(u),m=ua(p[o.start],p[o.end]);return l(p[o.start])||l(p[o.end])||m(a[o.start])||m(a[o.end])}).sort((u,p)=>{const m=Vs(u)[o.crossAxisStart],x=Vs(p)[o.crossAxisStart];return e?m-x:x-m}).filter((u,p,m)=>Vs(u)[o.crossAxisStart]===Vs(m[0])[o.crossAxisStart]);if(!c.length)return null;if(c.length===1)return c[0];const d=c.filter(u=>ua(Vs(u)[o.start],Vs(u)[o.end])(t[o.line]));return d.length===1?d[0]:d.length>1?d.sort((u,p)=>Vs(u)[o.start]-Vs(p)[o.start])[0]:c.sort((u,p)=>{const m=_T(t,CT(Vs(u))),x=_T(t,CT(Vs(p)));return m!==x?m-x:Vs(u)[o.start]-Vs(p)[o.start]})[0]};const NT=(e,t)=>{const n=e.page.borderBox.center;return Ac(e.descriptor.id,t)?Ni(n,t.displacedBy.point):n},$pe=(e,t)=>{const n=e.page.borderBox;return Ac(e.descriptor.id,t)?e0(n,sp(t.displacedBy.point)):n};var Upe=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:s,afterCritical:i})=>s.filter(o=>QO({target:$pe(o,i),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((o,l)=>{const c=ym(e,Sj(n,NT(o,i))),d=ym(e,Sj(n,NT(l,i)));return c<d?-1:d<c?1:o.descriptor.index-l.descriptor.index})[0]||null,t0=Zr(function(t,n){const s=n[t.line];return{value:s,point:Gd(t.line,s)}});const Vpe=(e,t,n)=>{const s=e.axis;if(e.descriptor.mode==="virtual")return Gd(s.line,t[s.line]);const i=e.subject.page.contentBox[s.size],c=ip(e.descriptor.id,n).reduce((d,u)=>d+u.client.marginBox[s.size],0)+t[s.line]-i;return c<=0?null:Gd(s.line,c)},nM=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),rM=(e,t,n)=>{const s=e.frame;ap(t,e)&&jt(),e.subject.withPlaceholder&&jt();const i=t0(e.axis,t.displaceBy).point,a=Vpe(e,i,n),o={placeholderSize:i,increasedBy:a,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!s){const u=Wf({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:e.frame});return{...e,subject:u}}const l=a?us(s.scroll.max,a):s.scroll.max,c=nM(s,l),d=Wf({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:c});return{...e,subject:d,frame:c}},Hpe=e=>{const t=e.subject.withPlaceholder;t||jt();const n=e.frame;if(!n){const o=Wf({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:o}}const s=t.oldFrameMaxScroll;s||jt();const i=nM(n,s),a=Wf({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return{...e,subject:a,frame:i}};var qpe=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:s,draggables:i,destination:a,viewport:o,afterCritical:l})=>
844{if(!t){if(n.length)return null;const p={displaced:vm,displacedBy:YO,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},m=k1({impact:p,draggable:s,droppable:a,draggables:i,afterCritical:l}),x=ap(s,a)?a:rM(a,s,i);return tM({draggable:s,destination:x,newPageBorderBoxCenter:m,viewport:o.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?p:null}const c=e[a.axis.line]<=t.page.borderBox.center[a.axis.line],d=(()=>{const p=t.descriptor.index;return t.descriptor.id===s.descriptor.id||c?p:p+1})(),u=t0(a.axis,s.displaceBy);return gy({draggable:s,insideDestination:n,destination:a,viewport:o,displacedBy:u,last:vm,index:d})},Gpe=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:s,draggables:i,droppables:a,viewport:o,afterCritical:l})=>{const c=Wpe({isMovingForward:e,pageBorderBoxCenter:t,source:s,droppables:a,viewport:o});if(!c)return null;const d=ip(c.descriptor.id,i),u=Upe({pageBorderBoxCenter:t,viewport:o,destination:c,insideDestination:d,afterCritical:l}),p=qpe({previousPageBorderBoxCenter:t,destination:c,draggable:n,draggables:i,moveRelativeTo:u,insideDestination:d,viewport:o,afterCritical:l});if(!p)return null;const m=k1({impact:p,draggable:n,droppable:c,draggables:i,afterCritical:l});return{clientSelection:Gk({pageBorderBoxCenter:m,draggable:n,viewport:o}),impact:p,scrollJumpRequest:null}},Bi=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const Kpe=(e,t)=>{const n=Bi(e);return n?t[n]:null};var Ype=({state:e,type:t})=>{const n=Kpe(e.impact,e.dimensions.droppables),s=!!n,i=e.dimensions.droppables[e.critical.droppable.id],a=n||i,o=a.axis.direction,l=o==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||o==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(l&&!s)return null;const c=t==="MOVE_DOWN"||t==="MOVE_RIGHT",d=e.dimensions.draggables[e.critical.draggable.id],u=e.current.page.borderBoxCenter,{draggables:p,droppables:m}=e.dimensions;return l?zpe({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:d,destination:a,draggables:p,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):Gpe({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:d,isOver:a,draggables:p,droppables:m,viewport:e.viewport,afterCritical:e.afterCritical})};function bd(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function sM(e){const t=ua(e.top,e.bottom),n=ua(e.left,e.right);return function(i){return t(i.y)&&n(i.x)}}function Xpe(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Jpe({pageBorderBox:e,draggable:t,candidates:n}){const s=t.page.borderBox.center,i=n.map(a=>{const o=a.axis,l=Gd(a.axis.line,e.center[o.line],a.page.borderBox.center[o.crossAxisLine]);return{id:a.descriptor.id,distance:ym(s,l)}}).sort((a,o)=>o.distance-a.distance);return i[0]?i[0].id:null}function Qpe({pageBorderBox:e,draggable:t,droppables:n}){const s=w1(n).filter(i=>{if(!i.isEnabled)return!1;const a=i.subject.active;if(!a||!Xpe(e,a))return!1;if(sM(a)(e.center))return!0;const o=i.axis,l=a.center[o.crossAxisLine],c=e[o.crossAxisStart],d=e[o.crossAxisEnd],u=ua(a[o.crossAxisStart],a[o.crossAxisEnd]),p=u(c),m=u(d);return!p&&!m?!0:p?c<l:d>l});return s.length?s.length===1?s[0].descriptor.id:Jpe({pageBorderBox:e,draggable:t,candidates:s}):null}const iM=(e,t)=>Ba(e0(e,t));var Zpe=(e,t)=>{const n=e.frame;return n?iM(t,n.scroll.diff.value):t};function aM({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function ehe({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var the=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:s,last:i,viewport:a,afterCritical:o})=>{const l=n.axis,c=t0(n.axis,t.displaceBy),d=c.value,u=e[l.start],p=e[l.end],x=S1(t,s).find(y=>{const v=y.descriptor.id,j=y.page.borderBox.center[l.line],k=Ac(v,o),S=aM({displaced:i,id:v});return k?S?p<=j:u<j-d:S?p<=j+d:u<j})||null,w=ehe({draggable:t,closest:x,inHomeList:ap(t,n)});return gy({draggable:t,insideDestination:s,destination:n,viewport:
844a,last:i,displacedBy:c,index:w})};const nhe=4;var rhe=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:s,insideDestination:i,afterCritical:a})=>{if(!s.isCombineEnabled)return null;const o=s.axis,l=t0(s.axis,e.displaceBy),c=l.value,d=t[o.start],u=t[o.end],m=S1(e,i).find(w=>{const y=w.descriptor.id,v=w.page.borderBox,k=v[o.size]/nhe,S=Ac(y,a),_=aM({displaced:n.displaced,id:y});return S?_?u>v[o.start]+k&&u<v[o.end]-k:d>v[o.start]-c+k&&d<v[o.end]-c-k:_?u>v[o.start]+c+k&&u<v[o.end]+c-k:d>v[o.start]+k&&d<v[o.end]-k});return m?{displacedBy:l,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:m.descriptor.id,droppableId:s.descriptor.id}}}:null},oM=({pageOffset:e,draggable:t,draggables:n,droppables:s,previousImpact:i,viewport:a,afterCritical:o})=>{const l=iM(t.page.borderBox,e),c=Qpe({pageBorderBox:l,draggable:t,droppables:s});if(!c)return xpe;const d=s[c],u=ip(d.descriptor.id,n),p=Zpe(d,l);return rhe({pageBorderBoxWithDroppableScroll:p,draggable:t,previousImpact:i,destination:d,insideDestination:u,afterCritical:o})||the({pageBorderBoxWithDroppableScroll:p,draggable:t,destination:d,insideDestination:u,last:i.displaced,viewport:a,afterCritical:o})},Kk=(e,t)=>({...e,[t.descriptor.id]:t});const she=({previousImpact:e,impact:t,droppables:n})=>{const s=Bi(e),i=Bi(t);if(!s||s===i)return n;const a=n[s];if(!a.subject.withPlaceholder)return n;const o=Hpe(a);return Kk(n,o)};var ihe=({draggable:e,draggables:t,droppables:n,previousImpact:s,impact:i})=>{const a=she({previousImpact:s,impact:i,droppables:n}),o=Bi(i);if(!o)return a;const l=n[o];if(ap(e,l)||l.subject.withPlaceholder)return a;const c=rM(l,e,t);return Kk(a,c)},Uh=({state:e,clientSelection:t,dimensions:n,viewport:s,impact:i,scrollJumpRequest:a})=>{const o=s||e.viewport,l=n||e.dimensions,c=t||e.current.client.selection,d=Ni(c,e.initial.client.selection),u={offset:d,selection:c,borderBoxCenter:us(e.initial.client.borderBoxCenter,d)},p={selection:us(u.selection,o.scroll.current),borderBoxCenter:us(u.borderBoxCenter,o.scroll.current),offset:us(u.offset,o.scroll.diff.value)},m={client:u,page:p};if(e.phase==="COLLECTING")return{...e,dimensions:l,viewport:o,current:m};const x=l.draggables[e.critical.draggable.id],w=i||oM({pageOffset:p.offset,draggable:x,draggables:l.draggables,droppables:l.droppables,previousImpact:e.impact,viewport:o,afterCritical:e.afterCritical}),y=ihe({draggable:x,impact:w,previousImpact:e.impact,draggables:l.draggables,droppables:l.droppables});return{...e,current:m,dimensions:{draggables:l.draggables,droppables:y},impact:w,viewport:o,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null}};function ahe(e,t){return e.map(n=>t[n])}var lM=({impact:e,viewport:t,draggables:n,destination:s,forceShouldAnimate:i})=>{const a=e.displaced,o=ahe(a.all,n),l=bm({afterDragging:o,destination:s,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:i,last:a});return{...e,displaced:l}},cM=({impact:e,draggable:t,droppable:n,draggables:s,viewport:i,afterCritical:a})=>{const o=k1({impact:e,draggable:t,draggables:s,droppable:n,afterCritical:a});return Gk({pageBorderBoxCenter:o,draggable:t,viewport:i})},dM=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&jt();const s=e.impact,i=n||e.viewport,a=t||e.dimensions,{draggables:o,droppables:l}=a,c=o[e.critical.draggable.id],d=Bi(s);d||jt();const u=l[d],p=lM({impact:s,viewport:i,destination:u,draggables:o}),m=cM({impact:p,draggable:c,droppable:u,draggables:o,viewport:i,afterCritical:e.afterCritical});return Uh({impact:p,clientSelection:m,state:e,dimensions:a,viewport:i})},ohe=e=>({index:e.index,droppableId:e.droppableId}),uM=({draggable:e,home:t,draggables:n,viewport:s})=>{const i=t0(t.axis,e.displaceBy),a=ip(t.descriptor.id,n),o=a.indexOf(e);o===-1&&jt();const l=a.slice(o+1),c=l.reduce((m,x)=>(m[x.descriptor.id]=!0,m),{}),d={inVirtualList:t.descriptor.mode==="virtual",displacedBy:i,effected:c};return{impact:{displaced:bm({afterDragging:l,destination:t,displacedBy:i,last:null,viewport:s.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:ohe(e.descriptor)}},afterCritical:d}},lhe=(e,t)=>({draggables:e.draggables,droppables:Kk(e.droppables,t)}),che=({draggable:e,offset:t,initialWindowScroll:n})=>{const s=uy(e.client,t),i=fy(s,n);return{...e,placeholder:{...e.placeholder,client:s},client:s,page:i}},dhe=e=>{const t=e.frame;return t||jt(),t}
844,uhe=({additions:e,updatedDroppables:t,viewport:n})=>{const s=n.scroll.diff.value;return e.map(i=>{const a=i.descriptor.droppableId,o=t[a],c=dhe(o).scroll.diff.value,d=us(s,c);return che({draggable:i,offset:d,initialWindowScroll:n.scroll.initial})})},fhe=({state:e,published:t})=>{const n=t.modified.map(j=>{const k=e.dimensions.droppables[j.droppableId];return $k(k,j.scroll)}),s={...e.dimensions.droppables,...GO(n)},i=KO(uhe({additions:t.additions,updatedDroppables:s,viewport:e.viewport})),a={...e.dimensions.draggables,...i};t.removals.forEach(j=>{delete a[j]});const o={droppables:s,draggables:a},l=Bi(e.impact),c=l?o.droppables[l]:null,d=o.draggables[e.critical.draggable.id],u=o.droppables[e.critical.droppable.id],{impact:p,afterCritical:m}=uM({draggable:d,home:u,draggables:a,viewport:e.viewport}),x=c&&c.isCombineEnabled?e.impact:p,w=oM({pageOffset:e.current.page.offset,draggable:o.draggables[e.critical.draggable.id],draggables:o.draggables,droppables:o.droppables,previousImpact:x,viewport:e.viewport,afterCritical:m}),y={...e,phase:"DRAGGING",impact:w,onLiftImpact:p,dimensions:o,afterCritical:m,forceShouldAnimate:!1};return e.phase==="COLLECTING"?y:{...y,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const kj=e=>e.movementMode==="SNAP",D2=(e,t,n)=>{const s=lhe(e.dimensions,t);return!kj(e)||n?Uh({state:e,dimensions:s}):dM({state:e,dimensions:s})};function I2(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const RT={phase:"IDLE",completed:null,shouldFlush:!1};var phe=(e=RT,t)=>{if(t.type==="FLUSH")return{...RT,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&jt();const{critical:n,clientSelection:s,viewport:i,dimensions:a,movementMode:o}=t.payload,l=a.draggables[n.draggable.id],c=a.droppables[n.droppable.id],d={selection:s,borderBoxCenter:l.client.borderBox.center,offset:rs},u={client:d,page:{selection:us(d.selection,i.scroll.initial),borderBoxCenter:us(d.selection,i.scroll.initial),offset:us(d.selection,i.scroll.diff.value)}},p=w1(a.droppables).every(y=>!y.isFixedOnPage),{impact:m,afterCritical:x}=uM({draggable:l,home:c,draggables:a.draggables,viewport:i});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:o,dimensions:a,initial:u,current:u,isWindowScrollAllowed:p,impact:m,afterCritical:x,onLiftImpact:m,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&jt(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||jt(),fhe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;bd(e)||jt();const{client:n}=t.payload;return vc(n,e.current.client.selection)?e:Uh({state:e,clientSelection:n,impact:kj(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return I2(e);bd(e)||jt();const{id:n,newScroll:s}=t.payload,i=e.dimensions.droppables[n];if(!i)return e;const a=$k(i,s);return D2(e,a,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;bd(e)||jt();const{id:n,isEnabled:s}=t.payload,i=e.dimensions.droppables[n];i||jt(),i.isEnabled===s&&jt();const a={...i,isEnabled:s};return D2(e,a,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;bd(e)||jt();const{id:n,isCombineEnabled:s}=t.payload,i=e.dimensions.droppables[n];i||jt(),i.isCombineEnabled===s&&jt();const a={...i,isCombineEnabled:s};return D2(e,a,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;bd(e)||jt(),e.isWindowScrollAllowed||jt();const n=t.payload.newScroll;if(vc(e.viewport.scroll.current,n))return I2(e);const s=eM(e.viewport,n);return kj(e)?dM({state:e,viewport:s}):Uh({state:e,viewport:s})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!bd(e))return e;const n=t.payload.maxScroll;if(vc(n,e.viewport.scroll.max))return e;const s={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:s}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;
844e.phase!=="DRAGGING"&&jt();const n=Ype({state:e,type:t.type});return n?Uh({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&jt(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:s,newHomeClientOffset:i}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||jt(),{phase:"DROP_ANIMATING",completed:n,dropDuration:s,newHomeClientOffset:i,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function Bn(e,t){return e instanceof Object&&"type"in e&&e.type===t}const hhe=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),mhe=e=>({type:"LIFT",payload:e}),ghe=e=>({type:"INITIAL_PUBLISH",payload:e}),xhe=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),yhe=()=>({type:"COLLECTION_STARTING",payload:null}),vhe=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),bhe=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),whe=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),fM=e=>({type:"MOVE",payload:e}),jhe=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),She=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),khe=()=>({type:"MOVE_UP",payload:null}),_he=()=>({type:"MOVE_DOWN",payload:null}),Che=()=>({type:"MOVE_RIGHT",payload:null}),Ehe=()=>({type:"MOVE_LEFT",payload:null}),Yk=()=>({type:"FLUSH",payload:null}),Fhe=e=>({type:"DROP_ANIMATE",payload:e}),Xk=e=>({type:"DROP_COMPLETE",payload:e}),pM=e=>({type:"DROP",payload:e}),Ahe=e=>({type:"DROP_PENDING",payload:e}),hM=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var The=e=>({getState:t,dispatch:n})=>s=>i=>{if(!Bn(i,"LIFT")){s(i);return}const{id:a,clientSelection:o,movementMode:l}=i.payload,c=t();c.phase==="DROP_ANIMATING"&&n(Xk({completed:c.completed})),t().phase!=="IDLE"&&jt(),n(Yk()),n(hhe({draggableId:a,movementMode:l}));const u={draggableId:a,scrollOptions:{shouldPublishImmediately:l==="SNAP"}},{critical:p,dimensions:m,viewport:x}=e.startPublishing(u);n(ghe({critical:p,dimensions:m,clientSelection:o,movementMode:l,viewport:x}))},Nhe=e=>()=>t=>n=>{Bn(n,"INITIAL_PUBLISH")&&e.dragging(),Bn(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(Bn(n,"FLUSH")||Bn(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const Jk={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},wm={opacity:{drop:0,combining:.7},scale:{drop:.75}},mM={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},ud=`${mM.outOfTheWay}s ${Jk.outOfTheWay}`,Vh={fluid:`opacity ${ud}`,snap:`transform ${ud}, opacity ${ud}`,drop:e=>{const t=`${e}s ${Jk.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${ud}`,placeholder:`height ${ud}, width ${ud}, margin ${ud}`},DT=e=>vc(e,rs)?void 0:`translate(${e.x}px, ${e.y}px)`,_j={moveTo:DT,drop:(e,t)=>{const n=DT(e);if(n)return t?`${n} scale(${wm.scale.drop})`:n}},{minDropTime:Cj,maxDropTime:gM}=mM,Rhe=gM-Cj,IT=1500,Dhe=.6;var Ihe=({current:e,destination:t,reason:n})=>{const s=ym(e,t);if(s<=0)return Cj;if(s>=IT)return gM;const i=s/IT,a=Cj+Rhe*i,o=n==="CANCEL"?a*Dhe:a;return Number(o.toFixed(2))},Phe=({impact:e,draggable:t,dimensions:n,viewport:s,afterCritical:i})=>{const{draggables:a,droppables:o}=n,l=Bi(e),c=l?o[l]:null,d=o[t.descriptor.droppableId],u=cM({impact:e,draggable:t,draggables:a,afterCritical:i,droppable:c||d,viewport:s});return Ni(u,t.client.borderBox.center)},Bhe=({draggables:e,reason:t,lastImpact:n,home:s,viewport:i,onLiftImpact:a})=>!n.at||t!=="DROP"?{impact:lM({draggables:e,impact:a,destination:s,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:vm},didDropInsideDroppable:!0};const Ohe=({getState:e,dispatch:t})=>n=>s=>{if(!Bn(s,"DROP")){n(s);return}const i=e(),a=s.payload.reason;if(i.phase==="COLLECTING"){t(Ahe({reason:a}));return}if(i.phase==="IDLE")return;i.phase==="DROP_PENDING"&&i.isWaiting&&jt(),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||jt();const l=i.critical,c=i.dimensions,d=c.draggables[i.critical.draggable.id],{impact:u,didDropInsideDroppable:p}=Bhe({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.
844id],viewport:i.viewport,draggables:i.dimensions.draggables}),m=p?Uk(u):null,x=p?j1(u):null,w={index:l.draggable.index,droppableId:l.droppable.id},y={draggableId:d.descriptor.id,type:d.descriptor.type,source:w,reason:a,mode:i.movementMode,destination:m,combine:x},v=Phe({impact:u,draggable:d,dimensions:c,viewport:i.viewport,afterCritical:i.afterCritical}),j={critical:i.critical,afterCritical:i.afterCritical,result:y,impact:u};if(!(!vc(i.current.client.offset,v)||!!y.combine)){t(Xk({completed:j}));return}const S=Ihe({current:i.current.client.offset,destination:v,reason:a});t(Fhe({newHomeClientOffset:v,dropDuration:S,completed:j}))};var xM=()=>({x:window.pageXOffset,y:window.pageYOffset});function Mhe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function Lhe({onWindowScroll:e}){function t(){e(xM())}const n=xm(t),s=Mhe(n);let i=yc;function a(){return i!==yc}function o(){a()&&jt(),i=ca(window,[s])}function l(){a()||jt(),n.cancel(),i(),i=yc}return{start:o,stop:l,isActive:a}}const zhe=e=>Bn(e,"DROP_COMPLETE")||Bn(e,"DROP_ANIMATE")||Bn(e,"FLUSH"),Whe=e=>{const t=Lhe({onWindowScroll:n=>{e.dispatch(jhe({newScroll:n}))}});return n=>s=>{!t.isActive()&&Bn(s,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&zhe(s)&&t.stop(),n(s)}};var $he=e=>{let t=!1,n=!1;const s=setTimeout(()=>{n=!0}),i=a=>{t||n||(t=!0,e(a),clearTimeout(s))};return i.wasCalled=()=>t,i},Uhe=()=>{const e=[],t=i=>{const a=e.findIndex(l=>l.timerId===i);a===-1&&jt();const[o]=e.splice(a,1);o.callback()};return{add:i=>{const a=setTimeout(()=>t(a)),o={timerId:a,callback:i};e.push(o)},flush:()=>
844{if(!e.length)return;const i=[...e];e.length=0,i.forEach(a=>{clearTimeout(a.timerId),a.callback()})}}};const Vhe=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,Hhe=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,qhe=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,s=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&s},lh=(e,t)=>{t()},Mg=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function P2(e,t,n,s){if(!e){n(s(t));return}const i=$he(n);e(t,{announce:i}),i.wasCalled()||n(s(t))}var Ghe=(e,t)=>{const n=Uhe();let s=null;const i=(p,m)=>{s&&jt(),lh("onBeforeCapture",()=>{const x=e().onBeforeCapture;x&&x({draggableId:p,mode:m})})},a=(p,m)=>{s&&jt(),lh("onBeforeDragStart",()=>{const x=e().onBeforeDragStart;x&&x(Mg(p,m))})},o=(p,m)=>{s&&jt();const x=Mg(p,m);s={mode:m,lastCritical:p,lastLocation:x.source,lastCombine:null},n.add(()=>{lh("onDragStart",()=>P2(e().onDragStart,x,t,Px.onDragStart))})},l=(p,m)=>{const x=Uk(m),w=j1(m);s||jt();const y=!qhe(p,s.lastCritical);y&&(s.lastCritical=p);const v=!Vhe(s.lastLocation,x);v&&(s.lastLocation=x);const j=!Hhe(s.lastCombine,w);if(j&&(s.lastCombine=w),!y&&!v&&!j)return;const k={...Mg(p,s.mode),combine:w,destination:x};n.add(()=>{lh("onDragUpdate",()=>P2(e().onDragUpdate,k,t,Px.onDragUpdate))})},c=()=>{s||jt(),n.flush()},d=p=>{s||jt(),s=null,lh("onDragEnd",()=>P2(e().onDragEnd,p,t,Px.onDragEnd))};return{beforeCapture:i,beforeStart:a,start:o,update:l,flush:c,drop:d,abort:()=>{if(!s)return;const p={...Mg(s.lastCritical,s.mode),combine:null,destination:null,reason:"CANCEL"};d(p)}}},Khe=(e,t)=>{const n=Ghe(e,t);return s=>i=>a=>{if(Bn(a,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(a.payload.draggableId,a.payload.movementMode);return}if(Bn(a,"INITIAL_PUBLISH")){const l=a.payload.critical;n.beforeStart(l,a.payload.movementMode),i(a),n.start(l,a.payload.movementMode);return}if(Bn(a,"DROP_COMPLETE")){const l=a.payload.completed.result;n.flush(),i(a),n.drop(l);return}if(i(a),Bn(a,"FLUSH")){n.abort();return}const o=s.getState();o.phase==="DRAGGING"&&n.update(o.critical,o.impact)}};const Yhe=e=>t=>n=>{if(!Bn(n,"DROP_ANIMATION_FINISHED")){t(n);return}const s=e.getState();s.phase!=="DROP_ANIMATING"&&jt(),e.dispatch(Xk({completed:s.completed}))},Xhe=e=>{let t=null,n=null;function s(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return i=>a=>{if((Bn(a,"FLUSH")||Bn(a,"DROP_COMPLETE")||Bn(a,"DROP_ANIMATION_FINISHED"))&&s(),i(a),!Bn(a,"DROP_ANIMATE"))return;const o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(hM())}};n=requestAnimationFrame(()=>{n=null,t=ca(window,[o])})}};var Jhe=e=>()=>t=>n=>{(Bn(n,"DROP_COMPLETE")||Bn(n,"FLUSH")||Bn(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},Qhe=e=>{let t=!1;return()=>n=>s=>{if(Bn(s,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(s.payload.critical.draggable.id),n(s),e.tryRestoreFocusRecorded();return}if(n(s),!!t){if(Bn(s,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(Bn(s,"DROP_COMPLETE")){t=!1;const i=s.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const Zhe=e=>Bn(e,"DROP_COMPLETE")||Bn(e,"DROP_ANIMATE")||Bn(e,"FLUSH");var eme=e=>t=>n=>s=>{if(Zhe(s)){e.stop(),n(s);return}if(Bn(s,"INITIAL_PUBLISH")){n(s);const i=t.getState();i.phase!=="DRAGGING"&&jt(),e.start(i);return}n(s),e.scroll(t.getState())};const tme=e=>t=>n=>{if(t(n),!Bn(n,"PUBLISH_WHILE_DRAGGING"))return;const s=e.getState();s.phase==="DROP_PENDING"&&(s.isWaiting||e.dispatch(pM({reason:s.reason})))},nme=DO;var rme=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:s,announce:i,autoScroller:a})=>RO(phe,nme(Zue(Nhe(n),Jhe(e),The(e),Ohe,Yhe,Xhe,tme,eme(a),Whe,Qhe(t),Khe(s,i))));const B2=()=>({additions:{},removals:{},modified:{}});function sme({registry:e,callbacks:t}){let n=B2(),s=null;const i=()=>{s||(t.collectionStarting(),s=requestAnimationFrame(()=>{s=null;const{additions:c,removals:d,modified:u}=n,p=Object.keys(c).map(w=>e.draggable.getById(w).getDimension(rs)).sort((w,y)=>w.descriptor.index-y.descriptor.index),m=Object.keys(u).map(w=>{const v=e.droppable.getById(w).callbacks.getScrollWhileDragging();return{droppableId:w,scroll:v}}),x={additions:p,removals:Object.keys(d),modified:m};n=B2(),t.publish(x)}))};return{add:c=>{const d=c.descriptor.id;n.additions[d]=c,n.modified[c.descriptor.droppableId]=!0,n.removals[d]&&delete n.removals[d],i()},remove:c=>{const d=c.descriptor;n.removals[d.id]=!0,n.modified[d.droppableId]=!0,n.additions[d.id]&&delete n.additions[d.id],i()},stop:()=>{s&&(cancelAnimationFrame(s),s=null,n=B2())}}}var yM=({scrollHeight:e,scrollWidth:t,height:n,width:s})=>{const i=Ni({x:t,y:e},{x:s,y:n});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},vM=()=>{const e=document.documentElement;return e||jt(),e},bM=()=>{const e=vM();return yM({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},ime=()=>{const e=xM(),t=bM(),n=e.y,s=e.x,i=vM(),a=i.clientWidth,o=i.clientHeight,l=s+a,c=n+o;return{frame:Ba({top:n,left:s,right:l,bottom:c}),scroll:{initial:e,current:e,max:t,diff:{value:rs,displacement:rs}}}},ame=({critical:e,scrollOptions:t,registry:n})=>{const s=ime(),i=s.scroll.current,a=e.droppable,o=n.droppable.getAllByType(a.type).map(u=>u.callbacks.getDimensionAndWatchScroll(i,t)),l=n.draggable.getAllByType(e.draggable.type).map(u=>u.getDimension(i));return{dimensions:{draggables:KO(l),droppables:GO(o)},critical:e,viewport:s}};function PT(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var ome=(e,t)=>
844{let n=null;const s=sme({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=(m,x)=>{e.droppable.exists(m)||jt(),n&&t.updateDroppableIsEnabled({id:m,isEnabled:x})},a=(m,x)=>{n&&(e.droppable.exists(m)||jt(),t.updateDroppableIsCombineEnabled({id:m,isCombineEnabled:x}))},o=(m,x)=>{n&&(e.droppable.exists(m)||jt(),t.updateDroppableScroll({id:m,newScroll:x}))},l=(m,x)=>{n&&e.droppable.getById(m).callbacks.scroll(x)},c=()=>{if(!n)return;s.stop();const m=n.critical.droppable;e.droppable.getAllByType(m.type).forEach(x=>x.callbacks.dragStopped()),n.unsubscribe(),n=null},d=m=>{n||jt();const x=n.critical.draggable;m.type==="ADDITION"&&PT(e,x,m.value)&&s.add(m.value),m.type==="REMOVAL"&&PT(e,x,m.value)&&s.remove(m.value)};return{updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:a,scrollDroppable:l,updateDroppableScroll:o,startPublishing:m=>{n&&jt();const x=e.draggable.getById(m.draggableId),w=e.droppable.getById(x.descriptor.droppableId),y={draggable:x.descriptor,droppable:w.descriptor},v=e.subscribe(d);return n={critical:y,unsubscribe:v},ame({critical:y,registry:e,scrollOptions:m.scrollOptions})},stopPublishing:c}},wM=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",lme=e=>{window.scrollBy(e.x,e.y)};const cme=Zr(e=>w1(e).filter(t=>!(!t.isEnabled||!t.frame))),dme=(e,t)=>cme(t).find(s=>(s.frame||jt(),sM(s.frame.pageMarginBox)(e)))||null;var ume=({center:e,destination:t,droppables:n})=>{if(t){const i=n[t];return i.frame?i:null}return dme(e,n)};const jm={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var fme=(e,t,n=()=>jm)=>{const s=n(),i=e[t.size]*s.startFromPercentage,a=e[t.size]*s.maxScrollAtPercentage;return{startScrollingFrom:i,maxScrollValueAt:a}},jM=({startOfRange:e,endOfRange:t,current:n})=>{const s=t-e;return s===0?0:(n-e)/s},Qk=1,pme=(e,t,n=()=>jm)=>{const s=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return s.maxPixelScroll;if(e===t.startScrollingFrom)return Qk;const a=1-jM({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),o=s.maxPixelScroll*s.ease(a);return Math.ceil(o)},hme=(e,t,n)=>{const s=n(),i=s.durationDampening.accelerateAt,a=s.durationDampening.stopDampeningAt,o=t,l=a,d=Date.now()-o;if(d>=a)return e;if(d<i)return Qk;const u=jM({startOfRange:i,endOfRange:l,current:d}),p=e*s.ease(u);return Math.ceil(p)},BT=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:s,getAutoScrollerOptions:i})=>{const a=pme(e,t,i);return a===0?0:s?Math.max(hme(a,n,i),Qk):a},OT=({container:e,distanceToEdges:t,dragStartTime:n,axis:s,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const o=fme(e,s,a);return t[s.end]<t[s.start]?BT({distanceToEdge:t[s.end],thresholds:o,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a}):-1*BT({distanceToEdge:t[s.start],thresholds:o,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a})},mme=({container:e,subject:t,proposedScroll:n})=>{const s=t.height>e.height,i=t.width>e.width;return!i&&!s?n:i&&s?null:{x:i?0:n.x,y:s?0:n.y}};const gme=qO(e=>e===0?0:e);var SM=({dragStartTime:e,container:t,subject:n,center:s,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const o={top:s.y-t.top,right:t.right-s.x,bottom:t.bottom-s.y,left:s.x-t.left},l=OT({container:t,distanceToEdges:o,dragStartTime:e,axis:Vk,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),c=OT({container:t,distanceToEdges:o,dragStartTime:e,axis:JO,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),d=gme({x:c,y:l});if(vc(d,rs))return null;const u=mme({container:t,subject:n,proposedScroll:d});return u?vc(u,rs)?null:u:null};const xme=qO(e=>e===0?0:e>0?1:-1),Zk=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:s})=>{const i=us(t,s),a={x:e(i.x,n.x),y:e(i.y,n.y)};return vc(a,rs)?null:a}})(),kM=({max:e,current:t,change:n})=>{const s={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},i=xme(n),a=Zk({max:s,current:t,change:i});return!a||i.x!==0&&a.x===0||i.y!==0&&a.y===0},e_=(e,t)=>
844kM({current:e.scroll.current,max:e.scroll.max,change:t}),yme=(e,t)=>{if(!e_(e,t))return null;const n=e.scroll.max,s=e.scroll.current;return Zk({current:s,max:n,change:t})},t_=(e,t)=>{const n=e.frame;return n?kM({current:n.scroll.current,max:n.scroll.max,change:t}):!1},vme=(e,t)=>{const n=e.frame;return!n||!t_(e,t)?null:Zk({current:n.scroll.current,max:n.scroll.max,change:t})};var bme=({viewport:e,subject:t,center:n,dragStartTime:s,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const o=SM({dragStartTime:s,container:e.frame,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return o&&e_(e,o)?o:null},wme=({droppable:e,subject:t,center:n,dragStartTime:s,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const o=e.frame;if(!o)return null;const l=SM({dragStartTime:s,container:o.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return l&&t_(e,l)?l:null},MT=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:s,scrollDroppable:i,getAutoScrollerOptions:a})=>{const o=e.current.page.borderBoxCenter,c=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const p=e.viewport,m=bme({dragStartTime:t,viewport:p,subject:c,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:a});if(m){s(m);return}}const d=ume({center:o,destination:Bi(e.impact),droppables:e.dimensions.droppables});if(!d)return;const u=wme({dragStartTime:t,droppable:d,subject:c,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:a});u&&i(d.descriptor.id,u)},jme=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>jm})=>{const s=xm(e),i=xm(t);let a=null;const o=d=>{a||jt();const{shouldUseTimeDampening:u,dragStartTime:p}=a;MT({state:d,scrollWindow:s,scrollDroppable:i,dragStartTime:p,shouldUseTimeDampening:u,getAutoScrollerOptions:n})};return{start:d=>{a&&jt();const u=Date.now();let p=!1;const m=()=>{p=!0};MT({state:d,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:m,scrollDroppable:m,getAutoScrollerOptions:n}),a={dragStartTime:u,shouldUseTimeDampening:p},p&&o(d)},stop:()=>{a&&(s.cancel(),i.cancel(),a=null)},scroll:o}},Sme=({move:e,scrollDroppable:t,scrollWindow:n})=>{const s=(l,c)=>{const d=us(l.current.client.selection,c);e({client:d})},i=(l,c)=>{if(!t_(l,c))return c;const d=vme(l,c);if(!d)return t(l.descriptor.id,c),null;const u=Ni(c,d);return t(l.descriptor.id,u),Ni(c,u)},a=(l,c,d)=>{if(!l||!e_(c,d))return d;const u=yme(c,d);if(!u)return n(d),null;const p=Ni(d,u);return n(p),Ni(d,p)};return l=>{const c=l.scrollJumpRequest;if(!c)return;const d=Bi(l.impact);d||jt();const u=i(l.dimensions.droppables[d],c);if(!u)return;const p=l.viewport,m=a(l.isWindowScrollAllowed,p,u);m&&s(l,m)}},kme=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:s})=>{const i=jme({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:s}),a=Sme({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:c=>{if(!(s().disabled||c.phase!=="DRAGGING")){if(c.movementMode==="FLUID"){i.scroll(c);return}c.scrollJumpRequest&&a(c)}},start:i.start,stop:i.stop}};const $f="data-rfd",Uf=(()=>{const e=`${$f}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Ej=(()=>{const e=`${$f}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),_me=(()=>{const e=`${$f}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),LT={contextId:`${$f}-scroll-container-context-id`},Cme=e=>t=>`[${t}="${e}"]`,ch=(e,t)=>e.map(n=>{const s=n.styles[t];return s?`${n.selector} { ${s} }`:""}).join(" "),Eme="pointer-events: none;";var Fme=e=>{const t=Cme(e),n=(()=>{const l=`
845      cursor: -webkit-grab;
846      cursor: grab;
847    `;return{selector:t(Uf.contextId),styles:{always:`
848          -webkit-touch-callout: none;
849          -webkit-tap-highlight-color: rgba(0,0,0,0);
850          touch-action: manipulation;
851        `,resting:l,dragging:Eme,dropAnimating:l}}})(),s=(()=>{const l=`
852      transition: ${Vh.outOfTheWay};
853    `;return{selector:t(Ej.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}})(),i={selector:t(_me.contextId),styles:{always:"overflow-anchor: n
853one;"}},o=[s,n,i,{selector:"body",styles:{dragging:`
854        cursor: grabbing;
855        cursor: -webkit-grabbing;
856        user-select: none;
857        -webkit-user-select: none;
858        -moz-user-select: none;
859        -ms-user-select: none;
860        overflow-anchor: none;
861      `}}];return{always:ch(o,"always"),resting:ch(o,"resting"),dragging:ch(o,"dragging"),dropAnimating:ch(o,"dropAnimating"),userCancel:ch(o,"userCancel")}};const Oi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?g.useLayoutEffect:g.useEffect,O2=()=>{const e=document.querySelector("head");return e||jt(),e},zT=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Ame(e,t){const n=En(()=>Fme(e),[e]),s=g.useRef(null),i=g.useRef(null),a=Ut(Zr(p=>{const m=i.current;m||jt(),m.textContent=p}),[]),o=Ut(p=>{const m=s.current;m||jt(),m.textContent=p},[]);Oi(()=>{!s.current&&!i.current||jt();const p=zT(t),m=zT(t);return s.current=p,i.current=m,p.setAttribute(`${$f}-always`,e),m.setAttribute(`${$f}-dynamic`,e),O2().appendChild(p),O2().appendChild(m),o(n.always),a(n.resting),()=>{const x=w=>{const y=w.current;y||jt(),O2().removeChild(y),w.current=null};x(s),x(i)}},[t,o,a,n.always,n.resting,e]);const l=Ut(()=>a(n.dragging),[a,n.dragging]),c=Ut(p=>{if(p==="DROP"){a(n.dropAnimating);return}a(n.userCancel)},[a,n.dropAnimating,n.userCancel]),d=Ut(()=>{i.current&&a(n.resting)},[a,n.resting]);return En(()=>({dragging:l,dropping:c,resting:d}),[l,c,d])}function _M(e,t){return Array.from(e.querySelectorAll(t))}var CM=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function _1(e){return e instanceof CM(e).HTMLElement}function Tme(e,t){const n=`[${Uf.contextId}="${e}"]`,s=_M(document,n);if(!s.length)return null;const i=s.find(a=>a.getAttribute(Uf.draggableId)===t);return!i||!_1(i)?null:i}function Nme(e){const t=g.useRef({}),n=g.useRef(null),s=g.useRef(null),i=g.useRef(!1),a=Ut(function(m,x){const w={id:m,focus:x};return t.current[m]=w,function(){const v=t.current;v[m]!==w&&delete v[m]}},[]),o=Ut(function(m){const x=Tme(e,m);x&&x!==document.activeElement&&x.focus()},[e]),l=Ut(function(m,x){n.current===m&&(n.current=x)},[]),c=Ut(function(){s.current||i.current&&(s.current=requestAnimationFrame(()=>{s.current=null;const m=n.current;m&&o(m)}))},[o]),d=Ut(function(m){n.current=null;const x=document.activeElement;x&&x.getAttribute(Uf.draggableId)===m&&(n.current=m)},[]);return Oi(()=>(i.current=!0,function(){i.current=!1;const m=s.current;m&&cancelAnimationFrame(m)}),[]),En(()=>({register:a,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l}),[a,d,c,l])}function Rme(){const e={draggables:{},droppables:{}},t=[];function n(p){return t.push(p),function(){const x=t.indexOf(p);x!==-1&&t.splice(x,1)}}function s(p){t.length&&t.forEach(m=>m(p))}function i(p){return e.draggables[p]||null}function a(p){const m=i(p);return m||jt(),m}const o={register:p=>{e.draggables[p.descriptor.id]=p,s({type:"ADDITION",value:p})},update:(p,m)=>{const x=e.draggables[m.descriptor.id];x&&x.uniqueId===p.uniqueId&&(delete e.draggables[m.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:p=>{const m=p.descriptor.id,x=i(m);x&&p.uniqueId===x.uniqueId&&(delete e.draggables[m],e.droppables[p.descriptor.droppableId]&&s({type:"REMOVAL",value:p}))},getById:a,findById:i,exists:p=>!!i(p),getAllByType:p=>Object.values(e.draggables).filter(m=>m.descriptor.type===p)};function l(p){return e.droppables[p]||null}function c(p){const m=l(p);return m||jt(),m}const d={register:p=>{e.droppables[p.descriptor.id]=p},unregister:p=>{const m=l(p.descriptor.id);m&&p.uniqueId===m.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:l,exists:p=>!!l(p),getAllByType:p=>Object.values(e.droppables).filter(m=>m.descriptor.type===p)};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:o,droppable:d,subscribe:n,clean:u}}function Dme(){const e=En(Rme,[]);return g.useEffect(()=>function(){e.clean()},[e]),e}var n_=Rn.createContext(null),xy=()=>{const e=document.body;return e||jt(),e};const Ime={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Pme=e=>`rfd-announcement-${e}`;function Bme(e){const t=En(()=>Pme(e),[e]),n=g.useRef(null);return g.useEffect(function(){const a=document.createElement("div");return n.current=a,a.id=t,a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true"),py(a.style,Ime),xy().appendChild(a),function(){setTimeout(function(){const c=xy();c.contains(a)&&c.removeChild(a),a===n.current&&(n.current=null)})}},[t]),Ut(i=>{const a=n.current;if(a){a.textContent=i;return}},[])}const Ome={separator:"::"};function r_(e,t=Ome){const n=Rn.useId();return En(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function Mme({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function Lme({contextId:e,text:t}){const n=r_("hidden-text",{separator:"-"}),s=En(()=>Mme({contextId:e,uniqueId:n}),[n,e]);return g.useEffect(function(){const a=document.createElement("div");return a.id=s,a.textContent=t,a.style.display="none",xy().appendChild(a),function(){const l=xy();l.contains(a)&&l.removeChild(a)}},[s,t]),s}var C1=Rn.createContext(null);function EM(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),t}function zme(){let e=null;function t(){return!!e}function n(o){return o===e}function s(o){e&&jt();const l={abandon:o};return e=l,l}function i(){e||jt(),e=null}function a(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:s,release:i,tryAbandon:a}}function Sm(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const Wme=9,$me=13,s_=27,FM=32,Ume=33,Vme=34,Hme=35,qme=36,Gme=37,Kme=38,Yme=39,Xme=40,Jme={[$me]:!0,[Wme]:!0};var AM=e=>{Jme[e.keyCode]&&e.preventDefault()};const E1=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(s=>`on${s}`in document)||e})(),TM=0,WT=5;function Qme(e,t){return Math.abs(t.x-e.x)>=WT||Math.abs(t.y-e.y)>=WT}const $T={type:"IDLE"};function Zme({cancel:e,completed:t,getPhase:n,setPhase:s}){return[{eventName:"mousemove",fn:i=>{const{button:a,clientX:o,clientY:l}=i;if(a!==TM)return;const c={x:o,y:l},d=n();if(d.type==="DRAGGING"){i.preventDefault(),d.actions.move(c);return}d.type!=="PENDING"&&jt();const u=d.point;if(!Qme(u,c))return;i.preventDefault();const p=d.actions.fluidLift(c);s({type:"DRAGGING",actions:p})}},{eventName:"mouseup",fn:i=>{const a=n();if(a.type!=="DRAGGING"){e();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:i=>{n().type==="DRAGGING"&&i.preventDefault(),e()}},{eventName:"keydown",fn:i=>{if(n().type==="PENDING"){e();return}if(i.keyCode===s_){i.preventDefault(),e();return}AM(i)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:i=>{const a=n();if(a.type==="IDLE"&&jt(),a.actions.shouldRespectForcePress()){e();return}i.preventDefault()}},{eventName:E1,fn:e}]}function e0e(e){const t=g.useRef($T),n=g.useRef(yc),s=En(()=>({eventName:"mousedown",fn:function(p){if(p.defaultPrevented||p.button!==TM||p.ctrlKey||p.metaKey||p.shiftKey||p.altKey)return;const m=e.findClosestDraggableId(p);if(!m)return;const x=e.tryGetLock(m,o,{sourceEvent:p});if(!x)return;p.preventDefault();const w={x:p.clientX,y:p.clientY};n.current(),d(x,w)}}),[e]),i=En(()=>({eventName:"webkitmouseforcewillbegin",fn:u=>{if(u.defaultPrevented)return;const p=e.findClosestDraggableId(u);if(!p)return;const m=e.findOptionsForDraggable(p);m&&(m.shouldRespectForcePress||e.canGetLock(p)&&u.preventDefault())}}),[e]),a=Ut(function(){const p={passive:!1,capture:!0};n.current=ca(window,[i,s],p)},[i,s]),o=Ut(()=>{t.current.type!=="IDLE"&&(t.current=$T,n.current(),a())},[a]),l=Ut(()=>{const u=t.current;o(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[o]),c=Ut(function(){const p={capture:!0,passive:!1},m=Zme({cancel:l,completed:o,getPhase:()=>t.current,setPhase:x=>{t.current=x}});n.current=ca(window,m,p)},[l,o]),d=Ut(function(p,m){t.current.type!=="IDLE"&&jt(),t.current={type:"PENDING",point:m,actions:p},c()},[c]);Oi(function(){return a(),function(){n.current()}},[a])}function t0e(){}const n0e={[Vme]:!0,[Ume]:!0,[qme]:!0,[Hme]:!0};function r0e(e,t){function n(){t(),e.cancel()}function s(){t(),e.drop()}return[{eventName:"keydown",fn:i=>{if(i.keyCode===s_){i.preventDefault(),n();return}if(i.keyCode===FM){i.preventDefault(),s();return}if(i.keyCode===Xme){i.preventDefault(),e.moveDown();return}if(i.keyCode===Kme){i.preventDefault(),e.moveUp();return}if(i.keyCode===Yme){i.preventDefault(),e.moveRight();return}if(i.keyCode===Gme){i.preventDefault(),e.moveLeft();return}if(n0e[i.keyCode]){i.preventDefault();return}AM(i)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:E1,fn:n}]}function s0e(e){const t=g.useRef(t0e),n=En(()=>
861({eventName:"keydown",fn:function(a){if(a.defaultPrevented||a.keyCode!==FM)return;const o=e.findClosestDraggableId(a);if(!o)return;const l=e.tryGetLock(o,u,{sourceEvent:a});if(!l)return;a.preventDefault();let c=!0;const d=l.snapLift();t.current();function u(){c||jt(),c=!1,t.current(),s()}t.current=ca(window,r0e(d,u),{capture:!0,passive:!1})}}),[e]),s=Ut(function(){const a={passive:!1,capture:!0};t.current=ca(window,[n],a)},[n]);Oi(function(){return s(),function(){t.current()}},[s])}const M2={type:"IDLE"},i0e=120,a0e=.15;function o0e({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===s_&&n.preventDefault(),e()}},{eventName:E1,fn:e}]}function l0e({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:s=>{const i=n();if(i.type!=="DRAGGING"){e();return}i.hasMoved=!0;const{clientX:a,clientY:o}=s.touches[0],l={x:a,y:o};s.preventDefault(),i.actions.move(l)}},{eventName:"touchend",fn:s=>{const i=n();if(i.type!=="DRAGGING"){e();return}s.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:s=>{if(n().type!=="DRAGGING"){e();return}s.preventDefault(),e()}},{eventName:"touchforcechange",fn:s=>{const i=n();i.type==="IDLE"&&jt();const a=s.touches[0];if(!a||!(a.force>=a0e))return;const l=i.actions.shouldRespectForcePress();if(i.type==="PENDING"){l&&e();return}if(l){if(i.hasMoved){s.preventDefault();return}e();return}s.preventDefault()}},{eventName:E1,fn:e}]}function c0e(e){const t=g.useRef(M2),n=g.useRef(yc),s=Ut(function(){return t.current},[]),i=Ut(function(x){t.current=x},[]),a=En(()=>({eventName:"touchstart",fn:function(x){if(x.defaultPrevented)return;const w=e.findClosestDraggableId(x);if(!w)return;const y=e.tryGetLock(w,l,{sourceEvent:x});if(!y)return;const v=x.touches[0],{clientX:j,clientY:k}=v,S={x:j,y:k};n.current(),p(y,S)}}),[e]),o=Ut(function(){const x={capture:!0,passive:!1};n.current=ca(window,[a],x)},[a]),l=Ut(()=>{const m=t.current;m.type!=="IDLE"&&(m.type==="PENDING"&&clearTimeout(m.longPressTimerId),i(M2),n.current(),o())},[o,i]),c=Ut(()=>{const m=t.current;l(),m.type==="DRAGGING"&&m.actions.cancel({shouldBlockNextClick:!0}),m.type==="PENDING"&&m.actions.abort()},[l]),d=Ut(function(){const x={capture:!0,passive:!1},w={cancel:c,completed:l,getPhase:s},y=ca(window,l0e(w),x),v=ca(window,o0e(w),x);n.current=function(){y(),v()}},[c,s,l]),u=Ut(function(){const x=s();x.type!=="PENDING"&&jt();const w=x.actions.fluidLift(x.point);i({type:"DRAGGING",actions:w,hasMoved:!1})},[s,i]),p=Ut(function(x,w){s().type!=="IDLE"&&jt();const y=setTimeout(u,i0e);i({type:"PENDING",point:w,actions:x,longPressTimerId:y}),d()},[d,s,i,u]);Oi(function(){return o(),function(){n.current();const w=s();w.type==="PENDING"&&(clearTimeout(w.longPressTimerId),i(M2))}},[s,o,i]),Oi(function(){return ca(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const d0e=["input","button","textarea","select","option","optgroup","video","audio"];function NM(e,t){if(t==null)return!1;if(d0e.includes(t.tagName.toLowerCase()))return!0;const s=t.getAttribute("contenteditable");return s==="true"||s===""?!0:t===e?!1:NM(e,t.parentElement)}function u0e(e,t){const n=t.target;return _1(n)?NM(e,n):!1}var f0e=e=>Ba(e.getBoundingClientRect()).center;function p0e(e){return e instanceof CM(e).Element}const h0e=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(s=>s in Element.prototype)||e})();function RM(e,t){return e==null?null:e[h0e](t)?e:RM(e.parentElement,t)}function m0e(e,t){return e.closest?e.closest(t):RM(e,t)}function g0e(e){return`[${Uf.contextId}="${e}"]`}function x0e(e,t){const n=t.target;if(!p0e(n))return null;const s=g0e(e),i=m0e(n,s);return!i||!_1(i)?null:i}function y0e(e,t){const n=x0e(e,t);return n?n.getAttribute(Uf.draggableId):null}function v0e(e,t){const n=`[${Ej.contextId}="${e}"]`,i=_M(document,n).find(a=>a.getAttribute(Ej.id)===t);return!i||!_1(i)?null:i}function b0e(e){e.preventDefault()}function Lg({expected:e,phase:t,isLockActive:n,shouldWarn:s}){return!(!n()||e!==t)}function DM({lockAPI:e,store:t,registry:n,draggableId:s}
861){if(e.isClaimed())return!1;const i=n.draggable.findById(s);return!(!i||!i.options.isEnabled||!wM(t.getState(),s))}function w0e({lockAPI:e,contextId:t,store:n,registry:s,draggableId:i,forceSensorStop:a,sourceEvent:o}){if(!DM({lockAPI:e,store:n,registry:s,draggableId:i}))return null;const c=s.draggable.getById(i),d=v0e(t,c.descriptor.id);if(!d||o&&!c.options.canDragInteractiveElements&&u0e(d,o))return null;const u=e.claim(a||yc);let p="PRE_DRAG";function m(){return c.options.shouldRespectForcePress}function x(){return e.isActive(u)}function w(F,A){Lg({expected:F,phase:p,isLockActive:x,shouldWarn:!0})&&n.dispatch(A())}const y=w.bind(null,"DRAGGING");function v(F){function A(){e.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(A(),jt()),n.dispatch(mhe(F.liftActionArgs)),p="DRAGGING";function C(D,P={shouldBlockNextClick:!1}){if(F.cleanup(),P.shouldBlockNextClick){const L=ca(window,[{eventName:"click",fn:b0e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(L)}A(),n.dispatch(pM({reason:D}))}return{isActive:()=>Lg({expected:"DRAGGING",phase:p,isLockActive:x,shouldWarn:!1}),shouldRespectForcePress:m,drop:D=>C("DROP",D),cancel:D=>C("CANCEL",D),...F.actions}}function j(F){const A=xm(D=>{y(()=>fM({client:D}))});return{...v({liftActionArgs:{id:i,clientSelection:F,movementMode:"FLUID"},cleanup:()=>A.cancel(),actions:{move:A}}),move:A}}function k(){const F={moveUp:()=>y(khe),moveRight:()=>y(Che),moveDown:()=>y(_he),moveLeft:()=>y(Ehe)};return v({liftActionArgs:{id:i,clientSelection:f0e(d),movementMode:"SNAP"},cleanup:yc,actions:F})}function S(){Lg({expected:"PRE_DRAG",phase:p,isLockActive:x,shouldWarn:!0})&&e.release()}return{isActive:()=>Lg({expected:"PRE_DRAG",phase:p,isLockActive:x,shouldWarn:!1}),shouldRespectForcePress:m,fluidLift:j,snapLift:k,abort:S}}const j0e=[e0e,s0e,c0e];function S0e({contextId:e,store:t,registry:n,customSensors:s,enableDefaultSensors:i}){const a=[...i?j0e:[],...s||[]],o=g.useState(()=>zme())[0],l=Ut(function(v,j){Sm(v)&&!Sm(j)&&o.tryAbandon()},[o]);Oi(function(){let v=t.getState();return t.subscribe(()=>{const k=t.getState();l(v,k),v=k})},[o,t,l]),Oi(()=>o.tryAbandon,[o.tryAbandon]);const c=Ut(y=>DM({lockAPI:o,registry:n,store:t,draggableId:y}),[o,n,t]),d=Ut((y,v,j)=>w0e({lockAPI:o,registry:n,contextId:e,store:t,draggableId:y,forceSensorStop:v||null,sourceEvent:j&&j.sourceEvent?j.sourceEvent:null}),[e,o,n,t]),u=Ut(y=>y0e(e,y),[e]),p=Ut(y=>{const v=n.draggable.findById(y);return v?v.options:null},[n.draggable]),m=Ut(function(){o.isClaimed()&&(o.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(Yk()))},[o,t]),x=Ut(()=>o.isClaimed(),[o]),w=En(()=>({canGetLock:c,tryGetLock:d,findClosestDraggableId:u,findOptionsForDraggable:p,tryReleaseLock:m,isLockClaimed:x}),[c,d,u,p,m,x]);for(let y=0;y<a.length;y++)a[y](w)}const k0e=e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Ka.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),_0e=e=>({...jm,...e.autoScrollerOptions,durationDampening:{...jm.durationDampening,...e.autoScrollerOptions}});function dh(e){return e.current||jt(),e.current}function C0e(e){const{contextId:t,setCallbacks:n,sensors:s,nonce:i,dragHandleUsageInstructions:a}=e,o=g.useRef(null),l=EM(e),c=Ut(()=>k0e(l.current),[l]),d=Ut(()=>_0e(l.current),[l]),u=Bme(t),p=Lme({contextId:t,text:a}),m=Ame(t,i),x=Ut(L=>{dh(o).dispatch(L)},[]),w=En(()=>pT({publishWhileDragging:xhe,updateDroppableScroll:vhe,updateDroppableIsEnabled:bhe,updateDroppableIsCombineEnabled:whe,collectionStarting:yhe},x),[x]),y=Dme(),v=En(()=>ome(y,w),[y,w]),j=En(()=>kme({scrollWindow:lme,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:d,...pT({move:fM},x)}),[v.scrollDroppable,x,d]),k=Nme(t),S=En(()=>rme({announce:u,autoScroller:j,dimensionMarshal:v,focusMarshal:k,getResponders:c,styleMarshal:m}),[u,j,v,k,c,m]);o.current=S;const _=Ut(()=>{const L=dh(o);L.getState().phase!=="IDLE"&&L.dispatch(Yk())},[]),F=Ut(()=>{const L=dh(o).getState();return L.phase==="DROP_ANIMATING"?!0:L.phase==="IDLE"?!1:L.isDragging},[]),A=En(()=>
861({isDragging:F,tryAbort:_}),[F,_]);n(A);const C=Ut(L=>wM(dh(o).getState(),L),[]),D=Ut(()=>bd(dh(o).getState()),[]),P=En(()=>({marshal:v,focus:k,contextId:t,canLift:C,isMovementAllowed:D,dragHandleUsageInstructionsId:p,registry:y}),[t,v,p,k,C,D,y]);return S0e({contextId:t,store:S,registry:y,customSensors:s||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),g.useEffect(()=>_,[_]),Rn.createElement(C1.Provider,{value:P},Rn.createElement(Kfe,{context:n_,store:S},e.children))}function E0e(){return Rn.useId()}function i_(e){const t=E0e(),n=e.dragHandleUsageInstructions||Px.dragHandleUsageInstructions;return Rn.createElement(ipe,null,s=>Rn.createElement(C0e,{nonce:e.nonce,contextId:t,setCallbacks:s,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const UT={dragging:5e3,dropAnimating:4500},F0e=(e,t)=>t?Vh.drop(t.duration):e?Vh.snap:Vh.fluid,A0e=(e,t)=>{if(e)return t?wm.opacity.drop:wm.opacity.combining},T0e=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function N0e(e){const n=e.dimension.client,{offset:s,combineWith:i,dropping:a}=e,o=!!i,l=T0e(e),c=!!a,d=c?_j.drop(s,o):_j.moveTo(s);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:F0e(l,a),transform:d,opacity:A0e(o,c),zIndex:c?UT.dropAnimating:UT.dragging,pointerEvents:"none"}}function R0e(e){return{transform:_j.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function D0e(e){return e.type==="DRAGGING"?N0e(e):R0e(e)}function I0e(e,t,n=rs){const s=window.getComputedStyle(t),i=t.getBoundingClientRect(),a=WO(i,s),o=fy(a,n),l={client:a,tagName:t.tagName.toLowerCase(),display:s.display},c={x:a.marginBox.width,y:a.marginBox.height};return{descriptor:e,placeholder:l,displaceBy:c,client:a,page:o}}function P0e(e){const t=r_("draggable"),{descriptor:n,registry:s,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:o,isEnabled:l}=e,c=En(()=>({canDragInteractiveElements:a,shouldRespectForcePress:o,isEnabled:l}),[a,l,o]),d=Ut(x=>{const w=i();return w||jt(),I0e(n,w,x)},[n,i]),u=En(()=>({uniqueId:t,descriptor:n,options:c,getDimension:d}),[n,d,c,t]),p=g.useRef(u),m=g.useRef(!0);Oi(()=>(s.draggable.register(p.current),()=>s.draggable.unregister(p.current)),[s.draggable]),Oi(()=>{if(m.current){m.current=!1;return}const x=p.current;p.current=u,s.draggable.update(u,x)},[u,s.draggable])}var a_=Rn.createContext(null);function yy(e){const t=g.useContext(e);return t||jt(),t}function B0e(e){e.preventDefault()}const O0e=e=>{const t=g.useRef(null),n=Ut((A=null)=>{t.current=A},[]),s=Ut(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:a,registry:o}=yy(C1),{type:l,droppableId:c}=yy(a_),d=En(()=>({id:e.draggableId,index:e.index,type:l,droppableId:c}),[e.draggableId,e.index,l,c]),{children:u,draggableId:p,isEnabled:m,shouldRespectForcePress:x,canDragInteractiveElements:w,isClone:y,mapped:v,dropAnimationFinished:j}=e;if(!y){const A=En(()=>({descriptor:d,registry:o,getDraggableRef:s,canDragInteractiveElements:w,shouldRespectForcePress:x,isEnabled:m}),[d,o,s,w,x,m]);P0e(A)}const k=En(()=>m?{tabIndex:0,role:"button","aria-describedby":a,"data-rfd-drag-handle-draggable-id":p,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:B0e}:null,[i,a,p,m]),S=Ut(A=>{v.type==="DRAGGING"&&v.dropping&&A.propertyName==="transform"&&Ka.flushSync(j)},[j,v]),_=En(()=>{const A=D0e(v),C=v.type==="DRAGGING"&&v.dropping?S:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":p,style:A,onTransitionEnd:C},dragHandleProps:k}},[i,k,p,v,S,n]),F=En(()=>({draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}),[d.droppableId,d.id,d.index,d.type]);return Rn.createElement(Rn.Fragment,null,u(_,v.snapshot,F))};var IM=(e,t)=>e===t,PM=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const M0e=e=>e.combine?e.combine.draggableId:null,L0e=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function z0e(){const e=Zr((i,a)=>({x:i,y:a})),t=Zr((i,a,o=null,l=null,c=null)=>({isDragging:!0,isClone:a,isDropAnimating:!!c,dropAnimation:c,mode:i,draggingOver:o,combineWith:l,combineTargetFor:null})),n=Zr((i,a,o,l,c=null,d=null,u=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:c,combineWith:d,mode:a,offset:i,dimension:o,forceShouldAnimate:u,snapshot:t(a,l,c,d,null)}}));return(i,a)=>
861{if(Sm(i)){if(i.critical.draggable.id!==a.draggableId)return null;const o=i.current.client.offset,l=i.dimensions.draggables[a.draggableId],c=Bi(i.impact),d=L0e(i.impact),u=i.forceShouldAnimate;return n(e(o.x,o.y),i.movementMode,l,a.isClone,c,d,u)}if(i.phase==="DROP_ANIMATING"){const o=i.completed;if(o.result.draggableId!==a.draggableId)return null;const l=a.isClone,c=i.dimensions.draggables[a.draggableId],d=o.result,u=d.mode,p=PM(d),m=M0e(d),w={duration:i.dropDuration,curve:Jk.drop,moveTo:i.newHomeClientOffset,opacity:m?wm.opacity.drop:null,scale:m?wm.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:c,dropping:w,draggingOver:p,combineWith:m,mode:u,forceShouldAnimate:null,snapshot:t(u,l,p,m,w)}}}return null}}function BM(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const W0e={mapped:{type:"SECONDARY",offset:rs,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:BM(null)}};function $0e(){const e=Zr((o,l)=>({x:o,y:l})),t=Zr(BM),n=Zr((o,l=null,c)=>({mapped:{type:"SECONDARY",offset:o,combineTargetFor:l,shouldAnimateDisplacement:c,snapshot:t(l)}})),s=o=>o?n(rs,o,!0):null,i=(o,l,c,d)=>{const u=c.displaced.visible[o],p=!!(d.inVirtualList&&d.effected[o]),m=j1(c),x=m&&m.draggableId===o?l:null;if(!u){if(!p)return s(x);if(c.displaced.invisible[o])return null;const v=sp(d.displacedBy.point),j=e(v.x,v.y);return n(j,x,!0)}if(p)return s(x);const w=c.displacedBy.point,y=e(w.x,w.y);return n(y,x,u.shouldAnimate)};return(o,l)=>{if(Sm(o))return o.critical.draggable.id===l.draggableId?null:i(l.draggableId,o.critical.draggable.id,o.impact,o.afterCritical);if(o.phase==="DROP_ANIMATING"){const c=o.completed;return c.result.draggableId===l.draggableId?null:i(l.draggableId,c.result.draggableId,c.impact,c.afterCritical)}return null}}const U0e=()=>{const e=z0e(),t=$0e();return(s,i)=>e(s,i)||t(s,i)||W0e},V0e={dropAnimationFinished:hM},H0e=LO(U0e,V0e,null,{context:n_,areStatePropsEqual:IM})(O0e);function OM(e){return yy(a_).isUsingCloneFor===e.draggableId&&!e.isClone?null:Rn.createElement(H0e,e)}function o_(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,s=!!e.shouldRespectForcePress;return Rn.createElement(OM,py({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:s}))}const MM=e=>t=>e===t,q0e=MM("scroll"),G0e=MM("auto"),VT=(e,t)=>t(e.overflowX)||t(e.overflowY),K0e=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return VT(n,q0e)||VT(n,G0e)},Y0e=()=>!1,LM=e=>e==null?null:e===document.body?Y0e()?e:null:e===document.documentElement?null:K0e(e)?e:LM(e.parentElement);var Fj=e=>({x:e.scrollLeft,y:e.scrollTop});const zM=e=>e?window.getComputedStyle(e).position==="fixed"?!0:zM(e.parentElement):!1;var X0e=e=>{const t=LM(e),n=zM(e);return{closestScrollable:t,isFixedOnPage:n}},J0e=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:s,direction:i,client:a,page:o,closest:l})=>{const c=(()=>{if(!l)return null;const{scrollSize:m,client:x}=l,w=yM({scrollHeight:m.scrollHeight,scrollWidth:m.scrollWidth,height:x.paddingBox.height,width:x.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:x,scrollSize:m,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:w,diff:{value:rs,displacement:rs}}}})(),d=i==="vertical"?Vk:JO,u=Wf({page:o,withPlaceholder:null,axis:d,frame:c});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:s,axis:d,isEnabled:t,client:a,page:o,frame:c,subject:u}};const Q0e=(e,t)=>{const n=$O(e);if(!t||e!==t)return n;const s=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,a=s+t.scrollHeight,o=i+t.scrollWidth,c=zk({top:s,right:o,bottom:a,left:i},n.border);return Wk({borderBox:c,margin:n.margin,border:n.border,padding:n.padding})};var Z0e=({ref:e,descriptor:t,env:n,windowScroll:s,direction:i,isDropDisabled:a,isCombine
861Enabled:o,shouldClipSubject:l})=>{const c=n.closestScrollable,d=Q0e(e,c),u=fy(d,s),p=(()=>{if(!c)return null;const x=$O(c),w={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:x,page:fy(x,s),scroll:Fj(c),scrollSize:w,shouldClipSubject:l}})();return J0e({descriptor:t,isEnabled:!a,isCombineEnabled:o,isFixedOnPage:n.isFixedOnPage,direction:i,client:d,page:u,closest:p})};const ege={passive:!1},tge={passive:!0};var HT=e=>e.shouldPublishImmediately?ege:tge;const zg=e=>e&&e.env.closestScrollable||null;function nge(e){const t=g.useRef(null),n=yy(C1),s=r_("droppable"),{registry:i,marshal:a}=n,o=EM(e),l=En(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),c=g.useRef(l),d=En(()=>Zr((_,F)=>{t.current||jt();const A={x:_,y:F};a.updateDroppableScroll(l.id,A)}),[l.id,a]),u=Ut(()=>{const _=t.current;return!_||!_.env.closestScrollable?rs:Fj(_.env.closestScrollable)},[]),p=Ut(()=>{const _=u();d(_.x,_.y)},[u,d]),m=En(()=>xm(p),[p]),x=Ut(()=>{const _=t.current,F=zg(_);if(_&&F||jt(),_.scrollOptions.shouldPublishImmediately){p();return}m()},[m,p]),w=Ut((_,F)=>{t.current&&jt();const A=o.current,C=A.getDroppableRef();C||jt();const D=X0e(C),P={ref:C,descriptor:l,env:D,scrollOptions:F};t.current=P;const L=Z0e({ref:C,descriptor:l,env:D,windowScroll:_,direction:A.direction,isDropDisabled:A.isDropDisabled,isCombineEnabled:A.isCombineEnabled,shouldClipSubject:!A.ignoreContainerClipping}),T=D.closestScrollable;return T&&(T.setAttribute(LT.contextId,n.contextId),T.addEventListener("scroll",x,HT(P.scrollOptions))),L},[n.contextId,l,x,o]),y=Ut(()=>{const _=t.current,F=zg(_);return _&&F||jt(),Fj(F)},[]),v=Ut(()=>{const _=t.current;_||jt();const F=zg(_);t.current=null,F&&(m.cancel(),F.removeAttribute(LT.contextId),F.removeEventListener("scroll",x,HT(_.scrollOptions)))},[x,m]),j=Ut(_=>{const F=t.current;F||jt();const A=zg(F);A||jt(),A.scrollTop+=_.y,A.scrollLeft+=_.x},[]),k=En(()=>({getDimensionAndWatchScroll:w,getScrollWhileDragging:y,dragStopped:v,scroll:j}),[v,w,y,j]),S=En(()=>({uniqueId:s,descriptor:l,callbacks:k}),[k,l,s]);Oi(()=>(c.current=S.descriptor,i.droppable.register(S),()=>{t.current&&v(),i.droppable.unregister(S)}),[k,l,v,S,a,i.droppable]),Oi(()=>{t.current&&a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,a]),Oi(()=>{t.current&&a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,a])}function L2(){}const qT={width:0,height:0,margin:upe},rge=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?qT:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},sge=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const s=rge({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:s.width,height:s.height,marginTop:s.margin.top,marginRight:s.margin.right,marginBottom:s.margin.bottom,marginLeft:s.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?Vh.placeholder:null}},ige=e=>{const t=g.useRef(null),n=Ut(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:s,onTransitionEnd:i,onClose:a,contextId:o}=e,[l,c]=g.useState(e.animate==="open");g.useEffect(()=>l?s!=="open"?(n(),c(!1),L2):t.current?L2:(t.current=setTimeout(()=>{t.current=null,c(!1)}),n):L2,[s,l,n]);const d=Ut(p=>{p.propertyName==="height"&&(i(),s==="close"&&a())},[s,a,i]),u=sge({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return Rn.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":o,onTransitionEnd:d,ref:e.innerRef})};var age=Rn.memo(ige);class oge extends Rn.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}
861render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const lge=e=>{const t=g.useContext(C1);t||jt();const{contextId:n,isMovementAllowed:s}=t,i=g.useRef(null),a=g.useRef(null),{children:o,droppableId:l,type:c,mode:d,direction:u,ignoreContainerClipping:p,isDropDisabled:m,isCombineEnabled:x,snapshot:w,useClone:y,updateViewportMaxScroll:v,getContainerForClone:j}=e,k=Ut(()=>i.current,[]),S=Ut((T=null)=>{i.current=T},[]);Ut(()=>a.current,[]);const _=Ut((T=null)=>{a.current=T},[]),F=Ut(()=>{s()&&v({maxScroll:bM()})},[s,v]);nge({droppableId:l,type:c,mode:d,direction:u,isDropDisabled:m,isCombineEnabled:x,ignoreContainerClipping:p,getDroppableRef:k});const A=En(()=>Rn.createElement(oge,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:T,data:R,animate:U})=>Rn.createElement(age,{placeholder:R,onClose:T,innerRef:_,animate:U,contextId:n,onTransitionEnd:F})),[n,F,e.placeholder,e.shouldAnimatePlaceholder,_]),C=En(()=>({innerRef:S,placeholder:A,droppableProps:{"data-rfd-droppable-id":l,"data-rfd-droppable-context-id":n}}),[n,l,A,S]),D=y?y.dragging.draggableId:null,P=En(()=>({droppableId:l,type:c,isUsingCloneFor:D}),[l,D,c]);function L(){if(!y)return null;const{dragging:T,render:R}=y,U=Rn.createElement(OM,{draggableId:T.draggableId,index:T.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(I,H)=>R(I,H,T));return Y8.createPortal(U,j())}return Rn.createElement(a_.Provider,{value:P},o(C,w),L())};function cge(){return document.body||jt(),document.body}const GT={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:cge},WM=e=>{let t={...e},n;for(n in GT)e[n]===void 0&&(t={...t,[n]:GT[n]});return t},z2=(e,t)=>e===t.droppable.type,KT=(e,t)=>t.draggables[e.draggable.id],dge=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=Zr(a=>({draggableId:a.id,type:a.type,source:{index:a.index,droppableId:a.droppableId}})),s=Zr((a,o,l,c,d,u)=>{const p=d.descriptor.id;if(d.descriptor.droppableId===a){const w=u?{render:u,dragging:n(d.descriptor)}:null,y={isDraggingOver:l,draggingOverWith:l?p:null,draggingFromThisWith:p,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!1,snapshot:y,useClone:w}}if(!o)return t;if(!c)return e;const x={isDraggingOver:l,draggingOverWith:p,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!0,snapshot:x,useClone:null}});return(a,o)=>{const l=WM(o),c=l.droppableId,d=l.type,u=!l.isDropDisabled,p=l.renderClone;if(Sm(a)){const m=a.critical;if(!z2(d,m))return t;const x=KT(m,a.dimensions),w=Bi(a.impact)===c;return s(c,u,w,w,x,p)}if(a.phase==="DROP_ANIMATING"){const m=a.completed;if(!z2(d,m.critical))return t;const x=KT(m.critical,a.dimensions);return s(c,u,PM(m.result)===c,Bi(m.impact)===c,x,p)}if(a.phase==="IDLE"&&a.completed&&!a.shouldFlush){const m=a.completed;if(!z2(d,m.critical))return t;const x=Bi(m.impact)===c,w=!!(m.impact.at&&m.impact.at.type==="COMBINE"),y=m.critical.droppable.id===c;return x?w?e:t:y?e:t}return t}},uge={updateViewportMaxScroll:She},fge=LO(dge,uge,(e,t,n)=>({...WM(n),...e,...t}),{context:n_,areStatePropsEqual:IM})(lge);var l_=fge;const uc="#E2E8F0",bc="#111827",ll="#6B7280",Zu="#9CA3AF",Aj="#6C24F5",c_="#DC2626";function pge(e){return!!e.is_terminal}function hge(e){return e.internal_status==="standby"}function Tj(e){return(e.order??0)===0&&!e.is_terminal&&e.internal_status!=="standby"}function YT(e){return!(Tj(e)||pge(e)||hge(e))}function W2({stage:e,index:t,applicationsCount:n,isReorderableRow:s,onRename:i,onRequestDelete:a}){const[o,l]=g.useState(!1),[c,d]=g.useState(e.name||""),u=g.useRef(null);g.useEffect(()=>{d(e.name||"")},[e.name]),g.useEffect(()=>{o&&u.current&&u.current.focus()},[o]);const p=async()=>{const y=c.trim();if(l(!1),!y||y===e.name){d(e.name||"");return}await i(e,y)},m=e.stage_type==="custom",x=s?"#FFFFFF":"#F9FAFB",w=(y,v)=>{var j;return r.jsxs("div",{ref:y==null?void 0:y.innerRef,...(y==null?void 0:y.draggableProps)||{},style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",background:v!=null&&v.isDragging?"#EEF2FF":x,border:`1px solid ${v!=null&&v.isDragging?Aj:uc}`,borderRadius:8,marginBottom:6,...((j=y==null?void 0:y.draggableProps)==null?void 0:j.style)||{}},children:[r.jsx("div",{...(y==null?void 0:y.dragHandleProps)||{},style:{color:s?Zu:"#D1D5DB",cursor:s?"grab":"not-allowed",display:"flex",alignItems:"center"},title:s?"Arraste para reordenar":"Etapa fixa",children:r.jsx(dS,{size:16})}),o?r.jsx("input",{ref:u,value:c,onChange:k=>d(k.target.value),onBlur:p,onKeyDown:k=>{k.key==="Enter"&&(k.preventDefault(),p()),k.key==="Escape"&&(k.preventDefault(),d(e.name||""),l(!1))},style:{flex:1,padding:"6px 8px",fontSize:13,border:`1px solid ${Aj}`,borderRadius:6,outline:"none",fontFamily:"inherit",color:bc,background:"#FFFFFF"}}):r.jsx("button",{type:"button",onClick:()=>l(!0),style:{flex:1,textAlign:"left",padding:"6px 8px",fontSize:13,color:bc,background:"transparent",border:"1px solid transparent",borderRadius:6,cursor:"text",fontFamily:"inherit"},onMouseEnter:k=>k.currentTarget.style.borderColor=uc,onMouseLeave:k=>k.currentTarget.style.borderColor="transparent",children:e.name}),r.jsx("span",{style:{fontSize:10,padding:"3px 8px",borderRadius:999,fontWeight:500,background:m?"#EEF2FF":"#F6F8FA",color:m?"#4338CA":"#4B5563",flexShrink:0}
861,children:m?"Custom":"Âncora"}),m?r.jsx("button",{type:"button",onClick:()=>a(e,n),title:"Remover etapa",style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,background:"transparent",border:"none",borderRadius:6,color:ll,cursor:"pointer",flexShrink:0},onMouseEnter:k=>{k.currentTarget.style.background="#FEE2E2",k.currentTarget.style.color=c_},onMouseLeave:k=>{k.currentTarget.style.background="transparent",k.currentTarget.style.color=ll},children:r.jsx(zn,{size:14})}):r.jsx("div",{style:{width:28,flexShrink:0}})]})};return s?r.jsx(o_,{draggableId:e.id,index:t,children:(y,v)=>w(y,v)}):w(null,null)}function mge({stage:e,applicationsCount:t,otherStages:n,onCancel:s,onConfirm:i,busy:a}){var c;const[o,l]=g.useState(((c=n[0])==null?void 0:c.id)||"");return r.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1100,padding:16},onClick:()=>!a&&s(),children:r.jsxs("div",{onClick:d=>d.stopPropagation(),style:{background:"#FFFFFF",borderRadius:12,padding:"24px 28px",maxWidth:440,width:"100%",boxShadow:"0 20px 40px rgba(15, 23, 42, 0.15)"},children:[t===0?r.jsxs(r.Fragment,{children:[r.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 8px",color:bc},children:['Remover etapa "',e.name,'"?']}),r.jsx("p",{style:{fontSize:13,color:ll,margin:"0 0 20px",lineHeight:1.5},children:"Esta etapa não possui candidatos e será removida do pipeline."})]}):r.jsxs(r.Fragment,{children:[r.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 8px",color:bc},children:['Remover "',e.name,'"']}),r.jsxs("p",{style:{fontSize:13,color:ll,margin:"0 0 12px",lineHeight:1.5},children:["Mover ",t," ",t===1?"candidato":"candidatos"," para:"]}),r.jsx("select",{value:o,onChange:d=>l(d.target.value),disabled:a,style:{width:"100%",padding:"8px 10px",fontSize:13,border:`1px solid ${uc}`,borderRadius:6,outline:"none",marginBottom:20,fontFamily:"inherit",color:bc,background:"#FFFFFF"},children:n.map(d=>r.jsx("option",{value:d.id,children:d.name},d.id))})]}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[r.jsx("button",{type:"button",onClick:s,disabled:a,style:{padding:"8px 16px",fontSize:13,background:"transparent",color:ll,border:`1px solid ${uc}`,borderRadius:6,cursor:a?"not-allowed":"pointer",fontFamily:"inherit"},children:"Cancelar"}),r.jsxs("button",{type:"button",onClick:()=>i(o),disabled:a||t>0&&!o,style:{padding:"8px 16px",fontSize:13,background:c_,color:"#FFFFFF",border:"none",borderRadius:6,cursor:a?"not-allowed":"pointer",fontWeight:500,fontFamily:"inherit",display:"flex",alignItems:"center",gap:6},children:[a&&r.jsx(rt,{size:13,style:{animation:"spin 0.8s linear infinite"}}),"Remover"]})]})]})})}function gge({open:e,jobTitle:t,jobId:n,workspaceId:s,stages:i,applicationsByStageId:a,onClose:o}){const[l,c]=g.useState([]),[d,u]=g.useState(!1),[p,m]=g.useState(""),[x,w]=g.useState(null),[y,v]=g.useState(!1),[j,k]=g.useState(null),[S,_]=g.useState(!1),[F,A]=g.useState(!1),C=g.useRef(null);g.useEffect(()=>{c([...i].sort((N,W)=>(N.order??0)-(W.order??0)))},[i,e]),g.useEffect(()=>{d&&C.current&&C.current.focus()},[d]);const P=g.useMemo(()=>l.filter(N=>N.stage_type==="custom").length,[l])>=3,L=l.filter(Tj),T=l.filter(YT),R=l.filter(N=>!Tj(N)&&!YT(N)),U=T.length>0?Math.max(...T.map(N=>N.order??0)):L.length>0?Math.max(...L.map(N=>N.order??0)):0,I=async(N,W)=>{try{await ne.entities.PipelineStage.update(N.id,{name:W}),c(O=>O.map(G=>G.id===N.id?{...G,name:W}:G))}catch{alert("Falha ao renomear etapa.")}},H=async N=>{const{destination:W,source:O}=N;if(!W||W.index===O.index)return;const G=Array.from(T),[M]=G.splice(O.index,1);G.splice(W.index,0,M);const z=L.length>0?Math.max(...L.map(ae=>ae.order??0))+1:1,K=G.map((ae,re)=>({id:ae.id,newOrder:z+re})),Y={};K.forEach(ae=>{Y[ae.id]=ae.newOrder});const J=[...R].sort((ae,re)=>(ae.order??0)-(re.order??0)),Q=z+G.length,ie=J.map((ae,re)=>({id:ae.id,newOrder:Q+re}));ie.forEach(ae=>{Y[ae.id]=ae.newOrder}),c(ae=>[...ae].map(re=>Y[re.id]!=null?{...re,order:Y[re.id]}:re).sort((re,pe)=>(re.order??0)-(pe.order??0))),A(!0);try{for(const ae of[...K,...ie])await ne.entities.PipelineStage.update(ae.id,{order:ae.newOrder})}catch{alert("Falha ao salvar nova ordem.")}finally{A(!1)}},V=async()=>{const N=p.trim();if(!N){u(!1),m(""),w(null);return}v(!0),w(null);try{const W=await ne.functions.invoke("createCustomStage",{workspace_id:s,job_id:n,name:N,insert_after_order:U}),O=(W==null?void 0:W.data)||W;if(!(O!=null&&O.success)){(O==null?void 0:O.error)==="custom_stage_limit"?w("Limite de 3 etapas customizadas atingido."):w((O==null?void 0:O.message)||(O==null?void 0:O.error)||"Falha ao criar etapa.");return}const G=[...O.stages||[]].sort((M,z)=>(M.order??0)-(z.order??0));c(G),m(""),u(!1)}catch(W){w((W==null?void 0:W.message)||"Falha ao criar etapa.")}finally{v(!1)}},X=async N=>{if(!j)return;const{stage:W,count:O}=j;_(!0);try{if(O>0&&N){const G=a[W.id]||[];for(const M of G)await ne.functions.invoke("moveApplicationToStage",{workspace_id:s,application_id:M.id,to_stage_id:N})}await ne.entities.PipelineStage.update(W.id,{is_archived:!0}),c(G=>G.filter(M=>M.id!==W.id)),k(null)}catch{alert("Falha ao remover etapa.")}finally{_(!1)}};return e?r.jsxs("div",{style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.5)",display:"flex",alignItems:"flex-start",justifyContent:"center",zIndex:1e3,padding:"60px 16px 24px",overflowY:"auto"},onClick:()=>o(!0),children:[r.jsxs("div",{onClick:N=>N.stopPropagation(),style:{background:"#FFFFFF",borderRadius:12,width:"100%",maxWidth:480,boxSh
861adow:"0 20px 50px rgba(15, 23, 42, 0.2)",display:"flex",flexDirection:"column"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",padding:"20px 24px 16px",borderBottom:`1px solid ${uc}`},children:[r.jsxs("div",{children:[r.jsx("h2",{style:{fontSize:16,fontWeight:600,margin:0,color:bc},children:"Configurar Pipeline"}),t&&r.jsx("p",{style:{fontSize:12,color:ll,margin:"4px 0 0"},children:t})]}),r.jsx("button",{type:"button",onClick:()=>o(!0),style:{padding:6,background:"transparent",border:"none",borderRadius:6,cursor:"pointer",color:ll,display:"flex"},onMouseEnter:N=>N.currentTarget.style.background="#F0F2F5",onMouseLeave:N=>N.currentTarget.style.background="transparent","aria-label":"Fechar",children:r.jsx(Jt,{size:18})})]}),r.jsxs("div",{style:{padding:"16px 20px 20px"},children:[F&&r.jsxs("div",{style:{fontSize:11,color:Zu,marginBottom:8,display:"flex",alignItems:"center",gap:6},children:[r.jsx(rt,{size:11,style:{animation:"spin 0.8s linear infinite"}}),"Salvando ordem..."]}),L.map(N=>r.jsx(W2,{stage:N,index:0,applicationsCount:(a[N.id]||[]).length,isReorderableRow:!1,onRename:I,onRequestDelete:()=>{}},N.id)),r.jsx(i_,{onDragEnd:H,children:r.jsx(l_,{droppableId:"settings-stages",children:N=>r.jsxs("div",{ref:N.innerRef,...N.droppableProps,children:[T.map((W,O)=>r.jsx(W2,{stage:W,index:O,applicationsCount:(a[W.id]||[]).length,isReorderableRow:!0,onRename:I,onRequestDelete:(G,M)=>k({stage:G,count:M})},W.id)),N.placeholder]})})}),d?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",background:"#FFFFFF",border:`1px solid ${Aj}`,borderRadius:8,marginBottom:6},children:[r.jsx("div",{style:{width:16,color:Zu,display:"flex"},children:r.jsx(dS,{size:16})}),r.jsx("input",{ref:C,value:p,disabled:y,onChange:N=>m(N.target.value),onBlur:V,onKeyDown:N=>{N.key==="Enter"&&(N.preventDefault(),V()),N.key==="Escape"&&(N.preventDefault(),m(""),u(!1),w(null))},placeholder:"Nome da etapa",style:{flex:1,padding:"6px 8px",fontSize:13,border:`1px solid ${uc}`,borderRadius:6,outline:"none",fontFamily:"inherit",color:bc,background:"#FFFFFF"}}),y&&r.jsx(rt,{size:14,style:{animation:"spin 0.8s linear infinite",color:Zu}})]}):r.jsxs("button",{type:"button",onClick:()=>{P||(u(!0),w(null))},disabled:P,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,width:"100%",padding:"10px 12px",background:"transparent",border:`1px dashed ${uc}`,borderRadius:8,color:P?Zu:ll,fontSize:13,cursor:P?"not-allowed":"pointer",fontFamily:"inherit",marginBottom:6,opacity:P?.6:1,transition:"background 120ms ease, border-color 120ms ease, color 120ms ease"},onMouseEnter:N=>{P||(N.currentTarget.style.background="#F9FAFB",N.currentTarget.style.borderColor="#9CA3AF",N.currentTarget.style.color=bc)},onMouseLeave:N=>{N.currentTarget.style.background="transparent",N.currentTarget.style.borderColor=uc,N.currentTarget.style.color=P?Zu:ll},children:[r.jsx(Ln,{size:14})," Nova etapa"]}),x&&r.jsx("div",{style:{fontSize:12,color:c_,marginTop:4,marginBottom:6},children:x}),R.map(N=>r.jsx(W2,{stage:N,index:0,applicationsCount:(a[N.id]||[]).length,isReorderableRow:!1,onRename:I,onRequestDelete:()=>{}},N.id))]})]}),j&&r.jsx(mge,{stage:j.stage,applicationsCount:j.count,otherStages:l.filter(N=>N.id!==j.stage.id),busy:S,onCancel:()=>!S&&k(null),onConfirm:X})]}):null}const Bx="#E2E8F0",Nj="#111827",Wu="#6B7280",Rj="#9CA3AF",xge="#DC2626",$2="#16A34A",yge="#92400E";function vge({application:e,candidateName:t,stages:n,onMove:s,onEdit:i,onSendToJob:a,onRemove:o}){const[l,c]=g.useState(!1),[d,u]=g.useState("root"),[p,m]=g.useState(!1),[x,w]=g.useState({top:0,left:0}),y=g.useRef(null),v=g.useRef(null),j=g.useRef(null),k=(n||[]).filter(T=>!T.is_archived),S=k.filter(T=>T.id!==(e==null?void 0:e.current_stage_id)),_=k.find(T=>T.internal_status==="standby"),F=k.find(T=>T.is_terminal&&T.internal_status==="hired"),A=k.find(T=>T.is_terminal&&T.internal_status==="rejected"),C=()=>{c(!1),u("root")};g.useEffect(()=>{if(!l)return;const T=U=>{const I=y.current&&y.current.contains(U.target),H=j.current&&j.current.contains(U.target);!I&&!H&&C()},R=U=>{U.key==="Escape"&&C()};return document.addEventListener("mousedown",T),document.addEventListener("keydown",R),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("keydown",R)}},[l]),g.useEffect(()=>{if(!l)return;const T=()=>C(),R=()=>C();return window.addEventListener("scroll",T,!0),window.addEventListener("resize",R),()=>{window.removeEventListener("scroll",T,!0),window.removeEventListener("resize",R)}},[l]),g.useLayoutEffect(()=>{if(!l||!v.current)return;const T=v.current.getBoundingClientRect(),R=200,U=d==="move"?240:d==="hire"?130:180,I=window.innerWidth,H=window.innerHeight,V=8;let X=T.right-R;X<V&&(X=V),X+R>I-V&&(X=I-R-V);let N=T.bottom+4;if(N+U>H-V){const W=T.top-U-4;N=W>=V?W:Math.max(V,H-U-V)}w({top:N,left:X})},[l,d]);const D=async(T,R)=>{if(!(!T||p)){m(!0);try{await s(T,R||{}),C()}catch{}finally{m(!1)}}},P=T=>{T.stopPropagation()},L=T=>{T.stopPropagation(),T.preventDefault&&T.preventDefault()};return r.jsxs("div",{ref:y,onMouseDown:P,onClick:P,style:{position:"absolute",top:6,right:6,zIndex:5},children:[r.jsx("button",{ref:v,type:"button",className:"card-kebab-btn",onClick:T=>{P(T),c(R=>!R),l&&u("root")},onMouseDown:L,"aria-label":"Ações",style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",background:l?"#F0F2F5":"transparent",border:"none",borderRadius:4,color:Wu,cursor:"pointer",opacity:l?1:0,transition:"opacity 120ms ease, background 120ms ease"},children:r.jsx(No,{size:14})}),l&&Ka.createPortal(r.jsxs("div",{ref:j,onMouseDown:L,onClick:P,style:{position:"fixed",top:x.top,left
861:x.left,minWidth:200,background:"#FFFFFF",border:`1px solid ${Bx}`,borderRadius:8,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.12)",zIndex:9999,overflow:"hidden",animation:"kebabIn 120ms ease"},children:[d==="root"&&r.jsxs("div",{style:{padding:4},children:[r.jsx(Jo,{icon:r.jsx(Rc,{size:13}),label:"Mover para",trailing:r.jsx(Qr,{size:13,style:{color:Rj}}),disabled:S.length===0,onClick:()=>u("move")}),r.jsx(Jo,{icon:r.jsx($r,{size:13}),label:"Editar candidato",color:"#185FA5",disabled:!i,onClick:T=>{P(T),i==null||i(),C()}}),r.jsx(Jo,{icon:r.jsx(pa,{size:13}),label:"Enviar pra outra vaga",disabled:!a,onClick:T=>{P(T),a==null||a(),C()}}),r.jsx(U2,{}),r.jsx(Jo,{icon:r.jsx(Jt,{size:13}),label:"Reprovar",color:xge,disabled:!A||p,onClick:()=>D(A==null?void 0:A.id)}),r.jsx(Jo,{icon:r.jsx(gS,{size:13}),label:"Em espera",color:yge,disabled:!_||p,onClick:()=>D(_==null?void 0:_.id)}),r.jsx(Jo,{icon:r.jsx(fn,{size:13}),label:"Contratar",color:$2,disabled:!F||p,onClick:()=>u("hire")}),o&&r.jsxs(r.Fragment,{children:[r.jsx(U2,{}),r.jsx(Jo,{icon:r.jsx(zn,{size:13}),label:"Remover do pipeline",color:"#A32D2D",onClick:()=>u("remove")})]})]}),d==="remove"&&r.jsxs("div",{style:{padding:12},children:[r.jsx("div",{style:{fontSize:12,fontWeight:600,color:"#A32D2D",marginBottom:6},children:"Remover candidato do pipeline?"}),r.jsxs("div",{style:{fontSize:12,color:Wu,marginBottom:12,lineHeight:1.4},children:[r.jsx("strong",{style:{color:Nj},children:t})," será removido desta vaga."]}),r.jsxs("div",{style:{display:"flex",gap:6,justifyContent:"flex-end"},children:[r.jsx("button",{type:"button",onClick:()=>u("root"),disabled:p,style:{padding:"6px 12px",fontSize:12,background:"transparent",color:Wu,border:`1px solid ${Bx}`,borderRadius:6,cursor:p?"not-allowed":"pointer",fontFamily:"inherit"},children:"Cancelar"}),r.jsx("button",{type:"button",onClick:T=>{P(T),o==null||o(),C()},disabled:p,style:{padding:"6px 12px",fontSize:12,fontWeight:500,background:"#A32D2D",color:"#FFFFFF",border:"none",borderRadius:6,cursor:p?"not-allowed":"pointer",fontFamily:"inherit"},children:"Confirmar"})]})]}),d==="move"&&r.jsxs("div",{style:{padding:4,maxHeight:240,overflowY:"auto"},children:[S.length===0?r.jsx("div",{style:{padding:"8px 10px",fontSize:12,color:Rj},children:"Nenhuma etapa disponível"}):S.map(T=>r.jsx(Jo,{label:T.name,disabled:p,onClick:()=>D(T.id)},T.id)),r.jsx(U2,{}),r.jsx(Jo,{label:"← Voltar",color:Wu,onClick:()=>u("root")})]}),d==="hire"&&r.jsxs("div",{style:{padding:12},children:[r.jsx("div",{style:{fontSize:12,fontWeight:600,color:$2,marginBottom:6},children:"Confirmar contratação"}),r.jsxs("div",{style:{fontSize:12,color:Wu,marginBottom:12,lineHeight:1.4},children:["Confirmar contratação de ",r.jsx("strong",{style:{color:Nj},children:t}),"?"]}),r.jsxs("div",{style:{display:"flex",gap:6,justifyContent:"flex-end"},children:[r.jsx("button",{type:"button",onClick:()=>u("root"),disabled:p,style:{padding:"6px 12px",fontSize:12,background:"transparent",color:Wu,border:`1px solid ${Bx}`,borderRadius:6,cursor:p?"not-allowed":"pointer",fontFamily:"inherit"},children:"Cancelar"}),r.jsxs("button",{type:"button",onClick:()=>D(F==null?void 0:F.id),disabled:p||!F,style:{padding:"6px 12px",fontSize:12,fontWeight:500,background:$2,color:"#FFFFFF",border:"none",borderRadius:6,cursor:p?"not-allowed":"pointer",fontFamily:"inherit",display:"flex",alignItems:"center",gap:4},children:[p&&r.jsx(rt,{size:11,style:{animation:"spin 0.8s linear infinite"}}),"Confirmar"]})]})]})]}),document.body),r.jsx("style",{children:`
862        @keyframes kebabIn {
863          from { opacity: 0; transform: translateY(-4px); }
864          to { opacity: 1; transform: translateY(0); }
865        }
866      `})]})}function Jo({icon:e,label:t,trailing:n,color:s,disabled:i,onClick:a}){return r.jsxs("button",{type:"button",onClick:a,disabled:i,style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"8px 10px",background:"transparent",border:"none",borderRadius:4,fontSize:12,color:i?Rj:s||Nj,textAlign:"left",cursor:i?"not-allowed":"pointer",fontFamily:"inherit",transition:"background 80ms ease"},onMouseEnter:o=>{i||(o.currentTarget.style.background="#F9FAFB")},onMouseLeave:o=>{o.currentTarget.style.background="transparent"},children:[e&&r.jsx("span",{style:{display:"flex",flexShrink:0},children:e}),r.jsx("span",{style:{flex:1},children:t}),n]})}function U2(){return r.jsx("div",{style:{height:1,background:Bx,margin:"4px 0"}})}const XT="#E2E8F0",$M="#111827",Dj="#6B7280",fd="#9CA3AF";function bge(e){var n;const t=e.trim().split(/\s+/);return t.length===1?((n=t[0][0])==null?void 0:n.toUpperCase())||"?":(t[0][0]+t[t.length-1][0]).toUpperCase()}function uh(e){if(e.talent_profile)return e.talent_profile;if(e.snapshot)return e.snapshot;if(e.profile_snapshot_json)try{return JSON.parse(e.profile_snapshot_json)}catch{return{}}return{}}function wge(e){const t=e.updated_date||e.applied_at||e.created_at||e.created_date;if(!t)return null;const n=new Date(t);return isNaN(n.getTime())?null:Math.floor((Date.now()-n.getTime())/(1e3*60*60*24))}function jge(e){return e?String(e).replace(/[^\d]/g,""):""}function Sge({size:e=12}){return r.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#25D366",xmlns:"http://www.w3.org/2000/svg",children:r.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-.
866198 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.001-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"})})}const Qo=({children:e,width:t,onClick:n,style:s})=>r.jsx("th",{onClick:n,style:{width:t,textAlign:"left",padding:"10px 12px",fontSize:11,fontWeight:600,color:Dj,textTransform:"uppercase",letterSpacing:.4,cursor:n?"pointer":"default",whiteSpace:"nowrap",...s},children:e}),Zo=({children:e,width:t,style:n,onClick:s})=>r.jsx("td",{onClick:s,style:{width:t,padding:"10px 12px",fontSize:12,color:$M,verticalAlign:"middle",...n},children:e});function kge({applications:e=[],stages:t=[],selectedIds:n,onToggleSelect:s,onSelectAll:i,onOpenDrawer:a,onQuickMove:o,wsId:l}){var S;const{entitlements:c}=Xa(),d=["growth","enterprise"].includes((S=c==null?void 0:c.ats)==null?void 0:S.plan_key),[u,p]=g.useState(null),[m,x]=g.useState("asc"),w=t.reduce((_,F)=>(_[F.id]=F,_),{}),y=e.length>0&&e.every(_=>n==null?void 0:n.has(_.id)),v=(()=>{if(!u)return e;const _=[...e];return _.sort((F,A)=>{if(u==="name"){const C=(uh(F).full_name||"").toLowerCase(),D=(uh(A).full_name||"").toLowerCase();return m==="asc"?C.localeCompare(D):D.localeCompare(C)}if(u==="salary"){const C=Number(F.salary_expectation||uh(F).salary_expectation||0),D=Number(A.salary_expectation||uh(A).salary_expectation||0);return C===0&&D===0?0:C===0?1:D===0?-1:m==="asc"?C-D:D-C}return 0}),_})(),j=_=>{u===_?x(F=>F==="asc"?"desc":"asc"):(p(_),x("asc"))},k=_=>u!==_?null:r.jsx("span",{style:{marginLeft:4,fontSize:9},children:m==="asc"?"↑":"↓"});return r.jsx("div",{style:{background:"#FFFFFF",border:`1px solid ${XT}`,borderRadius:12,overflow:"auto",height:"calc(100vh - 200px)"},children:r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed"},children:[r.jsx("thead",{style:{position:"sticky",top:0,background:"#F9FAFB",zIndex:2},children:r.jsxs("tr",{style:{borderBottom:`1px solid ${XT}`},children:[r.jsx(Qo,{width:40,style:{paddingLeft:16},children:r.jsx("input",{type:"checkbox",checked:y,onChange:_=>{_.stopPropagation(),i==null||i()},onClick:_=>_.stopPropagation(),style:{width:14,height:14,cursor:"pointer",accentColor:"#6C24F5",margin:0}})}),r.jsxs(Qo,{onClick:()=>j("name"),children:["Candidato ",k("name")]}),r.jsx(Qo,{width:128,children:"Etapa"}),r.jsx(Qo,{width:192,children:"Email"}),r.jsx(Qo,{width:160,children:"Telefone"}),r.jsxs(Qo,{width:112,onClick:()=>j("salary"),children:["Salário ",k("salary")]}),r.jsx(Qo,{width:80,children:"Tempo"}),d&&r.jsx(Qo,{width:64,children:"Rating"}),r.jsx(Qo,{width:40})]})}),r.jsxs("tbody",{children:[v.length===0&&r.jsx("tr",{children:r.jsx("td",{colSpan:d?9:8,style:{padding:"40px 16px",textAlign:"center",fontSize:12,color:fd,fontStyle:"italic"},children:"Nenhum candidato encontrado"})}),v.map((_,F)=>{const A=uh(_),C=A.full_name||"Candidato",D=A.headline||A.current_title||"",P=_.email||A.email||"",L=_.phone||A.phone||"",T=_.avatar_url||A.avatar_url||"",R=Number(_.salary_expectation||A.salary_expectation||0),U=R>0?`R$ ${R.toLocaleString("pt-BR",{maximumFractionDigits:0})}`:"—",I=w[_.current_stage_id],H=wge(_),V=H!=null&&H>7,X=(n==null?void 0:n.has(_.id))||!1,N=C.split(" ")[0]||"tudo bem";return r.jsxs("tr",{onClick:()=>a==null?void 0:a(_),style:{borderBottom:"1px solid #F9FAFB",cursor:"pointer",background:F%2===1?"rgba(249, 250, 251, 0.4)":"#FFFFFF",transition:"background 80ms ease"},onMouseEnter:W=>{W.currentTarget.style.background="#F9FAFB"},onMouseLeave:W=>{W.currentTarget.style.background=F%2===1?"rgba(249, 250, 251, 0.4)":"#FFFFFF"},children:[r.jsx(Zo,{width:40,style:{paddingLeft:16},onClick:W=>W.stopPropagation(),children:r.jsx("input",{type:"checkbox",checked:X,onChange:W=>{W.stopPropagation(),s==null||s(_.id)},onClick:W=>W.stopPropagation(),style:{width:14,height:14,cursor:"pointer",accentColor:"#6C24F5",margin:0}})}),r.jsx(Zo,{children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,minWidth:0},children:[T?r.jsx("img",{src:T,alt:C,style:{width:24,height:24,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):r.jsx("div",{style:{width:24,height:24,borderRadius:"50%",background:"#EEF2FF",color:"#4338CA",fontSize:10,fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:bge(C)}),r.jsxs("div",{style:{minWidth:0,flex:1},children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:$M,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C}),D&&r.jsx("div",{style:{fontSize:11,color:Dj,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:D})]})]})}),r.jsx(Zo,{width:128,children:I?r.jsx("span",{style:{fontSize:11,padding:"2px 8px",borderRadius:999,background:"#F6F8FA",color:"#374151",fontWeight:500,whiteSpace:"nowrap"},children:I.name}):r.jsx("span",{style:{color:fd},children:"—"})}),r.jsx(Zo,{width:192,children:P?r.jsx("a",{href:`mailto:${P}`,onClick:W=>W.stopPropagation(),style:{fontSize:11,color:"#2563EB",textDecoration:"none",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:P,children:P}):r.jsx("span",{style:{color:fd},children:"—"})}),r.jsx(Zo,{width:160,children:L?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[r.jsx("span",{style:{fontSize:11,color:"#4B5563",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0},children:L}),r.jsx("a",{href:`https://wa.me/${jge(L)}?text=${encodeURIComponent(`Oi, ${N}, tudo bem?`)}`,target:"_blank",rel:"noopener noreferrer",onClick:W=>W.stopPropagation(),style:{display:"inline-flex",flexShrink:0},title:"Abrir no WhatsApp",children:r.jsx(Sge,{size:12})})]}):r.jsx("span",{style:{color:fd},children:"—"})}),r.jsx(Zo,{width:112,children:r.jsx("span",{style:{fontSize:11,color:R>0?"#2563EB":fd,fontWeight:R>0?600:400},children:U})}),r.jsx(Zo,{width:80,children:r.jsx("span",{style:{fontSize:11,color:V?"#F59E0B":fd,fontWeight:500},children:H!=null?H<1?"há <1d":`há ${H}d`:"—"})}),d&&r.jsx(Zo,{width:64,children:r.jsx("span",{style:{fontSize:11,color:fd},children:"—"})}),r.jsx(Zo,{width:40,onClick:W=>W.stopPropagation(),children:r.jsx("button",{type:"button",onClick:W=>{W.stopPropagation(),a==null||a(_)},"aria-label":"Ações",style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",background:"transparent",border:"none",borderRadius:4,color:Dj,cursor:"pointer",fontSize:16,fontWeight:600,lineHeight:1},onMouseEnter:W=>{W.currentTarget.style.background="#F0F2F5"},onMouseLeave:W=>{W.currentTarget.style.background="transparent"},children:"⋮"})})]},_.id)})]})]})})}const Wg={free:{label:"Free",price:"R$ 0",features:[{text:"Pipeline kanban",included:!0},{text:"Até 50 candidatos",included:!0},{text:"Email individual",included:!0},{text:"Bulk email",included:!1},{text:"Exportação CSV",included:!1},{text:"Análises e relatórios",included:!1},{text:"Rating IA",included:!1},{text:"Automações",included:!1},{text:"Compartilhar com gestor",included:!1}]},starter:{label:"Starter",price:"R$ 349",oldPrice:"R$ 449",founderPrice
866:"R$ 262",features:[{text:"Pipeline kanban",included:!0},{text:"Candidatos ilimitados",included:!0},{text:"Email individual",included:!0},{text:"Bulk email",included:!0},{text:"Exportação CSV",included:!0},{text:"Análises e relatórios",included:!0},{text:"Agenda integrada",included:!0},{text:"Rating IA",included:!1},{text:"Automações",included:!1},{text:"Compartilhar com gestor",included:!1}]},growth:{label:"Growth",price:"R$ 549",oldPrice:"R$ 649",founderPrice:"R$ 412",features:[{text:"Tudo do Starter",included:!0},{text:"Extensão LinkedIn (sourcing)",included:!0},{text:"Rating IA",included:!0},{text:"Automações",included:!0},{text:"Compartilhar com gestor",included:!0},{text:"Candidatos ilimitados",included:!0},{text:"Relatórios avançados",included:!0}]}};function _ge({isOpen:e,onClose:t,requiredPlan:n,featureLabel:s,currentPlan:i}){const a=In();if(!e)return null;const o=Wg[i]||Wg.free,l=Wg[n]||Wg.growth;return r.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center"},onClick:t,children:r.jsxs("div",{onClick:c=>c.stopPropagation(),style:{background:"#FFFFFF",borderRadius:12,width:520,boxShadow:"0 24px 48px rgba(0,0,0,0.15)",overflow:"hidden"},children:[r.jsxs("div",{style:{background:"linear-gradient(135deg, #0F0B2E 0%, #1A1145 40%, #2D1B69 70%, #3D2580 100%)",padding:"20px 24px",position:"relative",overflow:"hidden"},children:[r.jsx("div",{style:{position:"absolute",top:-20,right:-20,width:100,height:100,borderRadius:"50%",background:"rgba(99,91,255,0.08)"}}),r.jsx("button",{onClick:t,style:{position:"absolute",top:16,right:16,background:"transparent",border:"none",color:"rgba(255,255,255,0.5)",cursor:"pointer",zIndex:1},children:r.jsx(Jt,{size:16})}),r.jsx("div",{style:{fontSize:17,fontWeight:500,color:"#FFFFFF",marginBottom:4,position:"relative",zIndex:1},children:"Desbloqueie essa funcionalidade"}),r.jsxs("div",{style:{fontSize:13,color:"#A0A0B8",position:"relative",zIndex:1},children:["Acione o plano ",l.label," para ",s," e muito mais."]})]}),r.jsxs("div",{style:{padding:"20px 24px"},children:[r.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16},children:[r.jsxs("div",{style:{flex:1,border:"1px solid #E2E8F0",borderRadius:10,padding:14,opacity:.6},children:[r.jsx("div",{style:{fontSize:10,fontWeight:600,color:"#9CA3AF",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:4},children:"Seu plano"}),r.jsx("div",{style:{fontSize:16,fontWeight:600,color:"#1B1626",marginBottom:2},children:o.label}),r.jsxs("div",{style:{fontSize:12,color:"#6B7280",marginBottom:10},children:[o.price,"/mês"]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:o.features.map((c,d)=>r.jsxs("div",{style:{fontSize:11,color:c.included?"#9CA3AF":"#D1D5DB"},children:[c.included?"✓":"✕"," ",c.text]},d))})]}),r.jsxs("div",{style:{flex:1,border:"2px solid #6C24F5",borderRadius:10,padding:14,position:"relative"},children:[r.jsx("div",{style:{position:"absolute",top:-1,right:12,background:"#6C24F5",color:"white",fontSize:9,fontWeight:600,padding:"2px 8px",borderRadius:"0 0 6px 6px",textTransform:"uppercase",letterSpacing:"0.04em"},children:"Recomendado"}),r.jsx("div",{style:{fontSize:10,fontWeight:600,color:"#6C24F5",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:4},children:"Upgrade"}),r.jsx("div",{style:{fontSize:16,fontWeight:600,color:"#1B1626",marginBottom:2},children:l.label}),r.jsxs("div",{style:{fontSize:12,color:"#6B7280",marginBottom:4},children:[l.oldPrice&&r.jsx("span",{style:{textDecoration:"line-through",color:"#9CA3AF",marginRight:4},children:l.oldPrice}),l.price,"/seat/mês"]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:l.features.map((c,d)=>r.jsxs("div",{style:{fontSize:11,color:c.included?"#374151":"#D1D5DB",fontWeight:c.included?500:400,...c.included?{color:"#6C24F5"}:{}},children:[c.included?"✓":"✕"," ",c.text]},d))}),l.founderPrice&&r.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:8,padding:"6px 10px",borderRadius:6,background:"rgba(16,185,129,0.06)",border:"1px solid rgba(16,185,129,0.12)"}
866,children:r.jsxs("span",{style:{fontSize:10,color:"#10B981"},children:[r.jsx("strong",{children:"Founders:"})," ",l.founderPrice,"/seat/mês"]})})]})]}),r.jsxs("button",{onClick:()=>{t(),a("/app/conta/plano")},style:{width:"100%",padding:"10px 0",background:"#6C24F5",color:"white",border:"none",borderRadius:8,fontSize:14,fontWeight:600,cursor:"pointer",marginBottom:8,boxShadow:"0 4px 14px rgba(108,36,245,0.3)"},children:["Fazer upgrade para ",l.label]}),r.jsx("button",{onClick:t,style:{width:"100%",padding:"8px 0",background:"transparent",color:"#6B7280",border:"none",fontSize:12,cursor:"pointer"},children:"Fechar"})]})]})})}function el({children:e,onClick:t,disabled:n,title:s}){return r.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),n||t==null||t(i)},disabled:n,title:s,className:`text-white text-xs px-3 py-1.5 rounded font-medium transition-colors ${n?"bg-blue-500/50 cursor-not-allowed opacity-50":"bg-blue-500 hover:bg-blue-400 cursor-pointer"}`,style:{fontFamily:"inherit",border:"none"},children:e})}function Cge({selectedCount:e,stages:t=[],workspaceId:n,onBulkMove:s,onBulkReject:i,onBulkStandby:a,onBulkSendToJob:o,onBulkSendEmail:l,onBulkRemove:c,onExport:d,onShare:u,onRating:p,onClearSelection:m,atsStarterOrAbove:x,atsGrowthOrAbove:w,currentPlan:y}){const[v,j]=g.useState(!1),[k,S]=g.useState(!1),[_,F]=g.useState(!1),[A,C]=g.useState(!1),[D,P]=g.useState(null),L=g.useRef(null),T=g.useRef(null);g.useEffect(()=>{if(!v)return;const H=X=>{var O,G;const N=(O=L.current)==null?void 0:O.contains(X.target),W=(G=T.current)==null?void 0:G.contains(X.target);!N&&!W&&j(!1)},V=X=>{X.key==="Escape"&&j(!1)};return document.addEventListener("mousedown",H),document.addEventListener("keydown",V),()=>{document.removeEventListener("mousedown",H),document.removeEventListener("keydown",V)}},[v]);const R=async H=>{if(!A){C(!0),j(!1);try{await s(H)}finally{C(!1)}}},U=async()=>{if(!A){C(!0);try{await a()}finally{C(!1)}}},I=async({rejectionReasonId:H,rejectionNotes:V})=>{if(!A){C(!0);try{await i(H,V||void 0),S(!1)}finally{C(!1)}}};return e<=0?null:r.jsxs("div",{className:"sticky top-0 z-30 mx-4 mt-2 px-4 py-2 rounded-lg shadow-lg flex items-center gap-3 flex-wrap",style:{background:"#2563EB",color:"#FFFFFF"},children:[r.jsxs("span",{className:"font-medium text-sm whitespace-nowrap",children:[e," selecionado",e===1?"":"s"]}),r.jsxs("div",{style:{position:"relative"},children:[r.jsxs("button",{ref:L,type:"button",onClick:H=>{H.stopPropagation(),j(V=>!V)},disabled:A,className:`text-white text-xs px-3 py-1.5 rounded font-medium inline-flex items-center gap-1 ${A?"bg-blue-500/50 cursor-not-allowed":"bg-blue-500 hover:bg-blue-400 cursor-pointer"}`,style:{border:"none",fontFamily:"inherit"},children:["Mover para ",r.jsx(ar,{size:12})]}),v&&r.jsx("div",{ref:T,onClick:H=>H.stopPropagation(),className:"absolute mt-1 bg-white text-gray-900 shadow-xl rounded-lg overflow-hidden",style:{top:"100%",left:0,minWidth:200,maxHeight:280,overflowY:"auto",border:"1px solid #E2E8F0",zIndex:40},children:t.length===0?r.jsx("div",{className:"px-3 py-2 text-xs text-gray-500",children:"Nenhuma etapa disponível"}):t.map(H=>r.jsx("button",{type:"button",onClick:()=>R(H.id),className:"block w-full text-left px-3 py-2 text-xs hover:bg-gray-100",style:{background:"transparent",border:"none",fontFamily:"inherit",cursor:"pointer"},children:H.name},H.id))})]}),r.jsxs(el,{onClick:()=>{j(!1),S(!0)},disabled:A,children:[A?r.jsx(rt,{size:11,className:"animate-spin inline mr-1"}):null,"Reprovar"]}),r.jsx(el,{onClick:U,disabled:A,children:"Em espera"}),o&&r.jsx(el,{onClick:()=>o==null?void 0:o(),disabled:A,children:r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(pa,{size:12})," Enviar pra vaga"]})}),c&&r.jsxs("div",{style:{position:"relative"},children:[r.jsx(el,{onClick:()=>F(H=>!H),disabled:A,children:r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(zn,{size:12})," Remover"]})}),_&&r.jsxs("div",{onClick:H=>H.stopPropagation(),className:"absolute mt-1 bg-white text-gray-900 shadow-xl rounded-lg p-3",style:{top:"100%",left:0,width:260,border:"1px solid #E2E8F0",zIndex:40},children:[r.jsxs("div",{className:"text-xs font-medium text-gray-900 mb-2",children:["Remover ",e," candidato",e===1?"":"s"," do pipeline?"]}),r.jsxs("div",{className:"flex gap-2 justify-end",children:[r.jsx("button",{type:"button",onClick:()=>F(!1),className:"px-3 py-1.5 text-xs text-gray-600",style:{background:"transparent",border:"none",borderRadius:6,cursor:"pointer",fontFamily:"inherit"},children:"Cancelar"}),r.jsx("button",{type:"button",onClick:async()=>{C(!0);try{await(c==null?void 0:c()),F(!1)}finally{C(!1)}},className:"px-3 py-1.5 text-xs font-medium text-white",style:{background:"#A32D2D",border:"none",borderRadius:6,cursor:A?"not-allowed":"pointer",fontFamily:"inherit"},children:"Confirmar"})]})]})]}),l?r.jsx(el,{onClick:()=>
866{if(!x){P({requiredPlan:"starter",featureLabel:"Enviar email em massa"});return}l==null||l()},disabled:A,title:"Enviar email para selecionados",children:r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(mr,{size:12})," Enviar Email"]})}):r.jsx(el,{disabled:!0,title:"Em breve",children:"Email"}),r.jsx(el,{disabled:!0,title:"Em breve",children:"Assessment"}),d&&r.jsx(el,{onClick:()=>{if(!x){P({requiredPlan:"starter",featureLabel:"Exportar candidatos"});return}d==null||d()},children:r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(Wa,{size:12})," Exportar"]})}),u&&r.jsx(el,{onClick:()=>{if(!w){P({requiredPlan:"growth",featureLabel:"Compartilhar com gestor"});return}u==null||u()},children:r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx($a,{size:12})," Compartilhar"]})}),p&&r.jsx("button",{onClick:()=>{if(!w){P({requiredPlan:"growth",featureLabel:"Rating IA"});return}p==null||p()},className:"text-xs bg-white/10 text-white border border-white/20 px-3 py-1.5 rounded-md font-medium hover:bg-white/20 flex items-center gap-1.5",children:"✦ Rating IA"}),r.jsx("div",{style:{height:16,width:1,background:"#60A5FA"}}),r.jsxs("button",{type:"button",onClick:H=>{H.stopPropagation(),m==null||m()},className:"text-white text-xs px-2 py-1.5 rounded inline-flex items-center gap-1 hover:bg-blue-500",style:{background:"transparent",border:"none",cursor:"pointer",fontFamily:"inherit"},children:[r.jsx(Jt,{size:12})," Limpar"]}),k&&r.jsx(kk,{workspaceId:n,onConfirm:I,onCancel:()=>S(!1)}),D&&r.jsx(_ge,{isOpen:!0,onClose:()=>P(null),requiredPlan:D.requiredPlan,featureLabel:D.featureLabel,currentPlan:y})]})}const Ege=[{key:"manual",label:"Manual",icon:$m,enabled:!0},{key:"cv",label:"Upload CV",icon:Ha,enabled:!0}];function Fge({message:e,type:t,onClose:n}){if(g.useEffect(()=>{if(!e)return;const i=setTimeout(n,3e3);return()=>clearTimeout(i)},[e,n]),!e)return null;const s=t==="error"?"#DC2626":t==="warn"?"#D97706":"#16A34A";return r.jsx("div",{style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",background:s,color:"#FFFFFF",fontSize:13,fontWeight:500,padding:"10px 18px",borderRadius:8,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.2)",zIndex:2100},children:e})}function UM({isOpen:e,onClose:t,wsId:n,jobId:s,jobName:i,onSuccess:a,mode:o="individual"}){const[l,c]=g.useState("manual"),[d,u]=g.useState(""),[p,m]=g.useState(""),[x,w]=g.useState(""),[y,v]=g.useState(""),[j,k]=g.useState(""),[S,_]=g.useState(""),[F,A]=g.useState(!1),[C,D]=g.useState(null),[P,L]=g.useState(!1),[T,R]=g.useState(""),[U,I]=g.useState({message:"",type:"success"});if(g.useEffect(()=>{e||(u(""),m(""),w(""),v(""),k(""),_(""),c("manual"),A(!1))},[e]),g.useEffect(()=>{if(!e)return;const N=W=>{W.key==="Escape"&&!F&&t()};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[e,F,t]),!e)return null;if(o==="group")return r.jsx(r.Fragment,{children:r.jsx("div",{onClick:t,style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.5)",zIndex:1500,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:N=>N.stopPropagation(),className:"bg-white rounded-xl shadow-2xl max-w-md w-full p-6",children:[r.jsxs("div",{className:"flex items-start justify-between mb-2",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Adicionar em massa"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:i})]}),r.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-gray-100 text-gray-500",children:r.jsx(Jt,{size:18})})]}),r.jsx("p",{className:"text-sm text-gray-600 my-4",children:"Em breve — importação em massa via CSV, LinkedIn URLs ou CVs."}),r.jsx("div",{className:"grid grid-cols-3 gap-2 mt-4",children:["CSV","URLs LinkedIn","CVs em lote"].map(N=>r.jsxs("div",{className:"border border-gray-200 rounded-lg p-3 text-center bg-gray-50 opacity-60 cursor-not-allowed",children:[r.jsx("div",{className:"text-xs font-medium text-gray-500",children:N}),r.jsx("div",{className:"text-[10px] text-gray-400 mt-1",children:"Em breve"})]},N))})]})})});const H=d.trim().length>0&&!F,V=async()=>{var O,G,M;if(!H)return;A(!0);const N={full_name:d.trim(),email:p.trim()||void 0,phone:x.trim()||void 0,headline:y.trim()||void 0,current_company:j.trim()||void 0,salary_expectation:S?Number(S):void 0,...C||{}},W=!!(s&&String(s).trim());try{const z=W?await ne.functions.invoke("addSourcedCandidate",{workspace_id:n,job_id:s,...N}):await ne.functions.invoke("addTalentToWorkspace",{workspace_id:n,...N,source:"manual"}),K=(z==null?void 0:z.data)||z;if(!(K!=null&&K.success)){I({message:(K==null?void 0:K.message)||"Erro ao adicionar candidato.",type:"error"}),A(!1);return}if(K!=null&&K.already_existed){I({message:"Este candidato já possui uma candidatura nesta vaga.",type:"warn"}),A(!1);return}if(K!=null&&K.exists_in_workspace){I({message:"Candidato já estava no seu pipeline. Adicionado à vaga.",type:"warn"});let J=N.email;try{(O=K.application)!=null&&O.profile_snapshot_json&&(J=JSON.parse(K.application.profile_snapshot_json).email||N.email)}catch{}setTimeout(()=>{var Q;t(),a==null||a({...N,talent_profile_id:K.talent_profile_id,application_id:((Q=K.application)==null?void 0:Q.id)||null,email:J})},2e3);return}let Y=N.email;try{(G=K.application)!=null&&G.profile_snapshot_json&&(Y=JSON.parse(K.application.profile_snapshot_json).email||N.email)}catch{}t(),a==null||a({...N,talent_profile_id:K.talent_profile_id,application_id:((M=K.application)==null?void 0:M.id)||null,email:Y})}catch(z){I({message:(z==null?void 0:z.message)||"Erro ao adicionar candidato.",type:"error"}),A(!1)}},X=async N=>{var O,G;const W=(O=N.target.files)==null?void 0:O[0];if(W){L(!0),R("");try{const M=await ne.integrations.Core.UploadFile({file:W}),z=((G=M==null?void 0:M.data)==null?void 0:G.file_url)||(M==null?void 0:M.file_url);if(!z){R("Falha ao enviar o arquivo."),L(!1);return}const K=await ne.functions.invoke("parseProfileFromCV",{file_url:z}),Y=(K==null?void 0:K.data)||K;if(!(Y!=null&&Y.success)){R((Y==null?void 0:Y.message)||"Falha ao processar o CV."),L(!1);return}const J=Y.profile||{};u(J.full_name||""),m(J.email||""),w(J.phone||""),v(J.headline||""),k(J.current_company||""),_(J.salary_expectation?String(J.salary_expectation):""),D({current_title:J.current_title||null,location:J.location||null,summary_executive:J.summary_executive||null,linkedin_url:J.linkedin_url||null,experiences:J.experiences||[],education:J.education||[],languages:J.languages||[],skills:J.skills||[]}),c("manual"),L(!1)}catch(M){R((M==null?void 0:M.message)||"Erro ao processar o CV."),L(!1)}}};return r.jsxs(r.Fragment,{children:[r.jsx("div",{onClick:()=>!F&&t(),style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.5)",zIndex:1500,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:N=>N.stopPropagation(),className:"bg-white rounded-xl shadow-2xl max-w-md w-full p-6",children:[r.jsxs("div",{className:"flex items-start justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Adicionar candidato"}),i&&r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:i})]}),r.jsx("button",{onClick:t,disabled:F,className:"p-1 rounded hover:bg-gray-100 text-gray-500 disabled:opacity-50",children:r.jsx(Jt,{size:18})})]}),r.jsx("div",{className:"flex gap-1 mb-5 bg-gray-100 p-1 rounded-lg",children:Ege.map(N=>{const W=N.icon,O=l===N.key;return r.jsxs("button",{onClick:()=>N.enabled&&c(N.key),disabled:!N.enabled,className:`flex-1 flex items-center justify-center gap-1.5 text-xs font-medium px-2 py-1.5 rounded-md transition-colors ${O?"bg-white text-gray-900 shadow-sm":N.enabled?"text-gray-600 hover:text-gray-900":"text-gray-400 cursor-not-allowed"}`,title:N.enabled?"":"Em breve",children:[r.jsx(W,{size:13}),N.label]},N.key)})}),l==="manual"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:["Nome completo ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"text",value:d,onChange:N=>u(N.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none",placeholder:"João Silva",autoFocus:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Email"}),r.jsx("input",{type:"email",value:p,onChange:N=>m(N.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none",placeholder:"[email protected]"})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Telefone"}),r.jsx("input",{type:"text",value:x,onChange:N=>w(N.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none",placeholder:"(11) 99999-9999"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Salário R$"}),r.jsx("input",{type:"number",value:S,onChange:N=>_(N.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none",placeholder:"8000"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Cargo / Headline"}),r.jsx("input",{type:"text",value:y,onChange:N=>v(N.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none",placeholder:"Desenvolvedor Full Stack"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Empresa atual"}),r.jsx("input",{type:"text",value:j,onChange:N=>k(N.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none",placeholder:"Empresa XYZ"})]}),r.jsxs("div",{className:"flex justify-end gap-2 pt-3 mt-2 border-t border-gray-100",children:[r.jsx("button",{onClick:t,disabled:F,className:"text-sm px-4 py-2 text-gray-600 hover:text-gray-900 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{onClick:V,disabled:!H,className:"text-sm px-4 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed flex items-center gap-2",children:[F&&r.jsx(rt,{size:13,className:"animate-spin"}),"Adicionar"]})]})]}),l==="cv"&&r.jsxs("div",{className:"space-y-4 py-2",children:[r.jsxs("label",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:8,padding:"32px 16px",border:"2px dashed #D1D5DB",borderRadius:12,cursor:P?"not-allowed":"pointer",background:"#F9FAFB"},children:[P?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:22,className:"animate-spin",style:{color:"#2563EB"}}),r.jsx("span",{className:"text-sm text-gray-600",children:"Lendo o currículo..."})]}):r.jsxs(r.Fragment,{children:[r.jsx(Ha,{size:22,style:{color:"#9
866CA3AF"}}),r.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Enviar PDF ou DOCX"}),r.jsx("span",{className:"text-xs text-gray-400",children:"A IA preenche os campos para você revisar"})]}),r.jsx("input",{type:"file",accept:".pdf,.docx,application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document",onChange:X,disabled:P,style:{display:"none"}})]}),T&&r.jsx("div",{className:"text-xs text-red-600 bg-red-50 border border-red-100 rounded px-3 py-2",children:T})]})]})}),r.jsx(Fge,{message:U.message,type:U.type,onClose:()=>I({message:"",type:U.type})})]})}function Age(e){if(!e)return{};if(e.talent_profile)return e.talent_profile;if(e.snapshot)return e.snapshot;if(e.profile_snapshot_json)try{return JSON.parse(e.profile_snapshot_json)}catch{return{}}return{}}function d_({isOpen:e,candidate:t,onClose:n,onSaved:s}){const[i,a]=g.useState(""),[o,l]=g.useState(""),[c,d]=g.useState(""),[u,p]=g.useState(""),[m,x]=g.useState(""),[w,y]=g.useState(""),[v,j]=g.useState(""),[k,S]=g.useState(!1),[_,F]=g.useState(""),[A,C]=g.useState([]),[D,P]=g.useState(null),[L,T]=g.useState({});if(g.useEffect(()=>{if(e&&t){const I=Age(t);a(I.full_name||""),l(xo(I.email)?"":I.email||""),d(I.phone||""),p(I.linkedin_url||""),x(I.headline||""),y(I.current_company||""),j(I.salary_expectation?String(I.salary_expectation):""),F(""),S(!1),C([]),P(null),T({});const H=t.workspace_id,V=t.talent_profile_id;H&&V&&(async()=>{try{const[X,N]=await Promise.all([ne.entities.CustomFieldDefinition.filter({workspace_id:H}).catch(()=>[]),ne.entities.WorkspaceTalent.filter({workspace_id:H,talent_profile_id:V}).catch(()=>[])]),W=(X||[]).filter(M=>M.is_native!==!0).sort((M,z)=>(M.order||0)-(z.order||0));C(W);const O=(N==null?void 0:N[0])||null;P((O==null?void 0:O.id)||null);let G={};try{O!=null&&O.custom_fields_json&&(G=JSON.parse(O.custom_fields_json))}catch{}T(G||{})}catch{}})()}},[e,t]),g.useEffect(()=>{if(!e)return;const I=H=>{H.key==="Escape"&&!k&&n()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[e,k,n]),!e)return null;const R=i.trim().length>0&&!k,U=async()=>{if(R){if(!(t!=null&&t.talent_profile_id)){F("Candidato sem talent_profile_id");return}S(!0),F("");try{const I=await ne.functions.invoke("updateCandidateProfile",{talent_profile_id:t.talent_profile_id,full_name:i.trim(),email:o.trim(),phone:c.trim(),linkedin_url:u.trim(),headline:m.trim(),current_company:w.trim(),salary_expectation:v?Number(v):void 0}),H=(I==null?void 0:I.data)||I;if(!(H!=null&&H.success)){F((H==null?void 0:H.error)||"Erro ao salvar."),S(!1);return}if(D&&A.length>0)try{await ne.entities.WorkspaceTalent.update(D,{custom_fields_json:JSON.stringify(L)})}catch{}const V={full_name:i.trim(),email:o.trim(),phone:c.trim(),linkedin_url:u.trim(),headline:m.trim(),current_company:w.trim()};v&&(V.salary_expectation=Number(v)),t!=null&&t.talent_profile_id&&ne.functions.invoke("generateCandidateSummary",{talent_profile_id:t.talent_profile_id}).catch(()=>{}),s==null||s(V),n()}catch(I){F((I==null?void 0:I.message)||"Erro ao salvar."),S(!1)}}};return r.jsx("div",{onClick:()=>!k&&n(),style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.5)",zIndex:1600,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:I=>I.stopPropagation(),className:"bg-white rounded-xl shadow-2xl max-w-md w-full p-6",children:[r.jsxs("div",{className:"flex items-start justify-between mb-4",children:[r.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Editar candidato"}),r.jsx("button",{onClick:n,disabled:k,className:"p-1 rounded hover:bg-gray-100 text-gray-500 disabled:opacity-50",children:r.jsx(Jt,{size:18})})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:["Nome completo ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"text",value:i,onChange:I=>a(I.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none",autoFocus:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Email"}),r.jsx("input",{type:"email",value:o,onChange:I=>l(I.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none"})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Telefone"}),r.jsx("input",{type:"text",value:c,onChange:I=>d(I.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Salário R$"}
866),r.jsx("input",{type:"number",value:v,onChange:I=>j(I.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"LinkedIn URL"}),r.jsx("input",{type:"url",value:u,onChange:I=>p(I.target.value),placeholder:"https://linkedin.com/in/...",className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Cargo / Headline"}),r.jsx("input",{type:"text",value:m,onChange:I=>x(I.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Empresa atual"}),r.jsx("input",{type:"text",value:w,onChange:I=>y(I.target.value),className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none"})]}),A.length>0&&r.jsxs("div",{className:"mt-6 pt-4 border-t border-gray-200",children:[r.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-500 mb-3",children:"Campos personalizados"}),r.jsx("div",{className:"grid grid-cols-2 gap-3",children:A.map(I=>{const H=L[I.field_key];if(I.field_type==="text")return r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:I.field_label}),r.jsx("input",{type:"text",value:H||"",onChange:V=>T(X=>({...X,[I.field_key]:V.target.value})),className:"w-full border border-gray-200 rounded-lg text-xs px-3 py-2 focus:outline-none focus:border-blue-300"})]},I.id);if(I.field_type==="number")return r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:I.field_label}),r.jsx("input",{type:"number",value:H??"",onChange:V=>T(X=>({...X,[I.field_key]:V.target.value?Number(V.target.value):null})),className:"w-full border border-gray-200 rounded-lg text-xs px-3 py-2 focus:outline-none focus:border-blue-300"})]},I.id);if(I.field_type==="date")return r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:I.field_label}),r.jsx("input",{type:"date",value:H||"",onChange:V=>T(X=>({...X,[I.field_key]:V.target.value})),className:"w-full border border-gray-200 rounded-lg text-xs px-3 py-2 focus:outline-none focus:border-blue-300"})]},I.id);if(I.field_type==="boolean")return r.jsxs("div",{className:"flex items-center gap-2 py-1",children:[r.jsx("input",{type:"checkbox",checked:H===!0,onChange:V=>T(X=>({...X,[I.field_key]:V.target.checked})),className:"w-3.5 h-3.5 accent-indigo-600"}),r.jsx("label",{className:"text-xs text-gray-600",children:I.field_label})]},I.id);if(I.field_type==="select")return r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:I.field_label}),r.jsxs("select",{value:H||"",onChange:V=>T(X=>({...X,[I.field_key]:V.target.value||null})),className:"w-full border border-gray-200 rounded-lg text-xs px-3 py-2 focus:outline-none focus:border-blue-300 bg-white",children:[r.jsx("option",{value:"",children:"—"}),(I.options||[]).map(V=>r.jsx("option",{value:V,children:V},V))]})]},I.id);if(I.field_type==="multi_select"){const V=Array.isArray(H)?H:[];return r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:I.field_label}),r.jsx("div",{className:"flex flex-wrap gap-1.5",children:(I.options||[]).map(X=>{const N=V.includes(X);return r.jsx("button",{type:"button",onClick:()=>{T(W=>{const O=Array.isArray(W[I.field_key])?[...W[I.field_key]]:[];return N?{...W,[I.field_key]:O.filter(G=>G!==X)}:{...W,[I.field_key]:[...O,X]}})},className:`text-[11px] px-2.5 py-1 rounded-full border ${N?"bg-indigo-50 border-indigo-300 text-indigo-700":"bg-white border-gray-200 text-gray-600"}`,children:X},X)})})]},I.id)}return null})})]}),_&&r.jsx("div",{className:"text-xs text-red-600 bg-red-50 border border-red-100 rounded px-3 py-2",children:_}),r.jsxs("div",{className:"flex justify-end gap-2 pt-3 mt-2 border-t border-gray-100",children:[r.jsx("button",{onClick:n,disabled:k,className:"text-sm px-4 py-2 text-gray-600 hover:text-gray-900 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{onClick:U,disabled:!R,className:"text-sm px-4 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed flex items-center gap-2",children:[k&&r.jsx(rt,{size:13,className:"animate-spin"}),"Salvar"]})]})]})]})})}function Tge({isOpen:e,group:t,applications:n,stages:s,workspaceId:i,onClose:a,onRes
866olved:o}){const[l,c]=g.useState(null),[d,u]=g.useState(!1),[p,m]=g.useState("");if(g.useEffect(()=>{e&&(c(null),m(""),u(!1))},[e,t]),!e||!t)return null;const x=(t.application_ids||[]).map(S=>n.find(_=>_.id===S||_.application_id===S)).filter(Boolean),w=S=>{const _=(s||[]).find(F=>F.id===S);return(_==null?void 0:_.name)||"—"},y=S=>{if(!S)return"—";try{return new Date(S).toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric"})}catch{return"—"}},v=S=>{const _=Md(S),F=Number(S.salary_expectation||_.salary_expectation||0);return F>0?`R$ ${F.toLocaleString("pt-BR",{maximumFractionDigits:0})}`:"—"},j=async()=>{if(!l||d)return;const S=x.map(_=>_.id||_.application_id).filter(_=>_!==l);if(S.length===0){a();return}u(!0),m("");try{const _=await ne.functions.invoke("resolveDuplicateApplications",{workspace_id:i,keep_application_id:l,remove_application_ids:S}),F=(_==null?void 0:_.data)||_;if(!(F!=null&&F.success)){m((F==null?void 0:F.message)||"Erro ao resolver duplicidade."),u(!1);return}o==null||o(),a()}catch(_){m((_==null?void 0:_.message)||"Erro ao resolver duplicidade."),u(!1)}},k=x.length>0&&Md(x[0]).full_name||"Candidato";return r.jsx("div",{onClick:()=>!d&&a(),style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.5)",zIndex:1700,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsx("div",{onClick:S=>S.stopPropagation(),className:"bg-white rounded-xl shadow-2xl w-full",style:{maxWidth:640},children:r.jsxs("div",{className:"p-6",children:[r.jsxs("div",{className:"flex items-start justify-between mb-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(_o,{size:18,style:{color:"#D97706"}}),r.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Resolver candidatura duplicada"})]}),r.jsx("button",{onClick:a,disabled:d,className:"p-1 rounded hover:bg-gray-100 text-gray-500 disabled:opacity-50",children:r.jsx(Jt,{size:18})})]}),r.jsxs("p",{className:"text-xs text-gray-500 mb-4",children:[r.jsx("strong",{children:k})," tem ",x.length," candidaturas nesta vaga. Escolha qual manter — as outras serão removidas do pipeline (reversível)."]}),r.jsx("div",{className:"space-y-2 mb-4",children:x.map(S=>{const _=S.id||S.application_id,F=Md(S),A=l===_,C=S.email||F.email||"",D=xo(C)?"sem e-mail":C||"—";return r.jsxs("button",{type:"button",onClick:()=>c(_),style:{width:"100%",textAlign:"left",border:A?"2px solid #2563EB":"1px solid #E2E8F0",background:A?"#EFF6FF":"#FFFFFF",borderRadius:12,padding:"12px 14px",cursor:"pointer",transition:"border-color 120ms, background 120ms"},children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",style:{minWidth:0},children:[r.jsx("div",{style:{width:18,height:18,borderRadius:"50%",border:A?"6px solid #2563EB":"2px solid #D1D5DB",flexShrink:0,transition:"border 120ms"}}),r.jsx("span",{className:"text-sm font-medium text-gray-900",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F.full_name||"Candidato"})]}),A&&r.jsxs("span",{className:"text-xs font-medium",style:{color:"#2563EB",display:"flex",alignItems:"center",gap:4},children:[r.jsx(fn,{size:13})," Manter"]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 mt-2 pl-7",style:{fontSize:11,color:"#6B7280"},children:[r.jsxs("div",{children:["Etapa: ",r.jsx("span",{style:{color:"#374151"},children:w(S.current_stage_id)})]}),r.jsxs("div",{children:["Salário: ",r.jsx("span",{style:{color:"#374151"},children:v(S)})]}),r.jsxs("div",{children:["Criada: ",r.jsx("span",{style:{color:"#374151"},children:y(S.created_at)})]}),r.jsxs("div",{children:["Origem: ",r.jsx("span",{style:{color:"#374151"},children:S.origin||"—"})]}),r.jsxs("div",{style:{gridColumn:"1 / -1"},children:["E-mail: ",r.jsx("span",{style:{color:"#374151"},children:D})]})]})]},_)})}),p&&r.jsx("div",{className:"text-xs text-red-600 bg-red-50 border border-red-100 rounded px-3 py-2 mb-3",children:p}),r.jsxs("div",{className:"flex justify-end gap-2 pt-3 border-t border-gray-100",children:[r.jsx("button",{onClick:a,disabled:d,className:"text-sm px-4 py-2 text-gray-600 hover:text-gray-900 disabled:opacity-50",children:"Manter as duas"}),r.jsxs("button",{onClick:j,disabled:!l||d,className:"text-sm px-4 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed flex items-center gap-2",children:[d&&r.jsx(rt,{size:13,className:"animate-spin"}),"Manter selecionada e remover outras"]})]})]})})})}const Nge={published:"Publicada",paused:"Pausada",closed:"Encerrada",draft:"Rascunho"};function Rge({message:e,type:t,onClose:n}){if(g.useEffect(()=>{if(!e)return;const i=setTimeout(n,3e3);return()=>clearTimeout(i)},[e,n]),!e)return null;const s=t==="error"?"#DC2626":t==="warn"?"#D97706":"#16A34A";return r.jsx("div",{style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",background:s,color:"#FFFFFF",fontSize:13,fontWeight:500,padding:"10px 18px",borderRadius:8,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.2)",zIndex:2100},children:e})}function u_({isOpen:e,candidateIds:t,candidateCount:n,wsId:s,currentJobId:i,onClose:a,onSent:o}){const[l,c]=g.useState([]),[d,u]=g.useState(!1),[p,m]=g.useState(""),[x,w]=g.useState(!1),[y,v]=g.useState(""),[j,k]=g.useState({message:"",type:"success"});if(g.useEffect(()=>{if(!e){m(""),v(""),w(!1);return}s&&(u(!0),ne.entities.Job.filter({workspace_id:s}).then(F=>{const A=(F||[]).filter(C=>C.status!=="deleted"&&C.id!==i);c(A)}).catch(()=>c([])).finally(()=>u(!1)))},[e,s,i]),g.useEffect(()=>{if(!e)return;const F=A=>{A.key==="Escape"&&!x&&a()};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[e,x,a]),!e)return null;const S=p&&!x&&(t==null?void 0:t.length)>0,_=async()=>{var F;if(S){w(!0),v("");try{const A=await ne.functions.invoke("sendCandidateToJob",{workspace_id:s,job_id:p,talent_profile_ids:t}),C=(A==null?void 0:A.data)||A;if(!(C!=null&&C.success)){v((C==null?void 0:C.error)||"Erro ao enviar."),w(!1);return}const D=C.created_count||0,P=C.reactivated_count||0,L=D+P,T=(C.skipped||[]).filter(H=>
866H.reason==="already_exists").length,R=((F=l.find(H=>H.id===p))==null?void 0:F.title)||"vaga selecionada";let U="",I="success";L>0&&T>0?U=`${L} enviado${L>1?"s":""}, ${T} já estava${T>1?"m":""} na vaga`:L>0?U=L===1?`Candidato enviado para ${R}`:`${L} candidatos enviados para ${R}`:T>0?(U=T===1?"Candidato já estava na vaga":`${T} candidatos já estavam na vaga`,I="warn"):(U="Nenhum candidato enviado",I="warn"),k({message:U,type:I}),setTimeout(()=>{o==null||o(),a()},800)}catch(A){v((A==null?void 0:A.message)||"Erro ao enviar."),w(!1)}}};return r.jsxs(r.Fragment,{children:[r.jsx("div",{onClick:()=>!x&&a(),style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.5)",zIndex:1600,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:F=>F.stopPropagation(),className:"bg-white rounded-xl shadow-2xl max-w-md w-full p-6",children:[r.jsxs("div",{className:"flex items-start justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Enviar pra outra vaga"}),r.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[n," candidato",n!==1?"s":""," selecionado",n!==1?"s":""]})]}),r.jsx("button",{onClick:a,disabled:x,className:"p-1 rounded hover:bg-gray-100 text-gray-500 disabled:opacity-50",children:r.jsx(Jt,{size:18})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Vaga de destino"}),r.jsxs("select",{value:p,onChange:F=>m(F.target.value),disabled:d||x,className:"border border-gray-200 rounded-lg text-sm px-3 py-2 w-full focus:border-blue-400 focus:outline-none bg-white",children:[r.jsx("option",{value:"",children:d?"Carregando vagas...":"Selecione uma vaga"}),l.map(F=>r.jsxs("option",{value:F.id,children:[F.title," ",F.status!=="published"?`(${Nge[F.status]||F.status})`:""]},F.id))]}),!d&&l.length===0&&r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Nenhuma outra vaga disponível."})]}),r.jsxs("div",{className:"flex gap-2 bg-blue-50 border border-blue-100 rounded-lg px-3 py-2.5",children:[r.jsx(XV,{size:14,className:"text-blue-600 flex-shrink-0 mt-0.5"}),r.jsxs("p",{className:"text-xs text-blue-900 leading-relaxed",children:["Os candidatos serão adicionados na etapa ",r.jsx("strong",{children:"Sourced"})," da vaga selecionada. Candidatos já presentes na vaga serão ignorados."]})]}),y&&r.jsx("div",{className:"text-xs text-red-600 bg-red-50 border border-red-100 rounded px-3 py-2",children:y}),r.jsxs("div",{className:"flex justify-end gap-2 pt-3 mt-2 border-t border-gray-100",children:[r.jsx("button",{onClick:a,disabled:x,className:"text-sm px-4 py-2 text-gray-600 hover:text-gray-900 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{onClick:_,disabled:!S,className:"text-sm px-4 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed flex items-center gap-2",children:[x&&r.jsx(rt,{size:13,className:"animate-spin"}),"Enviar"]})]})]})]})}),r.jsx(Rge,{message:j.message,type:j.type,onClose:()=>k({message:"",type:j.type})})]})}/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var VM=1252,Dge=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],f_={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},p_=function(e){Dge.indexOf(e)!=-1&&(VM=f_[0]=e)};function Ige(){p_(1252)}var Oa=function(e){p_(e)};function HM(){Oa(1200),Ige()}function JT(e){for(var t=[],n=0,s=e.length;n<s;++n)t[n]=e.charCodeAt(n);return t}function Pge(e){for(var t=[],n=0;n<e.length>>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n)+(e.charCodeAt(2*n+1)<<8));return t.join("")}function qM(e){for(var t=[],n=0;n<e.length>>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n+1)+(e.charCodeAt(2*n)<<8));return t.join("")}var Nh=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return t==255&&n==254?Pge(e.slice(2)):t==254&&n==255?qM(e.slice(2)):t==65279?e.slice(1):e},$g=function(t){return String.fromCharCode(t)},QT=function(t){return String.fromCharCode(t)},km,fc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
866+/=";function ZT(e){for(var t="",n=0,s=0,i=0,a=0,o=0,l=0,c=0,d=0;d<e.length;)n=e.charCodeAt(d++),a=n>>2,s=e.charCodeAt(d++),o=(n&3)<<4|s>>4,i=e.charCodeAt(d++),l=(s&15)<<2|i>>6,c=i&63,isNaN(s)?l=c=64:isNaN(i)&&(c=64),t+=fc.charAt(a)+fc.charAt(o)+fc.charAt(l)+fc.charAt(c);return t}function zi(e){var t="",n=0,s=0,i=0,a=0,o=0,l=0,c=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var d=0;d<e.length;)a=fc.indexOf(e.charAt(d++)),o=fc.indexOf(e.charAt(d++)),n=a<<2|o>>4,t+=String.fromCharCode(n),l=fc.indexOf(e.charAt(d++)),s=(o&15)<<4|l>>2,l!==64&&(t+=String.fromCharCode(s)),c=fc.indexOf(e.charAt(d++)),i=(l&3)<<6|c,c!==64&&(t+=String.fromCharCode(i));return t}var bn=(function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node})(),tu=(function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,n){return n?new Buffer(t,n):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}})();function Tc(e){return bn?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function e6(e){return bn?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Pa=function(t){return bn?tu(t,"binary"):t.split("").map(function(n){return n.charCodeAt(0)&255})};function nu(e){if(Array.isArray(e))return e.map(function(s){return String.fromCharCode(s)}).join("");for(var t=[],n=0;n<e.length;++n)t[n]=String.fromCharCode(e[n]);return t.join("")}function h_(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return h_(new Uint8Array(e));for(var t=new Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t}var tc=bn?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:tu(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,n=0;for(t=0;t<e.length;++t)n+=e[t].length;var s=new Uint8Array(n),i=0;for(t=0,n=0;t<e.length;n+=i,++t)if(i=e[t].length,e[t]instanceof Uint8Array)s.set(e[t],n);else{if(typeof e[t]=="string")throw"wtf";s.set(new Uint8Array(e[t]),n)}return s}return[].concat.apply([],e.map(function(a){return Array.isArray(a)?a:[].slice.call(a)}))};function Bge(e){for(var t=[],n=0,s=e.length+250,i=Tc(e.length+255),a=0;a<e.length;++a){var o=e.charCodeAt(a);if(o<128)i[n++]=o;else if(o<2048)i[n++]=192|o>>6&31,i[n++]=128|o&63;else if(o>=55296&&o<57344){o=(o&1023)+64;var l=e.charCodeAt(++a)&1023;i[n++]=240|o>>8&7,i[n++]=128|o>>2&63,i[n++]=128|l>>6&15|(o&3)<<4,i[n++]=128|l&63}else i[n++]=224|o>>12&15,i[n++]=128|o>>6&63,i[n++]=128|o&63;n>s&&(t.push(i.slice(0,n)),n=0,i=Tc(65535),s=65530)}return t.push(i.slice(0,n)),tc(t)}var Xs=/\u0000/g,Rh=/[\u0001-\u0006]/g;function yf(e){for(var t="",n=e.length-1;n>=0;)t+=e.charAt(n--);return t}function Ma(e,t){var n=""+e;return n.length>=t?n:hr("0",t-n.length)+n}function m_(e,t){var n=""+e;return n.length>=t?n:hr(" ",t-n.length)+n}function vy(e,t){var n=""+e;return n.length>=t?n:n+hr(" ",t-n.length)}function Oge(e,t){var n=""+Math.round(e);return n.length>=t?n:hr("0",t-n.length)+n}function Mge(e,t){var n=""+e;return n.length>=t?n:hr("0",t-n.length)+n}var t6=Math.pow(2,32);function $u(e,t){if(e>t6||e<-t6)return Oge(e,t);var n=Math.round(e);return Mge(n,t)}function by(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var n6=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],V2=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function Lge(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var cn={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},r6={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:4
vendor: 4,790 bytes, line 866
8666,81:47,82:0},zge={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function wy(e,t,n){for(var s=e<0?-1:1,i=e*s,a=0,o=1,l=0,c=1,d=0,u=0,p=Math.floor(i);d<t&&(p=Math.floor(i),l=p*o+a,u=p*d+c,!(i-p<5e-8));)i=1/(i-p),a=o,o=l,c=d,d=u;if(u>t&&(d>t?(u=c,l=a):(u=d,l=o)),!n)return[0,s*l,u];var m=Math.floor(s*l/u);return[m,s*l-m*u,u]}function Ed(e,t,n){if(e>2958465||e<0)return null;var s=e|0,i=Math.floor(86400*(e-s)),a=0,o=[],l={D:s,T:i,u:86400*(e-s)-i,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(l.u)<1e-6&&(l.u=0),t&&t.date1904&&(s+=1462),l.u>.9999&&(l.u=0,++i==86400&&(l.T=i=0,++s,++l.D)),s===60)o=n?[1317,10,29]:[1900,2,29],a=3;else if(s===0)o=n?[1317,8,29]:[1900,1,0],a=6;else{s>60&&--s;var c=new Date(1900,0,1);c.setDate(c.getDate()+s-1),o=[c.getFullYear(),c.getMonth()+1,c.getDate()],a=c.getDay(),s<60&&(a=(a+6)%7),n&&(a=qge(c,o))}return l.y=o[0],l.m=o[1],l.d=o[2],l.S=i%60,i=Math.floor(i/60),l.M=i%60,i=Math.floor(i/60),l.H=i,l.q=a,l}var GM=new Date(1899,11,31,0,0,0),Wge=GM.getTime(),$ge=new Date(1900,2,1,0,0,0);function KM(e,t){var n=e.getTime();return t?n-=1461*24*60*60*1e3:e>=$ge&&(n+=1440*60*1e3),(n-(Wge+(e.getTimezoneOffset()-GM.getTimezoneOffset())*6e4))/(1440*60*1e3)}function g_(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function Uge(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function Vge(e){var t=e<0?12:11,n=g_(e.toFixed(12));return n.length<=t||(n=e.toPrecision(10),n.length<=t)?n:e.toExponential(5)}function Hge(e){var t=g_(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function _m(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),n;return t>=-4&&t<=-1?n=e.toPrecision(10+t):Math.abs(t)<=9?n=Vge(e):t===10?n=e.toFixed(10).substr(0,12):n=Hge(e),g_(Uge(n.toUpperCase()))}function Kd(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):_m(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return ha(14,KM(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function qge(e,t){t[0]-=581;var n=e.getDay();return e<60&&(n=(n+6)%7),n}function Gge(e,t,n,s){var i="",a=0,o=0,l=n.y,c,d=0;switch(e){case 98:l=n.y+543;case 121:switch(t.length){case 1:case 2:c=l%100,d=2;break;default:c=l%1e4,d=4;break}break;case 109:switch(t.length){case 1:case 2:c=n.m,d=t.length;break;case 3:return V2[n.m-1][1];case 5:return V2[n.m-1][0];default:return V2[n.m-1][2]}break;case 100:switch(t.length){case 1:case 2:c=n.d,d=t.length;break;case 3:return n6[n.q][0];default:return n6[n.q][1]}break;case 104:switch(t.length){case 1:case 2:c=1+(n.H+11)%12,d=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:c=n.H,d=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:c=n.M,d=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return n.u===0&&(t=="s"||t=="ss")?Ma(n.S,t.length):(s>=2?o=s===3?1e3:100:o=s===1?10:1,a=Math.round(o*(n.S+n.u)),a>=60*o&&(a=0),t==="s"?a===0?"0":""+a/o:(i=Ma(a,2+s),t==="ss"?i.substr(0,2):"."+i.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":c=n.D*24+n.H;break;case"[m]":case"[mm]":c=(n.D*24+n.H)*60+n.M;break;case"[s]":case"[ss]":c=((n.D*24+n.H)*60+n.M)*60+Math.round(n.S+n.u);break;default:throw"bad abstime format: "+t}d=t.length===3?1:2;break;case 101:c=l,d=1;break}var u=d>0?Ma(c,d):"";return u}function pc(e){var t=3;if(e.length<=t)return e;for(var n=e.length%t,s=e.substr(0,n);n!=e.length;n+=t)s+=(s.length>0?",":"")+e.substr(n,t);return s}var YM=/%/g;function Kge(e,t,n){var s=t.replace(YM,""),i=t.length-s.length;return hl(e,s,n*Math.pow(10,2*i))+hr("%",i)}function Yge(e,t,n){for(var s=t.length-1;t.charCodeAt(s-1)===44;)--s;return hl(e,t.substr(0,s),n/Math.pow(10,3*(t.length-s)))}function XM(e,t){var n,s=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+XM(e,-t);var i=e.indexOf(".");i===-1&&(i=e.indexOf("E"));var a=Math.floor(Math.log(t)*Math.LOG10E)%i;if(a<0&&(a+=i),n=(t/Math.pow(10,a)).toPrecision(s+1+(i+a)%i),n.indexOf("e")===-1){var o=Math.floor(Math.log(t)*Math.LOG10E);
vendor: 3,935 bytes, line 866
866for(n.indexOf(".")===-1?n=n.charAt(0)+"."+n.substr(1)+"E+"+(o-n.length+a):n+="E+"+(o-a);n.substr(0,2)==="0.";)n=n.charAt(0)+n.substr(2,i)+"."+n.substr(2+i),n=n.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");n=n.replace(/\+-/,"-")}n=n.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,c,d,u){return c+d+u.substr(0,(i+a)%i)+"."+u.substr(a)+"E"})}else n=t.toExponential(s);return e.match(/E\+00$/)&&n.match(/e[+-]\d$/)&&(n=n.substr(0,n.length-1)+"0"+n.charAt(n.length-1)),e.match(/E\-/)&&n.match(/e\+/)&&(n=n.replace(/e\+/,"e")),n.replace("e","E")}var JM=/# (\?+)( ?)\/( ?)(\d+)/;function Xge(e,t,n){var s=parseInt(e[4],10),i=Math.round(t*s),a=Math.floor(i/s),o=i-a*s,l=s;return n+(a===0?"":""+a)+" "+(o===0?hr(" ",e[1].length+1+e[4].length):m_(o,e[1].length)+e[2]+"/"+e[3]+Ma(l,e[4].length))}function Jge(e,t,n){return n+(t===0?"":""+t)+hr(" ",e[1].length+2+e[4].length)}var QM=/^#*0*\.([0#]+)/,ZM=/\).*[0#]/,e9=/\(###\) ###\\?-####/;function qs(e){for(var t="",n,s=0;s!=e.length;++s)switch(n=e.charCodeAt(s)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(n)}return t}function s6(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n}function i6(e,t){var n=e-Math.floor(e),s=Math.pow(10,t);return t<(""+Math.round(n*s)).length?0:Math.round(n*s)}function Qge(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function Zge(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function ta(e,t,n){if(e.charCodeAt(0)===40&&!t.match(ZM)){var s=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return n>=0?ta("n",s,n):"("+ta("n",s,-n)+")"}if(t.charCodeAt(t.length-1)===44)return Yge(e,t,n);if(t.indexOf("%")!==-1)return Kge(e,t,n);if(t.indexOf("E")!==-1)return XM(t,n);if(t.charCodeAt(0)===36)return"$"+ta(e,t.substr(t.charAt(1)==" "?2:1),n);var i,a,o,l,c=Math.abs(n),d=n<0?"-":"";if(t.match(/^00+$/))return d+$u(c,t.length);if(t.match(/^[#?]+$/))return i=$u(n,0),i==="0"&&(i=""),i.length>t.length?i:qs(t.substr(0,t.length-i.length))+i;if(a=t.match(JM))return Xge(a,c,d);if(t.match(/^#+0+$/))return d+$u(c,t.length-t.indexOf("0"));if(a=t.match(QM))return i=s6(n,a[1].length).replace(/^([^\.]+)$/,"$1."+qs(a[1])).replace(/\.$/,"."+qs(a[1])).replace(/\.(\d*)$/,function(w,y){return"."+y+hr("0",qs(a[1]).length-y.length)}),t.indexOf("0.")!==-1?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),a=t.match(/^(0*)\.(#*)$/))return d+s6(c,a[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=t.match(/^#{1,3},##0(\.?)$/))return d+pc($u(c,0));if(a=t.match(/^#,##0\.([#0]*0)$/))return n<0?"-"+ta(e,t,-n):pc(""+(Math.floor(n)+Qge(n,a[1].length)))+"."+Ma(i6(n,a[1].length),a[1].length);if(a=t.match(/^#,#*,#0/))return ta(e,t.replace(/^#,#*,/,""),n);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=yf(ta(e,t.replace(/[\\-]/g,""),n)),o=0,yf(yf(t.replace(/\\/g,"")).replace(/[0#]/g,function(w){return o<i.length?i.charAt(o++):w==="0"?"0":""}));if(t.match(e9))return i=ta(e,"##########",n),"("+i.substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var u="";if(a=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(a[4].length,7),l=wy(c,Math.pow(10,o)-1,!1),i=""+d,u=hl("n",a[1],l[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),i+=u+a[2]+"/"+a[3],u=vy(l[2],o),u.length<a[4].length&&(u=qs(a[4].substr(a[4].length-u.length))+u),i+=u,i;if(a=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(a[1].length,a[4].length),7),l=wy(c,Math.pow(10,o)-1,!0),d+(l[0]||(l[1]?"":"0"))+" "+(l[1]?m_(l[1],o)+a[2]+"/"+a[3]+vy(l[2],o):hr(" ",2*o+1+a[2].length+a[3].length));if(a=t.match(/^[#0?]+$/))return i=$u(n,0),t.length<=i.length?i:qs(t.substr(0,t.length-i.length))+i;if(a=t.match(/^([#0?]+)\.([#0]+)$/)){i=""+n.toFixed(Math.min(a[2].length,10)).replace(/([^0])0+$/,"$1"),o=i.indexOf(".");var p=t.indexOf(".")-o,m=t.length-i.length-p;return qs(t.substr(0,p)+i+t.substr(t.length-m))}
vendor: 12,389 bytes, line 866
866if(a=t.match(/^00,000\.([#0]*0)$/))return o=i6(n,a[1].length),n<0?"-"+ta(e,t,-n):pc(Zge(n)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(w){return"00,"+(w.length<3?Ma(0,3-w.length):"")+w})+"."+Ma(o,a[1].length);switch(t){case"###,##0.00":return ta(e,"#,##0.00",n);case"###,###":case"##,###":case"#,###":var x=pc($u(c,0));return x!=="0"?d+x:"";case"###,###.00":return ta(e,"###,##0.00",n).replace(/^0\./,".");case"#,###.00":return ta(e,"#,##0.00",n).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function exe(e,t,n){for(var s=t.length-1;t.charCodeAt(s-1)===44;)--s;return hl(e,t.substr(0,s),n/Math.pow(10,3*(t.length-s)))}function txe(e,t,n){var s=t.replace(YM,""),i=t.length-s.length;return hl(e,s,n*Math.pow(10,2*i))+hr("%",i)}function t9(e,t){var n,s=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+t9(e,-t);var i=e.indexOf(".");i===-1&&(i=e.indexOf("E"));var a=Math.floor(Math.log(t)*Math.LOG10E)%i;if(a<0&&(a+=i),n=(t/Math.pow(10,a)).toPrecision(s+1+(i+a)%i),!n.match(/[Ee]/)){var o=Math.floor(Math.log(t)*Math.LOG10E);n.indexOf(".")===-1?n=n.charAt(0)+"."+n.substr(1)+"E+"+(o-n.length+a):n+="E+"+(o-a),n=n.replace(/\+-/,"-")}n=n.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,c,d,u){return c+d+u.substr(0,(i+a)%i)+"."+u.substr(a)+"E"})}else n=t.toExponential(s);return e.match(/E\+00$/)&&n.match(/e[+-]\d$/)&&(n=n.substr(0,n.length-1)+"0"+n.charAt(n.length-1)),e.match(/E\-/)&&n.match(/e\+/)&&(n=n.replace(/e\+/,"e")),n.replace("e","E")}function oo(e,t,n){if(e.charCodeAt(0)===40&&!t.match(ZM)){var s=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return n>=0?oo("n",s,n):"("+oo("n",s,-n)+")"}if(t.charCodeAt(t.length-1)===44)return exe(e,t,n);if(t.indexOf("%")!==-1)return txe(e,t,n);if(t.indexOf("E")!==-1)return t9(t,n);if(t.charCodeAt(0)===36)return"$"+oo(e,t.substr(t.charAt(1)==" "?2:1),n);var i,a,o,l,c=Math.abs(n),d=n<0?"-":"";if(t.match(/^00+$/))return d+Ma(c,t.length);if(t.match(/^[#?]+$/))return i=""+n,n===0&&(i=""),i.length>t.length?i:qs(t.substr(0,t.length-i.length))+i;if(a=t.match(JM))return Jge(a,c,d);if(t.match(/^#+0+$/))return d+Ma(c,t.length-t.indexOf("0"));if(a=t.match(QM))return i=(""+n).replace(/^([^\.]+)$/,"$1."+qs(a[1])).replace(/\.$/,"."+qs(a[1])),i=i.replace(/\.(\d*)$/,function(w,y){return"."+y+hr("0",qs(a[1]).length-y.length)}),t.indexOf("0.")!==-1?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),a=t.match(/^(0*)\.(#*)$/))return d+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=t.match(/^#{1,3},##0(\.?)$/))return d+pc(""+c);if(a=t.match(/^#,##0\.([#0]*0)$/))return n<0?"-"+oo(e,t,-n):pc(""+n)+"."+hr("0",a[1].length);if(a=t.match(/^#,#*,#0/))return oo(e,t.replace(/^#,#*,/,""),n);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=yf(oo(e,t.replace(/[\\-]/g,""),n)),o=0,yf(yf(t.replace(/\\/g,"")).replace(/[0#]/g,function(w){return o<i.length?i.charAt(o++):w==="0"?"0":""}));if(t.match(e9))return i=oo(e,"##########",n),"("+i.substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var u="";if(a=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(a[4].length,7),l=wy(c,Math.pow(10,o)-1,!1),i=""+d,u=hl("n",a[1],l[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),i+=u+a[2]+"/"+a[3],u=vy(l[2],o),u.length<a[4].length&&(u=qs(a[4].substr(a[4].length-u.length))+u),i+=u,i;if(a=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(a[1].length,a[4].length),7),l=wy(c,Math.pow(10,o)-1,!0),d+(l[0]||(l[1]?"":"0"))+" "+(l[1]?m_(l[1],o)+a[2]+"/"+a[3]+vy(l[2],o):hr(" ",2*o+1+a[2].length+a[3].length));if(a=t.match(/^[#0?]+$/))return i=""+n,t.length<=i.length?i:qs(t.substr(0,t.length-i.length))+i;if(a=t.match(/^([#0]+)\.([#0]+)$/)){i=""+n.toFixed(Math.min(a[2].length,10)).replace(/([^0])0+$/,"$1"),o=i.indexOf(".");var p=t.indexOf(".")-o,m=t.length-i.length-p;return qs(t.substr(0,p)+i+t.substr(t.length-m))}if(a=t.match(/^00,000\.([#0]*0)$/))return n<0?"-"+oo(e,t,-n):pc(""+n).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(w){return"00,"+(w.length<3?Ma(0,3-w.length):"")+w})+"."+Ma(0,a[1].length);switch(t){case"###,###":case"##,###":case"#,###":var x=pc(""+c);return x!=="0"?d+x:"";default:if(t.match(/\.[0#?]*$/))return oo(e,t.slice(0,t.lastIndexOf(".")),n)+qs(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function hl(e,t,n){return(n|0)===n?oo(e,t,n):ta(e,t,n)}function nxe(e){for(var t=[],n=!1,s=0,i=0;s<e.length;++s)switch(e.charCodeAt(s)){case 34:n=!n;break;case 95:case 42:case 92:++s;break;case 59:t[t.length]=e.substr(i,s-i),i=s+1}if(t[t.length]=e.substr(i),n===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var n9=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function op(e){for(var t=0,n="",s="";t<e.length;)switch(n=e.charAt(t)){case"G":by(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(s=n;e.charAt(t++)!=="]"&&t<e.length;)s+=e.charAt(t);if(s.match(n9))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(n=e.charAt(++t))>-1||n=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===n;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function rxe(e,t,n,s){for(var i=[],a="",o=0,l="",c="t",d,u,p,m="H";o<e.length;)switch(l=e.charAt(o)){case"G":if(!by(e,o))throw new Error("unrecognized character "+l+" in "+e);i[i.length]={t:"G",v:"General"},o+=7;break;case'"':for(a="";(p=e.charCodeAt(++o))!==34&&o<e.length;)a+=String.fromCharCode(p);i[i.length]={t:"t",v:a},++o;break;case"\\":var x=e.charAt(++o),w=x==="("||x===")"?x:"t";i[i.length]={t:w,v:x},++o;break;case"_":i[i.length]={t:"t",v:" "},o+=2;break;case"@":i[i.length]={t:"T",v:t},++o;break;case"B":case"b":if(e.charAt(o+1)==="1"||e.charAt(o+1)==="2"){if(d==null&&(d=Ed(t,n,e.charAt(o+1)==="2"),d==null))return"";i[i.length]={t:"X",v:e.substr(o,2)},c=l,o+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":l=l.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||d==null&&(d=Ed(t,n),d==null))return"";for(a=l;++o<e.length&&e.charAt(o).toLowerCase()===l;)a+=l;l==="m"&&c.toLowerCase()==="h"&&(l="M"),l==="h"&&(l=m),i[i.length]={t:l,v:a},c=l;break;case"A":case"a":case"上":var y={t:l,v:l};if(d==null&&(d=Ed(t,n)),e.substr(o,3).toUpperCase()==="A/P"?(d!=null&&(y.v=d.H>=12?"P":"A"),y.t="T",m="h",o+=3):e.substr(o,5).toUpperCase()==="AM/PM"?(d!=null&&(y.v=d.H>=12?"PM":"AM"),y.t="T",o+=5,m="h"):e.substr(o,5).toUpperCase()==="上午/下午"?(d!=null&&(y.v=d.H>=12?"下午":"上午"),y.t="T",o+=5,m="h"):(y.t="t",++o),d==null&&y.t==="T")return"";i[i.length]=y,c=l;break;case"[":for(a=l;e.charAt(o++)!=="]"&&o<e.length;)a+=e.charAt(o);if(a.slice(-1)!=="]")throw'unterminated "[" block: |'+a+"|";if(a.match(n9)){if(d==null&&(d=Ed(t,n),d==null))return"";i[i.length]={t:"Z",v:a.toLowerCase()},c=a.charAt(1)}else a.indexOf("$")>-1&&(a=(a.match(/\$([^-\[\]]*)/)||[])[1]||"$",op(e)||(i[i.length]={t:"t",v:a}));break;case".":if(d!=null){for(a=l;++o<e.length&&(l=e.charAt(o))==="0";)a+=l;i[i.length]={t:"s",v:a};break}case"0":case"#":for(a=l;++o<e.length&&"0#?.,E+-%".indexOf(l=e.charAt(o))>-1;)a+=l;i[i.length]={t:"n",v:a};break;case"?":for(a=l;e.charAt(++o)===l;)a+=l;i[i.length]={t:l,v:a},c=l;break;case"*":++o,(e.charAt(o)==" "||e.charAt(o)=="*")&&++o;break;case"(":case")":i[i.length]={t:s===1?"t":l,v:l},++o;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(a=l;o<e.length&&"0123456789".indexOf(e.charAt(++o))>-1;)a+=e.charAt(o);i[i.length]={t:"D",v:a};break;case" ":i[i.length]={t:l,v:l},++o;break;case"$":i[i.length]={t:"t",v:"$"},++o;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(l)===-1)throw new Error("unrecognized character "+l+" in "+e);i[i.length]={t:"t",v:l},++o;break}var v=0,j=0,k;for(o=i.length-1,c="t";o>=0;--o)switch(i[o].t){case"h":case"H":i[o].t=m,c="h",v<1&&(v=1);break;case"s":(k=i[o].v.match(/\.0+$/))&&(j=Math.max(j,k[0].length-1)),v<3&&(v=3);case"d":case"y":case"M":case"e":c=i[o].t;break;case"m":c==="s"&&(i[o].t="M",v<2&&(v=2));break;case"X":break;case"Z":v<1&&i[o].v.match(/[Hh]/)&&(v=1),v<2&&i[o].v.match(/[Mm]/)&&(v=2),v<3&&i[o].v.match(/[Ss]/)&&(v=3)}switch(v){case 0:break;case 1:d.u>=.5&&(d.u=0,++d.S),d.S>=60&&(d.S=0,++d.M),d.M>=60&&(d.M=0,++d.H);break;case 2:d.u>=.5&&(d.u=0,++d.S),d.S>=60&&(d.S=0,++d.M);break}var S="",_;for(o=0;o<i.length;++o)switch(i[o].t){case"t":case"T":case" ":case"D":break;case"X":i[o].v="",i[o].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":i[o].v=Gge(i[o].t.charCodeAt(0),i[o].v,d,j),i[o].t="t";break;case"n":case"?":for(_=o+1;i[_]!=null&&((l=i[_].t)==="?"||l==="D"||(l===" "||l==="t")&&i[_+1]!=null&&(i[_+1].t==="?"||i[_+1].t==="t"&&i[_+1].v==="/")||i[o].t==="("&&(l===" "||l==="n"||l===")")||l==="t"&&(i[_].v==="/"||i[_].v===" "&&i[_+1]!=null&&i[_+1].t=="?"));)i[o].v+=i[_].v,i[_]={v:"",t:";"},++_;S+=i[o].v,o=_-1;break;case"G":i[o].t="t",i[o].v=Kd(t,n);break}var F="",A,C;if(S.length>0){S.charCodeAt(0)==40?(A=t<0&&S.charCodeAt(0)===45?-t:t,C=hl("n",S,A)):(A=t<0&&s>1?-t:t,C=hl("n",S,A),A<0&&i[0]&&i[0].t=="t"&&(C=C.substr(1),i[0].v="-"+i[0].v)),_=C.length-1;var D=i.length;for(o=0;o<i.length;++o)if(i[o]!=null&&i[o].t!="t"&&i[o].v.indexOf(".")>-1){D=o;break}var P=i.length;if(D===i.length&&C.indexOf("E")===-1){for(o=i.length-1;o>=0;--o)i[o]==null||"n?".indexOf(i[o].t)===-1||(_>=i[o].v.length-1?(_-=i[o].v.length,i[o].v=C.substr(_+1,i[o].v.length)):_<0?i[o].v="":(i[o].v=C.substr(0,_+1),_=-1),i[o].t="t",P=o);_>=0&&P<i.length&&(i[P].v=C.substr(0,_+1)+i[P].v)}else if(D!==i.length&&C.indexOf("E")===-1){for(_=C.indexOf(".")-1,o=D;o>=0;--o)if(!(i[o]==null||"n?".indexOf(i[o].t)===-1)){for(u=i[o].v.indexOf(".")>-1&&o===D?i[o].v.indexOf(".")-1:i[o].v.length-1,F=i[o].v.substr(u+1);u>=0;--u)_>=0&&(i[o].v.charAt(u)==="0"||i[o].v.charAt(u)==="#")&&(F=C.charAt(_--)+F);i[o].v=F,i[o].t="t",P=o}for(_>=0&&P<i.length&&(i[P].v=C.substr(0,_+1)+i[P].v),_=C.indexOf(".")+1,o=D;o<i.length;++o)if(!(i[o]==null||"n?(".indexOf(i[o].t)===-1&&o!==D)){for(u=i[o].v.indexOf(".")>-1&&o===D?i[o].v.indexOf(".")+1:0,F=i[o].v.substr(0,u);u<i[o].v.length;++u)_<C.length&&(F+=C.charAt(_++));i[o].v=F,i[o].t="t",P=o}}}for(o=0;o<i.length;++o)i[o]!=null&&"n?".indexOf(i[o].t)>-1&&(A=s>1&&t<0&&o>0&&i[o-1].v==="-"?-t:t,i[o].v=hl(i[o].t,i[o].v,A),i[o].t="t");var L="";for(o=0;o!==i.length;++o)i[o]!=null&&(L+=i[o].v);return L}var a6=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function o6(e,t){if(t==null)return!1;var n=parseFloat(t[2]);switch(t[1]){case"=":if(e==n)return!0;break;case">":if(e>n)return!0;break;case"<":if(e<n)return!0;break;case"<>":if(e!=n)return!0;break;case">=":if(e>=n)return!0;break;case"<=":if(e<=n)return!0;break}return!1}function sxe(e,t){var n=nxe(e),s=n.length,i=n[s-1].indexOf("@");if(s<4&&i>-1&&--s,n.length>4)throw new Error("cannot find right format for |"+n.join("|")+"|");if(typeof t!="number")return[4,n.length===4||i>-1?n[n.length-1]:"@"];switch(n.length){case 1:n=i>-1?["General","General","General",n[0]]:[n[0],n[0],n[0],"@"];break;case 2:n=i>-1?[n[0],n[0],n[0],n[1]]:[n[0],n[1],n[0],"@"];break;case 3:n=i>-1?[n[0],n[1],n[0],n[2]]:[n[0],n[1],n[2],"@"];break}var a=t>0?n[0]:t<0?n[1]:n[2];if(n[0].indexOf("[")===-1&&n[1].indexOf("[")===-1)return[s,a];if(n[0].match(/\[[=<>]/)!=null||n[1].match(/\[[=<>]/)!=null){var o=n[0].match(a6),l=n[1].match(a6);return o6(t,o)?[s,n[0]]:o6(t,l)?[s,n[1]]:[s,n[o!=null&&l!=null?2:1]]}return[s,a]}function ha(e,t,n){n==null&&(n={});var s="";switch(typeof e){case"string":e=="m/d/yy"&&n.dateNF?s=n.dateNF:s=e;break;case"number":e==14&&n.dateNF?s=n.dateNF:s=(n.table!=null?n.table:cn)[e],s==null&&(s=n.table&&n.table[r6[e]]||cn[r6[e]]),s==null&&(s=zge[e]||"General");break}if(by(s,0))return Kd(t,n);
vendor: 33,790 bytes, lines 866-876
866t instanceof Date&&(t=KM(t,n.date1904));var i=sxe(s,t);if(by(i[1]))return Kd(t,n);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return rxe(i[1],t,n,i[0])}function Ld(e,t){if(typeof t!="number"){t=+t||-1;for(var n=0;n<392;++n){if(cn[n]==null){t<0&&(t=n);continue}if(cn[n]==e){t=n;break}}t<0&&(t=391)}return cn[t]=e,t}function r9(){cn=Lge()}var ixe={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},s9=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function axe(e){var t=typeof e=="number"?cn[e]:e;return t=t.replace(s9,"(\\d+)"),new RegExp("^"+t+"$")}function oxe(e,t,n){var s=-1,i=-1,a=-1,o=-1,l=-1,c=-1;(t.match(s9)||[]).forEach(function(p,m){var x=parseInt(n[m+1],10);switch(p.toLowerCase().charAt(0)){case"y":s=x;break;case"d":a=x;break;case"h":o=x;break;case"s":c=x;break;case"m":o>=0?l=x:i=x;break}}),c>=0&&l==-1&&i>=0&&(l=i,i=-1);var d=(""+(s>=0?s:new Date().getFullYear())).slice(-4)+"-"+("00"+(i>=1?i:1)).slice(-2)+"-"+("00"+(a>=1?a:1)).slice(-2);d.length==7&&(d="0"+d),d.length==8&&(d="20"+d);var u=("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return o==-1&&l==-1&&c==-1?d:s==-1&&i==-1&&a==-1?u:d+"T"+u}var lxe=(function(){var e={};e.version="1.2.0";function t(){for(var C=0,D=new Array(256),P=0;P!=256;++P)C=P,C=C&1?-306674912^C>>>1:C>>>1,C=C&1?-306674912^C>>>1:C>>>1,C=C&1?-306674912^C>>>1:C>>>1,C=C&1?-306674912^C>>>1:C>>>1,C=C&1?-306674912^C>>>1:C>>>1,C=C&1?-306674912^C>>>1:C>>>1,C=C&1?-306674912^C>>>1:C>>>1,C=C&1?-306674912^C>>>1:C>>>1,D[P]=C;return typeof Int32Array<"u"?new Int32Array(D):D}var n=t();function s(C){var D=0,P=0,L=0,T=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(L=0;L!=256;++L)T[L]=C[L];for(L=0;L!=256;++L)for(P=C[L],D=256+L;D<4096;D+=256)P=T[D]=P>>>8^C[P&255];var R=[];for(L=1;L!=16;++L)R[L-1]=typeof Int32Array<"u"?T.subarray(L*256,L*256+256):T.slice(L*256,L*256+256);return R}var i=s(n),a=i[0],o=i[1],l=i[2],c=i[3],d=i[4],u=i[5],p=i[6],m=i[7],x=i[8],w=i[9],y=i[10],v=i[11],j=i[12],k=i[13],S=i[14];function _(C,D){for(var P=D^-1,L=0,T=C.length;L<T;)P=P>>>8^n[(P^C.charCodeAt(L++))&255];return~P}function F(C,D){for(var P=D^-1,L=C.length-15,T=0;T<L;)P=S[C[T++]^P&255]^k[C[T++]^P>>8&255]^j[C[T++]^P>>16&255]^v[C[T++]^P>>>24]^y[C[T++]]^w[C[T++]]^x[C[T++]]^m[C[T++]]^p[C[T++]]^u[C[T++]]^d[C[T++]]^c[C[T++]]^l[C[T++]]^o[C[T++]]^a[C[T++]]^n[C[T++]];for(L+=15;T<L;)P=P>>>8^n[(P^C[T++])&255];return~P}function A(C,D){for(var P=D^-1,L=0,T=C.length,R=0,U=0;L<T;)R=C.charCodeAt(L++),R<128?P=P>>>8^n[(P^R)&255]:R<2048?(P=P>>>8^n[(P^(192|R>>6&31))&255],P=P>>>8^n[(P^(128|R&63))&255]):R>=55296&&R<57344?(R=(R&1023)+64,U=C.charCodeAt(L++)&1023,P=P>>>8^n[(P^(240|R>>8&7))&255],P=P>>>8^n[(P^(128|R>>2&63))&255],P=P>>>8^n[(P^(128|U>>6&15|(R&3)<<4))&255],P=P>>>8^n[(P^(128|U&63))&255]):(P=P>>>8^n[(P^(224|R>>12&15))&255],P=P>>>8^n[(P^(128|R>>6&63))&255],P=P>>>8^n[(P^(128|R&63))&255]);return~P}return e.table=n,e.bstr=_,e.buf=F,e.str=A,e})(),jn=(function(){var t={};t.version="1.2.1";function n(ee,fe){for(var ce=ee.split("/"),ue=fe.split("/"),de=0,me=0,De=Math.min(ce.length,ue.length);de<De;++de){if(me=ce[de].length-ue[de].length)return me;if(ce[de]!=ue[de])return ce[de]<ue[de]?-1:1}return ce.length-ue.length}function s(ee){if(ee.charAt(ee.length-1)=="/")return ee.slice(0,-1).indexOf("/")===-1?ee:s(ee.slice(0,-1));var fe=ee.lastIndexOf("/");return fe===-1?ee:ee.slice(0,fe+1)}function i(ee){if(ee.charAt(ee.length-1)=="/")return i(ee.slice(0,-1));var fe=ee.lastIndexOf("/");return fe===-1?ee:ee.slice(fe+1)}function a(ee,fe){typeof fe=="string"&&(fe=new Date(fe));var ce=fe.getHours();ce=ce<<6|fe.getMinutes(),ce=ce<<5|fe.getSeconds()>>>1,ee.write_shift(2,ce);var ue=fe.getFullYear()-1980;ue=ue<<4|fe.getMonth()+1,ue=ue<<5|fe.getDate(),ee.write_shift(2,ue)}function o(ee){var fe=ee.read_shift(2)&65535,ce=ee.read_shift(2)&65535,ue=new Date,de=ce&31;ce>>>=5;var me=ce&15;ce>>>=4,ue.setMilliseconds(0),ue.setFullYear(ce+1980),ue.setMonth(me-1),ue.setDate(de);var De=fe&31;fe>>>=5;var Me=fe&63;return fe>>>=6,ue.setHours(fe),ue.setMinutes(Me),ue.setSeconds(De<<1),ue}function l(ee){cs(ee,0);for(var fe={},ce=0;ee.l<=ee.length-4;){var ue=ee.read_shift(2),de=ee.read_shift(2),me=ee.l+de,De={};switch(ue){case 21589:ce=ee.read_shift(1),ce&1&&(De.mtime=ee.read_shift(4)),de>5&&(ce&2&&(De.atime=ee.read_shift(4)),ce&4&&(De.ctime=ee.read_shift(4))),De.mtime&&(De.mt=new Date(De.mtime*1e3));break}ee.l=me,fe[ue]=De}return fe}var c;function d(){return c||(c={})}function u(ee,fe){if(ee[0]==80&&ee[1]==75)return nr(ee,fe);if((ee[0]|32)==109&&(ee[1]|32)==105)return Ht(ee,fe);if(ee.length<512)throw new Error("CFB file size "+ee.length+" < 512");var ce=3,ue=512,de=0,me=0,De=0,Me=0,Fe=0,Ie=[],Pe=ee.slice(0,512);cs(Pe,0);var tt=p(Pe);switch(ce=tt[0],ce){case 3:ue=512;break;case 4:ue=4096;break;case 0:if(tt[1]==0)return nr(ee,fe);default:throw new Error("Major Version: Expected 3 or 4 saw "+ce)}ue!==512&&(Pe=ee.slice(0,ue),cs(Pe,28));var pt=ee.slice(0,ue);m(Pe,ce);var _t=Pe.read_shift(4,"i");if(ce===3&&_t!==0)throw new Error("# Directory Sectors: Expected 0 saw "+_t);Pe.l+=4,De=Pe.read_shift(4,"i"),Pe.l+=4,Pe.chk("00100000","Mini Stream Cutoff Size: "),Me=Pe.read_shift(4,"i"),de=Pe.read_shift(4,"i"),Fe=Pe.read_shift(4,"i"),me=Pe.read_shift(4,"i");for(var lt=-1,ot=0;ot<109&&(lt=Pe.read_shift(4,"i"),!(lt<0));++ot)Ie[ot]=lt;var Yt=x(ee,ue);v(Fe,me,Yt,ue,Ie);var An=k(Yt,De,Ie,ue);An[De].name="!Directory",de>0&&Me!==U&&(An[Me].name="!MiniFAT"),An[Ie[0]].name="!FAT",An.fat_addrs=Ie,An.ssz=ue;var hn={},Wn=[],ms=[],Dr=[];S(De,An,Yt,Wn,de,hn,ms,Me),w(ms,Dr,Wn),Wn.shift();var gs={FileIndex:ms,FullPaths:Dr};return fe&&fe.raw&&(gs.raw={header:pt,sectors:Yt}),gs}function p(ee){if(ee[ee.l]==80&&ee[ee.l+1]==75)return[0,0];ee.chk(I,"Header Signature: "),ee.l+=16;var fe=ee.read_shift(2,"u");return[ee.read_shift(2,"u"),fe]}function m(ee,fe){var ce=9;switch(ee.l+=2,ce=ee.read_shift(2)){case 9:if(fe!=3)throw new Error("Sector Shift: Expected 9 saw "+ce);break;case 12:if(fe!=4)throw new Error("Sector Shift: Expected 12 saw "+ce);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+ce)}ee.chk("0600","Mini Sector Shift: "),ee.chk("000000000000","Reserved: ")}function x(ee,fe){for(var ce=Math.ceil(ee.length/fe)-1,ue=[],de=1;de<ce;++de)ue[de-1]=ee.slice(de*fe,(de+1)*fe);return ue[ce-1]=ee.slice(ce*fe),ue}function w(ee,fe,ce){for(var ue=0,de=0,me=0,De=0,Me=0,Fe=ce.length,Ie=[],Pe=[];ue<Fe;++ue)Ie[ue]=Pe[ue]=ue,fe[ue]=ce[ue];for(;Me<Pe.length;++Me)ue=Pe[Me],de=ee[ue].L,me=ee[ue].R,De=ee[ue].C,Ie[ue]===ue&&(de!==-1&&Ie[de]!==de&&(Ie[ue]=Ie[de]),me!==-1&&Ie[me]!==me&&(Ie[ue]=Ie[me])),De!==-1&&(Ie[De]=ue),de!==-1&&ue!=Ie[ue]&&(Ie[de]=Ie[ue],Pe.lastIndexOf(de)<Me&&Pe.push(de)),me!==-1&&ue!=Ie[ue]&&(Ie[me]=Ie[ue],Pe.lastIndexOf(me)<Me&&Pe.push(me));for(ue=1;ue<Fe;++ue)Ie[ue]===ue&&(me!==-1&&Ie[me]!==me?Ie[ue]=Ie[me]:de!==-1&&Ie[de]!==de&&(Ie[ue]=Ie[de]));for(ue=1;ue<Fe;++ue)if(ee[ue].type!==0){if(Me=ue,Me!=Ie[Me])do Me=Ie[Me],fe[ue]=fe[Me]+"/"+fe[ue];while(Me!==0&&Ie[Me]!==-1&&Me!=Ie[Me]);Ie[ue]=-1}for(fe[0]+="/",ue=1;ue<Fe;++ue)ee[ue].type!==2&&(fe[ue]+="/")}function y(ee,fe,ce){for(var ue=ee.start,de=ee.size,me=[],De=ue;ce&&de>0&&De>=0;)me.push(fe.slice(De*R,De*R+R)),de-=R,De=jd(ce,De*4);return me.length===0?Mr(0):tc(me).slice(0,ee.size)}function v(ee,fe,ce,ue,de){var me=U;if(ee===U){if(fe!==0)throw new Error("DIFAT chain shorter than expected")}else if(ee!==-1){var De=ce[ee],Me=(ue>>>2)-1;if(!De)return;for(var Fe=0;Fe<Me&&(me=jd(De,Fe*4))!==U;++Fe)de.push(me);v(jd(De,ue-4),fe-1,ce,ue,de)}}function j(ee,fe,ce,ue,de){var me=[],De=[];de||(de=[]);var Me=ue-1,Fe=0,Ie=0;for(Fe=fe;Fe>=0;){de[Fe]=!0,me[me.length]=Fe,De.push(ee[Fe]);var Pe=ce[Math.floor(Fe*4/ue)];if(Ie=Fe*4&Me,ue<4+Ie)throw new Error("FAT boundary crossed: "+Fe+" 4 "+ue);if(!ee[Pe])break;Fe=jd(ee[Pe],Ie)}return{nodes:me,data:x6([De])}}function k(ee,fe,ce,ue){var de=ee.length,me=[],De=[],Me=[],Fe=[],Ie=ue-1,Pe=0,tt=0,pt=0,_t=0;for(Pe=0;Pe<de;++Pe)if(Me=[],pt=Pe+fe,pt>=de&&(pt-=de),!De[pt]){Fe=[];var lt=[];for(tt=pt;tt>=0;){lt[tt]=!0,De[tt]=!0,Me[Me.length]=tt,Fe.push(ee[tt]);var ot=ce[Math.floor(tt*4/ue)];if(_t=tt*4&Ie,ue<4+_t)throw new Error("FAT boundary crossed: "+tt+" 4 "+ue);if(!ee[ot]||(tt=jd(ee[ot],_t),lt[tt]))break}me[pt]={nodes:Me,data:x6([Fe])}}return me}function S(ee,fe,ce,ue,de,me,De,Me){for(var Fe=0,Ie=ue.length?2:0,Pe=fe[ee].data,tt=0,pt=0,_t;tt<Pe.length;tt+=128){var lt=Pe.slice(tt,tt+128);cs(lt,64),pt=lt.read_shift(2),_t=w_(lt,0,pt-Ie),ue.push(_t);var ot={name:_t,type:lt.read_shift(1),color:lt.read_shift(1),L:lt.read_shift(4,"i"),R:lt.read_shift(4,"i"),C:lt.read_shift(4,"i"),clsid:lt.read_shift(16),state:lt.read_shift(4,"i"),start:0,size:0},Yt=lt.read_shift(2)+lt.read_shift(2)+lt.read_shift(2)+lt.read_shift(2);Yt!==0&&(ot.ct=_(lt,lt.l-8));var An=lt.read_shift(2)+lt.read_shift(2)+lt.read_shift(2)+lt.read_shift(2);An!==0&&(ot.mt=_(lt,lt.l-8)),ot.start=lt.read_shift(4,"i"),ot.size=lt.read_shift(4,"i"),ot.size<0&&ot.start<0&&(ot.size=ot.type=0,ot.start=U,ot.name=""),ot.type===5?(Fe=ot.start,de>0&&Fe!==U&&(fe[Fe].name="!StreamData")):ot.size>=4096?(ot.storage="fat",fe[ot.start]===void 0&&(fe[ot.start]=j(ce,ot.start,fe.fat_addrs,fe.ssz)),fe[ot.start].name=ot.name,ot.content=fe[ot.start].data.slice(0,ot.size)):(ot.storage="minifat",ot.size<0?ot.size=0:Fe!==U&&ot.start!==U&&fe[Fe]&&(ot.content=y(ot,fe[Fe].data,(fe[Me]||{}).data))),ot.content&&cs(ot.content,0),me[_t]=ot,De.push(ot)}}function _(ee,fe){return new Date((Ei(ee,fe+4)/1e7*Math.pow(2,32)+Ei(ee,fe)/1e7-11644473600)*1e3)}function F(ee,fe){return d(),u(c.readFileSync(ee),fe)}function A(ee,fe){var ce=fe&&fe.type;switch(ce||bn&&Buffer.isBuffer(ee)&&(ce="buffer"),ce||"base64"){case"file":return F(ee,fe);case"base64":return u(Pa(zi(ee)),fe);case"binary":return u(Pa(ee),fe)}return u(ee,fe)}function C(ee,fe){var ce=fe||{},ue=ce.root||"Root Entry";if(ee.FullPaths||(ee.FullPaths=[]),ee.FileIndex||(ee.FileIndex=[]),ee.FullPaths.length!==ee.FileIndex.length)throw new Error("inconsistent CFB structure");ee.FullPaths.length===0&&(ee.FullPaths[0]=ue+"/",ee.FileIndex[0]={name:ue,type:5}),ce.CLSID&&(ee.FileIndex[0].clsid=ce.CLSID),D(ee)}function D(ee){var fe="�Sh33tJ5";if(!jn.find(ee,"/"+fe)){var ce=Mr(4);ce[0]=55,ce[1]=ce[3]=50,ce[2]=54,ee.FileIndex.push({name:fe,type:2,content:ce,size:4,L:69,R:69,C:69}),ee.FullPaths.push(ee.FullPaths[0]+fe),P(ee)}}function P(ee,fe){C(ee);for(var ce=!1,ue=!1,de=ee.FullPaths.length-1;de>=0;--de){var me=ee.FileIndex[de];switch(me.type){case 0:ue?ce=!0:(ee.FileIndex.pop(),ee.FullPaths.pop());break;case 1:case 2:case 5:ue=!0,isNaN(me.R*me.L*me.C)&&(ce=!0),me.R>-1&&me.L>-1&&me.R==me.L&&(ce=!0);break;default:ce=!0;break}}if(!(!ce&&!fe)){var De=new Date(1987,1,19),Me=0,Fe=Object.create?Object.create(null):{},Ie=[];for(de=0;de<ee.FullPaths.length;++de)Fe[ee.FullPaths[de]]=!0,ee.FileIndex[de].type!==0&&Ie.push([ee.FullPaths[de],ee.FileIndex[de]]);for(de=0;de<Ie.length;++de){var Pe=s(Ie[de][0]);ue=Fe[Pe],ue||(Ie.push([Pe,{name:i(Pe).replace("/",""),type:1,clsid:V,ct:De,mt:De,content:null}]),Fe[Pe]=!0)}for(Ie.sort(function(_t,lt){return n(_t[0],lt[0])}),ee.FullPaths=[],ee.FileIndex=[],de=0;de<Ie.length;++de)ee.FullPaths[de]=Ie[de][0],ee.FileIndex[de]=Ie[de][1];for(de=0;de<Ie.length;++de){var tt=ee.FileIndex[de],pt=ee.FullPaths[de];if(tt.name=i(pt).replace("/",""),tt.L=tt.R=tt.C=-(tt.color=1),tt.size=tt.content?tt.content.length:0,tt.start=0,tt.clsid=tt.clsid||V,de===0)tt.C=Ie.length>1?1:-1,tt.size=0,tt.type=5;else if(pt.slice(-1)=="/"){for(Me=de+1;Me<Ie.length&&s(ee.FullPaths[Me])!=pt;++Me);for(tt.C=Me>=Ie.length?-1:Me,Me=de+1;Me<Ie.length&&s(ee.FullPaths[Me])!=s(pt);++Me);tt.R=Me>=Ie.length?-1:Me,tt.type=1}else s(ee.FullPaths[de+1]||"")==s(pt)&&(tt.R=de+1),tt.type=2}}}function L(ee,fe){var ce=fe||{};if(ce.fileType=="mad")return ke(ee,ce);switch(P(ee),ce.fileType){case"zip":return dr(ee,ce)}var ue=(function(_t){for(var lt=0,ot=0,Yt=0;Yt<_t.FileIndex.length;++Yt){var An=_t.FileIndex[Yt];if(An.content){var hn=An.content.length;hn>0&&(hn<4096?lt+=hn+63>>6:ot+=hn+511>>9)}}for(var Wn=_t.FullPaths.length+3>>2,ms=lt+7>>3,Dr=lt+127>>7,gs=ms+ot+Wn+Dr,Vn=gs+127>>7,Wi=Vn<=109?0:Math.ceil((Vn-109)/127);gs+Vn+Wi+127>>7>Vn;)Wi=++Vn<=109?0:Math.ceil((Vn-109)/127);var Hn=[1,Wi,Vn,Dr,Wn,ot,lt,0];return _t.FileIndex[0].size=lt<<6,Hn[7]=(_t.FileIndex[0].start=Hn[0]+Hn[1]+Hn[2]+Hn[3]+Hn[4]+Hn[5])+(Hn[6]+7>>3),Hn})(ee),de=Mr(ue[7]<<9),me=0,De=0;{for(me=0;me<8;++me)de.write_shift(1,H[me]);for(me=0;me<8;++me)de.write_shift(2,0);for(de.write_shift(2,62),de.write_shift(2,3),de.write_shift(2,65534),de.write_shift(2,9),de.write_shift(2,6),me=0;me<3;++me)de.write_shift(2,0);for(de.write_shift(4,0),de.write_shift(4,ue[2]),de.write_shift(4,ue[0]+ue[1]+ue[2]+ue[3]-1),de.write_shift(4,0),de.write_shift(4,4096),de.write_shift(4,ue[3]?ue[0]+ue[1]+ue[2]-1:U),de.write_shift(4,ue[3]),de.write_shift(-4,ue[1]?ue[0]-1:U),de.write_shift(4,ue[1]),me=0;me<109;++me)de.write_shift(-4,me<ue[2]?ue[1]+me:-1)}if(ue[1])for(De=0;De<ue[1];++De){for(;me<236+De*127;++me)de.write_shift(-4,me<ue[2]?ue[1]+me:-1);de.write_shift(-4,De===ue[1]-1?U:De+1)}var Me=function(_t){for(De+=_t;me<De-1;++me)de.write_shift(-4,me+1);_t&&(++me,de.write_shift(-4,U))};for(De=me=0,De+=ue[1];me<De;++me)de.write_shift(-4,X.DIFSECT);for(De+=ue[2];me<De;++me)de.write_shift(-4,X.FATSECT);Me(ue[3]),Me(ue[4]);for(var Fe=0,Ie=0,Pe=ee.FileIndex[0];Fe<ee.FileIndex.length;++Fe)Pe=ee.FileIndex[Fe],Pe.content&&(Ie=Pe.content.length,!(Ie<4096)&&(Pe.start=De,Me(Ie+511>>9)));for(Me(ue[6]+7>>3);de.l&511;)de.write_shift(-4,X.ENDOFCHAIN);for(De=me=0,Fe=0;Fe<ee.FileIndex.length;++Fe)Pe=ee.FileIndex[Fe],Pe.content&&(Ie=Pe.content.length,!(!Ie||Ie>=4096)&&(Pe.start=De,Me(Ie+63>>6)));for(;de.l&511;)de.write_shift(-4,X.ENDOFCHAIN);for(me=0;me<ue[4]<<2;++me){var tt=ee.FullPaths[me];if(!tt||tt.length===0){for(Fe=0;Fe<17;++Fe)de.write_shift(4,0);for(Fe=0;Fe<3;++Fe)de.write_shift(4,-1);for(Fe=0;Fe<12;++Fe)de.write_shift(4,0);continue}Pe=ee.FileIndex[me],me===0&&(Pe.start=Pe.size?Pe.start-1:U);var pt=me===0&&ce.root||Pe.name;if(Ie=2*(pt.length+1),de.write_shift(64,pt,"utf16le"),de.write_shift(2,Ie),de.write_shift(1,Pe.type),de.write_shift(1,Pe.color),de.write_shift(-4,Pe.L),de.write_shift(-4,Pe.R),de.write_shift(-4,Pe.C),Pe.clsid)de.write_shift(16,Pe.clsid,"hex");else for(Fe=0;Fe<4;++Fe)de.write_shift(4,0);de.write_shift(4,Pe.state||0),de.write_shift(4,0),de.write_shift(4,0),de.write_shift(4,0),de.write_shift(4,0),de.write_shift(4,Pe.start),de.write_shift(4,Pe.size),de.write_shift(4,0)}for(me=1;me<ee.FileIndex.length;++me)if(Pe=ee.FileIndex[me],Pe.size>=4096)if(de.l=Pe.start+1<<9,bn&&Buffer.isBuffer(Pe.content))Pe.content.copy(de,de.l,0,Pe.size),de.l+=Pe.size+511&-512;else{for(Fe=0;Fe<Pe.size;++Fe)de.write_shift(1,Pe.content[Fe]);for(;Fe&511;++Fe)de.write_shift(1,0)}for(me=1;me<ee.FileIndex.length;++me)if(Pe=ee.FileIndex[me],Pe.size>0&&Pe.size<4096)if(bn&&Buffer.isBuffer(Pe.content))Pe.content.copy(de,de.l,0,Pe.size),de.l+=Pe.size+63&-64;else{for(Fe=0;Fe<Pe.size;++Fe)de.write_shift(1,Pe.content[Fe]);for(;Fe&63;++Fe)de.write_shift(1,0)}if(bn)de.l=de.length;else for(;de.l<de.length;)de.write_shift(1,0);return de}function T(ee,fe){var ce=ee.FullPaths.map(function(Fe){return Fe.toUpperCase()}),ue=ce.map(function(Fe){var Ie=Fe.split("/");return Ie[Ie.length-(Fe.slice(-1)=="/"?2:1)]}),de=!1;fe.charCodeAt(0)===47?(de=!0,fe=ce[0].slice(0,-1)+fe):de=fe.indexOf("/")!==-1;var me=fe.toUpperCase(),De=de===!0?ce.indexOf(me):ue.indexOf(me);if(De!==-1)return ee.FileIndex[De];var Me=!me.match(Rh);for(me=me.replace(Xs,""),Me&&(me=me.replace(Rh,"!")),De=0;De<ce.length;++De)if((Me?ce[De].replace(Rh,"!"):ce[De]).replace(Xs,"")==me||(Me?ue[De].replace(Rh,"!"):ue[De]).replace(Xs,"")==me)return ee.FileIndex[De];return null}var R=64,U=-2,I="d0cf11e0a1b11ae1",H=[208,207,17,224,161,177,26,225],V="00000000000000000000000000000000",X={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:U,FREESECT:-1,HEADER_SIGNATURE:I,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:V,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function N(ee,fe,ce){d();var ue=L(ee,ce);c.writeFileSync(fe,ue)}function W(ee){for(var fe=new Array(ee.length),ce=0;ce<ee.length;++ce)fe[ce]=String.fromCharCode(ee[ce]);return fe.join("")}function O(ee,fe){var ce=L(ee,fe);switch(fe&&fe.type||"buffer"){case"file":return d(),c.writeFileSync(fe.filename,ce),ce;case"binary":return typeof ce=="string"?ce:W(ce);case"base64":return ZT(typeof ce=="string"?ce:W(ce));case"buffer":if(bn)return Buffer.isBuffer(ce)?ce:tu(ce);case"array":return typeof ce=="string"?Pa(ce):ce}return ce}var G;function M(ee){try{var fe=ee.InflateRaw,ce=new fe;if(ce._processChunk(new Uint8Array([3,0]),ce._finishFlushFlag),ce.bytesRead)G=ee;else throw new Error("zlib does not expose bytesRead")}catch(ue){console.error("cannot use native zlib: "+(ue.message||ue))}}function z(ee,fe){if(!G)return Vt(ee,fe);var ce=G.InflateRaw,ue=new ce,de=ue._processChunk(ee.slice(ee.l),ue._finishFlushFlag);return ee.l+=ue.bytesRead,de}function K(ee){return G?G.deflateRawSync(ee):He(ee)}var Y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],J=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],Q=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function ie(ee){var fe=(ee<<1|ee<<11)&139536|(ee<<5|ee<<15)&558144;return(fe>>16|fe>>8|fe)&255}for(var ae=typeof Uint8Array<"u",re=ae?new Uint8Array(256):[],pe=0;pe<256;++pe)re[pe]=ie(pe);function Z(ee,fe){var ce=re[ee&255];return fe<=8?ce>>>8-fe:(ce=ce<<8|re[ee>>8&255],fe<=16?ce>>>16-fe:(ce=ce<<8|re[ee>>16&255],ce>>>24-fe))}function Ne(ee,fe){var ce=fe&7,ue=fe>>>3;return(ee[ue]|(ce<=6?0:ee[ue+1]<<8))>>>ce&3}function te(ee,fe){var ce=fe&7,ue=fe>>>3;return(ee[ue]|(ce<=5?0:ee[ue+1]<<8))>>>ce&7}function xe(ee,fe){var ce=fe&7,ue=fe>>>3;return(ee[ue]|(ce<=4?0:ee[ue+1]<<8))>>>ce&15}function he(ee,fe){var ce=fe&7,ue=fe>>>3;return(ee[ue]|(ce<=3?0:ee[ue+1]<<8))>>>ce&31}function le(ee,fe){var ce=fe&7,ue=fe>>>3;return(ee[ue]|(ce<=1?0:ee[ue+1]<<8))>>>ce&127}function ge(ee,fe,ce){var ue=fe&7,de=fe>>>3,me=(1<<ce)-1,De=ee[de]>>>ue;return ce<8-ue||(De|=ee[de+1]<<8-ue,ce<16-ue)||(De|=ee[de+2]<<16-ue,ce<24-ue)||(De|=ee[de+3]<<24-ue),De&me}function $e(ee,fe,ce){var ue=fe&7,de=fe>>>3;return ue<=5?ee[de]|=(ce&7)<<ue:(ee[de]|=ce<<ue&255,ee[de+1]=(ce&7)>>8-ue),fe+3}function ft(ee,fe,ce){var ue=fe&7,de=fe>>>3;return ce=(ce&1)<<ue,ee[de]|=ce,fe+1}function Qe(ee,fe,ce){var ue=fe&7,de=fe>>>3;return ce<<=ue,ee[de]|=ce&255,ce>>>=8,ee[de+1]=ce,fe+8}function Ve(ee,fe,ce){var ue=fe&7,de=fe>>>3;return ce<<=ue,ee[de]|=ce&255,ce>>>=8,ee[de+1]=ce&255,ee[de+2]=ce>>>8,fe+16}function ze(ee,fe){var ce=ee.length,ue=2*ce>fe?2*ce:fe+5,de=0;if(ce>=fe)return ee;if(bn){var me=e6(ue);if(ee.copy)ee.copy(me);else for(;de<ee.length;++de)me[de]=ee[de];return me}else if(ae){var De=new Uint8Array(ue);if(De.set)De.set(ee);else for(;de<ce;++de)De[de]=ee[de];return De}return ee.length=ue,ee}function at(ee){for(var fe=new Array(ee),ce=0;ce<ee;++ce)fe[ce]=0;return fe}function Nt(ee,fe,ce){var ue=1,de=0,me=0,De=0,Me=0,Fe=ee.length,Ie=ae?new Uint16Array(32):at(32);for(me=0;me<32;++me)Ie[me]=0;for(me=Fe;me<ce;++me)ee[me]=0;Fe=ee.length;var Pe=ae?new Uint16Array(Fe):at(Fe);for(me=0;me<Fe;++me)Ie[de=ee[me]]++,ue<de&&(ue=de),Pe[me]=0;for(Ie[0]=0,me=1;me<=ue;++me)Ie[me+16]=Me=Me+Ie[me-1]<<1;for(me=0;me<Fe;++me)Me=ee[me],Me!=0&&(Pe[me]=Ie[Me+16]++);var tt=0;for(me=0;me<Fe;++me)if(tt=ee[me],tt!=0)for(Me=Z(Pe[me],ue)>>ue-tt,De=(1<<ue+4-tt)-1;De>=0;--De)fe[Me|De<<tt]=tt&15|me<<4;return ue}var _e=ae?new Uint16Array(512):at(512),be=ae?new Uint16Array(32):at(32);if(!ae){for(var Re=0;Re<512;++Re)_e[Re]=0;for(Re=0;Re<32;++Re)be[Re]=0}(function(){for(var ee=[],fe=0;fe<32;fe++)ee.push(5);Nt(ee,be,32);var ce=[];for(fe=0;fe<=143;fe++)ce.push(8);for(;fe<=255;fe++)ce.push(9);for(;fe<=279;fe++)ce.push(7);for(;fe<=287;fe++)ce.push(8);Nt(ce,_e,288)})();var Xe=(function(){for(var fe=ae?new Uint8Array(32768):[],ce=0,ue=0;ce<Q.length-1;++ce)for(;ue<Q[ce+1];++ue)fe[ue]=ce;for(;ue<32768;++ue)fe[ue]=29;var de=ae?new Uint8Array(259):[];for(ce=0,ue=0;ce<J.length-1;++ce)for(;ue<J[ce+1];++ue)de[ue]=ce;function me(Me,Fe){for(var Ie=0;Ie<Me.length;){var Pe=Math.min(65535,Me.length-Ie),tt=Ie+Pe==Me.length;for(Fe.write_shift(1,+tt),Fe.write_shift(2,Pe),Fe.write_shift(2,~Pe&65535);Pe-- >0;)Fe[Fe.l++]=Me[Ie++]}return Fe.l}function De(Me,Fe){for(var Ie=0,Pe=0,tt=ae?new Uint16Array(32768):[];Pe<Me.length;){var pt=Math.min(65535,Me.length-Pe);if(pt<10){for(Ie=$e(Fe,Ie,+(Pe+pt==Me.length)),Ie&7&&(Ie+=8-(Ie&7)),Fe.l=Ie/8|0,Fe.write_shift(2,pt),Fe.write_shift(2,~pt&65535);pt-- >0;)Fe[Fe.l++]=Me[Pe++];Ie=Fe.l*8;continue}Ie=$e(Fe,Ie,+(Pe+pt==Me.length)+2);for(var _t=0;pt-- >0;){var lt=Me[Pe];_t=(_t<<5^lt)&32767;var ot=-1,Yt=0;if((ot=tt[_t])&&(ot|=Pe&-32768,ot>Pe&&(ot-=32768),ot<Pe))for(;Me[ot+Yt]==Me[Pe+Yt]&&Yt<250;)++Yt;if(Yt>2){lt=de[Yt],lt<=22?Ie=Qe(Fe,Ie,re[lt+1]>>1)-1:(Qe(Fe,Ie,3),Ie+=5,Qe(Fe,Ie,re[lt-23]>>5),Ie+=3);var An=lt<8?0:lt-4>>2;An>0&&(Ve(Fe,Ie,Yt-J[lt]),Ie+=An),lt=fe[Pe-ot],Ie=Qe(Fe,Ie,re[lt]>>3),Ie-=3;var hn=lt<4?0:lt-2>>1;hn>0&&(Ve(Fe,Ie,Pe-ot-Q[lt]),Ie+=hn);for(var Wn=0;Wn<Yt;++Wn)tt[_t]=Pe&32767,_t=(_t<<5^Me[Pe])&32767,++Pe;pt-=Yt-1}else lt<=143?lt=lt+48:Ie=ft(Fe,Ie,1),Ie=Qe(Fe,Ie,re[lt]),tt[_t]=Pe&32767,++Pe}Ie=Qe(Fe,Ie,0)-1}return Fe.l=(Ie+7)/8|0,Fe.l}return function(Fe,Ie){return Fe.length<8?me(Fe,Ie):De(Fe,Ie)}})();function He(ee){var fe=Mr(50+Math.floor(ee.length*1.1)),ce=Xe(ee,fe);return fe.slice(0,ce)}var St=ae?new Uint16Array(32768):at(32768),Ct=ae?new Uint16Array(32768):at(32768),Se=ae?new Uint16Array(128):at(128),et=1,bt=1;function Ot(ee,fe){var ce=he(ee,fe)+257;fe+=5;var ue=he(ee,fe)+1;fe+=5;var de=xe(ee,fe)+4;fe+=4;for(var me=0,De=ae?new Uint8Array(19):at(19),Me=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Fe=1,Ie=ae?new Uint8Array(8):at(8),Pe=ae?new Uint8Array(8):at(8),tt=De.length,pt=0;pt<de;++pt)De[Y[pt]]=me=te(ee,fe),Fe<me&&(Fe=me),Ie[me]++,fe+=3;var _t=0;for(Ie[0]=0,pt=1;pt<=Fe;++pt)Pe[pt]=_t=_t+Ie[pt-1]<<1;for(pt=0;pt<tt;++pt)(_t=De[pt])!=0&&(Me[pt]=Pe[_t]++);var lt=0;for(pt=0;pt<tt;++pt)if(lt=De[pt],lt!=0){_t=re[Me[pt]]>>8-lt;for(var ot=(1<<7-lt)-1;ot>=0;--ot)Se[_t|ot<<lt]=lt&7|pt<<3}var Yt=[];for(Fe=1;Yt.length<ce+ue;)switch(_t=Se[le(ee,fe)],fe+=_t&7,_t>>>=3){case 16:for(me=3+Ne(ee,fe),fe+=2,_t=Yt[Yt.length-1];me-- >0;)Yt.push(_t);break;case 17:for(me=3+te(ee,fe),fe+=3;me-- >0;)Yt.push(0);break;case 18:for(me=11+le(ee,fe),fe+=7;me-- >0;)Yt.push(0);break;default:Yt.push(_t),Fe<_t&&(Fe=_t);break}var An=Yt.slice(0,ce),hn=Yt.slice(ce);for(pt=ce;pt<286;++pt)An[pt]=0;for(pt=ue;pt<30;++pt)hn[pt]=0;return et=Nt(An,St,286),bt=Nt(hn,Ct,30),fe}function sn(ee,fe){if(ee[0]==3&&!(ee[1]&3))return[Tc(fe),2];for(var ce=0,ue=0,de=e6(fe||1<<18),me=0,De=de.length>>>0,Me=0,Fe=0;(ue&1)==0;){if(ue=te(ee,ce),ce+=3,ue>>>1)ue>>1==1?(Me=9,Fe=5):(ce=Ot(ee,ce),Me=et,Fe=bt);else{ce&7&&(ce+=8-(ce&7));var Ie=ee[ce>>>3]|ee[(ce>>>3)+1]<<8;if(ce+=32,Ie>0)for(!fe&&De<me+Ie&&(de=ze(de,me+Ie),De=de.length);Ie-- >0;)de[me++]=ee[ce>>>3],ce+=8;continue}for(;;){!fe&&De<me+32767&&(de=ze(de,me+32767),De=de.length);var Pe=ge(ee,ce,Me),tt=ue>>>1==1?_e[Pe]:St[Pe];if(ce+=tt&15,tt>>>=4,(tt>>>8&255)===0)de[me++]=tt;else{if(tt==256)break;tt-=257;var pt=tt<8?0:tt-4>>2;pt>5&&(pt=0);var _t=me+J[tt];pt>0&&(_t+=ge(ee,ce,pt),ce+=pt),Pe=ge(ee,ce,Fe),tt=ue>>>1==1?be[Pe]:Ct[Pe],ce+=tt&15,tt>>>=4;var lt=tt<4?0:tt-2>>1,ot=Q[tt];for(lt>0&&(ot+=ge(ee,ce,lt),ce+=lt),!fe&&De<_t&&(de=ze(de,_t+100),De=de.length);me<_t;)de[me]=de[me-ot],++me}}}return fe?[de,ce+7>>>3]:[de.slice(0,me),ce+7>>>3]}function Vt(ee,fe){var ce=ee.slice(ee.l||0),ue=sn(ce,fe);return ee.l+=ue[1],ue[0]}function Un(ee,fe){if(ee)typeof console<"u"&&console.error(fe);else throw new Error(fe)}function nr(ee,fe){var ce=ee;cs(ce,0);var ue=[],de=[],me={FileIndex:ue,FullPaths:de};C(me,{root:fe.root});for(var De=ce.length-4;(ce[De]!=80||ce[De+1]!=75||ce[De+2]!=5||ce[De+3]!=6)&&De>=0;)--De;ce.l=De+4,ce.l+=4;var Me=ce.read_shift(2);ce.l+=6;var Fe=ce.read_shift(4);for(ce.l=Fe,De=0;De<Me;++De){ce.l+=20;var Ie=ce.read_shift(4),Pe=ce.read_shift(4),tt=ce.read_shift(2),pt=ce.read_shift(2),_t=ce.read_shift(2);ce.l+=8;var lt=ce.read_shift(4),ot=l(ce.slice(ce.l+tt,ce.l+tt+pt));ce.l+=tt+pt+_t;var Yt=ce.l;ce.l=lt+4,xr(ce,Ie,Pe,me,ot),ce.l=Yt}return me}function xr(ee,fe,ce,ue,de){ee.l+=2;var me=ee.read_shift(2),De=ee.read_shift(2),Me=o(ee);if(me&8257)throw new Error("Unsupported ZIP encryption");for(var Fe=ee.read_shift(4),Ie=ee.read_shift(4),Pe=ee.read_shift(4),tt=ee.read_shift(2),pt=ee.read_shift(2),_t="",lt=0;lt<tt;++lt)_t+=String.fromCharCode(ee[ee.l++]);if(pt){var ot=l(ee.slice(ee.l,ee.l+pt));(ot[21589]||{}).mt&&(Me=ot[21589].mt),((de||{})[21589]||{}).mt&&(Me=de[21589].mt)}ee.l+=pt;var Yt=ee.slice(ee.l,ee.l+Ie);switch(De){case 8:Yt=z(ee,Pe);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+De)}var An=!1;me&8&&(Fe=ee.read_shift(4),Fe==134695760&&(Fe=ee.read_shift(4),An=!0),Ie=ee.read_shift(4),Pe=ee.read_shift(4)),Ie!=fe&&Un(An,"Bad compressed size: "+fe+" != "+Ie),Pe!=ce&&Un(An,"Bad uncompressed size: "+ce+" != "+Pe),Be(ue,_t,Yt,{unsafe:!0,mt:Me})}function dr(ee,fe){var ce=fe||{},ue=[],de=[],me=Mr(1),De=ce.compression?8:0,Me=0,Fe=0,Ie=0,Pe=0,tt=0,pt=ee.FullPaths[0],_t=pt,lt=ee.FileIndex[0],ot=[],Yt=0;for(Fe=1;Fe<ee.FullPaths.length;++Fe)if(_t=ee.FullPaths[Fe].slice(pt.length),lt=ee.FileIndex[Fe],!(!lt.size||!lt.content||_t=="�Sh33tJ5")){var An=Pe,hn=Mr(_t.length);for(Ie=0;Ie<_t.length;++Ie)hn.write_shift(1,_t.charCodeAt(Ie)&127);hn=hn.slice(0,hn.l),ot[tt]=lxe.buf(lt.content,0);var Wn=lt.content;De==8&&(Wn=K(Wn)),me=Mr(30),me.write_shift(4,67324752),me.write_shift(2,20),me.write_shift(2,Me),me.write_shift(2,De),lt.mt?a(me,lt.mt):me.write_shift(4,0),me.write_shift(-4,ot[tt]),me.write_shift(4,Wn.length),me.write_shift(4,lt.content.length),me.write_shift(2,hn.length),me.write_shift(2,0),Pe+=me.length,ue.push(me),Pe+=hn.length,ue.push(hn),Pe+=Wn.length,ue.push(Wn),me=Mr(46),me.write_shift(4,33639248),me.write_shift(2,0),me.write_shift(2,20),me.write_shift(2,Me),me.write_shift(2,De),me.write_shift(4,0),me.write_shift(-4,ot[tt]),me.write_shift(4,Wn.length),me.write_shift(4,lt.content.length),me.write_shift(2,hn.length),me.write_shift(2,0),me.write_shift(2,0),me.write_shift(2,0),me.write_shift(2,0),me.write_shift(4,0),me.write_shift(4,An),Yt+=me.l,de.push(me),Yt+=hn.length,de.push(hn),++tt}return me=Mr(22),me.write_shift(4,101010256),me.write_shift(2,0),me.write_shift(2,0),me.write_shift(2,tt),me.write_shift(2,tt),me.write_shift(4,Yt),me.write_shift(4,Pe),me.write_shift(2,0),tc([tc(ue),tc(de),me])}var hs={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function mi(ee,fe){if(ee.ctype)return ee.ctype;var ce=ee.name||"",ue=ce.match(/\.([^\.]+)$/);return ue&&hs[ue[1]]||fe&&(ue=(ce=fe).match(/[\.\\]([^\.\\])+$/),ue&&hs[ue[1]])?hs[ue[1]]:"application/octet-stream"}function Ur(ee){for(var fe=ZT(ee),ce=[],ue=0;ue<fe.length;ue+=76)ce.push(fe.slice(ue,ue+76));return ce.join(`\r
867`)+`\r
868`}function Ue(ee){var fe=ee.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(Ie){var Pe=Ie.charCodeAt(0).toString(16).toUpperCase();return"="+(Pe.length==1?"0"+Pe:Pe)});fe=fe.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),fe.charAt(0)==`
869`&&(fe="=0D"+fe.slice(1)),fe=fe.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
870=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var ce=[],ue=fe.split(`\r
871`),de=0;de<ue.length;++de){var me=ue[de];if(me.length==0){ce.push("");continue}for(var De=0;De<me.length;){var Me=76,Fe=me.slice(De,De+Me);Fe.charAt(Me-1)=="="?Me--:Fe.charAt(Me-2)=="="?Me-=2:Fe.charAt(Me-3)=="="&&(Me-=3),Fe=me.slice(De,De+Me),De+=Me,De<me.length&&(Fe+="="),ce.push(Fe)}}return ce.join(`\r
872`)}function Et(ee){for(var fe=[],ce=0;ce<ee.length;++ce){for(var ue=ee[ce];ce<=ee.length&&ue.charAt(ue.length-1)=="=";)ue=ue.slice(0,ue.length-1)+ee[++ce];fe.push(ue)}for(var de=0;de<fe.length;++de)fe[de]=fe[de].replace(/[=][0-9A-Fa-f]{2}/g,function(me){return String.fromCharCode(parseInt(me.slice(1),16))});return Pa(fe.join(`\r
873`))}function mt(ee,fe,ce){for(var ue="",de="",me="",De,Me=0;Me<10;++Me){var Fe=fe[Me];if(!Fe||Fe.match(/^\s*$/))break;var Ie=Fe.match(/^(.*?):\s*([^\s].*)$/);if(Ie)switch(Ie[1].toLowerCase()){case"content-location":ue=Ie[2].trim();break;case"content-type":me=Ie[2].trim();break;case"content-transfer-encoding":de=Ie[2].trim();break}}switch(++Me,de.toLowerCase()){case"base64":De=Pa(zi(fe.slice(Me).join("")));break;case"quoted-printable":De=Et(fe.slice(Me));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+de)}var Pe=Be(ee,ue.slice(ce.length),De,{unsafe:!0});me&&(Pe.ctype=me)}function Ht(ee,fe){if(W(ee.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var ce=fe&&fe.root||"",ue=(bn&&Buffer.isBuffer(ee)?ee.toString("binary"):W(ee)).split(`\r
874`),de=0,me="";for(de=0;de<ue.length;++de)if(me=ue[de],!!/^Content-Location:/i.test(me)&&(me=me.slice(me.indexOf("file")),ce||(ce=me.slice(0,me.lastIndexOf("/")+1)),me.slice(0,ce.length)!=ce))for(;ce.length>0&&(ce=ce.slice(0,ce.length-1),ce=ce.slice(0,ce.lastIndexOf("/")+1),me.slice(0,ce.length)!=ce););var De=(ue[1]||"").match(/boundary="(.*?)"/);if(!De)throw new Error("MAD cannot find boundary");var Me="--"+(De[1]||""),Fe=[],Ie=[],Pe={FileIndex:Fe,FullPaths:Ie};C(Pe);var tt,pt=0;for(de=0;de<ue.length;++de){var _t=ue[de];_t!==Me&&_t!==Me+"--"||(pt++&&mt(Pe,ue.slice(tt,de),ce),tt=de)}return Pe}function ke(ee,fe){var ce=fe||{},ue=ce.boundary||"SheetJS";ue="------="+ue;for(var de=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+ue.slice(2)+'"',"","",""],me=ee.FullPaths[0],De=me,Me=ee.FileIndex[0],Fe=1;Fe<ee.FullPaths.length;++Fe)if(De=ee.FullPaths[Fe].slice(me.length),Me=ee.FileIndex[Fe],!(!Me.size||!Me.content||De=="�Sh33tJ5")){De=De.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(Yt){return"_x"+Yt.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(Yt){return"_u"+Yt.charCodeAt(0).toString(16)+"_"});for(var Ie=Me.content,Pe=bn&&Buffer.isBuffer(Ie)?Ie.toString("binary"):W(Ie),tt=0,pt=Math.min(1024,Pe.length),_t=0,lt=0;lt<=pt;++lt)(_t=Pe.charCodeAt(lt))>=32&&_t<128&&++tt;var ot=tt>=pt*4/5;de.push(ue),de.push("Content-Location: "+(ce.root||"file:///C:/SheetJS/")+De),de.push("Content-Transfer-Encoding: "+(ot?"quoted-printable":"base64")),de.push("Content-Type: "+mi(Me,De)),de.push(""),de.push(ot?Ue(Pe):Ur(Pe))}return de.push(ue+`--\r
875`),de.join(`\r
876`)}function Ze(ee){var fe={};return C(fe,ee),fe}function Be(ee,fe,ce,ue){var de=ue&&ue.unsafe;de||C(ee);var me=!de&&jn.find(ee,fe);if(!me){var De=ee.FullPaths[0];fe.slice(0,De.length)==De?De=fe:(De.slice(-1)!="/"&&(De+="/"),De=(De+fe).replace("//","/")),me={name:i(fe),type:2},ee.FileIndex.push(me),ee.FullPaths.push(De),de||jn.utils.cfb_gc(ee)}return me.content=ce,me.size=ce?ce.length:0,ue&&(ue.CLSID&&(me.clsid=ue.CLSID),ue.mt&&(me.mt=ue.mt),ue.ct&&(me.ct=ue.ct)),me}function xt(ee,fe){C(ee);var ce=jn.find(ee,fe);if(ce){for(var ue=0;ue<ee.FileIndex.length;++ue)if(ee.FileIndex[ue]==ce)return ee.FileIndex.splice(ue,1),ee.FullPaths.splice(ue,1),!0}return!1}function yt(ee,fe,ce){C(ee);var ue=jn.find(ee,fe);if(ue){for(var de=0;de<ee.FileIndex.length;++de)if(ee.FileIndex[de]==ue)return ee.FileIndex[de].name=i(ce),ee.FullPaths[de]=ce,!0}return!1}function dt(ee){P(ee,!0)}return t.find=T,t.read=A,t.parse=u,t.write=O,t.writeFile=N,t.utils={cfb_new:Ze,cfb_add:Be,cfb_del:xt,cfb_mov:yt,cfb_gc:dt,ReadShift:Hh,CheckField:C9,prep_blob:cs,bconcat:tc,use_zlib:M,_deflateRaw:He,_inflateRaw:Vt,consts:X},t})();function cxe(e){if(typeof Deno<"u")return Deno.readFileSync(e);if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var t=File(e);t.open("r"),t.encoding="binary";var n=t.read();return t.close(),n}catch(s){if(!s.message||!s.message.match(/onstruct/))throw s}throw new Error("Cannot access file "+e)}function Ao(e){for(var t=Object.keys(e),n=[],s=0;s<t.length;++s)Object.prototype.hasOwnProperty.call(e,t[s])&&n.push(t[s]);return n}function x_(e){for(var t=[],n=Ao(e),s=0;s!==n.length;++s)t[e[n[s]]]=n[s];return t}var jy=new Date(1899,11,30,0,0,0);function Qs(e,t){var n=e.getTime(),s=jy.getTime()+(e.getTimezoneOffset()-jy.getTimezoneOffset())*6e4;return(n-s)/(1440*60*1e3)}var i9=new Date,dxe=jy.getTime()+(i9.getTimezoneOffset()-jy.getTimezoneOffset())*6e4,l6=i9.getTimezoneOffset();function F1(e){var t=new Date;return t.setTime(e*24*60*60*1e3+dxe),t.getTimezoneOffset()!==l6&&t.setTime(t.getTime()+(t.getTimezoneOffset()-l6)*6e4),t}function uxe(e){var t=0,n=0,s=!1,i=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!i)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var a=1;a!=i.length;
876++a)if(i[a]){switch(n=1,a>3&&(s=!0),i[a].slice(i[a].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+i[a].slice(i[a].length-1));case"D":n*=24;case"H":n*=60;case"M":if(s)n*=60;else throw new Error("Unsupported ISO Duration Field: M")}t+=n*parseInt(i[a],10)}return t}var c6=new Date("2017-02-19T19:06:09.000Z"),a9=isNaN(c6.getFullYear())?new Date("2/19/17"):c6,fxe=a9.getFullYear()==2017;function es(e,t){var n=new Date(e);if(fxe)return t>0?n.setTime(n.getTime()+n.getTimezoneOffset()*60*1e3):t<0&&n.setTime(n.getTime()-n.getTimezoneOffset()*60*1e3),n;if(e instanceof Date)return e;if(a9.getFullYear()==1917&&!isNaN(n.getFullYear())){var s=n.getFullYear();return e.indexOf(""+s)>-1||n.setFullYear(n.getFullYear()+100),n}var i=e.match(/\d+/g)||["2017","2","19","0","0","0"],a=new Date(+i[0],+i[1]-1,+i[2],+i[3]||0,+i[4]||0,+i[5]||0);return e.indexOf("Z")>-1&&(a=new Date(a.getTime()-a.getTimezoneOffset()*60*1e3)),a}function Yd(e,t){if(bn&&Buffer.isBuffer(e)){if(t){if(e[0]==255&&e[1]==254)return Ih(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return Ih(qM(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(e[0]==255&&e[1]==254)return Ih(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return Ih(new TextDecoder("utf-16be").decode(e.slice(2)))}var n={"€":"€","‚":"‚",ƒ:"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰",Š:"Š","‹":"‹",Œ:"Œ",Ž:"Ž","‘":"‘","’":"’","“":"“","”":"”","•":"•","–":"–","—":"—","˜":"˜","™":"™",š:"š","›":"›",œ:"œ",ž:"ž",Ÿ:"Ÿ"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(a){return n[a]||a})}catch{}for(var s=[],i=0;i!=e.length;++i)s.push(String.fromCharCode(e[i]));return s.join("")}function fs(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=fs(e[n]));return t}function hr(e,t){for(var n="";n.length<t;)n+=e;return n}function La(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var n=1,s=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return n*=100,""});return!isNaN(t=Number(s))||(s=s.replace(/[(](.*)[)]/,function(i,a){return n=-n,a}),!isNaN(t=Number(s)))?t/n:t}var pxe=["january","february","march","april","may","june","july","august","september","october","november","december"];function Vf(e){var t=new Date(e),n=new Date(NaN),s=t.getYear(),i=t.getMonth(),a=t.getDate();if(isNaN(a))return n;var o=e.toLowerCase();if(o.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(o=o.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),o.length>3&&pxe.indexOf(o)==-1)return n}else if(o.match(/[a-z]/))return n;return s<0||s>8099?n:(i>0||a>1)&&s!=101?t:e.match(/[^-0-9:,\/\\]/)?n:t}var hxe=(function(){var e="abacaba".split(/(:?b)/i).length==5;return function(n,s,i){if(e||typeof s=="string")return n.split(s);for(var a=n.split(s),o=[a[0]],l=1;l<a.length;++l)o.push(i),o.push(a[l]);return o}})();function o9(e){return e?e.content&&e.type?Yd(e.content,!0):e.data?Nh(e.data):e.asNodeBuffer&&bn?Nh(e.asNodeBuffer().toString("binary")):e.asBinary?Nh(e.asBinary()):e._data&&e._data.getContent?Nh(Yd(Array.prototype.slice.call(e._data.getContent(),0))):null:null}function l9(e){if(!e)return null;if(e.data)return JT(e.data);if(e.asNodeBuffer&&bn)return e.asNodeBuffer();if(e._data&&e._data.getContent){var t=e._data.getContent();return typeof t=="string"?JT(t):Array.prototype.slice.call(t)}return e.content&&e.type?e.content:null}function mxe(e){return e&&e.name.slice(-4)===".bin"?l9(e):o9(e)}function ra(e,t){for(var n=e.FullPaths||Ao(e.files),s=t.toLowerCase().replace(/[\/]/g,"\\"),i=s.replace(/\\/g,"/"),a=0;a<n.length;++a){var o=n[a].replace(/^Root Entry[\/]/,"").toLowerCase();if(s==o||i==o)return e.files?e.files[n[a]]:e.FileIndex[a]}return null}function y_(e,t){var n=ra(e,t);if(n==null)throw new Error("Cannot find file "+t+" in zip");return n}function Er(e,t,n){if(!n)return mxe(y_(e,t));if(!t)return null;try{return Er(e,t)}catch{return null}}
876function Ti(e,t,n){if(!n)return o9(y_(e,t));if(!t)return null;try{return Ti(e,t)}catch{return null}}function gxe(e,t,n){return l9(y_(e,t))}function d6(e){for(var t=e.FullPaths||Ao(e.files),n=[],s=0;s<t.length;++s)t[s].slice(-1)!="/"&&n.push(t[s].replace(/^Root Entry[\/]/,""));return n.sort()}function xxe(e,t,n){if(e.FullPaths){if(typeof n=="string"){var s;return bn?s=tu(n):s=Bge(n),jn.utils.cfb_add(e,t,s)}jn.utils.cfb_add(e,t,n)}else e.file(t,n)}function c9(e,t){switch(t.type){case"base64":return jn.read(e,{type:"base64"});case"binary":return jn.read(e,{type:"binary"});case"buffer":case"array":return jn.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+t.type)}function Dh(e,t){if(e.charAt(0)=="/")return e.slice(1);var n=t.split("/");t.slice(-1)!="/"&&n.pop();for(var s=e.split("/");s.length!==0;){var i=s.shift();i===".."?n.pop():i!=="."&&n.push(i)}return n.join("/")}var d9=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
877`,yxe=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,u6=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/mg,vxe=/<[^>]*>/g,Os=d9.match(u6)?u6:vxe,bxe=/<\w*:/,wxe=/<(\/?)\w+:/;function Zt(e,t,n){for(var s={},i=0,a=0;i!==e.length&&!((a=e.charCodeAt(i))===32||a===10||a===13);++i);if(t||(s[0]=e.slice(0,i)),i===e.length)return s;var o=e.match(yxe),l=0,c="",d=0,u="",p="",m=1;
877if(o)for(d=0;d!=o.length;++d){for(p=o[d],a=0;a!=p.length&&p.charCodeAt(a)!==61;++a);for(u=p.slice(0,a).trim();p.charCodeAt(a+1)==32;)++a;for(m=(i=p.charCodeAt(a+1))==34||i==39?1:0,c=p.slice(a+1+m,p.length-m),l=0;l!=u.length&&u.charCodeAt(l)!==58;++l);if(l===u.length)u.indexOf("_")>0&&(u=u.slice(0,u.indexOf("_"))),s[u]=c,s[u.toLowerCase()]=c;else{var x=(l===5&&u.slice(0,5)==="xmlns"?"xmlns":"")+u.slice(l+1);if(s[x]&&u.slice(l-3,l)=="ext")continue;s[x]=c,s[x.toLowerCase()]=c}}return s}function Bo(e){return e.replace(wxe,"<$1")}var u9={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},jxe=x_(u9),Fn=(function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/ig,t=/_x([\da-fA-F]{4})_/ig;return function n(s){var i=s+"",a=i.indexOf("<![CDATA[");if(a==-1)return i.replace(e,function(l,c){return u9[l]||String.fromCharCode(parseInt(c,l.indexOf("x")>-1?16:10))||l}).replace(t,function(l,c){return String.fromCharCode(parseInt(c,16))});var o=i.indexOf("]]>");return n(i.slice(0,a))+i.slice(a+9,o)+n(i.slice(o+3))}})(),Sxe=/[&<>'"]/g,kxe=/[\u0000-\u001f]/g;function v_(e){var t=e+"";return t.replace(Sxe,function(n){return jxe[n]}).replace(/\n/g,"<br/>").replace(kxe,function(n){return"&#x"+("000"+n.charCodeAt(0).toString(16)).slice(-4)+";"})}var f6=(function(){var e=/&#(\d+);/g;function t(n,s){return String.fromCharCode(parseInt(s,10))}return function(s){return s.replace(e,t)}})();function ir(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function H2(e){for(var t="",n=0,s=0,i=0,a=0,o=0,l=0;n<e.length;){if(s=e.charCodeAt(n++),s<128){t+=String.fromCharCode(s);continue}if(i=e.charCodeAt(n++),s>191&&s<224){o=(s&31)<<6,o|=i&63,t+=String.fromCharCode(o);continue}if(a=e.charCodeAt(n++),s<240){t+=String.fromCharCode((s&15)<<12|(i&63)<<6|a&63);continue}o=e.charCodeAt(n++),l=((s&7)<<18|(i&63)<<12|(a&63)<<6|o&63)-65536,t+=String.fromCharCode(55296+(l>>>10&1023)),t+=String.fromCharCode(56320+(l&1023))}return t}function p6(e){var t=Tc(2*e.length),n,s,i=1,a=0,o=0,l;for(s=0;s<e.length;s+=i)i=1,(l=e.charCodeAt(s))<128?n=l:l<224?(n=(l&31)*64+(e.charCodeAt(s+1)&63),i=2):l<240?(n=(l&15)*4096+(e.charCodeAt(s+1)&63)*64+(e.charCodeAt(s+2)&63),i=3):(i=4,n=(l&7)*262144+(e.charCodeAt(s+1)&63)*4096+(e.charCodeAt(s+2)&63)*64+(e.charCodeAt(s+3)&63),n-=65536,o=55296+(n>>>10&1023),n=56320+(n&1023)),o!==0&&(t[a++]=o&255,t[a++]=o>>>8,o=0),t[a++]=n%256,t[a++]=n>>>8;return t.slice(0,a).toString("ucs2")}function h6(e){return tu(e,"binary").toString("utf8")}var Ug="foo bar baz☃🍣",Jn=bn&&(h6(Ug)==H2(Ug)&&h6||p6(Ug)==H2(Ug)&&p6)||H2,Ih=bn?function(e){return tu(e,"utf8").toString("binary")}:function(e){for(var t=[],n=0,s=0,i=0;n<e.length;)switch(s=e.charCodeAt(n++),!0){case s<128:t.push(String.fromCharCode(s));break;case s<2048:t.push(String.fromCharCode(192+(s>>6))),t.push(String.fromCharCode(128+(s&63)));break;case(s>=55296&&s<57344):s-=55296,i=e.charCodeAt(n++)-56320+(s<<10),t.push(String.fromCharCode(240+(i>>18&7))),t.push(String.fromCharCode(144+(i>>12&63))),t.push(String.fromCharCode(128+(i>>6&63))),t.push(String.fromCharCode(128+(i&63)));break;default:t.push(String.fromCharCode(224+(s>>12))),t.push(String.fromCharCode(128+(s>>6&63))),t.push(String.fromCharCode(128+(s&63)))}return t.join("")},Cm=(function(){var e={};return function(n,s){var i=n+"|"+(s||"");return e[i]?e[i]:e[i]=new RegExp("<(?:\\w+:)?"+n+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+n+">",s||"")}})(),f9=(function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(n){for(var s=n.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
878`).replace(/<[^>]*>/g,""),i=0;i<e.length;++i)s=s.replace(e[i][0],e[i][1]);return s}})(),_xe=(function(){var e={};return function(n){return e[n]!==void 0?e[n]:e[n]=new RegExp("<(?:vt:)?"+n+">([\\s\\S]*?)</(?:vt:)?"+n+">","g")}})(),Cxe=/<\/?(?:vt:)?variant>/g,Exe=/<(?:vt:)([^>]*)>([\s\S]*)</;function m6(e,t){var n=Zt(e),s=e.match(_xe(n.baseType))||[],i=[];if(s.length!=n.size){if(t.WTF)throw new Error("unexpected vector length "+s.length+" != "+n.size);return i}
vendor: 11,637 bytes, line 878
878return s.forEach(function(a){var o=a.replace(Cxe,"").match(Exe);o&&i.push({v:Jn(o[2]),t:o[1]})}),i}var Fxe=/(^\s|\s$|\n)/;function Axe(e){return Ao(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function Txe(e,t,n){return"<"+e+(n!=null?Axe(n):"")+(t!=null?(t.match(Fxe)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function b_(e){if(bn&&Buffer.isBuffer(e))return e.toString("utf8");if(typeof e=="string")return e;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return Jn(nu(h_(e)));throw new Error("Bad input format: expected Buffer or string")}var Em=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/][^>]*)?>/mg,Nxe={CT:"http://schemas.openxmlformats.org/package/2006/content-types"},Rxe=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];function Dxe(e,t){for(var n=1-2*(e[t+7]>>>7),s=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),i=e[t+6]&15,a=5;a>=0;--a)i=i*256+e[t+a];return s==2047?i==0?n*(1/0):NaN:(s==0?s=-1022:(s-=1023,i+=Math.pow(2,52)),n*Math.pow(2,s-52)*i)}function Ixe(e,t,n){var s=(t<0||1/t==-1/0?1:0)<<7,i=0,a=0,o=s?-t:t;isFinite(o)?o==0?i=a=0:(i=Math.floor(Math.log(o)/Math.LN2),a=o*Math.pow(2,52-i),i<=-1023&&(!isFinite(a)||a<Math.pow(2,52))?i=-1022:(a-=Math.pow(2,52),i+=1023)):(i=2047,a=isNaN(t)?26985:0);for(var l=0;l<=5;++l,a/=256)e[n+l]=a&255;e[n+6]=(i&15)<<4|a&15,e[n+7]=i>>4|s}var g6=function(e){for(var t=[],n=10240,s=0;s<e[0].length;++s)if(e[0][s])for(var i=0,a=e[0][s].length;i<a;i+=n)t.push.apply(t,e[0][s].slice(i,i+n));return t},x6=bn?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:tu(t)})):g6(e)}:g6,y6=function(e,t,n){for(var s=[],i=t;i<n;i+=2)s.push(String.fromCharCode(cl(e,i)));return s.join("").replace(Xs,"")},w_=bn?function(e,t,n){return Buffer.isBuffer(e)?e.toString("utf16le",t,n).replace(Xs,""):y6(e,t,n)}:y6,v6=function(e,t,n){for(var s=[],i=t;i<t+n;++i)s.push(("0"+e[i].toString(16)).slice(-2));return s.join("")},p9=bn?function(e,t,n){return Buffer.isBuffer(e)?e.toString("hex",t,t+n):v6(e,t,n)}:v6,b6=function(e,t,n){for(var s=[],i=t;i<n;i++)s.push(String.fromCharCode(ef(e,i)));return s.join("")},n0=bn?function(t,n,s){return Buffer.isBuffer(t)?t.toString("utf8",n,s):b6(t,n,s)}:b6,h9=function(e,t){var n=Ei(e,t);return n>0?n0(e,t+4,t+4+n-1):""},m9=h9,g9=function(e,t){var n=Ei(e,t);return n>0?n0(e,t+4,t+4+n-1):""},x9=g9,y9=function(e,t){var n=2*Ei(e,t);return n>0?n0(e,t+4,t+4+n-1):""},v9=y9,b9=function(t,n){var s=Ei(t,n);return s>0?w_(t,n+4,n+4+s):""},w9=b9,j9=function(e,t){var n=Ei(e,t);return n>0?n0(e,t+4,t+4+n):""},S9=j9,k9=function(e,t){return Dxe(e,t)},Sy=k9,_9=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};bn&&(m9=function(t,n){if(!Buffer.isBuffer(t))return h9(t,n);var s=t.readUInt32LE(n);return s>0?t.toString("utf8",n+4,n+4+s-1):""},x9=function(t,n){if(!Buffer.isBuffer(t))return g9(t,n);var s=t.readUInt32LE(n);return s>0?t.toString("utf8",n+4,n+4+s-1):""},v9=function(t,n){if(!Buffer.isBuffer(t))return y9(t,n);var s=2*t.readUInt32LE(n);return t.toString("utf16le",n+4,n+4+s-1)},w9=function(t,n){if(!Buffer.isBuffer(t))return b9(t,n);var s=t.readUInt32LE(n);return t.toString("utf16le",n+4,n+4+s)},S9=function(t,n){if(!Buffer.isBuffer(t))return j9(t,n);var s=t.readUInt32LE(n);return t.toString("utf8",n+4,n+4+s)},Sy=function(t,n){return Buffer.isBuffer(t)?t.readDoubleLE(n):k9(t,n)},_9=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var ef=function(e,t){return e[t]},cl=function(e,t){return e[t+1]*256+e[t]},Pxe=function(e,t){var n=e[t+1]*256+e[t];return n<32768?n:(65535-n+1)*-1},Ei=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},jd=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},Bxe=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function Hh(e,t){var n="",s,i,a=[],o,l,c,d;switch(t){case"dbcs":if(d=this.l,bn&&Buffer.isBuffer(this))n=this.slice(this.l,this.l+2*e).toString("utf16le");else for(c=0;c<e;++c)n+=String.fromCharCode(cl(this,d)),d+=2;e*=2;break;case"utf8":n=n0(this,this.l,this.l+e);break;case"utf16le":e*=2,n=w_(this,this.l,this.l+e);break;case"wstr":return Hh.call(this,e,"dbcs");case"lpstr-ansi":n=m9(this,this.l),e=4+Ei(this,this.l);break;case"lpstr-cp":n=x9(this,this.l),e=4+Ei(this,this.l);break;case"lpwstr":n=v9(this,this.l),e=4+2*Ei(this,this.l);break;case"lpp4":e=4+Ei(this,this.l),n=w9(this,this.l),e&2&&(e+=2);break;case"8lpp4":e=4+Ei(this,this.l),n=S9(this,this.l),e&3&&(e+=4-(e&3));break;case"cstr":for(e=0,n="";(o=ef(this,this.l+e++))!==0;)a.push($g(o));n=a.join("");break;case"_wstr":for(e=0,n="";(o=cl(this,this.l+e))!==0;)a.push($g(o)),e+=2;e+=2,n=a.join("");break;case"dbcs-cont":for(n="",d=this.l,c=0;c<e;++c){if(this.lens&&this.lens.indexOf(d)!==-1)return o=ef(this,d),this.l=d+1,l=Hh.call(this,e-c,o?"dbcs-cont":"sbcs-cont"),a.join("")+l;a.push($g(cl(this,d))),d+=2}n=a.join(""),e*=2;break;case"cpstr":case"sbcs-cont":for(n="",d=this.l,c=0;c!=e;++c){if(this.lens&&this.lens.indexOf(d)!==-1)return o=ef(this,d),this.l=d+1,l=Hh.call(this,e-c,o?"dbcs-cont":"sbcs-cont"),a.join("")+l;a.push($g(ef(this,d))),d+=1}n=a.join("");break;default:switch(e){case 1:return s=ef(this,this.l),this.l++,s;case 2:return s=(t==="i"?Pxe:cl)(this,this.l),this.l+=2,s;case 4:case-4:return t==="i"||(this[this.l+3]&128)===0?(s=(e>0?jd:Bxe)(this,this.l),this.l+=4,s):(i=Ei(this,this.l),this.l+=4,i);case 8:case-8:if(t==="f")return e==8?i=Sy(this,this.l):i=Sy([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,i;e=8;case 16:n=p9(this,this.l,e);break}}return this.l+=e,n}var Oxe=function(e,t,n){e[n]=t&255,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24&255},Mxe=function(e,t,n){e[n]=t&255,e[n+1]=t>>8&255,e[n+2]=t>>16&255,e[n+3]=t>>24&255},Lxe=function(e,t,n){e[n]=t&255,e[n+1]=t>>>8&255};function zxe(e,t,n){var s=0,i=0;if(n==="dbcs"){for(i=0;i!=t.length;++i)Lxe(this,t.charCodeAt(i),this.l+2*i);s=2*t.length}else if(n==="sbcs"){for(t=t.replace(/[^\x00-\x7F]/g,"_"),i=0;i!=t.length;++i)this[this.l+i]=t.charCodeAt(i)&255;s=t.length}else if(n==="hex"){for(;i<e;++i)this[this.l++]=parseInt(t.slice(2*i,2*i+2),16)||0;return this}else if(n==="utf16le"){var a=Math.min(this.l+e,this.length);for(i=0;i<Math.min(t.length,e);++i){var o=t.charCodeAt(i);this[this.l++]=o&255,this[this.l++]=o>>8}for(;this.l<a;)this[this.l++]=0;return this}else switch(e){case 1:s=1,this[this.l]=t&255;break;case 2:s=2,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255;break;case 3:s=3,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255,t>>>=8,this[this.l+2]=t&255;break;case 4:s=4,Oxe(this,t,this.l);break;case 8:if(s=8,n==="f"){Ixe(this,t,this.l);break}case 16:break;case-4:s=4,Mxe(this,t,this.l);break}return this.l+=s,this}function C9(e,t){var n=p9(this,this.l,e.length>>1);if(n!==e)throw new Error(t+"Expected "+e+" saw "+n);this.l+=e.length>>1}function cs(e,t){e.l=t,e.read_shift=Hh,e.chk=C9,e.write_shift=zxe}function Ps(e,t){e.l+=t}function Mr(e){var t=Tc(e);return cs(t,0),t}function Cl(e,t,n){if(e){var s,i,a;cs(e,e.l||0);for(var o=e.length,l=0,c=0;e.l<o;){l=e.read_shift(1),l&128&&(l=(l&127)+((e.read_shift(1)&127)<<7));var d=Ay[l]||Ay[65535];for(s=e.read_shift(1),a=s&127,i=1;i<4&&s&128;++i)a+=((s=e.read_shift(1))&127)<<7*i;c=e.l+a;var u=d.f&&d.f(e,a,n);if(e.l=c,t(u,d,l))return}}}function Ij(){var e=[],t=bn?256:2048,n=function(d){var u=Mr(d);return cs(u,0),u},s=n(t),i=function(){s&&(s.length>s.l&&(s=s.slice(0,s.l),s.l=s.length),s.length>0&&e.push(s),s=null)},a=function(d){return s&&d<s.length-s.l?s:(i(),s=n(Math.max(d+1,t)))},o=function(){return i(),tc(e)},l=function(d){i(),s=d,s.l==null&&(s.l=s.length),a(t)};return{next:a,push:l,end:o,_bufs:e}}function qh(e,t,n){var s=fs(e);if(t.s?(s.cRel&&(s.c+=t.s.c),s.rRel&&(s.r+=t.s.r)):(s.cRel&&(s.c+=t.c),s.rRel&&(s.r+=t.r)),!n||n.biff<12){for(;s.c>=256;)s.c-=256;for(;s.r>=65536;)s.r-=65536}return s}function w6(e,t,n){var s=fs(e);return s.s=qh(s.s,t.s,n),s.e=qh(s.e,t.s,n),s}function Gh(e,t){if(e.cRel&&e.c<0)for(e=fs(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=fs(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var n=an(e);return!e.cRel&&e.cRel!=null&&(n=Uxe(n)),!e.rRel&&e.rRel!=null&&(n=Wxe(n)),n}function q2(e,t){return e.s.r==0&&!e.s.rRel&&e.e.r==(t.biff>=12?1048575:t.biff>=8?65536:16384)&&!e.e.rRel?(e.s.cRel?"":"$")+zr(e.s.c)+":"+(e.e.cRel?"":"$")+zr(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+ps(e.s.r)+":"+(e.e.rRel?"":"$")+ps(e.e.r):Gh(e.s,t.biff)+":"+Gh(e.e,t.biff)}function j_(e){return parseInt($xe(e),10)-1}function ps(e){return""+(e+1)}function Wxe(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function $xe(e){return e.replace(/\$(\d+)$/,"$1")}function S_(e){for(var t=Vxe(e),n=0,s=0;s!==t.length;++s)n=26*n+t.charCodeAt(s)-64;return n-1}function zr(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function Uxe(e){return e.replace(/^([A-Z])/,"$$$1")}function Vxe(e){return e.replace(/^\$([A-Z])/,"$1")}function Hxe(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function Ys(e){for(var t=0,n=0,s=0;s<e.length;++s){var i=e.charCodeAt(s);i>=48&&i<=57?t=10*t+(i-48):i>=65&&i<=90&&(n=26*n+(i-64))}return{c:n-1,r:t-1}}function an(e){for(var t=e.c+1,n="";t;t=(t-1)/26|0)n=String.fromCharCode((t-1)%26+65)+n;return n+(e.r+1)}function lp(e){var t=e.indexOf(":");return t==-1?{s:Ys(e),e:Ys(e)}:{s:Ys(e.slice(0,t)),e:Ys(e.slice(t+1))}}function Sn(e,t){return typeof t>"u"||typeof t=="number"?Sn(e.s,e.e):(typeof e!="string"&&(e=an(e)),typeof t!="string"&&(t=an(t)),e==t?e:e+":"+t)}function gr(e){var t={s:{c:0,r:0},e:{c:0,r:0}},n=0,s=0,i=0,a=e.length;for(n=0;s<a&&!((i=e.charCodeAt(s)-64)<1||i>26);++s)n=26*n+i;for(t.s.c=--n,n=0;s<a&&!((i=e.charCodeAt(s)-48)<0||i>9);++s)n=10*n+i;if(t.s.r=--n,s===a||i!=10)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++s,n=0;s!=a&&!((i=e.charCodeAt(s)-64)<1||i>26);++s)n=26*n+i;for(t.e.c=--n,n=0;s!=a&&!((i=e.charCodeAt(s)-48)<0||i>9);++s)n=10*n+i;return t.e.r=--n,t}function j6(e,t){var n=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=ha(e.z,n?Qs(t):t)}catch{}try{return e.w=ha((e.XF||{}).numFmtId||(n?14:0),n?Qs(t):t)}catch{return""+t}}function Sl(e,t,n){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&n&&n.dateNF&&(e.z=n.dateNF),e.t=="e"?iu[e.v]||e.v:t==null?j6(e,e.v):j6(e,t))}function Wc(e,t){var n=t&&t.sheet?t.sheet:"Sheet1",s={};return s[n]=e,{SheetNames:[n],Sheets:s}}function E9(e,t,n){var s=n||{},i=e?Array.isArray(e):s.dense,a=e||(i?[]:{}),o=0,l=0;if(a&&s.origin!=null){if(typeof s.origin=="number")o=s.origin;else{var c=typeof s.origin=="string"?Ys(s.origin):s.origin;o=c.r,l=c.c}a["!ref"]||(a["!ref"]="A1:A1")}var d={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(a["!ref"]){var u=gr(a["!ref"]);d.s.c=u.s.c,d.s.r=u.s.r,d.e.c=Math.max(d.e.c,u.e.c),d.e.r=Math.max(d.e.r,u.e.r),o==-1&&(d.e.r=o=u.e.r+1)}for(var p=0;p!=t.length;++p)if(t[p]){if(!Array.isArray(t[p]))throw new Error("aoa_to_sheet expects an array of arrays");for(var m=0;m!=t[p].length;++m)if(!(typeof t[p][m]>"u")){var x={v:t[p][m]},w=o+p,y=l+m;if(d.s.r>w&&(d.s.r=w),d.s.c>y&&(d.s.c=y),d.e.r<w&&(d.e.r=w),d.e.c<y&&(d.e.c=y),t[p][m]&&typeof t[p][m]=="object"&&!Array.isArray(t[p][m])&&!(t[p][m]instanceof Date))x=t[p][m];else if(Array.isArray(x.v)&&(x.f=t[p][m][1],x.v=x.v[0]),x.v===null)if(x.f)x.t="n";else if(s.nullError)x.t="e",x.v=0;else if(s.sheetStubs)x.t="z";else continue;
878else typeof x.v=="number"?x.t="n":typeof x.v=="boolean"?x.t="b":x.v instanceof Date?(x.z=s.dateNF||cn[14],s.cellDates?(x.t="d",x.w=ha(x.z,Qs(x.v))):(x.t="n",x.v=Qs(x.v),x.w=ha(x.z,x.v))):x.t="s";if(i)a[w]||(a[w]=[]),a[w][y]&&a[w][y].z&&(x.z=a[w][y].z),a[w][y]=x;else{var v=an({c:y,r:w});a[v]&&a[v].z&&(x.z=a[v].z),a[v]=x}}}return d.s.c<1e7&&(a["!ref"]=Sn(d)),a}function cp(e,t){return E9(null,e,t)}function qxe(e){return e.read_shift(4,"i")}function Ds(e){var t=e.read_shift(4);return t===0?"":e.read_shift(t,"dbcs")}function Gxe(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function k_(e,t){var n=e.l,s=e.read_shift(1),i=Ds(e),a=[],o={t:i,h:i};if((s&1)!==0){for(var l=e.read_shift(4),c=0;c!=l;++c)a.push(Gxe(e));o.r=a}else o.r=[{ich:0,ifnt:0}];return e.l=n+t,o}var Kxe=k_;function ga(e){var t=e.read_shift(4),n=e.read_shift(2);return n+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:n}}function ru(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}var Yxe=Ds;function __(e){var t=e.read_shift(4);return t===0||t===4294967295?"":e.read_shift(t,"dbcs")}var Xxe=Ds,Pj=__;function C_(e){var t=e.slice(e.l,e.l+4),n=t[0]&1,s=t[0]&2;e.l+=4;var i=s===0?Sy([0,0,0,0,t[0]&252,t[1],t[2],t[3]],0):jd(t,0)>>2;return n?i/100:i}function F9(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}var su=F9;function As(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function Jxe(e){var t={},n=e.read_shift(1),s=n>>>1,i=e.read_shift(1),a=e.read_shift(2,"i"),o=e.read_shift(1),l=e.read_shift(1),c=e.read_shift(1);switch(e.l++,s){case 0:t.auto=1;break;case 1:t.index=i;var d=zd[i];d&&(t.rgb=Am(d));break;case 2:t.rgb=Am([o,l,c]);break;case 3:t.theme=i;break}return a!=0&&(t.tint=a>0?a/32767:a/32768),t}function Qxe(e){var t=e.read_shift(1);e.l++;var n={fBold:t&1,fItalic:t&2,fUnderline:t&4,fStrikeout:t&8,fOutline:t&16,fShadow:t&32,fCondense:t&64,fExtend:t&128};return n}function A9(e,t){var n={2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"},s=e.read_shift(4);switch(s){case 0:return"";case 4294967295:case 4294967294:return n[e.read_shift(4)]||""}if(s>400)throw new Error("Unsupported Clipboard: "+s.toString(16));return e.l-=4,e.read_shift(0,t==1?"lpstr":"lpwstr")}function Zxe(e){return A9(e,1)}function eye(e){return A9(e,2)}var E_=2,di=3,Vg=11,S6=12,ky=19,Hg=64,tye=65,nye=71,rye=4108,sye=4126,Yr=80,T9=81,iye=[Yr,T9],aye={1:{n:"CodePage",t:E_},2:{n:"Category",t:Yr},3:{n:"PresentationFormat",t:Yr},4:{n:"ByteCount",t:di},5:{n:"LineCount",t:di},6:{n:"ParagraphCount",t:di},7:{n:"SlideCount",t:di},8:{n:"NoteCount",t:di},9:{n:"HiddenCount",t:di},10:{n:"MultimediaClipCount",t:di},11:{n:"ScaleCrop",t:Vg},12:{n:"HeadingPairs",t:rye},13:{n:"TitlesOfParts",t:sye},14:{n:"Manager",t:Yr},15:{n:"Company",t:Yr},16:{n:"LinksUpToDate",t:Vg},17:{n:"CharacterCount",t:di},19:{n:"SharedDoc",t:Vg},22:{n:"HyperlinksChanged",t:Vg},23:{n:"AppVersion",t:di,p:"version"},24:{n:"DigSig",t:tye},26:{n:"ContentType",t:Yr},27:{n:"ContentStatus",t:Yr},28:{n:"Language",t:Yr},29:{n:"Version",t:Yr},255:{},2147483648:{n:"Locale",t:ky},2147483651:{n:"Behavior",t:ky},1919054434:{}},oye={1:{n:"CodePage",t:E_},2:{n:"Title",t:Yr},3:{n:"Subject",t:Yr},4:{n:"Author",t:Yr},5:{n:"Keywords",t:Yr},6:{n:"Comments",t:Yr},7:{n:"Template",t:Yr},8:{n:"LastAuthor",t:Yr},9:{n:"RevNumber",t:Yr},10:{n:"EditTime",t:Hg},11:{n:"LastPrinted",t:Hg},12:{n:"CreatedDate",t:Hg},13:{n:"ModifiedDate",t:Hg},14:{n:"PageCount",t:di},15:{n:"WordCount",t:di},16:{n:"CharCount",t:di},17:{n:"Thumbnail",t:nye},18:{n:"Application",t:Yr},19:{n:"DocSecurity",t:di},255:{},2147483648:{n:"Locale",t:ky},2147483651:{n:"Behavior",t:ky},1919054434:{}},k6={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},lye=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","dar
878kVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function cye(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var dye=cye([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),zd=fs(dye),iu={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},N9={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},_6={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"};function uye(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function fye(e){var t=uye();if(!e||!e.match)return t;var n={};
vendor: 560 bytes, line 878
878if((e.match(Os)||[]).forEach(function(s){var i=Zt(s);switch(i[0].replace(bxe,"<")){case"<?xml":break;case"<Types":t.xmlns=i["xmlns"+(i[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":n[i.Extension]=i.ContentType;break;case"<Override":t[_6[i.ContentType]]!==void 0&&t[_6[i.ContentType]].push(i.PartName);break}}),t.xmlns!==Nxe.CT)throw new Error("Unknown Namespace: "+t.xmlns);return t.calcchain=t.calcchains.length>0?t.calcchains[0]:"",t.sst=t.strs.length>0?t.strs[0]:"",t.style=t.styles.length>0?t.styles[0]:"",t.defaults=n,delete t.calcchains,t}var uf
vendor: 2,399 bytes, line 878
878={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",
878VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function Bj(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function Kh(e,t){var n={"!id":{}};if(!e)return n;t.charAt(0)!=="/"&&(t="/"+t);var s={};return(e.match(Os)||[]).forEach(function(i){var a=Zt(i);if(a[0]==="<Relationship"){var o={};o.Type=a.Type,o.Target=a.Target,o.Id=a.Id,a.TargetMode&&(o.TargetMode=a.TargetMode);var l=a.TargetMode==="External"?a.Target:Dh(a.Target,t);n[l]=o,s[a.Id]=o}}),n["!id"]=s,n}var pye="application/vnd.oasis.opendocument.spreadsheet";function hye(e,t){for(var n=b_(e),s,i;s=Em.exec(n);)switch(s[3]){case"manifest":break;case"file-entry":if(i=Zt(s[0],!1),i.path=="/"&&i.type!==pye)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(t&&t.WTF)throw s}}var Yh=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],mye=(function(){for(var e=new Array(Yh.length),t=0;t<Yh.length;++t){var n=Yh[t],s="(?:"+n[0].slice(0,n[0].indexOf(":"))+":)"+n[0].slice(n[0].indexOf(":")+1);e[t]=new RegExp("<"+s+"[^>]*>([\\s\\S]*?)</"+s+">")}return e})();function R9(e){var t={};e=Jn(e);for(var n=0;n<Yh.length;++n){var s=Yh[n],i=e.match(mye[n]);i!=null&&i.length>0&&(t[s[1]]=Fn(i[1])),s[2]==="date"&&t[s[1]]&&(t[s[1]]=es(t[s[1]]))}return t}var gye=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];function D9(e,t,n,s){var i=[];if(typeof e=="string")i=m6(e,s);else for(var a=0;a<e.length;++a)i=i.concat(e[a].map(function(u){return{v:u}}));var o=typeof t=="string"?m6(t,s).map(function(u){return u.v}):t,l=0,c=0;if(o.length>0)for(var d=0;d!==i.length;d+=2){switch(c=+i[d+1].v,i[d].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":n.Worksheets=c,n.SheetNames=o.slice(l,l+c);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":n.NamedRanges=c,n.DefinedNames=o.slice(l,l+c);break;case"Charts":case"Diagramme":n.Chartsheets=c,n.ChartNames=o.slice(l,l+c);break}l+=c}}function xye(e,t,n){var s={};return t||(t={}),e=Jn(e),gye.forEach(function(i){var a=(e.match(Cm(i[0]))||[])[1];switch(i[2]){case"string":a&&(t[i[1]]=Fn(a));break;case"bool":t[i[1]]=a==="true";break;case"raw":var o=e.match(new RegExp("<"+i[0]+"[^>]*>([\\s\\S]*?)</"+i[0]+">"));o&&o.length>0&&(s[i[1]]=o[1]);break}}),s.HeadingPairs&&s.TitlesOfParts&&D9(s.HeadingPairs,s.TitlesOfParts,t,n),t}var yye=/<[^>]+>[^<]*/g;function vye(e,t){var n={},s="",i=e.match(yye);if(i)for(var a=0;a!=i.length;++a){var o=i[a],l=Zt(o);switch(l[0]){case"<?xml":break;case"<Properties":break;case"<property":s=Fn(l.name);break;case"</property>":s=null;break;default:if(o.indexOf("<vt:")===0){var c=o.split(">"),d=c[0].slice(4),u=c[1];switch(d){case"lpstr":case"bstr":case"lpwstr":n[s]=Fn(u);break;case"bool":n[s]=ir(u);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":n[s]=parseInt(u,10);break;case"r4":case"r8":case"decimal":n[s]=parseFloat(u);break;case"filetime":case"date":n[s]=es(u);break;case"cy":case"error":n[s]=Fn(u);break;default:if(d.slice(-1)=="/")break;t.WTF&&typeof console<"u"&&console.warn("Unexpected",o,d,c)}}else if(o.slice(0,2)!=="</"){if(t.WTF)throw new Error(o)}}}return n}var bye={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"},G2;function wye(e,t,n){G2||(G2=x_(bye)),t=G2[t]||t,e[t]=n}function F_(e){var t=e.read_shift(4),n=e.read_shift(4);return new Date((n/1e7*Math.pow(2,32)+t/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}function I9(e,t,n){var s=e.l,i=e.read_shift(0,"lpstr-cp");if(n)for(;e.l-s&3;)++e.l;return i}function P9(e,t,n){var s=e.read_shift(0,"lpwstr");return s}function B9(e,t,n){return t===31?P9(e):I9(e,t,n)}function Oj(e,t,n){return B9(e,t,n===!1?0:4)}function jye(e,t){if(!t)throw new Error("VtUnalignedString must have positive length");return B9(e,t,0)}function Sye(e){for(var t=e.read_shift(4),n=[],s=0;s!=t;++s){var i=e.l;n[s]=e.read_shift(0,"lpwstr").replace(Xs,""),e.l-i&2&&(e.l+=2)}return n}function kye(e){for(var t=e.read_shift(4),n=[],s=0;s!=t;++s)n[s]=e.read_shift(0,"lpstr-cp").replace(Xs,"");return n}function _ye(e){var t=e.l,n=_y(e,T9);e[e.l]==0&&e[e.l+1]==0&&e.l-t&2&&(e.l+=2);var s=_y(e,di);return[n,s]}function Cye(e){for(var t=e.read_shift(4),n=[],s=0;s<t/2;++s)n.push(_ye(e));return n}function C6(e,t){for(var n=e.read_shift(4),s={},i=0;i!=n;++i){var a=e.read_shift(4),o=e.read_shift(4);s[a]=e.read_shift(o,t===1200?"utf16le":"utf8").replace(Xs,"").replace(Rh,"!"),t===1200&&o%2&&(e.l+=2)}return e.l&3&&(e.l=e.l>>3<<2),s}function O9(e){var t=e.read_shift(4),n=e.slice(e.l,e.l+t);return e.l+=t,(t&3)>0&&(e.l+=4-(t&3)&3),n}function Eye(e){var t={};return t.Size=e.read_shift(4),e.l+=t.Size+3-(t.Size-1)%4,t}
vendor: 16,279 bytes, line 878
878function _y(e,t,n){var s=e.read_shift(2),i,a=n||{};if(e.l+=2,t!==S6&&s!==t&&iye.indexOf(t)===-1&&!((t&65534)==4126&&(s&65534)==4126))throw new Error("Expected type "+t+" saw "+s);switch(t===S6?s:t){case 2:return i=e.read_shift(2,"i"),a.raw||(e.l+=2),i;case 3:return i=e.read_shift(4,"i"),i;case 11:return e.read_shift(4)!==0;case 19:return i=e.read_shift(4),i;case 30:return I9(e,s,4).replace(Xs,"");case 31:return P9(e);case 64:return F_(e);case 65:return O9(e);case 71:return Eye(e);case 80:return Oj(e,s,!a.raw).replace(Xs,"");case 81:return jye(e,s).replace(Xs,"");case 4108:return Cye(e);case 4126:case 4127:return s==4127?Sye(e):kye(e);default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+s)}}function E6(e,t){var n=e.l,s=e.read_shift(4),i=e.read_shift(4),a=[],o=0,l=0,c=-1,d={};for(o=0;o!=i;++o){var u=e.read_shift(4),p=e.read_shift(4);a[o]=[u,p+n]}a.sort(function(k,S){return k[1]-S[1]});var m={};for(o=0;o!=i;++o){if(e.l!==a[o][1]){var x=!0;if(o>0&&t)switch(t[a[o-1][0]].t){case 2:e.l+2===a[o][1]&&(e.l+=2,x=!1);break;case 80:e.l<=a[o][1]&&(e.l=a[o][1],x=!1);break;case 4108:e.l<=a[o][1]&&(e.l=a[o][1],x=!1);break}if((!t||o==0)&&e.l<=a[o][1]&&(x=!1,e.l=a[o][1]),x)throw new Error("Read Error: Expected address "+a[o][1]+" at "+e.l+" :"+o)}if(t){var w=t[a[o][0]];if(m[w.n]=_y(e,w.t,{raw:!0}),w.p==="version"&&(m[w.n]=String(m[w.n]>>16)+"."+("0000"+String(m[w.n]&65535)).slice(-4)),w.n=="CodePage")switch(m[w.n]){case 0:m[w.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:Oa(l=m[w.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+m[w.n])}}else if(a[o][0]===1){if(l=m.CodePage=_y(e,E_),Oa(l),c!==-1){var y=e.l;e.l=a[c][1],d=C6(e,l),e.l=y}}else if(a[o][0]===0){if(l===0){c=o,e.l=a[o+1][1];continue}d=C6(e,l)}else{var v=d[a[o][0]],j;switch(e[e.l]){case 65:e.l+=4,j=O9(e);break;case 30:e.l+=4,j=Oj(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 31:e.l+=4,j=Oj(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,j=e.read_shift(4,"i");break;case 19:e.l+=4,j=e.read_shift(4);break;case 5:e.l+=4,j=e.read_shift(8,"f");break;case 11:e.l+=4,j=vr(e,4);break;case 64:e.l+=4,j=es(F_(e));break;default:throw new Error("unparsed value: "+e[e.l])}m[v]=j}}return e.l=n+s,m}function F6(e,t,n){var s=e.content;if(!s)return{};cs(s,0);var i,a,o,l,c=0;s.chk("feff","Byte Order: "),s.read_shift(2);var d=s.read_shift(4),u=s.read_shift(16);if(u!==jn.utils.consts.HEADER_CLSID&&u!==n)throw new Error("Bad PropertySet CLSID "+u);if(i=s.read_shift(4),i!==1&&i!==2)throw new Error("Unrecognized #Sets: "+i);if(a=s.read_shift(16),l=s.read_shift(4),i===1&&l!==s.l)throw new Error("Length mismatch: "+l+" !== "+s.l);i===2&&(o=s.read_shift(16),c=s.read_shift(4));var p=E6(s,t),m={SystemIdentifier:d};for(var x in p)m[x]=p[x];if(m.FMTID=a,i===1)return m;if(c-s.l==2&&(s.l+=2),s.l!==c)throw new Error("Length mismatch 2: "+s.l+" !== "+c);var w;try{w=E6(s,null)}catch{}for(x in w)m[x]=w[x];return m.FMTID=[a,o],m}function Yl(e,t){return e.read_shift(t),null}function Fye(e,t,n){for(var s=[],i=e.l+t;e.l<i;)s.push(n(e,i-e.l));if(i!==e.l)throw new Error("Slurp error");return s}function vr(e,t){return e.read_shift(t)===1}function Fr(e){return e.read_shift(2,"u")}function M9(e,t){return Fye(e,t,Fr)}function Aye(e){var t=e.read_shift(1),n=e.read_shift(1);return n===1?t:t===1}function r0(e,t,n){var s=e.read_shift(n&&n.biff>=12?2:1),i="sbcs-cont";if(n&&n.biff>=8,!n||n.biff==8){var a=e.read_shift(1);a&&(i="dbcs-cont")}else n.biff==12&&(i="wstr");n.biff>=2&&n.biff<=5&&(i="cpstr");var o=s?e.read_shift(s,i):"";return o}function Tye(e){var t=e.read_shift(2),n=e.read_shift(1),s=n&4,i=n&8,a=1+(n&1),o=0,l,c={};i&&(o=e.read_shift(2)),s&&(l=e.read_shift(4));var d=a==2?"dbcs-cont":"sbcs-cont",u=t===0?"":e.read_shift(t,d);return i&&(e.l+=4*o),s&&(e.l+=l),c.t=u,i||(c.raw="<t>"+c.t+"</t>",c.r=c.t),c}function Xd(e,t,n){var s;if(n){if(n.biff>=2&&n.biff<=5)return e.read_shift(t,"cpstr");if(n.biff>=12)return e.read_shift(t,"dbcs-cont")}var i=e.read_shift(1);return i===0?s=e.read_shift(t,"sbcs-cont"):s=e.read_shift(t,"dbcs-cont"),s}function s0(e,t,n){var s=e.read_shift(n&&n.biff==2?1:2);return s===0?(e.l++,""):Xd(e,s,n)}function au(e,t,n){if(n.biff>5)return s0(e,t,n);var s=e.read_shift(1);return s===0?(e.l++,""):e.read_shift(s,n.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function Nye(e){var t=e.read_shift(1);e.l++;var n=e.read_shift(2);return e.l+=2,[t,n]}function Rye(e){var t=e.read_shift(4),n=e.l,s=!1;t>24&&(e.l+=t-24,e.read_shift(16)==="795881f43b1d7f48af2c825dc4852763"&&(s=!0),e.l=n);var i=e.read_shift((s?t-24:t)>>1,"utf16le").replace(Xs,"");return s&&(e.l+=24),i}function Dye(e){for(var t=e.read_shift(2),n="";t-- >0;)n+="../";var s=e.read_shift(0,"lpstr-ansi");if(e.l+=2,e.read_shift(2)!=57005)throw new Error("Bad FileMoniker");var i=e.read_shift(4);if(i===0)return n+s.replace(/\\/g,"/");var a=e.read_shift(4);if(e.read_shift(2)!=3)throw new Error("Bad FileMoniker");var o=e.read_shift(a>>1,"utf16le").replace(Xs,"");return n+o}function Iye(e,t){var n=e.read_shift(16);switch(n){case"e0c9ea79f9bace118c8200aa004ba90b":return Rye(e);case"0303000000000000c000000000000046":return Dye(e);default:throw new Error("Unsupported Moniker "+n)}}function qg(e){var t=e.read_shift(4),n=t>0?e.read_shift(t,"utf16le").replace(Xs,""):"";return n}function Pye(e,t){var n=e.l+t,s=e.read_shift(4);if(s!==2)throw new Error("Unrecognized streamVersion: "+s);var i=e.read_shift(2);e.l+=2;var a,o,l,c,d="",u,p;i&16&&(a=qg(e,n-e.l)),i&128&&(o=qg(e,n-e.l)),(i&257)===257&&(l=qg(e,n-e.l)),(i&257)===1&&(c=Iye(e,n-e.l)),i&8&&(d=qg(e,n-e.l)),i&32&&(u=e.read_shift(16)),i&64&&(p=F_(e)),e.l=n;var m=o||l||c||"";m&&d&&(m+="#"+d),m||(m="#"+d),i&2&&m.charAt(0)=="/"&&m.charAt(1)!="/"&&(m="file://"+m);var x={Target:m};return u&&(x.guid=u),p&&(x.time=p),a&&(x.Tooltip=a),x}function L9(e){var t=e.read_shift(1),n=e.read_shift(1),s=e.read_shift(1),i=e.read_shift(1);return[t,n,s,i]}function z9(e,t){var n=L9(e);return n[3]=0,n}function Oo(e){var t=e.read_shift(2),n=e.read_shift(2),s=e.read_shift(2);return{r:t,c:n,ixfe:s}}function Bye(e){var t=e.read_shift(2),n=e.read_shift(2);return e.l+=8,{type:t,flags:n}}function Oye(e,t,n){return t===0?"":au(e,t,n)}function Mye(e,t,n){var s=n.biff>8?4:2,i=e.read_shift(s),a=e.read_shift(s,"i"),o=e.read_shift(s,"i");return[i,a,o]}function W9(e){var t=e.read_shift(2),n=C_(e);return[t,n]}function Lye(e,t,n){e.l+=4,t-=4;var s=e.l+t,i=r0(e,t,n),a=e.read_shift(2);if(s-=e.l,a!==s)throw new Error("Malformed AddinUdf: padding = "+s+" != "+a);return e.l+=a,i}function A1(e){var t=e.read_shift(2),n=e.read_shift(2),s=e.read_shift(2),i=e.read_shift(2);return{s:{c:s,r:t},e:{c:i,r:n}}}function $9(e){var t=e.read_shift(2),n=e.read_shift(2),s=e.read_shift(1),i=e.read_shift(1);return{s:{c:s,r:t},e:{c:i,r:n}}}var zye=$9;function U9(e){e.l+=4;var t=e.read_shift(2),n=e.read_shift(2),s=e.read_shift(2);return e.l+=12,[n,t,s]}function Wye(e){var t={};return e.l+=4,e.l+=16,t.fSharedNote=e.read_shift(2),e.l+=4,t}function $ye(e){var t={};return e.l+=4,e.cf=e.read_shift(2),t}function ks(e){e.l+=2,e.l+=e.read_shift(2)}var Uye={0:ks,4:ks,5:ks,6:ks,7:$ye,8:ks,9:ks,10:ks,11:ks,12:ks,13:Wye,14:ks,15:ks,16:ks,17:ks,18:ks,19:ks,20:ks,21:U9};function Vye(e,t){for(var n=e.l+t,s=[];e.l<n;){var i=e.read_shift(2);e.l-=2;try{s.push(Uye[i](e,n-e.l))}catch{return e.l=n,s}}return e.l!=n&&(e.l=n),s}function Gg(e,t){var n={BIFFVer:0,dt:0};switch(n.BIFFVer=e.read_shift(2),t-=2,t>=2&&(n.dt=e.read_shift(2),e.l-=2),n.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(t>6)throw new Error("Unexpected BIFF Ver "+n.BIFFVer)}return e.read_shift(t),n}function Hye(e,t){return t===0||e.read_shift(2),1200}function qye(e,t,n){if(n.enc)return e.l+=t,"";var s=e.l,i=au(e,0,n);return e.read_shift(t+s-e.l),i}function Gye(e,t,n){var s=n&&n.biff==8||t==2?e.read_shift(2):(e.l+=t,0);return{fDialog:s&16,fBelow:s&64,fRight:s&128}}function Kye(e,t,n){var s=e.read_shift(4),i=e.read_shift(1)&3,a=e.read_shift(1);switch(a){case 0:a="Worksheet";break;case 1:a="Macrosheet";break;case 2:a="Chartsheet";break;case 6:a="VBAModule";break}var o=r0(e,0,n);return o.length===0&&(o="Sheet1"),{pos:s,hs:i,dt:a,name:o}}function Yye(e,t){for(var n=e.l+t,s=e.read_shift(4),i=e.read_shift(4),a=[],o=0;o!=i&&e.l<n;++o)a.push(Tye(e));return a.Count=s,a.Unique=i,a}function Xye(e,t){var n={};return n.dsst=e.read_shift(2),e.l+=t-2,n}function Jye(e){var t={};t.r=e.read_shift(2),t.c=e.read_shift(2),t.cnt=e.read_shift(2)-t.c;var n=e.read_shift(2);e.l+=4;var s=e.read_shift(1);return e.l+=3,s&7&&(t.level=s&7),s&32&&(t.hidden=!0),s&64&&(t.hpt=n/20),t}function Qye(e){var t=Bye(e);if(t.type!=2211)throw new Error("Invalid Future Record "+t.type);var n=e.read_shift(4);return n!==0}function Zye(e){return e.read_shift(2),e.read_shift(4)}function A6(e,t,n){var s=0;n&&n.biff==2||(s=e.read_shift(2));var i=e.read_shift(2);n&&n.biff==2&&(s=1-(i>>15),i&=32767);var a={Unsynced:s&1,DyZero:(s&2)>>1,ExAsc:(s&4)>>2,ExDsc:(s&8)>>3};return[a,i]}function e1e(e){var t=e.read_shift(2),n=e.read_shift(2),s=e.read_shift(2),i=e.read_shift(2),a=e.read_shift(2),o=e.read_shift(2),l=e.read_shift(2),c=e.read_shift(2),d=e.read_shift(2);return{Pos:[t,n],Dim:[s,i],Flags:a,CurTab:o,FirstTab:l,Selected:c,TabRatio:d}}function t1e(e,t,n){if(n&&n.biff>=2&&n.biff<5)return{};var s=e.read_shift(2);return{RTL:s&64}}function n1e(){}function r1e(e,t,n){var s={dyHeight:e.read_shift(2),fl:e.read_shift(2)};switch(n&&n.biff||8){case 2:break;case 3:case 4:e.l+=2;break;default:e.l+=10;break}return s.name=r0(e,0,n),s}function s1e(e){var t=Oo(e);return t.isst=e.read_shift(4),t}function i1e(e,t,n){n.biffguess&&n.biff==2&&(n.biff=5);var s=e.l+t,i=Oo(e);n.biff==2&&e.l++;var a=s0(e,s-e.l,n);return i.val=a,i}function a1e(e,t,n){var s=e.read_shift(2),i=au(e,0,n);return[s,i]}var o1e=au;function T6(e,t,n){var s=e.l+t,i=n.biff==8||!n.biff?4:2,a=e.read_shift(i),o=e.read_shift(i),l=e.read_shift(2),c=e.read_shift(2);return e.l=s,{s:{r:a,c:l},e:{r:o,c}}}function l1e(e){var t=e.read_shift(2),n=e.read_shift(2),s=W9(e);return{r:t,c:n,ixfe:s[0],rknum:s[1]}}function c1e(e,t){for(var n=e.l+t-2,s=e.read_shift(2),i=e.read_shift(2),a=[];e.l<n;)a.push(W9(e));if(e.l!==n)throw new Error("MulRK read error");var o=e.read_shift(2);if(a.length!=o-i+1)throw new Error("MulRK length mismatch");return{r:s,c:i,C:o,rkrec:a}}function d1e(e,t){for(var n=e.l+t-2,s=e.read_shift(2),i=e.read_shift(2),a=[];e.l<n;)a.push(e.read_shift(2));if(e.l!==n)throw new Error("MulBlank read error");var o=e.read_shift(2);if(a.length!=o-i+1)throw new Error("MulBlank length mismatch");return{r:s,c:i,C:o,ixfe:a}}function u1e(e,t,n,s){var i={},a=e.read_shift(4),o=e.read_shift(4),l=e.read_shift(4),c=e.read_shift(2);return i.patternType=lye[l>>26],s.cellStyles&&(i.alc=a&7,i.fWrap=a>>3&1,i.alcV=a>>4&7,i.fJustLast=a>>7&1,i.trot=a>>8&255,i.cIndent=a>>16&15,i.fShrinkToFit=a>>20&1,i.iReadOrder=a>>22&2,i.fAtrNum=a>>26&1,i.fAtrFnt=a>>27&1,i.fAtrAlc=a>>28&1,i.fAtrBdr=a>>29&1,i.fAtrPat=a>>30&1,i.fAtrProt=a>>31&1,i.dgLeft=o&15,i.dgRight=o>>4&15,i.dgTop=o>>8&15,i.dgBottom=o>>12&15,i.icvLeft=o>>16&127,i.icvRight=o>>23&127,i.grbitDiag=o>>30&3,i.icvTop=l&127,i.icvBottom=l>>7&127,i.icvDiag=l>>14&127,i.dgDiag=l>>21&15,i.icvFore=c&127,i.icvBack=c>>7&127,i.fsxButton=c>>14&1),i}function f1e(e,t,n){var s={};return s.ifnt=e.read_shift(2),s.numFmtId=e.read_shift(2),s.flags=e.read_shift(2),s.fStyle=s.flags>>2&1,t-=6,s.data=u1e(e,t,s.fStyle,n),s}function p1e(e){e.l+=4;var t=[e.read_shift(2),e.read_shift(2)];if(t[0]!==0&&t[0]--,t[1]!==0&&t[1]--,t[0]>7||t[1]>7)throw new Error("Bad Gutters: "+t.join("|"));return t}function N6(e,t,n){var s=Oo(e);(n.biff==2||t==9)&&++e.l;var i=Aye(e);return s.val=i,s.t=i===!0||i===!1?"b":"e",s}function h1e(e,t,n){n.biffguess&&n.biff==2&&(n.biff=5);var s=Oo(e),i=As(e);return s.val=i,s}var R6=Oye;function m1e(e,t,n){var s=e.l+t,i=e.read_shift(2),a=e.read_shift(2);if(n.sbcch=a,a==1025||a==14849)return[a,i];if(a<1||a>255)throw new Error("Unexpected SupBook type: "+a);for(var o=Xd(e,a),l=[];s>e.l;)l.push(s0(e));return[a,i,o,l]}function D6(e,t,n){var s=e.read_shift(2),i,a={fBuiltIn:s&1,fWantAdvise:s>>>1&1,fWantPict:s>>>2&1,fOle:s>>>3&1,fOleLink:s>>>4&1,cf:s>>>5&1023,fIcon:s>>>15&1};return n.sbcch===14849&&(i=Lye(e,t-2,n)),a.body=i||e.read_shift(t-2),typeof i=="string"&&(a.Name=i),a}var g1e=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];function I6(e,t,n){var s=e.l+t,i=e.read_shift(2),a=e.read_shift(1),o=e.read_shift(1),l=e.read_shift(n&&n.biff==2?1:2),c=0;(!n||n.biff>=5)&&(n.biff!=5&&(e.l+=2),c=e.read_shift(2),n.biff==5&&(e.l+=2),e.l+=4);var d=Xd(e,o,n);i&32&&(d=g1e[d.charCodeAt(0)]);var u=s-e.l;n&&n.biff==2&&--u;var p=s==e.l||l===0||!(u>0)?[]:J2e(e,u,n,l);return{chKey:a,Name:d,itab:c,rgce:p}}function V9(e,t,n){if(n.biff<8)return x1e(e,t,n);for(var s=[],i=e.l+t,a=e.read_shift(n.biff>8?4:2);a--!==0;)s.push(Mye(e,n.biff>8?12:6,n));if(e.l!=i)throw new Error("Bad ExternSheet: "+e.l+" != "+i);return s}function x1e(e,t,n){e[e.l+1]==3&&e[e.l]++;var s=r0(e,t,n);return s.charCodeAt(0)==3?s.slice(1):s}function y1e(e,t,n){if(n.biff<8){e.l+=t;return}var s=e.read_shift(2),i=e.read_shift(2),a=Xd(e,s,n),o=Xd(e,i,n);return[a,o]}function v1e(e,t,n){var s=$9(e);e.l++;var i=e.read_shift(1);return t-=8,[Q2e(e,t,n),i,s]}function P6(e,t,n){var s=zye(e);switch(n.biff){case 2:e.l++,t-=7;break;case 3:case 4:e.l+=2,t-=8;break;default:e.l+=6,t-=12}return[s,Y2e(e,t,n)]}function b1e(e){var t=e.read_shift(4)!==0,n=e.read_shift(4)!==0,s=e.read_shift(4);return[t,n,s]}function w1e(e,t,n){if(!(n.biff<8)){var s=e.read_shift(2),i=e.read_shift(2),a=e.read_shift(2),o=e.read_shift(2),l=au(e,0,n);return n.biff<8&&e.read_shift(1),[{r:s,c:i},l,o,a]}}function j1e(e,t,n){return w1e(e,t,n)}function S1e(e,t){for(var n=[],s=e.read_shift(2);s--;)n.push(A1(e));return n}function k1e(e,t,n){if(n&&n.biff<8)return C1e(e,t,n);var s=U9(e),i=Vye(e,t-22,s[1]);return{cmo:s,ft:i}}var _1e={8:function(e,t){var n=e.l+t;e.l+=10;var s=e.read_shift(2);e.l+=4,e.l+=2,e.l+=2,e.l+=2,e.l+=4;var i=e.read_shift(1);return e.l+=i,e.l=n,{fmt:s}}};function C1e(e,t,n){e.l+=4;var s=e.read_shift(2),i=e.read_shift(2),a=e.read_shift(2);e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=6,t-=36;var o=[];return o.push((_1e[s]||Ps)(e,t,n)),{cmo:[i,s,a],ft:o}}function E1e(e,t,n){var s=e.l,i="";try{e.l+=4;var a=(n.lastobj||{cmo:[0,0]}).cmo[1],o;[0,5,7,11,12,14].indexOf(a)==-1?e.l+=6:o=Nye(e,6,n);var l=e.read_shift(2);e.read_shift(2),Fr(e,2);var c=e.read_shift(2);e.l+=c;for(var d=1;d<e.lens.length-1;++d){if(e.l-s!=e.lens[d])throw new Error("TxO: bad continue record");var u=e[e.l],p=Xd(e,e.lens[d+1]-e.lens[d]-1);if(i+=p,i.length>=(u?l:2*l))break}if(i.length!==l&&i.length!==l*2)throw new Error("cchText: "+l+" != "+i.length);return e.l=s+t,{t:i}}catch{return e.l=s+t,{t:i}}}function F1e(e,t){var n=A1(e);e.l+=16;var s=Pye(e,t-24);return[n,s]}function A1e(e,t){e.read_shift(2);var n=A1(e),s=e.read_shift((t-10)/2,"dbcs-cont");return s=s.replace(Xs,""),[n,s]}function T1e(e){var t=[0,0],n;return n=e.read_shift(2),t[0]=k6[n]||n,n=e.read_shift(2),t[1]=k6[n]||n,t}function N1e(e){for(var t=e.read_shift(2),n=[];t-- >0;)n.push(z9(e));return n}function R1e(e){for(var t=e.read_shift(2),n=[];t-- >0;)n.push(z9(e));return n}function D1e(e){e.l+=2;var t={cxfs:0,crc:0};return t.cxfs=e.read_shift(2),t.crc=e.read_shift(4),t}function H9(e,t,n){if(!n.cellStyles)return Ps(e,t);var s=n&&n.biff>=12?4:2,i=e.read_shift(s),a=e.read_shift(s),o=e.read_shift(s),l=e.read_shift(s),c=e.read_shift(2);s==2&&(e.l+=2);var d={s:i,e:a,w:o,ixfe:l,flags:c};return(n.biff>=5||!n.biff)&&(d.level=c>>8&7),d}function I1e(e,t){var n={};return t<32||(e.l+=16,n.header=As(e),n.footer=As(e),e.l+=2),n}function P1e(e,t,n){var s={area:!1};if(n.biff!=5)return e.l+=t,s;var i=e.read_shift(1);return e.l+=3,i&16&&(s.area=!0),s}var B1e=Oo,O1e=M9,M1e=s0;function L1e(e){var t=e.read_shift(2),n=e.read_shift(2),s=e.read_shift(4),i={fmt:t,env:n,len:s,data:e.slice(e.l,e.l+s)};return e.l+=s,i}
vendor: 4,776 bytes, line 878
878function z1e(e,t,n){n.biffguess&&n.biff==5&&(n.biff=2);var s=Oo(e);++e.l;var i=au(e,t-7,n);return s.t="str",s.val=i,s}function W1e(e){var t=Oo(e);++e.l;var n=As(e);return t.t="n",t.val=n,t}function $1e(e){var t=Oo(e);++e.l;var n=e.read_shift(2);return t.t="n",t.val=n,t}function U1e(e){var t=e.read_shift(1);return t===0?(e.l++,""):e.read_shift(t,"sbcs-cont")}function V1e(e,t){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=t-13}function H1e(e,t,n){var s=e.l+t,i=Oo(e),a=e.read_shift(2),o=Xd(e,a,n);return e.l=s,i.t="str",i.val=o,i}var q1e=[2,3,48,49,131,139,140,245],B6=(function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=x_({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function n(l,c){var d=[],u=Tc(1);switch(c.type){case"base64":u=Pa(zi(l));break;case"binary":u=Pa(l);break;case"buffer":case"array":u=l;break}cs(u,0);var p=u.read_shift(1),m=!!(p&136),x=!1,w=!1;switch(p){case 2:break;case 3:break;case 48:x=!0,m=!0;break;case 49:x=!0,m=!0;break;case 131:break;case 139:break;case 140:w=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+p.toString(16))}var y=0,v=521;p==2&&(y=u.read_shift(2)),u.l+=3,p!=2&&(y=u.read_shift(4)),y>1048576&&(y=1e6),p!=2&&(v=u.read_shift(2));var j=u.read_shift(2),k=c.codepage||1252;p!=2&&(u.l+=16,u.read_shift(1),u[u.l]!==0&&(k=e[u[u.l]]),u.l+=1,u.l+=2),w&&(u.l+=36);for(var S=[],_={},F=Math.min(u.length,p==2?521:v-10-(x?264:0)),A=w?32:11;u.l<F&&u[u.l]!=13;)switch(_={},_.name=km.utils.decode(k,u.slice(u.l,u.l+A)).replace(/[\u0000\r\n].*$/g,""),u.l+=A,_.type=String.fromCharCode(u.read_shift(1)),p!=2&&!w&&(_.offset=u.read_shift(4)),_.len=u.read_shift(1),p==2&&(_.offset=u.read_shift(2)),_.dec=u.read_shift(1),_.name.length&&S.push(_),p!=2&&(u.l+=w?13:14),_.type){case"B":(!x||_.len!=8)&&c.WTF&&console.log("Skipping "+_.name+":"+_.type);break;case"G":case"P":c.WTF&&console.log("Skipping "+_.name+":"+_.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+_.type)}if(u[u.l]!==13&&(u.l=v-1),u.read_shift(1)!==13)throw new Error("DBF Terminator not found "+u.l+" "+u[u.l]);u.l=v;var C=0,D=0;for(d[0]=[],D=0;D!=S.length;++D)d[0][D]=S[D].name;for(;y-- >0;){if(u[u.l]===42){u.l+=j;continue}for(++u.l,d[++C]=[],D=0,D=0;D!=S.length;++D){var P=u.slice(u.l,u.l+S[D].len);u.l+=S[D].len,cs(P,0);var L=km.utils.decode(k,P);switch(S[D].type){case"C":L.trim().length&&(d[C][D]=L.replace(/\s+$/,""));break;case"D":L.length===8?d[C][D]=new Date(+L.slice(0,4),+L.slice(4,6)-1,+L.slice(6,8)):d[C][D]=L;break;case"F":d[C][D]=parseFloat(L.trim());break;case"+":case"I":d[C][D]=w?P.read_shift(-4,"i")^2147483648:P.read_shift(4,"i");break;case"L":switch(L.trim().toUpperCase()){case"Y":case"T":d[C][D]=!0;break;case"N":case"F":d[C][D]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+L+"|")}break;case"M":if(!m)throw new Error("DBF Unexpected MEMO for type "+p.toString(16));d[C][D]="##MEMO##"+(w?parseInt(L.trim(),10):P.read_shift(4));break;case"N":L=L.replace(/\u0000/g,"").trim(),L&&L!="."&&(d[C][D]=+L||0);break;case"@":d[C][D]=new Date(P.read_shift(-8,"f")-621356832e5);break;case"T":d[C][D]=new Date((P.read_shift(4)-2440588)*864e5+P.read_shift(4));break;case"Y":d[C][D]=P.read_shift(4,"i")/1e4+P.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":d[C][D]=-P.read_shift(-8,"f");break;case"B":if(x&&S[D].len==8){d[C][D]=P.read_shift(8,"f");break}case"G":case"P":P.l+=S[D].len;break;case"0":if(S[D].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+S[D].type)}}}if(p!=2&&u.l<u.length&&u[u.l++]!=26)throw new Error("DBF EOF Marker missing "+(u.l-1)+" of "+u.length+" "+u[u.l-1].toString(16));return c&&c.sheetRows&&(d=d.slice(0,c.sheetRows)),c.DBF=S,d}function s(l,c){var d=c||{};d.dateNF||(d.dateNF="yyyymmdd");var u=cp(n(l,d),d);return u["!cols"]=d.DBF.map(function(p){return{wch:p.len,DBF:p}}),delete d.DBF,u}function i(l,c){try{return Wc(s(l,c),c)}catch(d){if(c&&c.WTF)throw d}return{SheetNames:[],Sheets:{}}}var a={B:8,C:250,L:1,D:8,"?":0,"":0};function o(l,c){var d=c||{};if(+d.codepage>
vendor: 3,964 bytes, line 878
878=0&&Oa(+d.codepage),d.type=="string")throw new Error("Cannot write DBF to JS string");var u=Ij(),p=Vj(l,{header:1,raw:!0,cellDates:!0}),m=p[0],x=p.slice(1),w=l["!cols"]||[],y=0,v=0,j=0,k=1;for(y=0;y<m.length;++y){if(((w[y]||{}).DBF||{}).name){m[y]=w[y].DBF.name,++j;continue}if(m[y]!=null){if(++j,typeof m[y]=="number"&&(m[y]=m[y].toString(10)),typeof m[y]!="string")throw new Error("DBF Invalid column name "+m[y]+" |"+typeof m[y]+"|");if(m.indexOf(m[y])!==y){for(v=0;v<1024;++v)if(m.indexOf(m[y]+"_"+v)==-1){m[y]+="_"+v;break}}}}var S=gr(l["!ref"]),_=[],F=[],A=[];for(y=0;y<=S.e.c-S.s.c;++y){var C="",D="",P=0,L=[];for(v=0;v<x.length;++v)x[v][y]!=null&&L.push(x[v][y]);if(L.length==0||m[y]==null){_[y]="?";continue}for(v=0;v<L.length;++v){switch(typeof L[v]){case"number":D="B";break;case"string":D="C";break;case"boolean":D="L";break;case"object":D=L[v]instanceof Date?"D":"C";break;default:D="C"}P=Math.max(P,String(L[v]).length),C=C&&C!=D?"C":D}P>250&&(P=250),D=((w[y]||{}).DBF||{}).type,D=="C"&&w[y].DBF.len>P&&(P=w[y].DBF.len),C=="B"&&D=="N"&&(C="N",A[y]=w[y].DBF.dec,P=w[y].DBF.len),F[y]=C=="C"||D=="N"?P:a[C]||0,k+=F[y],_[y]=C}var T=u.next(32);for(T.write_shift(4,318902576),T.write_shift(4,x.length),T.write_shift(2,296+32*j),T.write_shift(2,k),y=0;y<4;++y)T.write_shift(4,0);for(T.write_shift(4,0|(+t[VM]||3)<<8),y=0,v=0;y<m.length;++y)if(m[y]!=null){var R=u.next(32),U=(m[y].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);R.write_shift(1,U,"sbcs"),R.write_shift(1,_[y]=="?"?"C":_[y],"sbcs"),R.write_shift(4,v),R.write_shift(1,F[y]||a[_[y]]||0),R.write_shift(1,A[y]||0),R.write_shift(1,2),R.write_shift(4,0),R.write_shift(1,0),R.write_shift(4,0),R.write_shift(4,0),v+=F[y]||a[_[y]]||0}var I=u.next(264);for(I.write_shift(4,13),y=0;y<65;++y)I.write_shift(4,0);for(y=0;y<x.length;++y){var H=u.next(k);for(H.write_shift(1,0),v=0;v<m.length;++v)if(m[v]!=null)switch(_[v]){case"L":H.write_shift(1,x[y][v]==null?63:x[y][v]?84:70);break;case"B":H.write_shift(8,x[y][v]||0,"f");break;case"N":var V="0";for(typeof x[y][v]=="number"&&(V=x[y][v].toFixed(A[v]||0)),j=0;j<F[v]-V.length;++j)H.write_shift(1,32);H.write_shift(1,V,"sbcs");break;case"D":x[y][v]?(H.write_shift(4,("0000"+x[y][v].getFullYear()).slice(-4),"sbcs"),H.write_shift(2,("00"+(x[y][v].getMonth()+1)).slice(-2),"sbcs"),H.write_shift(2,("00"+x[y][v].getDate()).slice(-2),"sbcs")):H.write_shift(8,"00000000","sbcs");break;case"C":var X=String(x[y][v]!=null?x[y][v]:"").slice(0,F[v]);for(H.write_shift(1,X,"sbcs"),j=0;j<F[v]-X.length;++j)H.write_shift(1,32);break}}return u.next(1).write_shift(1,26),u.end()}return{to_workbook:i,to_sheet:s,from_sheet:o}})(),G1e=(function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1BN("+Ao(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),n=function(m,x){var w=e[x];return typeof w=="number"?QT(w):w},s=function(m,x,w){var y=x.charCodeAt(0)-32<<4|w.charCodeAt(0)-48;return y==59?m:QT(y)};e["|"]=254;function i(m,x){switch(x.type){case"base64":return a(zi(m),x);case"binary":return a(m,x);case"buffer":return a(bn&&Buffer.isBuffer(m)?m.toString("binary"):nu(m),x);case"array":return a(Yd(m),x)}throw new Error("Unrecognized type "+x.type)}function a(m,x){var w=m.split(/[\n\r]+/),y=-1,v=-1,j=0,k=0,S=[],_=[],F=null,A={},C=[],D=[],P=[],L=0,T;for(+x.codepage>=0&&Oa(+x.codepage);j!==w.length;++j){L=0;
vendor: 5,697 bytes, lines 878-882
878var R=w[j].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,s).replace(t,n),U=R.replace(/;;/g,"\0").split(";").map(function(Y){return Y.replace(/\u0000/g,";")}),I=U[0],H;if(R.length>0)switch(I){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":U[1].charAt(0)=="P"&&_.push(R.slice(3).replace(/;;/g,";"));break;case"C":var V=!1,X=!1,N=!1,W=!1,O=-1,G=-1;for(k=1;k<U.length;++k)switch(U[k].charAt(0)){case"A":break;case"X":v=parseInt(U[k].slice(1))-1,X=!0;break;case"Y":for(y=parseInt(U[k].slice(1))-1,X||(v=0),T=S.length;T<=y;++T)S[T]=[];break;case"K":H=U[k].slice(1),H.charAt(0)==='"'?H=H.slice(1,H.length-1):H==="TRUE"?H=!0:H==="FALSE"?H=!1:isNaN(La(H))?isNaN(Vf(H).getDate())||(H=es(H)):(H=La(H),F!==null&&op(F)&&(H=F1(H))),V=!0;break;case"E":W=!0;var M=vf(U[k].slice(1),{r:y,c:v});S[y][v]=[S[y][v],M];break;case"S":N=!0,S[y][v]=[S[y][v],"S5S"];break;case"G":break;case"R":O=parseInt(U[k].slice(1))-1;break;case"C":G=parseInt(U[k].slice(1))-1;break;default:if(x&&x.WTF)throw new Error("SYLK bad record "+R)}if(V&&(S[y][v]&&S[y][v].length==2?S[y][v][0]=H:S[y][v]=H,F=null),N){if(W)throw new Error("SYLK shared formula cannot have own formula");var z=O>-1&&S[O][G];if(!z||!z[1])throw new Error("SYLK shared formula cannot find base");S[y][v][1]=t7(z[1],{r:y-O,c:v-G})}break;case"F":var K=0;for(k=1;k<U.length;++k)switch(U[k].charAt(0)){case"X":v=parseInt(U[k].slice(1))-1,++K;break;case"Y":for(y=parseInt(U[k].slice(1))-1,T=S.length;T<=y;++T)S[T]=[];break;case"M":L=parseInt(U[k].slice(1))/20;break;case"F":break;case"G":break;case"P":F=_[parseInt(U[k].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(P=U[k].slice(1).split(" "),T=parseInt(P[0],10);T<=parseInt(P[1],10);++T)L=parseInt(P[2],10),D[T-1]=L===0?{hidden:!0}:{wch:L},Hf(D[T-1]);break;case"C":v=parseInt(U[k].slice(1))-1,D[v]||(D[v]={});break;case"R":y=parseInt(U[k].slice(1))-1,C[y]||(C[y]={}),L>0?(C[y].hpt=L,C[y].hpx=Tm(L)):L===0&&(C[y].hidden=!0);break;default:if(x&&x.WTF)throw new Error("SYLK bad record "+R)}K<1&&(F=null);break;default:if(x&&x.WTF)throw new Error("SYLK bad record "+R)}}return C.length>0&&(A["!rows"]=C),D.length>0&&(A["!cols"]=D),x&&x.sheetRows&&(S=S.slice(0,x.sheetRows)),[S,A]}function o(m,x){var w=i(m,x),y=w[0],v=w[1],j=cp(y,x);return Ao(v).forEach(function(k){j[k]=v[k]}),j}function l(m,x){return Wc(o(m,x),x)}function c(m,x,w,y){var v="C;Y"+(w+1)+";X"+(y+1)+";K";switch(m.t){case"n":v+=m.v||0,m.f&&!m.F&&(v+=";E"+Dbe(m.f,{r:w,c:y}));break;case"b":v+=m.v?"TRUE":"FALSE";break;case"e":v+=m.w||m.v;break;case"d":v+='"'+(m.w||m.v)+'"';break;case"s":v+='"'+m.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return v}function d(m,x){x.forEach(function(w,y){var v="F;W"+(y+1)+" "+(y+1)+" ";w.hidden?v+="0":(typeof w.width=="number"&&!w.wpx&&(w.wpx=Ey(w.width)),typeof w.wpx=="number"&&!w.wch&&(w.wch=Fy(w.wpx)),typeof w.wch=="number"&&(v+=Math.round(w.wch))),v.charAt(v.length-1)!=" "&&m.push(v)})}function u(m,x){x.forEach(function(w,y){var v="F;";w.hidden?v+="M0;":w.hpt?v+="M"+20*w.hpt+";":w.hpx&&(v+="M"+20*Q9(w.hpx)+";"),v.length>2&&m.push(v+"R"+(y+1))})}function p(m,x){var w=["ID;PWXL;N;E"],y=[],v=gr(m["!ref"]),j,k=Array.isArray(m),S=`\r
879`;w.push("P;PGeneral"),w.push("F;P0;DG0G8;M255"),m["!cols"]&&d(w,m["!cols"]),m["!rows"]&&u(w,m["!rows"]),w.push("B;Y"+(v.e.r-v.s.r+1)+";X"+(v.e.c-v.s.c+1)+";D"+[v.s.c,v.s.r,v.e.c,v.e.r].join(" "));for(var _=v.s.r;_<=v.e.r;++_)for(var F=v.s.c;F<=v.e.c;++F){var A=an({r:_,c:F});j=k?(m[_]||[])[F]:m[A],!(!j||j.v==null&&(!j.f||j.F))&&y.push(c(j,m,_,F))}return w.join(S)+S+y.join(S)+S+"E"+S}return{to_workbook:l,to_sheet:o,from_sheet:p}})(),K1e=(function(){function e(a,o){switch(o.type){case"base64":return t(zi(a),o);case"binary":return t(a,o);case"buffer":return t(bn&&Buffer.isBuffer(a)?a.toString("binary"):nu(a),o);case"array":return t(Yd(a),o)}throw new Error("Unrecognized type "+o.type)}function t(a,o){for(var l=a.split(`
880`),c=-1,d=-1,u=0,p=[];u!==l.length;++u){if(l[u].trim()==="BOT"){p[++c]=[],d=0;continue}if(!(c<0)){var m=l[u].trim().split(","),x=m[0],w=m[1];++u;for(var y=l[u]||"";(y.match(/["]/g)||[]).length&1&&u<l.length-1;)y+=`
881`+l[++u];switch(y=y.trim(),+x){case-1:if(y==="BOT"){p[++c]=[],d=0;continue}else if(y!=="EOD")throw new Error("Unrecognized DIF special command "+y);break;case 0:y==="TRUE"?p[c][d]=!0:y==="FALSE"?p[c][d]=!1:isNaN(La(w))?isNaN(Vf(w).getDate())?p[c][d]=w:p[c][d]=es(w):p[c][d]=La(w),++d;break;case 1:y=y.slice(1,y.length-1),y=y.replace(/""/g,'"'),y&&y.match(/^=".*"$/)&&(y=y.slice(2,-1)),p[c][d++]=y!==""?y:null;break}if(y==="EOD")break}}return o&&o.sheetRows&&(p=p.slice(0,o.sheetRows)),p}function n(a,o){return cp(e(a,o),o)}function s(a,o){return Wc(n(a,o),o)}var i=(function(){var a=function(c,d,u,p,m){c.push(d),c.push(u+","+p),c.push('"'+m.replace(/"/g,'""')+'"')},o=function(c,d,u,p){c.push(d+","+u),c.push(d==1?'"'+p.replace(/"/g,'""')+'"':p)};return function(c){var d=[],u=gr(c["!ref"]),p,m=Array.isArray(c);a(d,"TABLE",0,1,"sheetjs"),a(d,"VECTORS",0,u.e.r-u.s.r+1,""),a(d,"TUPLES",0,u.e.c-u.s.c+1,""),a(d,"DATA",0,0,"");for(var x=u.s.r;x<=u.e.r;++x){o(d,-1,0,"BOT");for(var w=u.s.c;w<=u.e.c;++w){var y=an({r:x,c:w});if(p=m?(c[x]||[])[w]:c[y],!p){o(d,1,0,"");continue}switch(p.t){case"n":var v=p.w;!v&&p.v!=null&&(v=p.v),v==null?p.f&&!p.F?o(d,1,0,"="+p.f):o(d,1,0,""):o(d,0,v,"V");break;case"b":o(d,0,p.v?1:0,p.v?"TRUE":"FALSE");break;case"s":o(d,1,0,isNaN(p.v)?p.v:'="'+p.v+'"');break;case"d":p.w||(p.w=ha(p.z||cn[14],Qs(es(p.v)))),o(d,0,p.w,"V");break;default:o(d,1,0,"")}}}o(d,-1,0,"EOD");var j=`\r
882`,k=d.join(j);return k}})();return{to_workbook:s,to_sheet:n,from_sheet:i}})(),Y1e=(function(){function e(p){return p.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n
vendor: 11,020 bytes, lines 882-892
882/g,`
883`)}function t(p){return p.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function n(p,m){for(var x=p.split(`
884`),w=-1,y=-1,v=0,j=[];v!==x.length;++v){var k=x[v].trim().split(":");if(k[0]==="cell"){var S=Ys(k[1]);if(j.length<=S.r)for(w=j.length;w<=S.r;++w)j[w]||(j[w]=[]);switch(w=S.r,y=S.c,k[2]){case"t":j[w][y]=e(k[3]);break;case"v":j[w][y]=+k[3];break;case"vtf":var _=k[k.length-1];case"vtc":switch(k[3]){case"nl":j[w][y]=!!+k[4];break;default:j[w][y]=+k[4];break}k[2]=="vtf"&&(j[w][y]=[j[w][y],_])}}}return m&&m.sheetRows&&(j=j.slice(0,m.sheetRows)),j}function s(p,m){return cp(n(p,m),m)}function i(p,m){return Wc(s(p,m),m)}var a=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
885`),o=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
886`)+`
887`,l=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
888`),c="--SocialCalcSpreadsheetControlSave--";function d(p){if(!p||!p["!ref"])return"";for(var m=[],x=[],w,y="",v=lp(p["!ref"]),j=Array.isArray(p),k=v.s.r;k<=v.e.r;++k)for(var S=v.s.c;S<=v.e.c;++S)if(y=an({r:k,c:S}),w=j?(p[k]||[])[S]:p[y],!(!w||w.v==null||w.t==="z")){switch(x=["cell",y,"t"],w.t){case"s":case"str":x.push(t(w.v));break;case"n":w.f?(x[2]="vtf",x[3]="n",x[4]=w.v,x[5]=t(w.f)):(x[2]="v",x[3]=w.v);break;case"b":x[2]="vt"+(w.f?"f":"c"),x[3]="nl",x[4]=w.v?"1":"0",x[5]=t(w.f||(w.v?"TRUE":"FALSE"));break;case"d":var _=Qs(es(w.v));x[2]="vtc",x[3]="nd",x[4]=""+_,x[5]=w.w||ha(w.z||cn[14],_);break;case"e":continue}m.push(x.join(":"))}return m.push("sheet:c:"+(v.e.c-v.s.c+1)+":r:"+(v.e.r-v.s.r+1)+":tvf:1"),m.push("valueformat:1:text-wiki"),m.join(`
889`)}function u(p){return[a,o,l,o,d(p),c].join(`
890`)}return{to_workbook:i,to_sheet:s,from_sheet:u}})(),Fm=(function(){function e(u,p,m,x,w){w.raw?p[m][x]=u:u===""||(u==="TRUE"?p[m][x]=!0:u==="FALSE"?p[m][x]=!1:isNaN(La(u))?isNaN(Vf(u).getDate())?p[m][x]=u:p[m][x]=es(u):p[m][x]=La(u))}function t(u,p){var m=p||{},x=[];if(!u||u.length===0)return x;for(var w=u.split(/[\r\n]/),y=w.length-1;y>=0&&w[y].length===0;)--y;for(var v=10,j=0,k=0;k<=y;++k)j=w[k].indexOf(" "),j==-1?j=w[k].length:j++,v=Math.max(v,j);for(k=0;k<=y;++k){x[k]=[];var S=0;for(e(w[k].slice(0,v).trim(),x,k,S,m),S=1;S<=(w[k].length-v)/10+1;++S)e(w[k].slice(v+(S-1)*10,v+S*10).trim(),x,k,S,m)}return m.sheetRows&&(x=x.slice(0,m.sheetRows)),x}var n={44:",",9:"	",59:";",124:"|"},s={44:3,9:2,59:1,124:0};function i(u){for(var p={},m=!1,x=0,w=0;x<u.length;++x)(w=u.charCodeAt(x))==34?m=!m:!m&&w in n&&(p[w]=(p[w]||0)+1);w=[];for(x in p)Object.prototype.hasOwnProperty.call(p,x)&&w.push([p[x],x]);if(!w.length){p=s;for(x in p)Object.prototype.hasOwnProperty.call(p,x)&&w.push([p[x],x])}return w.sort(function(y,v){return y[0]-v[0]||s[y[1]]-s[v[1]]}),n[w.pop()[1]]||44}function a(u,p){var m=p||{},x="",w=m.dense?[]:{},y={s:{c:0,r:0},e:{c:0,r:0}};u.slice(0,4)=="sep="?u.charCodeAt(5)==13&&u.charCodeAt(6)==10?(x=u.charAt(4),u=u.slice(7)):u.charCodeAt(5)==13||u.charCodeAt(5)==10?(x=u.charAt(4),u=u.slice(6)):x=i(u.slice(0,1024)):m&&m.FS?x=m.FS:x=i(u.slice(0,1024));var v=0,j=0,k=0,S=0,_=0,F=x.charCodeAt(0),A=!1,C=0,D=u.charCodeAt(0);u=u.replace(/\r\n/mg,`
891`);var P=m.dateNF!=null?axe(m.dateNF):null;function L(){var T=u.slice(S,_),R={};if(T.charAt(0)=='"'&&T.charAt(T.length-1)=='"'&&(T=T.slice(1,-1).replace(/""/g,'"')),T.length===0)R.t="z";else if(m.raw)R.t="s",R.v=T;else if(T.trim().length===0)R.t="s",R.v=T;else if(T.charCodeAt(0)==61)T.charCodeAt(1)==34&&T.charCodeAt(T.length-1)==34?(R.t="s",R.v=T.slice(2,-1).replace(/""/g,'"')):Pbe(T)?(R.t="n",R.f=T.slice(1)):(R.t="s",R.v=T);else if(T=="TRUE")R.t="b",R.v=!0;else if(T=="FALSE")R.t="b",R.v=!1;else if(!isNaN(k=La(T)))R.t="n",m.cellText!==!1&&(R.w=T),R.v=k;else if(!isNaN(Vf(T).getDate())||P&&T.match(P)){R.z=m.dateNF||cn[14];var U=0;P&&T.match(P)&&(T=oxe(T,m.dateNF,T.match(P)||[]),U=1),m.cellDates?(R.t="d",R.v=es(T,U)):(R.t="n",R.v=Qs(es(T,U))),m.cellText!==!1&&(R.w=ha(R.z,R.v instanceof Date?Qs(R.v):R.v)),m.cellNF||delete R.z}else R.t="s",R.v=T;if(R.t=="z"||(m.dense?(w[v]||(w[v]=[]),w[v][j]=R):w[an({c:j,r:v})]=R),S=_+1,D=u.charCodeAt(S),y.e.c<j&&(y.e.c=j),y.e.r<v&&(y.e.r=v),C==F)++j;else if(j=0,++v,m.sheetRows&&m.sheetRows<=v)return!0}e:for(;_<u.length;++_)switch(C=u.charCodeAt(_)){case 34:D===34&&(A=!A);break;case F:case 10:case 13:if(!A&&L())break e;break}return _-S>0&&L(),w["!ref"]=Sn(y),w}function o(u,p){return!(p&&p.PRN)||p.FS||u.slice(0,4)=="sep="||u.indexOf("	")>=0||u.indexOf(",")>=0||u.indexOf(";")>=0?a(u,p):cp(t(u,p),p)}function l(u,p){var m="",x=p.type=="string"?[0,0,0,0]:B_(u,p);switch(p.type){case"base64":m=zi(u);break;case"binary":m=u;break;case"buffer":p.codepage==65001?m=u.toString("utf8"):p.codepage&&typeof km<"u"||(m=bn&&Buffer.isBuffer(u)?u.toString("binary"):nu(u));break;case"array":m=Yd(u);break;case"string":m=u;break;default:throw new Error("Unrecognized type "+p.type)}return x[0]==239&&x[1]==187&&x[2]==191?m=Jn(m.slice(3)):p.type!="string"&&p.type!="buffer"&&p.codepage==65001?m=Jn(m):p.type=="binary"&&typeof km<"u",m.slice(0,19)=="socialcalc:version:"?Y1e.to_sheet(p.type=="string"?m:Jn(m),p):o(m,p)}function c(u,p){return Wc(l(u,p),p)}function d(u){for(var p=[],m=gr(u["!ref"]),x,w=Array.isArray(u),y=m.s.r;y<=m.e.r;++y){for(var v=[],j=m.s.c;j<=m.e.c;++j){var k=an({r:y,c:j});if(x=w?(u[y]||[])[j]:u[k],!x||x.v==null){v.push("          ");continue}for(var S=(x.w||(Sl(x),x.w)||"").slice(0,10);S.length<10;)S+=" ";v.push(S+(j===0?" ":""))}p.push(v.join(""))}return p.join(`
892`)}return{to_workbook:c,to_sheet:l,from_sheet:d}})();function X1e(e,t){var n=t||{},s=!!n.WTF;n.WTF=!0;try{var i=G1e.to_workbook(e,n);return n.WTF=s,i}catch(a){if(n.WTF=s,!a.message.match(/SYLK bad record ID/)&&s)throw a;return Fm.to_workbook(e,t)}}var Xh=(function(){function e(M,z,K){if(M){cs(M,M.l||0);for(var Y=K.Enum||O;M.l<M.length;){var J=M.read_shift(2),Q=Y[J]||Y[65535],ie=M.read_shift(2),ae=M.l+ie,re=Q.f&&Q.f(M,ie,K);if(M.l=ae,z(re,Q,J))return}}}function t(M,z){switch(z.type){case"base64":return n(Pa(zi(M)),z);case"binary":return n(Pa(M),z);case"buffer":case"array":return n(M,z)}throw"Unsupported type "+z.type}function n(M,z){if(!M)return M;var K=z||{},Y=K.dense?[]:{},J="Sheet1",Q="",ie=0,ae={},re=[],pe=[],Z={s:{r:0,c:0},e:{r:0,c:0}},Ne=K.sheetRows||0;if(M[2]==0&&(M[3]==8||M[3]==9)&&M.length>=16&&M[14]==5&&M[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(M[2]==2)K.Enum=O,e(M,function(le,ge,$e){switch($e){case 0:K.vers=le,le>=4096&&(K.qpro=!0);break;case 6:Z=le;break;case 204:le&&(Q=le);break;case 222:Q=le;break;case 15:case 51:K.qpro||(le[1].v=le[1].v.slice(1));case 13:case 14:case 16:$e==14&&(le[2]&112)==112&&(le[2]&15)>1&&(le[2]&15)<15&&(le[1].z=K.dateNF||cn[14],K.cellDates&&(le[1].t="d",le[1].v=F1(le[1].v))),K.qpro&&le[3]>ie&&(Y["!ref"]=Sn(Z),ae[J]=Y,re.push(J),Y=K.dense?[]:{},Z={s:{r:0,c:0},e:{r:0,c:0}},ie=le[3],J=Q||"Sheet"+(ie+1),Q="");var ft=K.dense?(Y[le[0].r]||[])[le[0].c]:Y[an(le[0])];if(ft){ft.t=le[1].t,ft.v=le[1].v,le[1].z!=null&&(ft.z=le[1].z),le[1].f!=null&&(ft.f=le[1].f);break}K.dense?(Y[le[0].r]||(Y[le[0].r]=[]),Y[le[0].r][le[0].c]=le[1]):Y[an(le[0])]=le[1];break}},K);else if(M[2]==26||M[2]==14)K.Enum=G,M[2]==14&&(K.qpro=!0,M.l=0),e(M,function(le,ge,$e){switch($e){case 204:J=le;break;case 22:le[1].v=le[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(le[3]>ie&&(Y["!ref"]=Sn(Z),ae[J]=Y,re.push(J),Y=K.dense?[]:{},Z={s:{r:0,c:0},e:{r:0,c:0}},ie=le[3],J="Sheet"+(ie+1)),Ne>0&&le[0].r>=Ne)break;K.dense?(Y[le[0].r]||(Y[le[0].r]=[]),Y[le[0].r][le[0].c]=le[1]):Y[an(le[0])]=le[1],Z.e.c<le[0].c&&(Z.e.c=le[0].c),Z.e.r<le[0].r&&(Z.e.r=le[0].r);break;case 27:le[14e3]&&(pe[le[14e3][0]]=le[14e3][1]);break;case 1537:pe[le[0]]=le[1],le[0]==ie&&(J=le[1]);break}},K);else throw new Error("Unrecognized LOTUS BOF "+M[2]);if(Y["!ref"]=Sn(Z),ae[Q||J]=Y,re.push(Q||J),!pe.length)return{SheetNames:re,Sheets:ae};for(var te={},xe=[],he=0;he<pe.length;++he)ae[re[he]]?(xe.push(pe[he]||re[he]),te[pe[he]]=ae[pe[he]]||ae[re[he]]):(xe.push(pe[he]),te[pe[he]]={"!ref":"A1"});return{SheetNames:xe,Sheets:te}}function s(M,z){var K=z||{};if(+K.codepage>=0&&Oa(+K.codepage),K.type=="string")throw new Error("Cannot write WK1 to JS string");var Y=Ij(),J=gr(M["!ref"]),Q=Array.isArray(M),ie=[];Ca(Y,0,a(1030)),Ca(Y,6,c(J));for(var ae=Math.min(J.e.r,8191),re=J.s.r;re<=ae;++re)for(var pe=ps(re),Z=J.s.c;Z<=J.e.c;++Z){re===J.s.r&&(ie[Z]=zr(Z));var Ne=ie[Z]+pe,te=Q?(M[re]||[])[Z]:M[Ne];if(!(!te||te.t=="z"))if(te.t=="n")(te.v|0)==te.v&&te.v>=-32768&&te.v<=32767?Ca(Y,13,x(re,Z,te.v)):Ca(Y,14,y(re,Z,te.v));else{var xe=Sl(te);Ca(Y,15,p(re,Z,xe.slice(0,239)))}}return Ca(Y,1),Y.end()}function i(M,z){var K=z||{};if(+K.codepage>=0&&Oa(+K.codepage),K.type=="string")throw new Error("Cannot write WK3 to JS string");var Y=Ij();Ca(Y,0,o(M));for(var J=0,Q=0;J<M.SheetNames.length;++J)(M.Sheets[M.SheetNames[J]]||{})["!ref"]&&Ca(Y,27,W(M.SheetNames[J],Q++));var ie=0;for(J=0;J<M.SheetNames.length;++J){var ae=M.Sheets[M.SheetNames[J]];if(!(!ae||!ae["!ref"])){for(var re=gr(ae["!ref"]),pe=Array.isArray(ae),Z=[],Ne=Math.min(re.e.r,8191),te=re.s.r;te<=Ne;++te)for(var xe=ps(te),he=re.s.c;he<=re.e.c;++he){te===re.s.r&&(Z[he]=zr(he));var le=Z[he]+xe,ge=pe?(ae[te]||[])[he]:ae[le];if(!(!ge||ge.t=="z"))if(ge.t=="n")Ca(Y,23,L(te,he,ie,ge.v));else{var $e=Sl(ge);Ca(Y,22,C(te,he,ie,$e.slice(0,239)))}}++ie}}return Ca(Y,1),Y.end()}function a(M){var z=Mr(2);return z.write_shift(2,M),z}function o(M){var z=Mr(26);z.write_shift(2,4096),z.write_shift(2,4),z.write_shift(4,0);for(var K=0,Y=0,J=0,Q=0;Q<M.SheetNames.length;++Q){var ie=M.SheetNames[Q],ae=M.Sheets[ie];if(!(!ae||!ae["!ref"])){++J;var re=lp(ae["!ref"]);K<re.e.r&&(K=re.e.r),Y<re.e.c&&(Y=re.e.c)}}return K>8191&&(K=8191),z.write_shift(2,K),z.write_shift(1,J),z.write_shift(1,Y),z.write_shift(2,0),z.write_shift(2,0),z.write_shift(1,1),z.write_shift(1,2),z.write_shift(4,0),z.write_shift(4,0),z}function l(M,z,K){var Y={s:{c:0,r:0},e:{c:0,r:0}};return z==8&&K.qpro?(Y.s.c=M.read_shift(1),M.l++,Y.s.r=M.read_shift(2),Y.e.c=M.read_shift(1),M.l++,Y.e.r=M.read_shift(2),Y):(Y.s.c=M.read_shift(2),Y.s.r=M.read_shift(2),z==12&&K.qpro&&(M.l+=2),Y.e.c=M.read_shift(2),Y.e.r=M.read_shift(2),z==12&&K.qpro&&(M.l+=2),Y.s.c==65535&&(Y.s.c=Y.e.c=Y.s.r=Y.e.r=0),Y)}function c(M){var z=Mr(8);return z.write_shift(2,M.s.c),z.write_shift(2,M.s.r),z.write_shift(2,M.e.c),z.write_shift(2,M.e.r),z}function d(M,z,K){var Y=[{c:0,r:0},{t:"n",v:0},0,0];return K.qpro&&K.vers!=20768?(Y[0].c=M.read_shift(1),Y[3]=M.read_shift(1),Y[0].r=M.read_shift(2),M.l+=2):(Y[2]=M.read_shift(1),Y[0].c=M.read_shift(2),Y[0].r=M.read_shift(2)),Y}function u(M,z,K){var Y=M.l+z,J=d(M,z,K);if(J[1].t="s",K.vers==20768){M.l++;var Q=M.read_shift(1);return J[1].v=M.read_shift(Q,"utf8"),J}return K.qpro&&M.l++,J[1].v=M.read_shift(Y-M.l,"cstr"),J}function p(M,z,K){var Y=Mr(7+K.length);Y.write_shift(1,255),Y.write_shift(2,z),Y.write_shift(2,M),Y.write_shift(1,39);for(var J=0;J<Y.length;++J){var Q=K.charCodeAt(J);Y.write_shift(1,Q>
vendor: 4,763 bytes, line 892
892=128?95:Q)}return Y.write_shift(1,0),Y}function m(M,z,K){var Y=d(M,z,K);return Y[1].v=M.read_shift(2,"i"),Y}function x(M,z,K){var Y=Mr(7);return Y.write_shift(1,255),Y.write_shift(2,z),Y.write_shift(2,M),Y.write_shift(2,K,"i"),Y}function w(M,z,K){var Y=d(M,z,K);return Y[1].v=M.read_shift(8,"f"),Y}function y(M,z,K){var Y=Mr(13);return Y.write_shift(1,255),Y.write_shift(2,z),Y.write_shift(2,M),Y.write_shift(8,K,"f"),Y}function v(M,z,K){var Y=M.l+z,J=d(M,z,K);if(J[1].v=M.read_shift(8,"f"),K.qpro)M.l=Y;else{var Q=M.read_shift(2);_(M.slice(M.l,M.l+Q),J),M.l+=Q}return J}function j(M,z,K){var Y=z&32768;return z&=-32769,z=(Y?M:0)+(z>=8192?z-16384:z),(Y?"":"$")+(K?zr(z):ps(z))}var k={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},S=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function _(M,z){cs(M,0);for(var K=[],Y=0,J="",Q="",ie="",ae="";M.l<M.length;){var re=M[M.l++];switch(re){case 0:K.push(M.read_shift(8,"f"));break;case 1:Q=j(z[0].c,M.read_shift(2),!0),J=j(z[0].r,M.read_shift(2),!1),K.push(Q+J);break;case 2:{var pe=j(z[0].c,M.read_shift(2),!0),Z=j(z[0].r,M.read_shift(2),!1);Q=j(z[0].c,M.read_shift(2),!0),J=j(z[0].r,M.read_shift(2),!1),K.push(pe+Z+":"+Q+J)}break;case 3:if(M.l<M.length){console.error("WK1 premature formula end");return}break;case 4:K.push("("+K.pop()+")");break;case 5:K.push(M.read_shift(2));break;case 6:{for(var Ne="";re=M[M.l++];)Ne+=String.fromCharCode(re);K.push('"'+Ne.replace(/"/g,'""')+'"')}break;case 8:K.push("-"+K.pop());break;case 23:K.push("+"+K.pop());break;case 22:K.push("NOT("+K.pop()+")");break;case 20:case 21:ae=K.pop(),ie=K.pop(),K.push(["AND","OR"][re-20]+"("+ie+","+ae+")");break;default:if(re<32&&S[re])ae=K.pop(),ie=K.pop(),K.push(ie+S[re]+ae);else if(k[re]){if(Y=k[re][1],Y==69&&(Y=M[M.l++]),Y>K.length){console.error("WK1 bad formula parse 0x"+re.toString(16)+":|"+K.join("|")+"|");return}var te=K.slice(-Y);K.length-=Y,K.push(k[re][0]+"("+te.join(",")+")")}else return re<=7?console.error("WK1 invalid opcode "+re.toString(16)):re<=24?console.error("WK1 unsupported op "+re.toString(16)):re<=30?console.error("WK1 invalid opcode "+re.toString(16)):re<=115?console.error("WK1 unsupported function opcode "+re.toString(16)):console.error("WK1 unrecognized opcode "+re.toString(16))}}K.length==1?z[1].f=""+K[0]:console.error("WK1 bad formula parse |"+K.join("|")+"|")}function F(M){var z=[{c:0,r:0},{t:"n",v:0},0];return z[0].r=M.read_shift(2),z[3]=M[M.l++],z[0].c=M[M.l++],z}function A(M,z){var K=F(M);return K[1].t="s",K[1].v=M.read_shift(z-4,"cstr"),K}function C(M,z,K,Y){var J=Mr(6+Y.length);J.write_shift(2,M),J.write_shift(1,K),J.write_shift(1,z),J.write_shift(1,39);for(var Q=0;Q<Y.length;++Q){var ie=Y.charCodeAt(Q);J.write_shift(1,ie>=128?95:ie)}return J.write_shift(1,0),J}function D(M,z){var K=F(M);K[1].v=M.read_shift(2);var Y=K[1].v>>1;if(K[1].v&1)switch(Y&7){case 0:Y=(Y>>3)*5e3;break;case 1:Y=(Y>>3)*500;break;case 2:Y=(Y>>3)/20;break;case 3:Y=(Y>>3)/200;break;case 4:Y=(Y>>3)/2e3;break;case 5:Y=(Y>>3)/2e4;break;case 6:Y=(Y>>3)/16;break;case 7:Y=(Y>>3)/64;break}return K[1].v=Y,K}function P(M,z){var K=F(M),Y=M.read_shift(4),J=M.read_shift(4),Q=M.read_shift(2);if(Q==65535)return Y===0&&J===3221225472?(K[1].t="e",K[1].v=15):Y===0&&J===3489660928?(K[1].t="e",K[1].v=42):K[1].v=0,K;var ie=Q&32768;return Q=(Q&32767)-16446,K[1].v=(1-ie*2)*(J*Math.pow(2,Q+32)+Y*Math.pow(2,Q)),K}function L(M,z,K,Y){var J=Mr(14);if(J.write_shift(2,M),J.write_shift(1,K),J.write_shift(1,z),Y==0)return J.write_shift(4,0),J.write_shift(4,0),J.write_shift(2,65535),J;var Q=0,ie=0,ae=0,re=0;return Y<0&&(Q=1,Y=-Y),ie=Math.log2(Y)|0,Y/=Math.pow(2,ie-31),re=Y>>>0,(re&2147483648)==0&&(Y/=2,++ie,re=Y>>>0),Y-=re,re|=2147483648,re>>>=0,Y*=Math.pow(2,32),ae=Y>>>0,J.write_shift(4,ae),J.write_shift(4,re),ie+=16383+(Q?32768:0),J.write_shift(2,ie),J}function T(M,z){var K=P(M);return M.l+=z-14,K}function R(M,z){var K=F(M),Y=M.read_shift(4);return K[1].v=Y>>6,K}function U(M,z){var K=F(M),Y=M.read_shift(8,"f");return K[1].v=Y,K}function I(M,z){var K=U(M);return M.l+=z-10,K}function H(M,z){return M[M.l+z-1]==0?M.read_shift(z,"cstr"):""}function V(M,z){var K=M[M.l++];K>z-1&&(K=z-1);for(var Y="";Y.length<K;)Y+=String.fromCharCode(M[M.l++]);return Y}function X(M,z,K){if(!(!K.qpro||z<21)){var Y=M.read_shift(1);M.l+=17,M.l+=1,M.l+=2;var J=M.read_shift(z-21,"cstr");return[Y,J]}}function N(M,z){for(var K={},Y=M.l+z;M.l<Y;){var J=M.read_shift(2);if(J==14e3){for(K[J]=[0,""],K[J][0]=M.read_shift(2);M[M.l];)K[J][1]+=String.fromCharCode(M[M.l]),M.l++;M.l++}}return K}function W(M,z){var K=Mr(5+M.length);K.write_shift(2,14e3),K.write_shift(2,z);for(var Y=0;Y<M.length;
vendor: 9,063 bytes, line 892
892++Y){var J=M.charCodeAt(Y);K[K.l++]=J>127?95:J}return K[K.l++]=0,K}var O={0:{n:"BOF",f:Fr},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:l},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:m},14:{n:"NUMBER",f:w},15:{n:"LABEL",f:u},16:{n:"FORMULA",f:v},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:u},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:H},222:{n:"SHEETNAMELP",f:V},65535:{n:""}},G={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:A},23:{n:"NUMBER17",f:P},24:{n:"NUMBER18",f:D},25:{n:"FORMULA19",f:T},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:N},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:R},38:{n:"??"},39:{n:"NUMBER27",f:U},40:{n:"FORMULA28",f:I},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:H},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:X},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:s,book_to_wk3:i,to_workbook:t}})();function J1e(e){var t={},n=e.match(Os),s=0,i=!1;if(n)for(;s!=n.length;++s){var a=Zt(n[s]);switch(a[0].replace(/\w*:/g,"")){case"<condense":break;case"<extend":break;case"<shadow":if(!a.val)break;case"<shadow>":case"<shadow/>":t.shadow=1;break;case"</shadow>":break;case"<charset":if(a.val=="1")break;t.cp=f_[parseInt(a.val,10)];break;case"<outline":if(!a.val)break;case"<outline>":case"<outline/>":t.outline=1;break;case"</outline>":break;case"<rFont":t.name=a.val;break;case"<sz":t.sz=a.val;break;case"<strike":if(!a.val)break;case"<strike>":case"<strike/>":t.strike=1;break;case"</strike>":break;case"<u":if(!a.val)break;switch(a.val){case"double":t.uval="double";break;case"singleAccounting":t.uval="single-accounting";break;case"doubleAccounting":t.uval="double-accounting";break}case"<u>":case"<u/>":t.u=1;break;case"</u>":break;case"<b":if(a.val=="0")break;case"<b>":case"<b/>":t.b=1;break;case"</b>":break;case"<i":if(a.val=="0")break;case"<i>":case"<i/>":t.i=1;break;case"</i>":break;case"<color":a.rgb&&(t.color=a.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":t.family=a.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":t.valign=a.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":break;case"<scheme":break;case"<scheme>":case"<scheme/>":case"</scheme>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(a[0].charCodeAt(1)!==47&&!i)throw new Error("Unrecognized rich format "+a[0])}}return t}var Q1e=(function(){var e=Cm("t"),t=Cm("rPr");function n(a){var o=a.match(e);if(!o)return{t:"s",v:""};var l={t:"s",v:Fn(o[1])},c=a.match(t);return c&&(l.s=J1e(c[1])),l}var s=/<(?:\w+:)?r>/g,i=/<\/(?:\w+:)?r>/;return function(o){return o.replace(s,"").split(i).map(n).filter(function(l){return l.v})}})(),Z1e=(function(){var t=/(\r\n|\n)/g;function n(i,a,o){var l=[];i.u&&l.push("text-decoration: underline;"),i.uval&&l.push("text-underline-style:"+i.uval+";"),i.sz&&l.push("font-size:"+i.sz+"pt;"),i.outline&&l.push("text-effect: outline;"),i.shadow&&l.push("text-shadow: auto;"),a.push('<span style="'+l.join("")+'">'),i.b&&(a.push("<b>"),o.push("</b>")),i.i&&(a.push("<i>"),o.push("</i>")),i.strike&&(a.push("<s>"),o.push("</s>"));var c=i.valign||"";return c=="superscript"||c=="super"?c="sup":c=="subscript"&&(c="sub"),c!=""&&(a.push("<"+c+">"),o.push("</"+c+">")),o.push("</span>"),i}function s(i){var a=[[],i.v,[]];return i.v?(i.s&&n(i.s,a[0],a[2]),a[0].join("")+a[1].replace(t,"<br/>")+a[2].join("")):""}return function(a){return a.map(s).join("")}})(),eve=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,tve=/<(?:\w+:)?r>/,nve=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function A_(e,t){var n=t?t.cellHTML:!0,s={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(s.t=Fn(Jn(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),s.r=Jn(e),n&&(s.h=v_(s.t))):e.match(tve)&&(s.r=Jn(e),s.t=Fn(Jn((e.replace(nve,"").match(eve)||[]).join("").replace(Os,""))),n&&(s.h=Z1e(Q1e(s.r)))),s):{t:""}}var rve=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,sve=/<(?:\w+:)?(?:si|sstItem)>/g,ive=/<\/(?:\w+:)?(?:si|sstItem)>/;function ave(e,t){var n=[],s="";if(!e)return n;var i=e.match(rve);if(i){s=i[2].replace(sve,"").split(ive);for(var a=0;a!=s.length;++a){var o=A_(s[a].trim(),t);o!=null&&(n[n.length]=o)}i=Zt(i[1]),n.Count=i.count,n.Unique=i.uniqueCount}return n}function ove(e){return[e.read_shift(4),e.read_shift(4)]}function lve(e,t){var n=[],s=!1;return Cl(e,function(a,o,l){switch(l){case 159:n.Count=a[0],n.Unique=a[1];break;case 19:n.push(a);break;case 160:return!0;case 35:s=!0;break;case 36:s=!1;break;default:if(o.T,!s||t.WTF)throw new Error("Unexpected record 0x"+l.toString(16))}}),n}function q9(e){for(var t=[],n=e.split(""),s=0;s<n.length;++s)t[s]=n[s].charCodeAt(0);return t}function ml(e,t){var n={};return n.Major=e.read_shift(2),n.Minor=e.read_shift(2),t>=4&&(e.l+=t-4),n}function cve(e){var t={};return t.id=e.read_shift(0,"lpp4"),t.R=ml(e,4),t.U=ml(e,4),t.W=ml(e,4),t}function dve(e){for(var t=e.read_shift(4),n=e.l+t-4,s={},i=e.read_shift(4),a=[];i-- >0;)a.push({t:e.read_shift(4),v:e.read_shift(0,"lpp4")});if(s.name=e.read_shift(0,"lpp4"),s.comps=a,e.l!=n)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+n);return s}function uve(e){var t=[];e.l+=4;for(var n=e.read_shift(4);n-- >0;)t.push(dve(e));return t}function fve(e){var t=[];e.l+=4;for(var n=e.read_shift(4);n-- >0;)t.push(e.read_shift(0,"lpp4"));return t}function pve(e){var t={};return e.read_shift(4),e.l+=4,t.id=e.read_shift(0,"lpp4"),t.name=e.read_shift(0,"lpp4"),t.R=ml(e,4),t.U=ml(e,4),t.W=ml(e,4),t}function hve(e){var t=pve(e);if(t.ename=e.read_shift(0,"8lpp4"),t.blksz=e.read_shift(4),t.cmode=e.read_shift(4),e.read_shift(4)!=4)throw new Error("Bad !Primary record");return t}function G9(e,t){var n=e.l+t,s={};s.Flags=e.read_shift(4)&63,e.l+=4,s.AlgID=e.read_shift(4);var i=!1;switch(s.AlgID){case 26126:case 26127:case 26128:i=s.Flags==36;break;case 26625:i=s.Flags==4;break;case 0:i=s.Flags==16||s.Flags==4||s.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+s.AlgID}if(!i)throw new Error("Encryption Flags/AlgID mismatch");return s.AlgIDHash=e.read_shift(4),s.KeySize=e.read_shift(4),s.ProviderType=e.read_shift(4),e.l+=8,s.CSPName=e.read_shift(n-e.l>>1,"utf16le"),e.l=n,s}function K9(e,t){var n={},s=e.l+t;return e.l+=4,n.Salt=e.slice(e.l,e.l+16),e.l+=16,n.Verifier=e.slice(e.l,e.l+16),e.l+=16,e.read_shift(4),n.VerifierHash=e.slice(e.l,s),e.l=s,n}function mve(e){var t=ml(e);switch(t.Minor){case 2:return[t.Minor,gve(e)];case 3:return[t.Minor,xve()];case 4:return[t.Minor,yve(e)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+t.Minor)}function gve(e){var t=e.read_shift(4);if((t&63)!=36)throw new Error("EncryptionInfo mismatch");var n=e.read_shift(4),s=G9(e,n),i=K9(e,e.length-e.l);return{t:"Std",h:s,v:i}}function xve(){throw new Error("File is password-protected: ECMA-376 Extensible")}
vendor: 6,823 bytes, line 892
892function yve(e){var t=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var n=e.read_shift(e.length-e.l,"utf8"),s={};return n.replace(Os,function(a){var o=Zt(a);switch(Bo(o[0])){case"<?xml":break;case"<encryption":case"</encryption>":break;case"<keyData":t.forEach(function(l){s[l]=o[l]});break;case"<dataIntegrity":s.encryptedHmacKey=o.encryptedHmacKey,s.encryptedHmacValue=o.encryptedHmacValue;break;case"<keyEncryptors>":case"<keyEncryptors":s.encs=[];break;case"</keyEncryptors>":break;case"<keyEncryptor":s.uri=o.uri;break;case"</keyEncryptor>":break;case"<encryptedKey":s.encs.push(o);break;default:throw o[0]}}),s}function vve(e,t){var n={},s=n.EncryptionVersionInfo=ml(e,4);if(t-=4,s.Minor!=2)throw new Error("unrecognized minor version code: "+s.Minor);if(s.Major>4||s.Major<2)throw new Error("unrecognized major version code: "+s.Major);n.Flags=e.read_shift(4),t-=4;var i=e.read_shift(4);return t-=4,n.EncryptionHeader=G9(e,i),t-=i,n.EncryptionVerifier=K9(e,t),n}function bve(e){var t={},n=t.EncryptionVersionInfo=ml(e,4);if(n.Major!=1||n.Minor!=1)throw"unrecognized version code "+n.Major+" : "+n.Minor;return t.Salt=e.read_shift(16),t.EncryptedVerifier=e.read_shift(16),t.EncryptedVerifierHash=e.read_shift(16),t}function wve(e){var t=0,n,s=q9(e),i=s.length+1,a,o,l,c,d;for(n=Tc(i),n[0]=s.length,a=1;a!=i;++a)n[a]=s[a-1];for(a=i-1;a>=0;--a)o=n[a],l=(t&16384)===0?0:1,c=t<<1&32767,d=l|c,t=d^o;return t^52811}var Y9=(function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],t=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],n=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],s=function(o){return(o/2|o*128)&255},i=function(o,l){return s(o^l)},a=function(o){for(var l=t[o.length-1],c=104,d=o.length-1;d>=0;--d)for(var u=o[d],p=0;p!=7;++p)u&64&&(l^=n[c]),u*=2,--c;return l};return function(o){for(var l=q9(o),c=a(l),d=l.length,u=Tc(16),p=0;p!=16;++p)u[p]=0;var m,x,w;for((d&1)===1&&(m=c>>8,u[d]=i(e[0],m),--d,m=c&255,x=l[l.length-1],u[d]=i(x,m));d>0;)--d,m=c>>8,u[d]=i(l[d],m),--d,m=c&255,u[d]=i(l[d],m);for(d=15,w=15-l.length;w>0;)m=c>>8,u[d]=i(e[w],m),--d,--w,m=c&255,u[d]=i(l[d],m),--d,--w;return u}})(),jve=function(e,t,n,s,i){i||(i=t),s||(s=Y9(e));var a,o;for(a=0;a!=t.length;++a)o=t[a],o^=s[n],o=(o>>5|o<<3)&255,i[a]=o,++n;return[i,n,s]},Sve=function(e){var t=0,n=Y9(e);return function(s){var i=jve("",s,t,n);return t=i[1],i[0]}};function kve(e,t,n,s){var i={key:Fr(e),verificationBytes:Fr(e)};return n.password&&(i.verifier=wve(n.password)),s.valid=i.verificationBytes===i.verifier,s.valid&&(s.insitu=Sve(n.password)),i}function _ve(e,t,n){var s=n||{};return s.Info=e.read_shift(2),e.l-=2,s.Info===1?s.Data=bve(e):s.Data=vve(e,t),s}function Cve(e,t,n){var s={Type:n.biff>=8?e.read_shift(2):0};return s.Type?_ve(e,t-2,s):kve(e,n.biff>=8?t:t-2,n,s),s}var Eve=(function(){function e(i,a){switch(a.type){case"base64":return t(zi(i),a);case"binary":return t(i,a);case"buffer":return t(bn&&Buffer.isBuffer(i)?i.toString("binary"):nu(i),a);case"array":return t(Yd(i),a)}throw new Error("Unrecognized type "+a.type)}function t(i,a){var o=a||{},l=o.dense?[]:{},c=i.match(/\\trowd.*?\\row\b/g);if(!c.length)throw new Error("RTF missing table");var d={s:{c:0,r:0},e:{c:0,r:c.length-1}};return c.forEach(function(u,p){Array.isArray(l)&&(l[p]=[]);for(var m=/\\\w+\b/g,x=0,w,y=-1;w=m.exec(u);){switch(w[0]){case"\\cell":var v=u.slice(x,m.lastIndex-w[0].length);if(v[0]==" "&&(v=v.slice(1)),++y,v.length){var j={v,t:"s"};Array.isArray(l)?l[p][y]=j:l[an({r:p,c:y})]=j}break}x=m.lastIndex}y>d.e.c&&(d.e.c=y)}),l["!ref"]=Sn(d),l}function n(i,a){return Wc(e(i,a),a)}function s(i){for(var a=["{\\rtf1\\ansi"],o=gr(i["!ref"]),l,c=Array.isArray(i),d=o.s.r;d<=o.e.r;++d){a.push("\\trowd\\trautofit1");for(var u=o.s.c;u<=o.e.c;++u)a.push("\\cellx"+(u+1));for(a.push("\\pard\\intbl"),u=o.s.c;u<=o.e.c;++u){var p=an({r:d,c:u});l=c?(i[d]||[])[u]:i[p],!(!l||l.v==null&&(!l.f||l.F))&&(a.push(" "+(l.w||(Sl(l),l.w))),a.push("\\cell"))}a.push("\\pard\\intbl\\row")}return a.join("")+"}"}return{to_workbook:n,to_sheet:e,from_sheet:s}})();function Fve(e){var t=e.slice(e[0]==="#"?1:0).slice(0,6);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}function Am(e){for(var t=0,n=1;t!=3;++t)n=n*256+(e[t]>255?255:e[t]<0?0:e[t]);return n.toString(16).toUpperCase().slice(1)}function Ave(e){var t=e[0]/255,n=e[1]/255,s=e[2]/255,i=Math.max(t,n,s),a=Math.min(t,n,s),o=i-a;if(o===0)return[0,0,t];var l=0,c=0,d=i+a;switch(c=o/(d>1?2-d:d),i){case t:l=((n-s)/o+6)%6;break;case n:l=(s-t)/o+2;break;case s:l=(t-n)/o+4;break}return[l/6,c,d/2]}function Tve(e){var t=e[0],n=e[1],s=e[2],i=n*2*(s<.5?s:1-s),a=s-i/2,o=[a,a,a],l=6*t,c;if(n!==0)switch(l|0){case 0:case 6:c=i*l,o[0]+=i,o[1]+=c;break;case 1:c=i*(2-l),o[0]+=c,o[1]+=i;break;case 2:c=i*(l-2),o[1]+=i,o[2]+=c;break;case 3:c=i*(4-l),o[1]+=c,o[2]+=i;break;case 4:c=i*(l-4),o[2]+=i,o[0]+=c;break;case 5:c=i*(6-l),o[2]+=c,o[0]+=i;break}for(var d=0;d!=3;++d)o[d]=Math.round(o[d]*255);return o}function Cy(e,t){if(t===0)return e;var n=Ave(Fve(e));return t<0?n[2]=n[2]*(1+t):n[2]=1-(1-n[2])*(1-t),Am(Tve(n))}var X9=6,Nve=15,Rve=1,Ks=X9;function Ey(e){return Math.floor((e+Math.round(128/Ks)/256)*Ks)}function Fy(e){return Math.floor((e-5)/Ks*100+.5)/100}function Mj(e){return Math.round((e*Ks+5)/Ks*256)/256}function K2(e){return Mj(Fy(Ey(e)))}function T_(e){var t=Math.abs(e-K2(e)),n=Ks;if(t>.005)for(Ks=Rve;Ks<Nve;++Ks)Math.abs(e-K2(e))<=t&&(t=Math.abs(e-K2(e)),n=Ks);Ks=n}function Hf(e){e.width?(e.wpx=Ey(e.width),e.wch=Fy(e.wpx),e.MDW=Ks):e.wpx?(e.wch=Fy(e.wpx),e.width=Mj(e.wch),e.MDW=Ks):typeof e.wch=="number"&&(e.width=Mj(e.wch),e.wpx=Ey(e.width),e.MDW=Ks),e.customWidth&&delete e.customWidth}var Dve=96,J9=Dve;function Q9(e){return e*96/J9}function Tm(e){return e*J9/96}var Ive={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};function Pve(e,t,n,s){t.Borders=[];var i={},a=!1;
vendor: 13,153 bytes, line 892
892(e[0].match(Os)||[]).forEach(function(o){var l=Zt(o);switch(Bo(l[0])){case"<borders":case"<borders>":case"</borders>":break;case"<border":case"<border>":case"<border/>":i={},l.diagonalUp&&(i.diagonalUp=ir(l.diagonalUp)),l.diagonalDown&&(i.diagonalDown=ir(l.diagonalDown)),t.Borders.push(i);break;case"</border>":break;case"<left/>":break;case"<left":case"<left>":break;case"</left>":break;case"<right/>":break;case"<right":case"<right>":break;case"</right>":break;case"<top/>":break;case"<top":case"<top>":break;case"</top>":break;case"<bottom/>":break;case"<bottom":case"<bottom>":break;case"</bottom>":break;case"<diagonal":case"<diagonal>":case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":case"<horizontal>":case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":case"<vertical>":case"<vertical/>":break;case"</vertical>":break;case"<start":case"<start>":case"<start/>":break;case"</start>":break;case"<end":case"<end>":case"<end/>":break;case"</end>":break;case"<color":case"<color>":break;case"<color/>":case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(s&&s.WTF&&!a)throw new Error("unrecognized "+l[0]+" in borders")}})}function Bve(e,t,n,s){t.Fills=[];var i={},a=!1;(e[0].match(Os)||[]).forEach(function(o){var l=Zt(o);switch(Bo(l[0])){case"<fills":case"<fills>":case"</fills>":break;case"<fill>":case"<fill":case"<fill/>":i={},t.Fills.push(i);break;case"</fill>":break;case"<gradientFill>":break;case"<gradientFill":case"</gradientFill>":t.Fills.push(i),i={};break;case"<patternFill":case"<patternFill>":l.patternType&&(i.patternType=l.patternType);break;case"<patternFill/>":case"</patternFill>":break;case"<bgColor":i.bgColor||(i.bgColor={}),l.indexed&&(i.bgColor.indexed=parseInt(l.indexed,10)),l.theme&&(i.bgColor.theme=parseInt(l.theme,10)),l.tint&&(i.bgColor.tint=parseFloat(l.tint)),l.rgb&&(i.bgColor.rgb=l.rgb.slice(-6));break;case"<bgColor/>":case"</bgColor>":break;case"<fgColor":i.fgColor||(i.fgColor={}),l.theme&&(i.fgColor.theme=parseInt(l.theme,10)),l.tint&&(i.fgColor.tint=parseFloat(l.tint)),l.rgb!=null&&(i.fgColor.rgb=l.rgb.slice(-6));break;case"<fgColor/>":case"</fgColor>":break;case"<stop":case"<stop/>":break;case"</stop>":break;case"<color":case"<color/>":break;case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(s&&s.WTF&&!a)throw new Error("unrecognized "+l[0]+" in fills")}})}function Ove(e,t,n,s){t.Fonts=[];var i={},a=!1;(e[0].match(Os)||[]).forEach(function(o){var l=Zt(o);switch(Bo(l[0])){case"<fonts":case"<fonts>":case"</fonts>":break;case"<font":case"<font>":break;case"</font>":case"<font/>":t.Fonts.push(i),i={};break;case"<name":l.val&&(i.name=Jn(l.val));break;case"<name/>":case"</name>":break;case"<b":i.bold=l.val?ir(l.val):1;break;case"<b/>":i.bold=1;break;case"<i":i.italic=l.val?ir(l.val):1;break;case"<i/>":i.italic=1;break;case"<u":switch(l.val){case"none":i.underline=0;break;case"single":i.underline=1;break;case"double":i.underline=2;break;case"singleAccounting":i.underline=33;break;case"doubleAccounting":i.underline=34;break}break;case"<u/>":i.underline=1;break;case"<strike":i.strike=l.val?ir(l.val):1;break;case"<strike/>":i.strike=1;break;case"<outline":i.outline=l.val?ir(l.val):1;break;case"<outline/>":i.outline=1;break;case"<shadow":i.shadow=l.val?ir(l.val):1;break;case"<shadow/>":i.shadow=1;break;case"<condense":i.condense=l.val?ir(l.val):1;break;case"<condense/>":i.condense=1;break;case"<extend":i.extend=l.val?ir(l.val):1;break;case"<extend/>":i.extend=1;break;case"<sz":l.val&&(i.sz=+l.val);break;case"<sz/>":case"</sz>":break;case"<vertAlign":l.val&&(i.vertAlign=l.val);break;case"<vertAlign/>":case"</vertAlign>":break;case"<family":l.val&&(i.family=parseInt(l.val,10));break;case"<family/>":case"</family>":break;case"<scheme":l.val&&(i.scheme=l.val);break;case"<scheme/>":case"</scheme>":break;case"<charset":if(l.val=="1")break;l.codepage=f_[parseInt(l.val,10)];break;case"<color":if(i.color||(i.color={}),l.auto&&(i.color.auto=ir(l.auto)),l.rgb)i.color.rgb=l.rgb.slice(-6);else if(l.indexed){i.color.index=parseInt(l.indexed,10);var c=zd[i.color.index];i.color.index==81&&(c=zd[1]),c||(c=zd[1]),i.color.rgb=c[0].toString(16)+c[1].toString(16)+c[2].toString(16)}else l.theme&&(i.color.theme=parseInt(l.theme,10),l.tint&&(i.color.tint=parseFloat(l.tint)),l.theme&&n.themeElements&&n.themeElements.clrScheme&&(i.color.rgb=Cy(n.themeElements.clrScheme[i.color.theme].rgb,i.color.tint||0)));break;case"<color/>":case"</color>":break;case"<AlternateContent":a=!0;break;case"</AlternateContent>":a=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(s&&s.WTF&&!a)throw new Error("unrecognized "+l[0]+" in fonts")}})}function Mve(e,t,n){t.NumberFmt=[];for(var s=Ao(cn),i=0;i<s.length;++i)t.NumberFmt[s[i]]=cn[s[i]];var a=e[0].match(Os);if(a)for(i=0;i<a.length;++i){var o=Zt(a[i]);switch(Bo(o[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":break;case"<numFmt":{var l=Fn(Jn(o.formatCode)),c=parseInt(o.numFmtId,10);if(t.NumberFmt[c]=l,c>0){if(c>392){for(c=392;c>60&&t.NumberFmt[c]!=null;--c);t.NumberFmt[c]=l}Ld(l,c)}}break;case"</numFmt>":break;default:if(n.WTF)throw new Error("unrecognized "+o[0]+" in numFmts")}}}var Kg=["numFmtId","fillId","fontId","borderId","xfId"],Yg=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function Lve(e,t,n){t.CellXf=[];var s,i=!1;(e[0].match(Os)||[]).forEach(function(a){var o=Zt(a),l=0;switch(Bo(o[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":break;case"<xf":case"<xf/>":for(s=o,delete s[0],l=0;l<Kg.length;++l)s[Kg[l]]&&(s[Kg[l]]=parseInt(s[Kg[l]],10));for(l=0;l<Yg.length;++l)s[Yg[l]]&&(s[Yg[l]]=ir(s[Yg[l]]));if(t.NumberFmt&&s.numFmtId>392){for(l=392;l>60;--l)if(t.NumberFmt[s.numFmtId]==t.NumberFmt[l]){s.numFmtId=l;break}}t.CellXf.push(s);break;case"</xf>":break;case"<alignment":case"<alignment/>":var c={};o.vertical&&(c.vertical=o.vertical),o.horizontal&&(c.horizontal=o.horizontal),o.textRotation!=null&&(c.textRotation=o.textRotation),o.indent&&(c.indent=o.indent),o.wrapText&&(c.wrapText=ir(o.wrapText)),s.alignment=c;break;case"</alignment>":break;case"<protection":break;case"</protection>":case"<protection/>":break;case"<AlternateContent":i=!0;break;case"</AlternateContent>":i=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+o[0]+" in cellXfs")}})}var zve=(function(){var t=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,n=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,s=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,i=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,a=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(l,c,d){var u={};if(!l)return u;l=l.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");var p;return(p=l.match(t))&&Mve(p,u,d),(p=l.match(i))&&Ove(p,u,c,d),(p=l.match(s))&&Bve(p,u,c,d),(p=l.match(a))&&Pve(p,u,c,d),(p=l.match(n))&&Lve(p,u,d),u}})();function Wve(e,t){var n=e.read_shift(2),s=Ds(e);return[n,s]}function $ve(e,t,n){var s={};s.sz=e.read_shift(2)/20;var i=Qxe(e);i.fItalic&&(s.italic=1),i.fCondense&&(s.condense=1),i.fExtend&&(s.extend=1),i.fShadow&&(s.shadow=1),i.fOutline&&(s.outline=1),i.fStrikeout&&(s.strike=1);var a=e.read_shift(2);switch(a===700&&(s.bold=1),e.read_shift(2)){case 1:s.vertAlign="superscript";break;case 2:s.vertAlign="subscript";break}var o=e.read_shift(1);o!=0&&(s.underline=o);var l=e.read_shift(1);l>0&&(s.family=l);var c=e.read_shift(1);switch(c>0&&(s.charset=c),e.l++,s.color=Jxe(e),e.read_shift(1)){case 1:s.scheme="major";break;case 2:s.scheme="minor";break}return s.name=Ds(e),s}var Uve=Ps;function Vve(e,t){var n=e.l+t,s=e.read_shift(2),i=e.read_shift(2);return e.l=n,{ixfe:s,numFmtId:i}}var Hve=Ps;function qve(e,t,n){var s={};s.NumberFmt=[];for(var i in cn)s.NumberFmt[i]=cn[i];s.CellXf=[],s.Fonts=[];var a=[],o=!1;return Cl(e,function(c,d,u){switch(u){case 44:s.NumberFmt[c[0]]=c[1],Ld(c[1],c[0]);break;case 43:s.Fonts.push(c),c.color.theme!=null&&t&&t.themeElements&&t.themeElements.clrScheme&&(c.color.rgb=Cy(t.themeElements.clrScheme[c.color.theme].rgb,c.color.tint||0));break;case 1025:break;case 45:break;case 46:break;case 47:a[a.length-1]==617&&s.CellXf.push(c);break;case 48:case 507:case 572:case 475:break;case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 35:o=!0;break;case 36:o=!1;break;case 37:a.push(u),o=!0;break;case 38:a.pop(),o=!1;break;default:if(d.T>0)a.push(u);else if(d.T<0)a.pop();else if(!o||n.WTF&&a[a.length-1]!=37)throw new Error("Unexpected record 0x"+u.toString(16))}}),s}var Gve=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function Kve(e,t,n){t.themeElements.clrScheme=[];var s={};(e[0].match(Os)||[]).forEach(function(i){var a=Zt(i);switch(a[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":s.rgb=a.val;break;case"<a:sysClr":s.rgb=a.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>":a[0].charAt(1)==="/"?(t.themeElements.clrScheme[Gve.indexOf(a[0])]=s,s={}):s.name=a[0].slice(3,a[0].length-1);break;default:if(n&&n.WTF)throw new Error("Unrecognized "+a[0]+" in clrScheme")}})}function Yve(){}function Xve(){}var Jve=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,Qve=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,Zve=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/;function ebe(e,t,n){t.themeElements={};var s;[["clrScheme",Jve,Kve],["fontScheme",Qve,Yve],["fmtScheme",Zve,Xve]].forEach(function(i){if(!(s=e.match(i[1])))throw new Error(i[0]+" not found in themeElements");i[2](s,t,n)})}var tbe=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function Z9(e,t){(!e||e.length===0)&&(e=nbe());var n,s={};if(!(n=e.match(tbe)))throw new Error("themeElements not found in theme");return ebe(n[0],s,t),s.raw=e,s}function nbe(e,t){var n=[d9];return n[n.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',n[n.length]="<a:themeElements>",n[n.length]='<a:clrScheme name="Office">',n[n.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',n[n.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',n[n.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',n[n.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',n[n.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',n[n.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',n[n.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',n[n.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',n[n.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',n[n.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',n[n.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',n[n.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',n[n.length]="</a:clrScheme>",n[n.length]='<a:fontScheme name="Office">',n[n.length]="<a:majorFont>",n[n.length]='<a:latin typeface="Cambria"/>',n[n.length]='<a:ea typeface=""/>',n[n.length]='<a:cs typeface=""/>',n[n.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',n[n.length]='<a:font script="Hang" typeface="맑은 고딕"/>',n[n.length]='<a:font script="Hans" typeface="宋体"/>',n[n.length]='<a:font script="Hant" typeface="新細明體"/>',n[n.length]='<a:font script="Arab" typeface="Times New Roman"/>',n[n.length]='<a:font script="Hebr" typeface="Times New Roman"/>',n[n.length]='<a:font script="Thai" typeface="Tahoma"/>',n[n.length]='<a:font script="Ethi" typeface="Nyala"/>',n[n.length]='<a:font script="Beng" typeface="Vrinda"/>',n[n.length]='<a:font script="Gujr" typeface="Shruti"/>',n[n.length]='<a:font script="Khmr" typeface="MoolBoran"/>',n[n.length]='<a:font script="Knda" typeface="Tunga"/>',n[n.length]='<a:font script="Guru" typeface="Raavi"/>',n[n.length]='<a:font script="Cans" typeface="Euphemia"/>',n[n.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',n[n.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',n[n.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',n[n.length]='<a:font script="Thaa" typeface="MV Boli"/>',n[n.length]='<a:font script="Deva" typeface="Mangal"/>',n[n.length]='<a:font script="Telu" typeface="Gautami"/>',n[n.length]='<a:font script="Taml" typeface="Latha"/>',n[n.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',n[n.length]='<a:font script="Orya" typeface="Kalinga"/>',n[n.length]='<a:font script="Mlym" typeface="Kartika"/>
892',n[n.length]='<a:font script="Laoo" typeface="DokChampa"/>',n[n.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',n[n.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',n[n.length]='<a:font script="Viet" typeface="Times New Roman"/>',n[n.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',n[n.length]='<a:font script="Geor" typeface="Sylfaen"/>',n[n.length]="</a:majorFont>",n[n.length]="<a:minorFont>",n[n.length]='<a:latin typeface="Calibri"/>',n[n.length]='<a:ea typeface=""/>',n[n.length]='<a:cs typeface=""/>',n[n.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',n[n.length]='<a:font script="Hang" typeface="맑은 고딕"/>',n[n.length]='<a:font script="Hans" typeface="宋体"/>',n[n.length]='<a:font script="Hant" typeface="新細明體"/>',n[n.length]='<a:font script="Arab" typeface="Arial"/>',n[n.length]='<a:font script="Hebr" typeface="Arial"/>',n[n.length]='<a:font script="Thai" typeface="Tahoma"/>',n[n.length]='<a:font script="Ethi" typeface="Nyala"/>',n[n.length]='<a:font script="Beng" typeface="Vrinda"/>',n[n.length]='<a:font script="Gujr" typeface="Shruti"/>',n[n.length]='<a:font script="Khmr" typeface="DaunPenh"/>',n[n.length]='<a:font script="Knda" typeface="Tunga"/>',n[n.length]='<a:font script="Guru" typeface="Raavi"/>',n[n.length]='<a:font script="Cans" typeface="Euphemia"/>',n[n.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',n[n.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',n[n.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',n[n.length]='<a:font script="Thaa" typeface="MV Boli"/>',n[n.length]='<a:font script="Deva" typeface="Mangal"/>',n[n.length]='<a:font script="Telu" typeface="Gautami"/>',n[n.length]='<a:font script="Taml" typeface="Latha"/>',n[n.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',n[n.length]='<a:font script="Orya" typeface="Kalinga"/>',n[n.length]='<a:font script="Mlym" typeface="Kartika"/>',n[n.length]='<a:font script="Laoo" typeface="DokChampa"/>',n[n.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',n[n.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',n[n.length]='<a:font script="Viet" typeface="Arial"/>',n[n.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',n[n.length]='<a:font script="Geor" typeface="Sylfaen"/>',n[n.length]="</a:minorFont>",n[n.length]="</a:fontScheme>",n[n.length]='<a:fmtScheme name="Office">',n[n.length]="<a:fillStyleLst>",n[n.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:lin ang="16200000" scaled="1"/>',n[n.length]="</a:gradFill>",n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:lin ang="16200000" scaled="0"/>',n[n.length]="</a:gradFill>",n[n.length]="</a:fillStyleLst>",n[n.length]="<a:lnStyleLst>",n[n.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]="</a:lnStyleLst>",n[n.length]="<a:effectStyleLst>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>
892",n[n.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]="</a:effectStyle>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]="</a:effectStyle>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',n[n.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',n[n.length]="</a:effectStyle>",n[n.length]="</a:effectStyleLst>",n[n.length]="<a:bgFillStyleLst>",n[n.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',n[n.length]="</a:gradFill>",n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',n[n.length]="</a:gradFill>",n[n.length]="</a:bgFillStyleLst>",n[n.length]="</a:fmtScheme>",n[n.length]="</a:themeElements>",n[n.length]="<a:objectDefaults>",n[n.length]="<a:spDef>",n[n.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',n[n.length]="</a:spDef>",n[n.length]="<a:lnDef>",n[n.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',n[n.length]="</a:lnDef>",n[n.length]="</a:objectDefaults>",n[n.length]="<a:extraClrSchemeLst/>",n[n.length]="</a:theme>",n.join("")}function rbe(e,t,n){var s=e.l+t,i=e.read_shift(4);if(i!==124226){if(!n.cellStyles){e.l=s;return}var a=e.slice(e.l);e.l=s;var o;try{o=c9(a,{type:"array"})}catch{return}var l=Ti(o,"theme/theme/theme1.xml",!0);if(l)return Z9(l,n)}}function sbe(e){return e.read_shift(4)}function ibe(e){var t={};switch(t.xclrType=e.read_shift(2),t.nTintShade=e.read_shift(2),t.xclrType){case 0:e.l+=4;break;case 1:t.xclrValue=abe(e,4);break;case 2:t.xclrValue=L9(e);break;case 3:t.xclrValue=sbe(e);break;case 4:e.l+=4;break}return e.l+=8,t}function abe(e,t){return Ps(e,t)}function obe(e,t){return Ps(e,t)}function lbe(e){var t=e.read_shift(2),n=e.read_shift(2)-4,s=[t];switch(t){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:s[1]=ibe(e);break;case 6:s[1]=obe(e,n);break;case 14:case 15:s[1]=e.read_shift(n===1?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+t+" "+n)}return s}function cbe(e,t){var n=e.l+t;e.l+=2;var s=e.read_shift(2);e.l+=2;for(var i=e.read_shift(2),a=[];i-- >0;)a.push(lbe(e,n-e.l));return{ixfe:s,ext:a}}function dbe(e,t){t.forEach(function(n){n[0]})}function ube(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:Ds(e)}}function fbe(e){for(var t=[],n=e.read_shift(4);n-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function pbe(e){return e.l+=4,e.read_shift(4)!=0}function hbe(e,t,n){var s={Types:[],Cell:[],Value:[]},i=n||{},a=[],o=!1,l=2;return Cl(e,function(c,d,u){switch(u){case 335:s.Types.push({name:c.name});break;case 51:c.forEach(function(p){l==1?s.Cell.push({type:s.Types[p[0]-1].name,index:
vendor: 3,645 bytes, line 892
892p[1]}):l==0&&s.Value.push({type:s.Types[p[0]-1].name,index:p[1]})});break;case 337:l=c?1:0;break;case 338:l=2;break;case 35:a.push(u),o=!0;break;case 36:a.pop(),o=!1;break;default:if(!d.T){if(!o||i.WTF&&a[a.length-1]!=35)throw new Error("Unexpected record 0x"+u.toString(16))}}}),s}function mbe(e,t,n){var s={Types:[],Cell:[],Value:[]};if(!e)return s;var i=!1,a=2,o;return e.replace(Os,function(l){var c=Zt(l);switch(Bo(c[0])){case"<?xml":break;case"<metadata":case"</metadata>":break;case"<metadataTypes":case"</metadataTypes>":break;case"<metadataType":s.Types.push({name:c.name});break;case"</metadataType>":break;case"<futureMetadata":for(var d=0;d<s.Types.length;++d)s.Types[d].name==c.name&&(o=s.Types[d]);break;case"</futureMetadata>":break;case"<bk>":break;case"</bk>":break;case"<rc":a==1?s.Cell.push({type:s.Types[c.t-1].name,index:+c.v}):a==0&&s.Value.push({type:s.Types[c.t-1].name,index:+c.v});break;case"</rc>":break;case"<cellMetadata":a=1;break;case"</cellMetadata>":a=2;break;case"<valueMetadata":a=0;break;case"</valueMetadata>":a=2;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;case"<rvb":if(!o)break;o.offsets||(o.offsets=[]),o.offsets.push(+c.i);break;default:if(!i&&n.WTF)throw new Error("unrecognized "+c[0]+" in metadata")}return l}),s}function gbe(e){var t=[];if(!e)return t;var n=1;return(e.match(Os)||[]).forEach(function(s){var i=Zt(s);switch(i[0]){case"<?xml":break;case"<calcChain":case"<calcChain>":case"</calcChain>":break;case"<c":delete i[0],i.i?n=i.i:i.i=n,t.push(i);break}}),t}function xbe(e){var t={};t.i=e.read_shift(4);var n={};n.r=e.read_shift(4),n.c=e.read_shift(4),t.r=an(n);var s=e.read_shift(1);return s&2&&(t.l="1"),s&8&&(t.a="1"),t}function ybe(e,t,n){var s=[];return Cl(e,function(a,o,l){switch(l){case 63:s.push(a);break;default:if(!o.T)throw new Error("Unexpected record 0x"+l.toString(16))}}),s}function vbe(e,t,n,s){if(!e)return e;var i=s||{},a=!1;Cl(e,function(l,c,d){switch(d){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:a=!0;break;case 36:a=!1;break;default:if(!c.T){if(!a||i.WTF)throw new Error("Unexpected record 0x"+d.toString(16))}}},i)}function bbe(e,t){if(!e)return"??";var n=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][n].Target}function O6(e,t,n,s){var i=Array.isArray(e),a;t.forEach(function(o){var l=Ys(o.ref);if(i?(e[l.r]||(e[l.r]=[]),a=e[l.r][l.c]):a=e[o.ref],!a){a={t:"z"},i?e[l.r][l.c]=a:e[o.ref]=a;var c=gr(e["!ref"]||"BDWGO1000001:A1");c.s.r>l.r&&(c.s.r=l.r),c.e.r<l.r&&(c.e.r=l.r),c.s.c>l.c&&(c.s.c=l.c),c.e.c<l.c&&(c.e.c=l.c);var d=Sn(c);d!==e["!ref"]&&(e["!ref"]=d)}a.c||(a.c=[]);var u={a:o.author,t:o.t,r:o.r,T:n};o.h&&(u.h=o.h);for(var p=a.c.length-1;p>=0;--p){if(!n&&a.c[p].T)return;n&&!a.c[p].T&&a.c.splice(p,1)}if(n&&s){for(p=0;p<s.length;++p)if(u.a==s[p].id){u.a=s[p].name||u.a;break}}a.c.push(u)})}function wbe(e,t){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var n=[],s=[],i=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);i&&i[1]&&i[1].split(/<\/\w*:?author>/).forEach(function(o){if(!(o===""||o.trim()==="")){var l=o.match(/<(?:\w+:)?author[^>]*>(.*)/);l&&n.push(l[1])}});var a=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return a&&a[1]&&a[1].split(/<\/\w*:?comment>/).forEach(function(o){if(!(o===""||o.trim()==="")){var l=o.match(/<(?:\w+:)?comment[^>]*>/);if(l){var c=Zt(l[0]),d={author:c.authorId&&n[c.authorId]||"sheetjsghost",ref:c.ref,guid:c.guid},u=Ys(c.ref);
892if(!(t.sheetRows&&t.sheetRows<=u.r)){var p=o.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),m=!!p&&!!p[1]&&A_(p[1])||{r:"",t:"",h:""};d.r=m.r,m.r=="<t></t>"&&(m.t=m.h=""),d.t=(m.t||"").replace(/\r\n/g,`
893`).replace(/\r/g,`
894`),t.cellHTML&&(d.h=m.h),s.push(d)}}}}),s}function jbe(e,t){var n=[],s=!1,i={},a=0;return e.replace(Os,function(l,c){var d=Zt(l);switch(Bo(d[0])){case"<?xml":break;case"<ThreadedComments":break;case"</ThreadedComments>":break;case"<threadedComment":i={author:d.personId,guid:d.id,ref:d.ref,T:1};break;case"</threadedComment>":i.t!=null&&n.push(i);break;case"<text>":case"<text":a=c+l.length;break;case"</text>":i.t=e.slice(a,c).replace(/\r\n/g,`
895`).replace(/\r/g,`
896`);break;case"<mentions":case"<mentions>":s=!0;break;case"</mentions>":s=!1;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":s=!0;break;case"</ext>":s=!1;break;default:if(!s&&t.WTF)throw new Error("unrecognized "+d[0]+" in threaded comments")}return l}),n}function Sbe(e,t){var n=[],s=!1;return e.replace(Os,function(a){var o=Zt(a);switch(Bo(o[0])){case"<?xml":break;case"<personList":break;case"</personList>":break;case"<person":n.push({name:o.displayname,id:o.id});break;case"</person>":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":s=!0;break;case"</ext>":s=!1;break;default:if(!s&&t.WTF)throw new Error("unrecognized "+o[0]+" in threaded comments")}return a}),n}function kbe(e){var t={};t.iauthor=e.read_shift(4);var n=su(e);return t.rfx=n.s,t.ref=an(n.s),e.l+=16,t}var _be=Ds;function Cbe(e,t){var n=[],s=[],i={},a=!1;return Cl(e,function(l,c,d){switch(d){case 632:s.push(l);break;case 635:i=l;break;case 637:i.t=l.t,i.h=l.h,i.r=l.r;break;case 636:if(i.author=s[i.iauthor],delete i.iauthor,t.sheetRows&&i.rfx&&t.sheetRows<=i.rfx.r)break;i.t||(i.t=""),delete i.rfx,n.push(i);break;case 3072:break;case 35:a=!0;break;case 36:a=!1;break;case 37:break;case 38:break;default:if(!c.T){if(!a||t.WTF)throw new Error("Unexpected record 0x"+d.toString(16))}}}),n}var Ebe="application/vnd.ms-office.vbaProject";function Fbe(e){var t=jn.utils.cfb_new({root:"R"});return e.FullPaths.forEach(function(n,s){if(!(n.slice(-1)==="/"||!n.match(/_VBA_PROJECT_CUR/))){var i=n.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");jn.utils.cfb_add(t,i,e.FileIndex[s].content)}}),jn.write(t)}function Abe(){return{"!type":"dialog"}}function Tbe(){return{"!type":"dialog"}}function Nbe(){return{"!type":"macro"}}function Rbe(){return{"!type":"macro"}}var vf=(function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function n(s,i,a,o){var l=!1,c=!1;a.length==0?c=!0:a.charAt(0)=="["&&(c=!0,a=a.slice(1,-1)),o.length==0?l=!0:o.charAt(0)=="["&&(l=!0,o=o.slice(1,-1));var d=a.length>0?parseInt(a,10)|0:0,u=o.length>0?parseInt(o,10)|0:0;return l?u+=t.c:--u,c?d+=t.r:--d,i+(l?"":"$")+zr(u)+(c?"":"$")+ps(d)}return function(i,a){return t=a,i.replace(e,n)}})(),e7=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,Dbe=(function(){return function(t,n){return t.replace(e7,function(s,i,a,o,l,c){var d=S_(o)-(a?0:n.c),u=j_(c)-(l?0:n.r),p=u==0?"":l?u+1:"["+u+"]",m=d==0?"":a?d+1:"["+d+"]";return i+"R"+p+"C"+m})}})();function t7(e,t){return e.replace(e7,function(n,s,i,a,o,l){return s+(i=="$"?i+a:zr(S_(a)+t.c))+(o=="$"?o+l:ps(j_(l)+t.r))})}function Ibe(e,t,n){var s=lp(t),i=s.s,a=Ys(n),o={r:a.r-i.r,c:a.c-i.c};return t7(e,o)}function Pbe(e){return e.length!=1}function M6(e){return e.replace(/_xlfn\./g,"")}function Cr(e){e.l+=1}function Nc(e,t){var n=e.read_shift(2);return[n&16383,n>>14&1,n>>15&1]}
vendor: 16,007 bytes, line 896
896function n7(e,t,n){var s=2;if(n){if(n.biff>=2&&n.biff<=5)return r7(e);n.biff==12&&(s=4)}var i=e.read_shift(s),a=e.read_shift(s),o=Nc(e),l=Nc(e);return{s:{r:i,c:o[0],cRel:o[1],rRel:o[2]},e:{r:a,c:l[0],cRel:l[1],rRel:l[2]}}}function r7(e){var t=Nc(e),n=Nc(e),s=e.read_shift(1),i=e.read_shift(1);return{s:{r:t[0],c:s,cRel:t[1],rRel:t[2]},e:{r:n[0],c:i,cRel:n[1],rRel:n[2]}}}function Bbe(e,t,n){if(n.biff<8)return r7(e);var s=e.read_shift(n.biff==12?4:2),i=e.read_shift(n.biff==12?4:2),a=Nc(e),o=Nc(e);return{s:{r:s,c:a[0],cRel:a[1],rRel:a[2]},e:{r:i,c:o[0],cRel:o[1],rRel:o[2]}}}function s7(e,t,n){if(n&&n.biff>=2&&n.biff<=5)return Obe(e);var s=e.read_shift(n&&n.biff==12?4:2),i=Nc(e);return{r:s,c:i[0],cRel:i[1],rRel:i[2]}}function Obe(e){var t=Nc(e),n=e.read_shift(1);return{r:t[0],c:n,cRel:t[1],rRel:t[2]}}function Mbe(e){var t=e.read_shift(2),n=e.read_shift(2);return{r:t,c:n&255,fQuoted:!!(n&16384),cRel:n>>15,rRel:n>>15}}function Lbe(e,t,n){var s=n&&n.biff?n.biff:8;if(s>=2&&s<=5)return zbe(e);var i=e.read_shift(s>=12?4:2),a=e.read_shift(2),o=(a&16384)>>14,l=(a&32768)>>15;if(a&=16383,l==1)for(;i>524287;)i-=1048576;if(o==1)for(;a>8191;)a=a-16384;return{r:i,c:a,cRel:o,rRel:l}}function zbe(e){var t=e.read_shift(2),n=e.read_shift(1),s=(t&32768)>>15,i=(t&16384)>>14;return t&=16383,s==1&&t>=8192&&(t=t-16384),i==1&&n>=128&&(n=n-256),{r:t,c:n,cRel:i,rRel:s}}function Wbe(e,t,n){var s=(e[e.l++]&96)>>5,i=n7(e,n.biff>=2&&n.biff<=5?6:8,n);return[s,i]}function $be(e,t,n){var s=(e[e.l++]&96)>>5,i=e.read_shift(2,"i"),a=8;if(n)switch(n.biff){case 5:e.l+=12,a=6;break;case 12:a=12;break}var o=n7(e,a,n);return[s,i,o]}function Ube(e,t,n){var s=(e[e.l++]&96)>>5;return e.l+=n&&n.biff>8?12:n.biff<8?6:8,[s]}function Vbe(e,t,n){var s=(e[e.l++]&96)>>5,i=e.read_shift(2),a=8;if(n)switch(n.biff){case 5:e.l+=12,a=6;break;case 12:a=12;break}return e.l+=a,[s,i]}function Hbe(e,t,n){var s=(e[e.l++]&96)>>5,i=Bbe(e,t-1,n);return[s,i]}function qbe(e,t,n){var s=(e[e.l++]&96)>>5;return e.l+=n.biff==2?6:n.biff==12?14:7,[s]}function L6(e){var t=e[e.l+1]&1,n=1;return e.l+=4,[t,n]}function Gbe(e,t,n){e.l+=2;for(var s=e.read_shift(n&&n.biff==2?1:2),i=[],a=0;a<=s;++a)i.push(e.read_shift(n&&n.biff==2?1:2));return i}function Kbe(e,t,n){var s=e[e.l+1]&255?1:0;return e.l+=2,[s,e.read_shift(n&&n.biff==2?1:2)]}function Ybe(e,t,n){var s=e[e.l+1]&255?1:0;return e.l+=2,[s,e.read_shift(n&&n.biff==2?1:2)]}function Xbe(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function Jbe(e,t,n){var s=e[e.l+1]&255?1:0;return e.l+=n&&n.biff==2?3:4,[s]}function i7(e){var t=e.read_shift(1),n=e.read_shift(1);return[t,n]}function Qbe(e){return e.read_shift(2),i7(e)}function Zbe(e){return e.read_shift(2),i7(e)}function e2e(e,t,n){var s=(e[e.l]&96)>>5;e.l+=1;var i=s7(e,0,n);return[s,i]}function t2e(e,t,n){var s=(e[e.l]&96)>>5;e.l+=1;var i=Lbe(e,0,n);return[s,i]}function n2e(e,t,n){var s=(e[e.l]&96)>>5;e.l+=1;var i=e.read_shift(2);n&&n.biff==5&&(e.l+=12);var a=s7(e,0,n);return[s,i,a]}function r2e(e,t,n){var s=(e[e.l]&96)>>5;e.l+=1;var i=e.read_shift(n&&n.biff<=3?1:2);return[swe[i],l7[i],s]}function s2e(e,t,n){var s=e[e.l++],i=e.read_shift(1),a=n&&n.biff<=3?[s==88?-1:0,e.read_shift(1)]:i2e(e);return[i,(a[0]===0?l7:rwe)[a[1]]]}function i2e(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function a2e(e,t,n){e.l+=n&&n.biff==2?3:4}function o2e(e,t,n){if(e.l++,n&&n.biff==12)return[e.read_shift(4,"i"),0];var s=e.read_shift(2),i=e.read_shift(n&&n.biff==2?1:2);return[s,i]}function l2e(e){return e.l++,iu[e.read_shift(1)]}function c2e(e){return e.l++,e.read_shift(2)}function d2e(e){return e.l++,e.read_shift(1)!==0}function u2e(e){return e.l++,As(e)}function f2e(e,t,n){return e.l++,r0(e,t-1,n)}function p2e(e,t){var n=[e.read_shift(1)];if(t==12)switch(n[0]){case 2:n[0]=4;break;case 4:n[0]=16;break;case 0:n[0]=1;break;case 1:n[0]=2;break}switch(n[0]){case 4:n[1]=vr(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:n[1]=iu[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:n[1]=As(e);break;case 2:n[1]=au(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+n[0])}return n}function h2e(e,t,n){for(var s=e.read_shift(n.biff==12?4:2),i=[],a=0;a!=s;++a)i.push((n.biff==12?su:A1)(e));return i}function m2e(e,t,n){var s=0,i=0;n.biff==12?(s=e.read_shift(4),i=e.read_shift(4)):(i=1+e.read_shift(1),s=1+e.read_shift(2)),n.biff>=2&&n.biff<8&&(--s,--i==0&&(i=256));for(var a=0,o=[];a!=s&&(o[a]=[]);++a)for(var l=0;l!=i;++l)o[a][l]=p2e(e,n.biff);return o}function g2e(e,t,n){var s=e.read_shift(1)>>>5&3,i=!n||n.biff>=8?4:2,a=e.read_shift(i);switch(n.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12;break}return[s,0,a]}function x2e(e,t,n){if(n.biff==5)return y2e(e);var s=e.read_shift(1)>>>5&3,i=e.read_shift(2),a=e.read_shift(4);return[s,i,a]}function y2e(e){var t=e.read_shift(1)>>>5&3,n=e.read_shift(2,"i");e.l+=8;var s=e.read_shift(2);return e.l+=12,[t,n,s]}function v2e(e,t,n){var s=e.read_shift(1)>>>5&3;e.l+=n&&n.biff==2?3:4;var i=e.read_shift(n&&n.biff==2?1:2);return[s,i]}function b2e(e,t,n){var s=e.read_shift(1)>>>5&3,i=e.read_shift(n&&n.biff==2?1:2);return[s,i]}function w2e(e,t,n){var s=e.read_shift(1)>>>5&3;return e.l+=4,n.biff<8&&e.l--,n.biff==12&&(e.l+=2),[s]}function j2e(e,t,n){var s=(e[e.l++]&96)>>5,i=e.read_shift(2),a=4;if(n)switch(n.biff){case 5:a=15;break;case 12:a=6;break}return e.l+=a,[s,i]}var S2e=Ps,k2e=Ps,_2e=Ps;function i0(e,t,n){return e.l+=2,[Mbe(e)]}function N_(e){return e.l+=6,[]}var C2e=i0,E2e=N_,F2e=N_,A2e=i0;function a7(e){return e.l+=2,[Fr(e),e.read_shift(2)&1]}var T2e=i0,N2e=a7,R2e=N_,D2e=i0,I2e=i0,P2e=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function B2e(e){e.l+=2;var t=e.read_shift(2),n=e.read_shift(2),s=e.read_shift(4),i=e.read_shift(2),a=e.read_shift(2),o=P2e[n>>2&31];return{ixti:t,coltype:n&3,rt:o,idx:s,c:i,C:a}}function O2e(e){return e.l+=2,[e.read_shift(4)]}function M2e(e,t,n){return e.l+=5,e.l+=2,e.l+=n.biff==2?1:4,["PTGSHEET"]}function L2e(e,t,n){return e.l+=n.biff==2?4:5,["PTGENDSHEET"]}function z2e(e){var t=e.read_shift(1)>>>5&3,n=e.read_shift(2);return[t,n]}function W2e(e){var t=e.read_shift(1)>>>5&3,n=e.read_shift(2);return[t,n]}function $2e(e){return e.l+=4,[0,0]}var z6={1:{n:"PtgExp",f:o2e},2:{n:"PtgTbl",f:_2e},3:{n:"PtgAdd",f:Cr},4:{n:"PtgSub",f:Cr},5:{n:"PtgMul",f:Cr},6:{n:"PtgDiv",f:Cr},7:{n:"PtgPower",f:Cr},8:{n:"PtgConcat",f:Cr},9:{n:"PtgLt",f:Cr},10:{n:"PtgLe",f:Cr},11:{n:"PtgEq",f:Cr},12:{n:"PtgGe",f:Cr},13:{n:"PtgGt",f:Cr},14:{n:"PtgNe",f:Cr},15:{n:"PtgIsect",f:Cr},16:{n:"PtgUnion",f:Cr},17:{n:"PtgRange",f:Cr},18:{n:"PtgUplus",f:Cr},19:{n:"PtgUminus",f:Cr},20:{n:"PtgPercent",f:Cr},21:{n:"PtgParen",f:Cr},22:{n:"PtgMissArg",f:Cr},23:{n:"PtgStr",f:f2e},26:{n:"PtgSheet",f:M2e},27:{n:"PtgEndSheet",f:L2e},28:{n:"PtgErr",f:l2e},29:{n:"PtgBool",f:d2e},30:{n:"PtgInt",f:c2e},31:{n:"PtgNum",f:u2e},32:{n:"PtgArray",f:qbe},33:{n:"PtgFunc",f:r2e},34:{n:"PtgFuncVar",f:s2e},35:{n:"PtgName",f:g2e},36:{n:"PtgRef",f:e2e},37:{n:"PtgArea",f:Wbe},38:{n:"PtgMemArea",f:v2e},39:{n:"PtgMemErr",f:S2e},40:{n:"PtgMemNoMem",f:k2e},41:{n:"PtgMemFunc",f:b2e},42:{n:"PtgRefErr",f:w2e},43:{n:"PtgAreaErr",f:Ube},44:{n:"PtgRefN",f:t2e},45:{n:"PtgAreaN",f:Hbe},46:{n:"PtgMemAreaN",f:z2e},47:{n:"PtgMemNoMemN",f:W2e},57:{n:"PtgNameX",f:x2e},58:{n:"PtgRef3d",f:n2e},59:{n:"PtgArea3d",f:$be},60:{n:"PtgRefErr3d",f:j2e},61:{n:"PtgAreaErr3d",f:Vbe},255:{}},U2e={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},V2e={1:{n:"PtgElfLel",f:a7},2:{n:"PtgElfRw",f:D2e},3:{n:"PtgElfCol",f:C2e},6:{n:"PtgElfRwV",f:I2e},7:{n:"PtgElfColV",f:A2e},10:{n:"PtgElfRadical",f:T2e},11:{n:"PtgElfRadicalS",f:R2e},13:{n:"PtgElfColS",f:E2e},15:{n:"PtgElfColSV",f:F2e},16:{n:"PtgElfRadicalLel",f:N2e},25:{n:"PtgList",f:B2e},29:{n:"PtgSxName",f:O2e},255:{}},H2e={0:{n:"PtgAttrNoop",f:$2e},1:{n:"PtgAttrSemi",f:Jbe},2:{n:"PtgAttrIf",f:Ybe},4:{n:"PtgAttrChoose",f:Gbe},8:{n:"PtgAttrGoto",f:Kbe},16:{n:"PtgAttrSum",f:a2e},32:{n:"PtgAttrBaxcel",f:L6},33:{n:"PtgAttrBaxcel",f:L6},64:{n:"PtgAttrSpace",f:Qbe},65:{n:"PtgAttrSpaceSemi",f:Zbe},128:{n:"PtgAttrIfError",f:Xbe},255:{}};function a0(e,t,n,s){if(s.biff<8)return Ps(e,t);for(var i=e.l+t,a=[],o=0;o!==n.length;++o)switch(n[o][0]){case"PtgArray":n[o][1]=m2e(e,0,s),a.push(n[o][1]);break;case"PtgMemArea":n[o][2]=h2e(e,n[o][1],s),a.push(n[o][2]);break;case"PtgExp":s&&s.biff==12&&(n[o][1][1]=e.read_shift(4),a.push(n[o][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+n[o][0]}return t=i-e.l,t!==0&&a.push(Ps(e,t)),a}function o0(e,t,n){for(var s=e.l+t,i,a,o=[];s!=e.l;)t=s-e.l,a=e[e.l],i=z6[a]||z6[U2e[a]],(a===24||a===25)&&(i=(a===24?V2e:H2e)[e[e.l+1]]),!i||!i.f?Ps(e,t):o.push([i.n,i.f(e,t,n)]);return o}function q2e(e){for(var t=[],n=0;n<e.length;++n){for(var s=e[n],i=[],a=0;a<s.length;++a){var o=s[a];if(o)switch(o[0]){case 2:i.push('"'+o[1].replace(/"/g,'""')+'"');break;default:i.push(o[1])}else i.push("")}t.push(i.join(","))}return t.join(";")}var G2e={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function K2e(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}function o7(e,t,n){if(!e)return"SH33TJSERR0";if(n.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var s=e.XTI[t];if(n.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),t==0?"":e.XTI[t-1];if(!s)return"SH33TJSERR1";var i="";if(n.biff>8)switch(e[s[0]][0]){case 357:return i=s[1]==-1?"#REF":e.SheetNames[s[1]],s[1]==s[2]?i:i+":"+e.SheetNames[s[2]];case 358:return n.SID!=null?e.SheetNames[n.SID]:"SH33TJSSAME"+e[s[0]][0];case 355:default:return"SH33TJSSRC"+e[s[0]][0]}switch(e[s[0]][0][0]){case 1025:return i=s[1]==-1?"#REF":e.SheetNames[s[1]]||"SH33TJSERR3",s[1]==s[2]?i:i+":"+e.SheetNames[s[2]];case 14849:return e[s[0]].slice(1).map(function(a){return a.Name}).join(";;");default:return e[s[0]][0][3]?(i=s[1]==-1?"#REF":e[s[0]][0][3][s[1]]||"SH33TJSERR4",s[1]==s[2]?i:i+":"+e[s[0]][0][3][s[2]]):"SH33TJSERR2"}}function W6(e,t,n){var s=o7(e,t,n);return s=="#REF"?s:K2e(s,n)}function Fs(e,t,n,s,i){var a=i&&i.biff||8,o={s:{c:0,r:0}},l=[],c,d,u,p=0,m=0,x,w="";if(!e[0]||!e[0][0])return"";for(var y=-1,v="",j=0,k=e[0].length;j<k;++j){var S=e[0][j];switch(S[0]){case"PtgUminus":l.push("-"+l.pop());break;case"PtgUplus":l.push("+"+l.pop());break;case"PtgPercent":l.push(l.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(c=l.pop(),d=l.pop(),y>=0){switch(e[0][y][1][0]){case 0:v=hr(" ",e[0][y][1][1]);break;case 1:v=hr("\r",e[0][y][1][1]);break;default:if(v="",i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][y][1][0])}d=d+v,y=-1}l.push(d+G2e[S[0]]+c);break;case"PtgIsect":c=l.pop(),d=l.pop(),l.push(d+" "+c);break;case"PtgUnion":c=l.pop(),d=l.pop(),l.push(d+","+c);break;case"PtgRange":c=l.pop(),d=l.pop(),l.push(d+":"+c);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":u=qh(S[1][1],o,i),l.push(Gh(u,a));break;case"PtgRefN":u=n?qh(S[1][1],n,i):S[1][1],l.push(Gh(u,a));break;case"PtgRef3d":p=S[1][1],u=qh(S[1][2],o,i),w=W6(s,p,i),l.push(w+"!"+Gh(u,a));break;case"PtgFunc":case"PtgFuncVar":var _=S[1][0],F=S[1][1];_||(_=0),_&=127;var A=_==0?[]:l.slice(-_);l.length-=_,F==="User"&&(F=A.shift()),l.push(F+"("+A.join(",")+")");break;case"PtgBool":l.push(S[1]?"TRUE":"FALSE");break;case"PtgInt":l.push(S[1]);break;case"PtgNum":l.push(String(S[1]));break;case"PtgStr":l.push('"'+S[1].replace(/"/g,'""')+'"');break;case"PtgErr":l.push(S[1]);break;case"PtgAreaN":x=w6(S[1][1],n?{s:n}:o,i),l.push(q2(x,i));break;case"PtgArea":x=w6(S[1][1],o,i),l.push(q2(x,i));break;case"PtgArea3d":p=S[1][1],x=S[1][2],w=W6(s,p,i),l.push(w+"!"+q2(x,i));break;case"PtgAttrSum":l.push("SUM("+l.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":m=S[1][2];var C=(s.names||[])[m-1]||(s[0]||[])[m],D=C?C.Name:"SH33TJSNAME"+String(m);D&&D.slice(0,6)=="_xlfn."&&!i.xlfn&&(D=D.slice(6)),l.push(D);break;case"PtgNameX":var P=S[1][1];m=S[1][2];var L;if(i.biff<=5)P<0&&(P=-P),s[P]&&(L=s[P][m]);else{var T="";if(((s[P]||[])[0]||[])[0]==14849||(((s[P]||[])[0]||[])[0]==1025?s[P][m]&&s[P][m].itab>0&&(T=s.SheetNames[s[P][m].itab-1]+"!"):T=s.SheetNames[m-1]+"!"),s[P]&&s[P][m])T+=s[P][m].Name;else if(s[0]&&s[0][m])T+=s[0][m].Name;else{var R=(o7(s,P,i)||"").split(";;");R[m-1]?T=R[m-1]:T+="SH33TJSERRX"}l.push(T);break}L||(L={Name:"SH33TJSERRY"}),l.push(L.Name);break;case"PtgParen":var U="(",I=")";if(y>=0){switch(v="",e[0][y][1][0]){case 2:U=hr(" ",e[0][y][1][1])+U;break;case 3:U=hr("\r",e[0][y][1][1])+U;break;case 4:I=hr(" ",e[0][y][1][1])+I;break;case 5:I=hr("\r",e[0][y][1][1])+I;break;default:if(i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][y][1][0])}y=-1}l.push(U+l.pop()+I);break;case"PtgRefErr":l.push("#REF!");break;case"PtgRefErr3d":l.push("#REF!");break;case"PtgExp":u={c:S[1][1],r:S[1][0]};var H={c:n.c,r:n.r};if(s.sharedf[an(u)]){var V=s.sharedf[an(u)];l.push(Fs(V,o,H,s,i))}else{var X=!1;for(c=0;c!=s.arrayf.length;++c)if(d=s.arrayf[c],!(u.c<d[0].s.c||u.c>d[0].e.c)&&!(u.r<d[0].s.r||u.r>d[0].e.r)){l.push(Fs(d[1],o,H,s,i)),X=!0;break}X||l.push(S[1])}break;case"PtgArray":l.push("{"+q2e(S[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":y=j;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":l.push("");break;case"PtgAreaErr":l.push("#REF!");break;case"PtgAreaErr3d":l.push("#REF!");break;case"PtgList":l.push("Table"+S[1].idx+"[#"+S[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(S));default:throw new Error("Unrecognized Formula Token: "+String(S))}var N=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(i.biff!=3&&y>=0&&N.indexOf(e[0][j][0])==-1){S=e[0][y];var W=!0;switch(S[1][0]){case 4:W=!1;case 0:v=hr(" ",S[1][1]);break;case 5:W=!1;case 1:v=hr("\r",S[1][1]);break;default:if(v="",i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+S[1][0])}l.push((W?v:"")+l.pop()+(W?"":v)),y=-1}}if(l.length>1&&i.WTF)throw new Error("bad formula stack");return l[0]}function Y2e(e,t,n){var s=e.l+t,i=n.biff==2?1:2,a,o=e.read_shift(i);if(o==65535)return[[],Ps(e,t-2)];var l=o0(e,o,n);return t!==o+i&&(a=a0(e,t-o-i,l,n)),e.l=s,[l,a]}function X2e(e,t,n){var s=e.l+t,i=n.biff==2?1:2,a,o=e.read_shift(i);if(o==65535)return[[],Ps(e,t-2)];var l=o0(e,o,n);return t!==o+i&&(a=a0(e,t-o-i,l,n)),e.l=s,[l,a]}function J2e(e,t,n,s){var i=e.l+t,a=o0(e,s,n),o;return i!==e.l&&(o=a0(e,i-e.l,a,n)),[a,o]}function Q2e(e,t,n){var s=e.l+t,i,a=e.read_shift(2),o=o0(e,a,n);return a==65535?[[],Ps(e,t-2)]:(t!==a+2&&(i=a0(e,s-a-2,o,n)),[o,i])}function Z2e(e){var t;if(cl(e,e.l+6)!==65535)return[As(e),"n"];switch(e[e.l]){case 0:return e.l+=8,["String","s"];case 1:return t=e[e.l+2]===1,e.l+=8,[t,"b"];case 2:return t=e[e.l+2],e.l+=8,[t,"e"];case 3:return e.l+=8,["","s"]}return[]}function Y2(e,t,n){var s=e.l+t,i=Oo(e);n.biff==2&&++e.l;var a=Z2e(e),o=e.read_shift(1);n.biff!=2&&(e.read_shift(1),n.biff>=5&&e.read_shift(4));var l=X2e(e,s-e.l,n);return{cell:i,val:a[0],formula:l,shared:o>>3&1,tt:a[1]}}function T1(e,t,n){var s=e.read_shift(4),i=o0(e,s,n),a=e.read_shift(4),o=a>0?a0(e,a,i,n):null;return[i,o]}var ewe=T1,N1=T1,twe=T1,nwe=T1,rwe
vendor: 7,370 bytes, line 896
896={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},
896l7={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284
vendor: 5,202 bytes, line 896
896:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},swe={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function $6(e){return e.slice(0,3)=="of:"&&(e=e.slice(3)),e.charCodeAt(0)==61&&(e=e.slice(1),e.charCodeAt(0)==61&&(e=e.slice(1))),e=e.replace(/COM\.MICROSOFT\./g,""),e=e.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(t,n){return n.replace(/\./g,"")}),e=e.replace(/\[.(#[A-Z]*[?!])\]/g,"$1"),e.replace(/[;~]/g,",").replace(/\|/g,";")}function X2(e){var t=e.split(":"),n=t[0].split(".")[0];return[n,t[0].split(".")[1]+(t.length>1?":"+(t[1].split(".")[1]||t[1].split(".")[0]):"")]}var Jh={},bf={};function Qh(e,t){if(e){var n=[.7,.7,.75,.75,.3,.3];t=="xlml"&&(n=[1,1,1,1,.5,.5]),e.left==null&&(e.left=n[0]),e.right==null&&(e.right=n[1]),e.top==null&&(e.top=n[2]),e.bottom==null&&(e.bottom=n[3]),e.header==null&&(e.header=n[4]),e.footer==null&&(e.footer=n[5])}}
vendor: 7,307 bytes, lines 896-897
896function c7(e,t,n,s,i,a){try{s.cellNF&&(e.z=cn[t])}catch(l){if(s.WTF)throw l}if(!(e.t==="z"&&!s.cellStyles)){if(e.t==="d"&&typeof e.v=="string"&&(e.v=es(e.v)),(!s||s.cellText!==!1)&&e.t!=="z")try{if(cn[t]==null&&Ld(ixe[t]||"General",t),e.t==="e")e.w=e.w||iu[e.v];else if(t===0)if(e.t==="n")(e.v|0)===e.v?e.w=e.v.toString(10):e.w=_m(e.v);else if(e.t==="d"){var o=Qs(e.v);(o|0)===o?e.w=o.toString(10):e.w=_m(o)}else{if(e.v===void 0)return"";e.w=Kd(e.v,bf)}else e.t==="d"?e.w=ha(t,Qs(e.v),bf):e.w=ha(t,e.v,bf)}catch(l){if(s.WTF)throw l}if(s.cellStyles&&n!=null)try{e.s=a.Fills[n],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=Cy(i.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),s.WTF&&(e.s.fgColor.raw_rgb=i.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=Cy(i.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),s.WTF&&(e.s.bgColor.raw_rgb=i.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(l){if(s.WTF&&a.Fills)throw l}}}function iwe(e,t){var n=gr(t);n.s.r<=n.e.r&&n.s.c<=n.e.c&&n.s.r>=0&&n.s.c>=0&&(e["!ref"]=Sn(n))}var awe=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,owe=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,lwe=/<(?:\w:)?hyperlink [^>]*>/mg,cwe=/"(\w*:\w*)"/,dwe=/<(?:\w:)?col\b[^>]*[\/]?>/g,uwe=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,fwe=/<(?:\w:)?pageMargins[^>]*\/>/g,d7=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,pwe=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,hwe=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function mwe(e,t,n,s,i,a,o){if(!e)return e;s||(s={"!id":{}});var l=t.dense?[]:{},c={s:{r:2e6,c:2e6},e:{r:0,c:0}},d="",u="",p=e.match(owe);p?(d=e.slice(0,p.index),u=e.slice(p.index+p[0].length)):d=u=e;var m=d.match(d7);m?R_(m[0],l,i,n):(m=d.match(pwe))&&gwe(m[0],m[1]||"",l,i,n);var x=(d.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(x>0){var w=d.slice(x,x+50).match(cwe);w&&iwe(l,w[1])}var y=d.match(hwe);y&&y[1]&&jwe(y[1],i);var v=[];if(t.cellStyles){var j=d.match(dwe);j&&vwe(v,j)}p&&Swe(p[1],l,t,c,a,o);var k=u.match(uwe);k&&(l["!autofilter"]=bwe(k[0]));var S=[],_=u.match(awe);if(_)for(x=0;x!=_.length;++x)S[x]=gr(_[x].slice(_[x].indexOf('"')+1));var F=u.match(lwe);F&&xwe(l,F,s);var A=u.match(fwe);if(A&&(l["!margins"]=ywe(Zt(A[0]))),!l["!ref"]&&c.e.c>=c.s.c&&c.e.r>=c.s.r&&(l["!ref"]=Sn(c)),t.sheetRows>0&&l["!ref"]){var C=gr(l["!ref"]);t.sheetRows<=+C.e.r&&(C.e.r=t.sheetRows-1,C.e.r>c.e.r&&(C.e.r=c.e.r),C.e.r<C.s.r&&(C.s.r=C.e.r),C.e.c>c.e.c&&(C.e.c=c.e.c),C.e.c<C.s.c&&(C.s.c=C.e.c),l["!fullref"]=l["!ref"],l["!ref"]=Sn(C))}return v.length>0&&(l["!cols"]=v),S.length>0&&(l["!merges"]=S),l}function R_(e,t,n,s){var i=Zt(e);n.Sheets[s]||(n.Sheets[s]={}),i.codeName&&(n.Sheets[s].CodeName=Fn(Jn(i.codeName)))}function gwe(e,t,n,s,i){R_(e.slice(0,e.indexOf(">")),n,s,i)}function xwe(e,t,n){for(var s=Array.isArray(e),i=0;i!=t.length;++i){var a=Zt(Jn(t[i]),!0);if(!a.ref)return;var o=((n||{})["!id"]||[])[a.id];o?(a.Target=o.Target,a.location&&(a.Target+="#"+Fn(a.location))):(a.Target="#"+Fn(a.location),o={Target:a.Target,TargetMode:"Internal"}),a.Rel=o,a.tooltip&&(a.Tooltip=a.tooltip,delete a.tooltip);for(var l=gr(a.ref),c=l.s.r;c<=l.e.r;++c)for(var d=l.s.c;d<=l.e.c;++d){var u=an({c:d,r:c});s?(e[c]||(e[c]=[]),e[c][d]||(e[c][d]={t:"z",v:void 0}),e[c][d].l=a):(e[u]||(e[u]={t:"z",v:void 0}),e[u].l=a)}}}function ywe(e){var t={};return["left","right","top","bottom","header","footer"].forEach(function(n){e[n]&&(t[n]=parseFloat(e[n]))}),t}function vwe(e,t){for(var n=!1,s=0;s!=t.length;++s){var i=Zt(t[s],!0);i.hidden&&(i.hidden=ir(i.hidden));var a=parseInt(i.min,10)-1,o=parseInt(i.max,10)-1;for(i.outlineLevel&&(i.level=+i.outlineLevel||0),delete i.min,delete i.max,i.width=+i.width,!n&&i.width&&(n=!0,T_(i.width)),Hf(i);a<=o;)e[a++]=fs(i)}}function bwe(e){var t={ref:(e.match(/ref="([^"]*)"/)||[])[1]};return t}var wwe=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function jwe(e,t){t.Views||(t.Views=[{}]),(e.match(wwe)||[]).forEach(function(n,s){var i=Zt(n);t.Views[s]||(t.Views[s]={}),+i.zoomScale&&(t.Views[s].zoom=+i.zoomScale),ir(i.rightToLeft)&&(t.Views[s].RTL=!0)})}var Swe=(function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,n=/r=["']([^"']*)["']/,s=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,i=/ref=["']([^"']*)["']/,a=Cm("v"),o=Cm("f");return function(c,d,u,p,m,x){for(var w=0,y="",v=[],j=[],k=0,S=0,_=0,F="",A,C,D=0,P=0,L,T,R=0,U=0,I=Array.isArray(x.CellXf),H,V=[],X=[],N=Array.isArray(d),W=[],O={},G=!1,M=!!u.sheetStubs,z=c.split(t),K=0,Y=z.length;K!=Y;++K){y=z[K].trim();var J=y.length;if(J!==0){var Q=0;e:for(w=0;w<J;++w)switch(y[w]){case">":if(y[w-1]!="/"){++w;break e}if(u&&u.cellStyles){if(C=Zt(y.slice(Q,w),!0),D=C.r!=null?parseInt(C.r,10):D+1,P=-1,u.sheetRows&&u.sheetRows<D)continue;O={},G=!1,C.ht&&(G=!0,O.hpt=parseFloat(C.ht),O.hpx=Tm(O.hpt)),C.hidden=="1"&&(G=!0,O.hidden=!0),C.outlineLevel!=null&&(G=!0,O.level=+C.outlineLevel),G&&(W[D-1]=O)}break;case"<":Q=w;break}if(Q>=w)break;if(C=Zt(y.slice(Q,w),!0),D=C.r!=null?parseInt(C.r,10):D+1,P=-1,!(u.sheetRows&&u.sheetRows<D)){p.s.r>D-1&&(p.s.r=D-1),p.e.r<D-1&&(p.e.r=D-1),u&&u.cellStyles&&(O={},G=!1,C.ht&&(G=!0,O.hpt=parseFloat(C.ht),O.hpx=Tm(O.hpt)),C.hidden=="1"&&(G=!0,O.hidden=!0),C.outlineLevel!=null&&(G=!0,O.level=+C.outlineLevel),G&&(W[D-1]=O)),v=y.slice(w).split(e);for(var ie=0;ie!=v.length&&v[ie].trim().charAt(0)=="<";++ie);for(v=v.slice(ie),w=0;w!=v.length;++w)if(y=v[w].trim(),y.length!==0){if(j=y.match(n),k=w,S=0,_=0,y="<c "+(y.slice(0,1)=="<"?">":"")+y,j!=null&&j.length===2){for(k=0,F=j[1],S=0;S!=F.length&&!((_=F.charCodeAt(S)-64)<1||_>26);++S)k=26*k+_;--k,P=k}else++P;for(S=0;S!=y.length&&y.charCodeAt(S)!==62;++S);if(++S,C=Zt(y.slice(0,S),!0),C.r||(C.r=an({r:D-1,c:P})),F=y.slice(S),A={t:""},(j=F.match(a))!=null&&j[1]!==""&&(A.v=Fn(j[1])),u.cellFormula){if((j=F.match(o))!=null&&j[1]!==""){if(A.f=Fn(Jn(j[1])).replace(/\r\n/g,`
897`),u.xlfn||(A.f=M6(A.f)),j[0].indexOf('t="array"')>-1)A.F=(F.match(i)||[])[1],A.F.indexOf(":")>-1&&V.push([gr(A.F),A.F]);else if(j[0].indexOf('t="shared"')>-1){T=Zt(j[0]);var ae=Fn(Jn(j[1]));u.xlfn||(ae=M6(ae)),X[parseInt(T.si,10)]=[T,ae,C.r]}}else(j=F.match(/<f[^>]*\/>/))&&(T=Zt(j[0]),X[T.si]&&(A.f=Ibe(X[T.si][1],X[T.si][2],C.r)));var re=Ys(C.r);for(S=0;S<V.length;++S)re.r>=V[S][0].s.r&&re.r<=V[S][0].e.r&&re.c>=V[S][0].s.c&&re.c<=V[S][0].e.c&&(A.F=V[S][1])}if(C.t==null&&A.v===void 0)if(A.f||A.F)A.v=0,A.t="n";else if(M)A.t="z";else continue;else A.t=C.t||"n";switch(p.s.c>P&&(p.s.c=P),p.e.c<P&&(p.e.c=P),A.t){case"n":if(A.v==""||A.v==null){if(!M)continue;A.t="z"}else A.v=parseFloat(A.v);break;case"s":if(typeof A.v>"u"){if(!M)continue;A.t="z"}else L=Jh[parseInt(A.v,10)],A.v=L.t,A.r=L.r,u.cellHTML&&(A.h=L.h);break;case"str":A.t="s",A.v=A.v!=null?Jn(A.v):"",u.cellHTML&&(A.h=v_(A.v));break;case"inlineStr":j=F.match(s),A.t="s",j!=null&&(L=A_(j[1]))?(A.v=L.t,u.cellHTML&&(A.h=L.h)):A.v="";break;case"b":A.v=ir(A.v);break;case"d":u.cellDates?A.v=es(A.v,1):(A.v=Qs(es(A.v,1)),A.t="n");break;case"e":(!u||u.cellText!==!1)&&(A.w=A.v),A.v=N9[A.v];break}if(R=U=0,H=null,I&&C.s!==void 0&&(H=x.CellXf[C.s],H!=null&&(H.numFmtId!=null&&(R=H.numFmtId),u.cellStyles&&H.fillId!=null&&(U=H.fillId))),c7(A,R,U,u,m,x),u.cellDates&&I&&A.t=="n"&&op(cn[R]
vendor: 10,568 bytes, line 897
897)&&(A.t="d",A.v=F1(A.v)),C.cm&&u.xlmeta){var pe=(u.xlmeta.Cell||[])[+C.cm-1];pe&&pe.type=="XLDAPR"&&(A.D=!0)}if(N){var Z=Ys(C.r);d[Z.r]||(d[Z.r]=[]),d[Z.r][Z.c]=A}else d[C.r]=A}}}}W.length>0&&(d["!rows"]=W)}})();function kwe(e,t){var n={},s=e.l+t;n.r=e.read_shift(4),e.l+=4;var i=e.read_shift(2);e.l+=1;var a=e.read_shift(1);return e.l=s,a&7&&(n.level=a&7),a&16&&(n.hidden=!0),a&32&&(n.hpt=i/20),n}var _we=su;function Cwe(){}function Ewe(e,t){var n={},s=e[e.l];return++e.l,n.above=!(s&64),n.left=!(s&128),e.l+=18,n.name=Yxe(e),n}function Fwe(e){var t=ga(e);return[t]}function Awe(e){var t=ru(e);return[t]}function Twe(e){var t=ga(e),n=e.read_shift(1);return[t,n,"b"]}function Nwe(e){var t=ru(e),n=e.read_shift(1);return[t,n,"b"]}function Rwe(e){var t=ga(e),n=e.read_shift(1);return[t,n,"e"]}function Dwe(e){var t=ru(e),n=e.read_shift(1);return[t,n,"e"]}function Iwe(e){var t=ga(e),n=e.read_shift(4);return[t,n,"s"]}function Pwe(e){var t=ru(e),n=e.read_shift(4);return[t,n,"s"]}function Bwe(e){var t=ga(e),n=As(e);return[t,n,"n"]}function u7(e){var t=ru(e),n=As(e);return[t,n,"n"]}function Owe(e){var t=ga(e),n=C_(e);return[t,n,"n"]}function Mwe(e){var t=ru(e),n=C_(e);return[t,n,"n"]}function Lwe(e){var t=ga(e),n=k_(e);return[t,n,"is"]}function zwe(e){var t=ga(e),n=Ds(e);return[t,n,"str"]}function Wwe(e){var t=ru(e),n=Ds(e);return[t,n,"str"]}function $we(e,t,n){var s=e.l+t,i=ga(e);i.r=n["!row"];var a=e.read_shift(1),o=[i,a,"b"];if(n.cellFormula){e.l+=2;var l=N1(e,s-e.l,n);o[3]=Fs(l,null,i,n.supbooks,n)}else e.l=s;return o}function Uwe(e,t,n){var s=e.l+t,i=ga(e);i.r=n["!row"];var a=e.read_shift(1),o=[i,a,"e"];if(n.cellFormula){e.l+=2;var l=N1(e,s-e.l,n);o[3]=Fs(l,null,i,n.supbooks,n)}else e.l=s;return o}function Vwe(e,t,n){var s=e.l+t,i=ga(e);i.r=n["!row"];var a=As(e),o=[i,a,"n"];if(n.cellFormula){e.l+=2;var l=N1(e,s-e.l,n);o[3]=Fs(l,null,i,n.supbooks,n)}else e.l=s;return o}function Hwe(e,t,n){var s=e.l+t,i=ga(e);i.r=n["!row"];var a=Ds(e),o=[i,a,"str"];if(n.cellFormula){e.l+=2;var l=N1(e,s-e.l,n);o[3]=Fs(l,null,i,n.supbooks,n)}else e.l=s;return o}var qwe=su;function Gwe(e,t){var n=e.l+t,s=su(e),i=__(e),a=Ds(e),o=Ds(e),l=Ds(e);e.l=n;var c={rfx:s,relId:i,loc:a,display:l};return o&&(c.Tooltip=o),c}function Kwe(){}function Ywe(e,t,n){var s=e.l+t,i=F9(e),a=e.read_shift(1),o=[i];if(o[2]=a,n.cellFormula){var l=ewe(e,s-e.l,n);o[1]=l}else e.l=s;return o}function Xwe(e,t,n){var s=e.l+t,i=su(e),a=[i];if(n.cellFormula){var o=nwe(e,s-e.l,n);a[1]=o,e.l=s}else e.l=s;return a}var Jwe=["left","right","top","bottom","header","footer"];function Qwe(e){var t={};return Jwe.forEach(function(n){t[n]=As(e)}),t}function Zwe(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function eje(){}function tje(){}function nje(e,t,n,s,i,a,o){if(!e)return e;var l=t||{};s||(s={"!id":{}});var c=l.dense?[]:{},d,u={s:{r:2e6,c:2e6},e:{r:0,c:0}},p=!1,m=!1,x,w,y,v,j,k,S,_,F,A=[];l.biff=12,l["!row"]=0;var C=0,D=!1,P=[],L={},T=l.supbooks||i.supbooks||[[]];if(T.sharedf=L,T.arrayf=P,T.SheetNames=i.SheetNames||i.Sheets.map(function(N){return N.name}),!l.supbooks&&(l.supbooks=T,i.Names))for(var R=0;R<i.Names.length;++R)T[0][R+1]=i.Names[R];var U=[],I=[],H=!1;Ay[16]={n:"BrtShortReal",f:u7};var V;if(Cl(e,function(W,O,G){if(!m)switch(G){case 148:d=W;break;case 0:x=W,l.sheetRows&&l.sheetRows<=x.r&&(m=!0),_=ps(v=x.r),l["!row"]=x.r,(W.hidden||W.hpt||W.level!=null)&&(W.hpt&&(W.hpx=Tm(W.hpt)),I[W.r]=W);break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 17:case 18:case 62:switch(w={t:W[2]},W[2]){case"n":w.v=W[1];break;case"s":S=Jh[W[1]],w.v=S.t,w.r=S.r;break;case"b":w.v=!!W[1];break;case"e":w.v=W[1],l.cellText!==!1&&(w.w=iu[w.v]);break;case"str":w.t="s",w.v=W[1];break;case"is":w.t="s",w.v=W[1].t;break}if((y=o.CellXf[W[0].iStyleRef])&&c7(w,y.numFmtId,null,l,a,o),j=W[0].c==-1?j+1:W[0].c,l.dense?(c[v]||(c[v]=[]),c[v][j]=w):c[zr(j)+_]=w,l.cellFormula){for(D=!1,C=0;C<P.length;++C){var M=P[C];x.r>=M[0].s.r&&x.r<=M[0].e.r&&j>=M[0].s.c&&j<=M[0].e.c&&(w.F=Sn(M[0]),D=!0)}!D&&W.length>3&&(w.f=W[3])}if(u.s.r>x.r&&(u.s.r=x.r),u.s.c>j&&(u.s.c=j),u.e.r<x.r&&(u.e.r=x.r),u.e.c<j&&(u.e.c=j),l.cellDates&&y&&w.t=="n"&&op(cn[y.numFmtId])){var z=Ed(w.v);z&&(w.t="d",w.v=new Date(z.y,z.m-1,z.d,z.H,z.M,z.S,z.u))}V&&(V.type=="XLDAPR"&&(w.D=!0),V=void 0);break;case 1:case 12:if(!l.sheetStubs||p)break;w={t:"z",v:void 0},j=W[0].c==-1?j+1:W[0].c,l.dense?(c[v]||(c[v]=[]),c[v][j]=w):c[zr(j)+_]=w,u.s.r>x.r&&(u.s.r=x.r),u.s.c>j&&(u.s.c=j),u.e.r<x.r&&(u.e.r=x.r),u.e.c<j&&(u.e.c=j),V&&(V.type=="XLDAPR"&&(w.D=!0),V=void 0);break;case 176:A.push(W);break;case 49:V=((l.xlmeta||{}).Cell||[])[W-1];break;case 494:var K=s["!id"][W.relId];for(K?(W.Target=K.Target,W.loc&&(W.Target+="#"+W.loc),W.Rel=K):W.relId==""&&(W.Target="#"+W.loc),v=W.rfx.s.r;v<=W.rfx.e.r;++v)for(j=W.rfx.s.c;j<=W.rfx.e.c;++j)l.dense?(c[v]||(c[v]=[]),c[v][j]||(c[v][j]={t:"z",v:void 0}),c[v][j].l=W):(k=an({c:j,r:v}),c[k]||(c[k]={t:"z",v:void 0}),c[k].l=W);break;case 426:if(!l.cellFormula)break;P.push(W),F=l.dense?c[v][j]:c[zr(j)+_],F.f=Fs(W[1],u,{r:x.r,c:j},T,l),F.F=Sn(W[0]);break;case 427:if(!l.cellFormula)break;L[an(W[0].s)]=W[1],F=l.dense?c[v][j]:c[zr(j)+_],F.f=Fs(W[1],u,{r:x.r,c:j},T,l);break;case 60:if(!l.cellStyles)break;for(;W.e>=W.s;)U[W.e--]={width:W.w/256,hidden:!!(W.flags&1),level:W.level},H||(H=!0,T_(W.w/256)),Hf(U[W.e+1]);break;case 161:c["!autofilter"]={ref:Sn(W)};break;case 476:c["!margins"]=W;break;case 147:i.Sheets[n]||(i.Sheets[n]={}),W.name&&(i.Sheets[n].CodeName=W.name),(W.above||W.left)&&(c["!outline"]={above:W.above,left:W.left});break;case 137:i.Views||(i.Views=[{}]),i.Views[0]||(i.Views[0]={}),W.RTL&&(i.Views[0].RTL=!0);break;case 485:break;case 64:case 1053:break;case 151:break;case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 551:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:p=!0;break;case 36:p=!1;break;case 37:p=!0;break;case 38:p=!1;break;default:if(!O.T){if(!p||l.WTF)throw new Error("Unexpected record 0x"+G.toString(16))}}},l),delete l.supbooks,delete l["!row"],!c["!ref"]&&(u.s.r<2e6||d&&(d.e.r>0||d.e.c>0||d.s.r>0||d.s.c>0))&&(c["!ref"]=Sn(d||u)),l.sheetRows&&c["!ref"]){var X=gr(c["!ref"]);l.sheetRows<=+X.e.r&&(X.e.r=l.sheetRows-1,X.e.r>u.e.r&&(X.e.r=u.e.r),X.e.r<X.s.r&&(X.s.r=X.e.r),X.e.c>u.e.c&&(X.e.c=u.e.c),X.e.c<X.s.c&&(X.s.c=X.e.c),c["!fullref"]=c["!ref"],c["!ref"]=Sn(X))}return A.length>0&&(c["!merges"]=A),U.length>0&&(c["!cols"]=U),I.length>0&&(c["!rows"]=I),c}function rje(e){var t=[],n=e.match(/^<c:numCache>/),s;(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/mg)||[]).forEach(function(a){var o=a.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);o&&(t[+o[1]]=n?+o[2]:o[2])});var i=Fn((e.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/<c:f>(.*?)<\/c:f>/mg)||[]).forEach(function(a){s=a.replace(/<.*?>/g,"")}),[t,i,s]}function sje(e,t,n,s,i,a){var o=a||{"!type":"chart"};if(!e)return a;var l=0,c=0,d="A",u={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(p){var m=rje(p);u.s.r=u.s.c=0,u.e.c=l,d=zr(l),m[0].forEach(function(x,w){o[d+ps(w)]={t:"n",v:x,z:m[1]},c=w}),u.e.r<c&&(u.e.r=c),++l}),l>0&&(o["!ref"]=Sn(u)),o}function ije(e,t,n,s,i){if(!e)return e;s||(s={"!id":{}});var a={"!type":"chart","!drawel":null,"!rel":""},o,l=e.match(d7);return l&&R_(l[0],a,i,n),(o=e.match(/drawing r:id="(.*?)"/))&&(a["!rel"]=o[1]),s["!id"][a["!rel"]]&&(a["!drawel"]=s["!id"][a["!rel"]]),a}function aje(e,t){e.l+=10;var n=Ds(e);return{name:n}}function oje(e,t,n,s,i){if(!e)return e;s||(s={"!id":{}});var a={"!type":"chart","!drawel":null,"!rel":""},o=!1;return Cl(e,function(c,d,u){switch(u){case 550:a["!rel"]=c;break;case 651:i.Sheets[n]||(i.Sheets[n]={}),c.name&&(i.Sheets[n].CodeName=c.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:break;case 35:o=!0;break;case 36:o=!1;break;case 37:break;case 38:break;default:if(!(d.T>0)){if(!(d.T<0)){if(!o||t.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}}},t),s["!id"][a["!rel"]]&&(a["!drawel"]=s["!id"][a["!rel"]]),a}var f7=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],lje=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],cje=[],dje=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function U6(e,t){for(var n=0;n!=e.length;++n)for(var s=e[n],i=0;i!=t.length;++i){var a=t[i];if(s[a[0]]==null)s[a[0]]=a[1];else switch(a[2]){case"bool":typeof s[a[0]]=="string"&&(s[a[0]]=ir(s[a[0]]));break;case"int":typeof s[a[0]]=="string"&&(s[a[0]]=parseInt(s[a[0]],10));break}}}function V6(e,t){for(var n=0;n!=t.length;++n){var s=t[n];if(e[s[0]]==null)e[s[0]]=s[1];else switch(s[2]){case"bool":typeof e[s[0]]=="string"&&(e[s[0]]=ir(e[s[0]]));break;case"int":typeof e[s[0]]=="string"&&(e[s[0]]=parseInt(e[s[0]],10));break}}}function p7(e){V6(e.WBProps,f7),V6(e.CalcPr,dje),U6(e.WBView,lje),U6(e.Sheets,cje),bf.date1904=ir(e.WBProps.date1904)}var uje="][*?/\\".split("");function fje(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");var n=!0;return uje.forEach(function(s){if(e.indexOf(s)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),n}var pje=/<\w+:workbook/;function hje(e,t){if(!e)throw new Error("Could not find file");var n={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},s=!1,i="xmlns",a={},o=0;
vendor: 35,236 bytes, lines 897-899
897if(e.replace(Os,function(c,d){var u=Zt(c);switch(Bo(u[0])){case"<?xml":break;case"<workbook":c.match(pje)&&(i="xmlns"+c.match(/<(\w+):/)[1]),n.xmlns=u[i];break;case"</workbook>":break;case"<fileVersion":delete u[0],n.AppVersion=u;break;case"<fileVersion/>":case"</fileVersion>":break;case"<fileSharing":break;case"<fileSharing/>":break;case"<workbookPr":case"<workbookPr/>":f7.forEach(function(p){if(u[p[0]]!=null)switch(p[2]){case"bool":n.WBProps[p[0]]=ir(u[p[0]]);break;case"int":n.WBProps[p[0]]=parseInt(u[p[0]],10);break;default:n.WBProps[p[0]]=u[p[0]]}}),u.codeName&&(n.WBProps.CodeName=Jn(u.codeName));break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":case"<bookViews>":case"</bookViews>":break;case"<workbookView":case"<workbookView/>":delete u[0],n.WBView.push(u);break;case"</workbookView>":break;case"<sheets":case"<sheets>":case"</sheets>":break;case"<sheet":switch(u.state){case"hidden":u.Hidden=1;break;case"veryHidden":u.Hidden=2;break;default:u.Hidden=0}delete u.state,u.name=Fn(Jn(u.name)),delete u[0],n.Sheets.push(u);break;case"</sheet>":break;case"<functionGroups":case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":case"</externalReferences>":case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":case"<definedNames":s=!0;break;case"</definedNames>":s=!1;break;case"<definedName":a={},a.Name=Jn(u.name),u.comment&&(a.Comment=u.comment),u.localSheetId&&(a.Sheet=+u.localSheetId),ir(u.hidden||"0")&&(a.Hidden=!0),o=d+c.length;break;case"</definedName>":a.Ref=Fn(Jn(e.slice(o,d))),n.Names.push(a);break;case"<definedName/>":break;case"<calcPr":delete u[0],n.CalcPr=u;break;case"<calcPr/>":delete u[0],n.CalcPr=u;break;case"</calcPr>":break;case"<oleSize":break;case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":break;case"<customWorkbookView":case"</customWorkbookView>":break;case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":break;case"<pivotCache":break;case"<smartTagPr":case"<smartTagPr/>":break;case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":break;case"<smartTagType":break;case"<webPublishing":case"<webPublishing/>":break;case"<fileRecoveryPr":case"<fileRecoveryPr/>":break;case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":break;case"<webPublishObject":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":s=!0;break;case"</ext>":s=!1;break;case"<ArchID":break;case"<AlternateContent":case"<AlternateContent>":s=!0;break;case"</AlternateContent>":s=!1;break;case"<revisionPtr":break;default:if(!s&&t.WTF)throw new Error("unrecognized "+u[0]+" in workbook")}return c}),Rxe.indexOf(n.xmlns)===-1)throw new Error("Unknown Namespace: "+n.xmlns);return p7(n),n}function mje(e,t){var n={};return n.Hidden=e.read_shift(4),n.iTabID=e.read_shift(4),n.strRelID=Pj(e),n.name=Ds(e),n}function gje(e,t){var n={},s=e.read_shift(4);n.defaultThemeVersion=e.read_shift(4);var i=t>8?Ds(e):"";return i.length>0&&(n.CodeName=i),n.autoCompressPictures=!!(s&65536),n.backupFile=!!(s&64),n.checkCompatibility=!!(s&4096),n.date1904=!!(s&1),n.filterPrivacy=!!(s&8),n.hidePivotFieldList=!!(s&1024),n.promptedSolutions=!!(s&16),n.publishItems=!!(s&2048),n.refreshAllConnections=!!(s&262144),n.saveExternalLinkValues=!!(s&128),n.showBorderUnselectedTables=!!(s&4),n.showInkAnnotation=!!(s&32),n.showObjects=["all","placeholders","none"][s>>13&3],n.showPivotChartFilter=!!(s&32768),n.updateLinks=["userSet","never","always"][s>>8&3],n}function xje(e,t){var n={};return e.read_shift(4),n.ArchID=e.read_shift(4),e.l+=t-8,n}function yje(e,t,n){var s=e.l+t;e.l+=4,e.l+=1;var i=e.read_shift(4),a=Xxe(e),o=twe(e,0,n),l=__(e);e.l=s;var c={Name:a,Ptg:o};return i<268435455&&(c.Sheet=i),l&&(c.Comment=l),c}function vje(e,t){var n={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},s=[],i=!1;t||(t={}),t.biff=12;var a=[],o=[[]];return o.SheetNames=[],o.XTI=[],Ay[16]={n:"BrtFRTArchID$",f:xje},Cl(e,function(c,d,u){switch(u){case 156:o.SheetNames.push(c.name),n.Sheets.push(c);break;case 153:n.WBProps=c;break;case 39:c.Sheet!=null&&(t.SID=c.Sheet),c.Ref=Fs(c.Ptg,null,null,o,t),delete t.SID,delete c.Ptg,a.push(c);break;case 1036:break;case 357:case 358:case 355:case 667:o[0].length?o.push([u,c]):o[0]=[u,c],o[o.length-1].XTI=[];break;case 362:o.length===0&&(o[0]=[],o[0].XTI=[]),o[o.length-1].XTI=o[o.length-1].XTI.concat(c),o.XTI=o.XTI.concat(c);break;case 361:break;case 2071:case 158:case 143:case 664:case 353:break;case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:break;case 35:s.push(u),i=!0;break;case 36:s.pop(),i=!1;break;case 37:s.push(u),i=!0;break;case 38:s.pop(),i=!1;break;case 16:break;default:if(!d.T){if(!i||t.WTF&&s[s.length-1]!=37&&s[s.length-1]!=35)throw new Error("Unexpected record 0x"+u.toString(16))}}},t),p7(n),n.Names=a,n.supbooks=o,n}function bje(e,t,n){return t.slice(-4)===".bin"?vje(e,n):hje(e,n)}function wje(e,t,n,s,i,a,o,l){return t.slice(-4)===".bin"?nje(e,s,n,i,a,o,l):mwe(e,s,n,i,a,o,l)}function jje(e,t,n,s,i,a,o,l){return t.slice(-4)===".bin"?oje(e,s,n,i,a):ije(e,s,n,i,a)}function Sje(e,t,n,s,i,a,o,l){return t.slice(-4)===".bin"?Nbe():Rbe()}function kje(e,t,n,s,i,a,o,l){return t.slice(-4)===".bin"?Abe():Tbe()}function _je(e,t,n,s){return t.slice(-4)===".bin"?qve(e,n,s):zve(e,n,s)}function Cje(e,t,n){return Z9(e,n)}function Eje(e,t,n){return t.slice(-4)===".bin"?lve(e,n):ave(e,n)}function Fje(e,t,n){return t.slice(-4)===".bin"?Cbe(e,n):wbe(e,n)}function Aje(e,t,n){return t.slice(-4)===".bin"?ybe(e):gbe(e)}function Tje(e,t,n,s){return n.slice(-4)===".bin"?vbe(e,t,n,s):void 0}function Nje(e,t,n){return t.slice(-4)===".bin"?hbe(e,t,n):mbe(e,t,n)}var h7=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,m7=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function _a(e,t){var n=e.split(/\s+/),s=[];if(s[0]=n[0],n.length===1)return s;var i=e.match(h7),a,o,l,c;if(i)for(c=0;c!=i.length;++c)a=i[c].match(m7),(o=a[1].indexOf(":"))===-1?s[a[1]]=a[2].slice(1,a[2].length-1):(a[1].slice(0,6)==="xmlns:"?l="xmlns"+a[1].slice(6):l=a[1].slice(o+1),s[l]=a[2].slice(1,a[2].length-1));return s}function Rje(e){var t=e.split(/\s+/),n={};if(t.length===1)return n;var s=e.match(h7),i,a,o,l;if(s)for(l=0;l!=s.length;++l)i=s[l].match(m7),(a=i[1].indexOf(":"))===-1?n[i[1]]=i[2].slice(1,i[2].length-1):(i[1].slice(0,6)==="xmlns:"?o="xmlns"+i[1].slice(6):o=i[1].slice(a+1),n[o]=i[2].slice(1,i[2].length-1));return n}var Zh;function Dje(e,t){var n=Zh[e]||Fn(e);return n==="General"?Kd(t):ha(n,t)}function Ije(e,t,n,s){var i=s;switch((n[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":i=ir(s);break;case"i2":case"int":i=parseInt(s,10);break;case"r4":case"float":i=parseFloat(s);break;case"date":case"dateTime.tz":i=es(s);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+n[0])}e[Fn(t)]=i}function Pje(e,t,n){if(e.t!=="z"){if(!n||n.cellText!==!1)try{e.t==="e"?e.w=e.w||iu[e.v]:t==="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=_m(e.v):e.w=Kd(e.v):e.w=Dje(t||"General",e.v)}catch(a){if(n.WTF)throw a}try{var s=Zh[t]||t||"General";if(n.cellNF&&(e.z=s),n.cellDates&&e.t=="n"&&op(s)){var i=Ed(e.v);i&&(e.t="d",e.v=new Date(i.y,i.m-1,i.d,i.H,i.M,i.S,i.u))}}catch(a){if(n.WTF)throw a}}}function Bje(e,t,n){if(n.cellStyles&&t.Interior){var s=t.Interior;s.Pattern&&(s.patternType=Ive[s.Pattern]||s.Pattern)}e[t.ID]=t}function Oje(e,t,n,s,i,a,o,l,c,d){var u="General",p=s.StyleID,m={};d=d||{};var x=[],w=0;for(p===void 0&&l&&(p=l.StyleID),p===void 0&&o&&(p=o.StyleID);a[p]!==void 0&&(a[p].nf&&(u=a[p].nf),a[p].Interior&&x.push(a[p].Interior),!!a[p].Parent);)p=a[p].Parent;switch(n.Type){case"Boolean":s.t="b",s.v=ir(e);break;case"String":s.t="s",s.r=f6(Fn(e)),s.v=e.indexOf("<")>-1?Fn(t||e).replace(/<.*?>/g,""):s.r;break;case"DateTime":e.slice(-1)!="Z"&&(e+="Z"),s.v=(es(e)-new Date(Date.UTC(1899,11,30)))/(1440*60*1e3),s.v!==s.v?s.v=Fn(e):s.v<60&&(s.v=s.v-1),(!u||u=="General")&&(u="yyyy-mm-dd");case"Number":s.v===void 0&&(s.v=+e),s.t||(s.t="n");break;case"Error":s.t="e",s.v=N9[e],d.cellText!==!1&&(s.w=e);break;default:e==""&&t==""?s.t="z":(s.t="s",s.v=f6(t||e));break}if(Pje(s,u,d),d.cellFormula!==!1)if(s.Formula){var y=Fn(s.Formula);y.charCodeAt(0)==61&&(y=y.slice(1)),s.f=vf(y,i),delete s.Formula,s.ArrayRange=="RC"?s.F=vf("RC:RC",i):s.ArrayRange&&(s.F=vf(s.ArrayRange,i),c.push([gr(s.F),s.F]))}else for(w=0;w<c.length;++w)i.r>=c[w][0].s.r&&i.r<=c[w][0].e.r&&i.c>=c[w][0].s.c&&i.c<=c[w][0].e.c&&(s.F=c[w][1]);d.cellStyles&&(x.forEach(function(v){!m.patternType&&v.patternType&&(m.patternType=v.patternType)}),s.s=m),s.StyleID!==void 0&&(s.ixfe=s.StyleID)}function Mje(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,`
898`).replace(/\r/g,`
899`),e.v=e.w=e.ixfe=void 0}function J2(e,t){var n=t||{};r9();var s=Nh(b_(e));(n.type=="binary"||n.type=="array"||n.type=="base64")&&(s=Jn(s));var i=s.slice(0,1024).toLowerCase(),a=!1;if(i=i.replace(/".*?"/g,""),(i.indexOf(">")&1023)>Math.min(i.indexOf(",")&1023,i.indexOf(";")&1023)){var o=fs(n);return o.type="string",Fm.to_workbook(s,o)}if(i.indexOf("<?xml")==-1&&["html","table","head","meta","script","style","div"].forEach(function(ge){i.indexOf("<"+ge)>=0&&(a=!0)}),a)return Gje(s,n);Zh={"General Number":"General","General Date":cn[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":cn[15],"Short Date":cn[14],"Long Time":cn[19],"Medium Time":cn[18],"Short Time":cn[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:cn[2],Standard:cn[4],Percent:cn[10],Scientific:cn[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var l,c=[],d,u={},p=[],m=n.dense?[]:{},x="",w={},y={},v=_a('<Data ss:Type="String">'),j=0,k=0,S=0,_={s:{r:2e6,c:2e6},e:{r:0,c:0}},F={},A={},C="",D=0,P=[],L={},T={},R=0,U=[],I=[],H={},V=[],X,N=!1,W=[],O=[],G={},M=0,z=0,K={Sheets:[],WBProps:{date1904:!1}},Y={};Em.lastIndex=0,s=s.replace(/<!--([\s\S]*?)-->/mg,"");for(var J="";l=Em.exec(s);)switch(l[3]=(J=l[3]).toLowerCase()){case"data":if(J=="data"){if(l[1]==="/"){if((d=c.pop())[0]!==l[3])throw new Error("Bad state: "+d.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break}if(c[c.length-1][1])break;l[1]==="/"?Oje(s.slice(j,l.index),C,v,c[c.length-1][0]=="comment"?H:w,{c:k,r:S},F,V[k],y,W,n):(C="",v=_a(l[0]),j=l.index+l[0].length);break;case"cell":if(l[1]==="/")if(I.length>0&&(w.c=I),(!n.sheetRows||n.sheetRows>S)&&w.v!==void 0&&(n.dense?(m[S]||(m[S]=[]),m[S][k]=w):m[zr(k)+ps(S)]=w),w.HRef&&(w.l={Target:Fn(w.HRef)},w.HRefScreenTip&&(w.l.Tooltip=w.HRefScreenTip),delete w.HRef,delete w.HRefScreenTip),(w.MergeAcross||w.MergeDown)&&(M=k+(parseInt(w.MergeAcross,10)|0),z=S+(parseInt(w.MergeDown,10)|0),P.push({s:{c:k,r:S},e:{c:M,r:z}})),!n.sheetStubs)w.MergeAcross?k=M+1:++k;else if(w.MergeAcross||w.MergeDown){for(var Q=k;Q<=M;++Q)for(var ie=S;ie<=z;++ie)(Q>k||ie>S)&&(n.dense?(m[ie]||(m[ie]=[]),m[ie][Q]={t:"z"}):m[zr(Q)+ps(ie)]={t:"z"});k=M+1}else++k;else w=Rje(l[0]),w.Index&&(k=+w.Index-1),k<_.s.c&&(_.s.c=k),k>_.e.c&&(_.e.c=k),l[0].slice(-2)==="/>"&&++k,I=[];break;case"row":l[1]==="/"||l[0].slice(-2)==="/>"?(S<_.s.r&&(_.s.r=S),S>_.e.r&&(_.e.r=S),l[0].slice(-2)==="/>"&&(y=_a(l[0]),y.Index&&(S=+y.Index-1)),k=0,++S):(y=_a(l[0]),y.Index&&(S=+y.Index-1),G={},(y.AutoFitHeight=="0"||y.Height)&&(G.hpx=parseInt(y.Height,10),G.hpt=Q9(G.hpx),O[S]=G),y.Hidden=="1"&&(G.hidden=!0,O[S]=G));break;case"worksheet":if(l[1]==="/"){if((d=c.pop())[0]!==l[3])throw new Error("Bad state: "+d.join("|"));p.push(x),_.s.r<=_.e.r&&_.s.c<=_.e.c&&(m["!ref"]=Sn(_),n.sheetRows&&n.sheetRows<=_.e.r&&(m["!fullref"]=m["!ref"],_.e.r=n.sheetRows-1,m["!ref"]=Sn(_))),P.length&&(m["!merges"]=P),V.length>0&&(m["!cols"]=V),O.length>0&&(m["!rows"]=O),u[x]=m}else _={s:{r:2e6,c:2e6},e:{r:0,c:0}},S=k=0,c.push([l[3],!1]),d=_a(l[0]),x=Fn(d.Name),m=n.dense?[]:{},P=[],W=[],O=[],Y={name:x,Hidden:0},K.Sheets.push(Y);break;case"table":if(l[1]==="/"){if((d=c.pop())[0]!==l[3])throw new Error("Bad state: "+d.join("|"))}else{if(l[0].slice(-2)=="/>")break;c.push([l[3],!1]),V=[],N=!1}break;case"style":l[1]==="/"?Bje(F,A,n):A=_a(l[0]);break;case"numberformat":A.nf=Fn(_a(l[0]).Format||"General"),Zh[A.nf]&&(A.nf=Zh[A.nf]);for(var ae=0;ae!=392&&cn[ae]!=A.nf;++ae);if(ae==392){for(ae=57;ae!=392;++ae)if(cn[ae]==null){Ld(A.nf,ae);break}}break;case"column":if(c[c.length-1][0]!=="table")break;if(X=_a(l[0]),X.Hidden&&(X.hidden=!0,delete X.Hidden),X.Width&&(X.wpx=parseInt(X.Width,10)),!N&&X.wpx>10){N=!0,Ks=X9;for(var re=0;re<V.length;++re)V[re]&&Hf(V[re])}N&&Hf(X),V[X.Index-1||V.length]=X;for(var pe=0;pe<+X.Span;++pe)V[V.length]=fs(X);break;case"namedrange":if(l[1]==="/")break;K.Names||(K.Names=[]);var Z=Zt(l[0]),Ne={Name:Z.Name,Ref:vf(Z.RefersTo.slice(1),{r:0,c:0})};K.Sheets.length>0&&(Ne.Sheet=K.Sheets.length-1),K.Names.push(Ne);break;case"namedcell":break;case"b":break;case"i":break;case"u":break;case"s":break;case"em":break;case"h2":break;case"h3":break;case"sub":break;case"sup":break;case"span":break;case"alignment":break;case"borders":break;case"border":break;case"font":if(l[0].slice(-2)==="/>")break;l[1]==="/"?C+=s.slice(D,l.index):D=l.index+l[0].length;break;case"interior":if(!n.cellStyles)break;A.Interior=_a(l[0]);break;case"protection":break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if(l[0].slice(-2)==="/>")break;l[1]==="/"?wye(L,J,s.slice(R,l.index)):R=l.index+l[0].length;break;case"paragraphs":break;case"styles":case"workbook":if(l[1]==="/"){if((d=c.pop())[0]!==l[3])throw new Error("Bad state: "+d.join("|"))}else c.push([l[3],!1]);break;case"comment":if(l[1]==="/"){if((d=c.pop())[0]!==l[3])throw new Error("Bad state: "+d.join("|"));Mje(H),I.push(H)}else c.push([l[3],!1]),d=_a(l[0]),H={a:d.Author};break;case"autofilter":if(l[1]==="/"){if((d=c.pop())[0]!==l[3])throw new Error("Bad state: "+d.join("|"))}else if(l[0].charAt(l[0].length-2)!=="/"){var te=_a(l[0]);m["!autofilter"]={ref:vf(te.Range).replace(/\$/g,"")},c.push([l[3],!0])}break;case"name":break;case"datavalidation":if(l[1]==="/"){if((d=c.pop())[0]!==l[3])throw new Error("Bad state: "+d.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break;case"pixelsperinch":break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if(l[1]==="/"){if((d=c.pop())[0]!==l[3])throw new Error("Bad state: "+d.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break;case"null":break;default:if(c.length==0&&l[3]=="document"||c.length==0&&l[3]=="uof")return X6(s,n);var xe=!0;switch(c[c.length-1][0]){case"officedocumentsettings":switch(l[3]){case"allowpng":break;case"removepersonalinformation":break;case"downloadcomponents":break;case"locationofcomponents":break;case"colors":break;case"color":break;case"index":break;case"rgb":break;case"targetscreensize":break;case"readonlyrecommended":break;default:xe=!1}break;case"componentoptions":switch(l[3]){case"toolbar":break;case"hideofficelogo":break;case"spreadsheetautofit":break;case"label":break;case"caption":break;case"maxheight":break;case"maxwidth":break;case"nextsheetnumber":break;default:xe=!1}break;case"excelworkbook":switch(l[3]){case"date1904":K.WBProps.date1904=!0;break;case"windowheight":break;case"windowwidth":break;case"windowtopx":break;case"windowtopy":break;case"tabratio":break;case"protectstructure":break;case"protectwindow":break;case"protectwindows":break;case"activesheet":break;case"displayinknotes":break;case"firstvisiblesheet":break;case"supbook":break;case"sheetname":break;case"sheetindex":break;case"sheetindexfirst":break;case"sheetindexlast":break;case"dll":break;case"acceptlabelsinformulas":break;case"donotsavelinkvalues":break;case"iteration":break;case"maxiterations":break;case"maxchange":break;case"path":break;case"xct":break;case"count":break;case"selectedsheets":break;case"calculation":break;case"uncalced":break;case"startupprompt":break;case"crn":break;case"externname":break;case"formula":break;case"colfirst":break;case"collast":break;case"wantadvise":break;case"boolean":break;case"error":break;case"text":break;case"ole":break;case"noautorecover":break;case"publishobjects":break;case"donotcalculatebeforesave":break;case"number":break;case"refmoder1c1":break;case"embedsavesmarttags":break;default:xe=!1}break;case"workbookoptions":switch(l[3]){case"owcversion":break;case"height":break;case"width":break;default:xe=!1}break;case"worksheetoptions":switch(l[3]){case"visible":if(l[0].slice(-2)!=="/>")if(l[1]==="/")switch(s.slice(R,l.index)){case"SheetHidden":Y.Hidden=1;break;case"SheetVeryHidden":Y.Hidden=2;break}else R=l.index+l[0].length;break;case"header":m["!margins"]||Qh(m["!margins"]={},"xlml"),isNaN(+Zt(l[0]).Margin)||(m["!margins"].header=+Zt(l[0]).Margin);break;case"footer":m["!margins"]||Qh(m["!margins"]={},"xlml"),isNaN(+Zt(l[0]).Margin)||(m["!margins"].footer=+Zt(l[0]).Margin);break;case"pagemargins":var he=Zt(l[0]);m["!margins"]||Qh(m["!margins"]={},"xlml"),isNaN(+he.Top)||(m["!margins"].top=+he.Top),isNaN(+he.Left)||(m["!margins"].left=+he.Left),isNaN(+he.Right)||(m["!margins"].right=+he.Right),isNaN(+he.Bottom)||(m["!margins"].bottom=+he.Bottom);break;case"displayrighttoleft":K.Views||(K.Views=[]),K.Views[0]||(K.Views[0]={}),K.Views[0].RTL=!0;break;case"freezepanes":break;case"frozennosplit":break;case"splithorizontal":case"splitvertical":break;case"donotdisplaygridlines":break;case"activerow":break;case"activecol":break;case"toprowbottompane":break;case"leftcolumnrightpane":break;case"unsynced":break;case"print":break;case"printerrors":break;case"panes":break;case"scale":break;case"pane":break;case"number":break;case"layout":break;case"pagesetup":break;case"selected":break;case"protectobjects":break;case"enableselection":break;case"protectscenarios":break;case"validprinterinfo":break;case"horizontalresolution":break;case"verticalresolution":break;case"numberofcopies":break;case"activepane":break;case"toprowvisible":break;case"leftcolumnvisible":break;case"fittopage":break;case"rangeselection":break;case"papersizeindex":break;case"pagelayoutzoom":break;case"pagebreakzoom":break;case"filteron":break;case"fitwidth":break;case"fitheight":break;case"commentslayout":break;case"zoom":break;case"lefttoright":break;case"gridlines":break;case"allowsort":break;case"allowfilter":break;case"allowinsertrows":break;case"allowdeleterows":break;case"allowinsertcols":break;case"allowdeletecols":break;case"allowinserthyperlinks":break;case"allowformatcells":break;case"allowsizecols":break;case"allowsizerows":break;case"nosummaryrowsbelowdetail":m["!outline"]||(m["!outline"]={}),m["!outline"].above=!0;break;case"tabcolorindex":break;case"donotdisplayheadings":break;case"showpagelayoutzoom":break;case"nosummarycolumnsrightdetail":m["!outline"]||(m["!outline"]={}),m["!outline"].left=!0;break;case"blackandwhite":break;case"donotdisplayzeros":break;case"displaypagebreak":break;case"rowcolheadings":break;case"donotdisplayoutline":break;case"noorientation":break;case"allowusepivottables":break;case"zeroheight":break;case"viewablerange":break;case"selection":break;case"protectcontents":break;default:xe=!1}break;case"pivottable":case"pivotcache":switch(l[3]){case"immediateitemsondrop":break;case"showpagemultipleitemlabel":break;case"compactrowindent":break;case"location":break;case"pivotfield":break;case"orientation":break;case"layoutform":break;case"layoutsubtotallocation":break;case"layoutcompactrow":break;case"position":break;case"pivotitem":break;case"datatype":break;case"datafield":break;case"sourcename":break;case"parentfield":break;case"ptlineitems":break;case"ptlineitem":break;case"countofsameitems":break;case"item":break;case"itemtype":break;case"ptsource":break;case"cacheindex":break;case"consolidationreference":break;case"filename":break;case"reference":break;case"nocolumngrand":break;case"norowgrand":break;case"blanklineafteritems":break;case"hidden":break;case"subtotal":break;case"basefield":break;case"mapchilditems":break;case"function":break;case"refreshonfileopen":break;case"printsettitles":break;case"mergelabels":break;case"defaultversion":break;case"refreshname":break;case"refreshdate":break;case"refreshdatecopy":break;case"versionlastrefresh":break;case"versionlastupdate":break;case"versionupdateablemin":break;case"versionrefreshablemin":break;case"calculation":break;default:xe=!1}break;case"pagebreaks":switch(l[3]){case"colbreaks":break;case"colbreak":break;case"rowbreaks":break;case"rowbreak":break;case"colstart":break;case"colend":break;case"rowend":break;default:xe=!1}break;case"autofilter":switch(l[3]){case"autofiltercolumn":break;case"autofiltercondition":break;case"autofilterand":break;case"autofilteror":break;default:xe=!1}break;case"querytable":switch(l[3]){case"id":break;case"autoformatfont":break;case"autoformatpattern":break;case"querysource":break;case"querytype":break;case"enableredirections":break;case"refreshedinxl9":break;case"urlstring":break;case"htmltables":break;case"connection":break;case"commandtext":break;case"refreshinfo":break;case"notitles":break;case"nextid":break;case"columninfo":break;case"overwritecells":break;case"donotpromptforfile":break;case"textwizardsettings":break;case"source":break;case"number":break;case"decimal":break;case"thousandseparator":break;case"trailingminusnumbers":break;case"formatsettings":break;case"fieldtype":break;case"delimiters":break;case"tab":break;case"comma":break;case"autoformatname":break;case"versionlastedit":break;case"versionlastrefresh":break;default:xe=!1}break;case"datavalidation":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;case"cellrangelist":break;default:xe=!1}break;case"sorting":case"conditionalformatting":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"cellrangelist":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;default:xe=!1}break;case"mapinfo":case"schema":case"data":switch(l[3]){case"map":break;case"entry":break;case"range":break;case"xpath":break;case"field":break;case"xsdtype":break;case"filteron":break;case"aggregate":break;case"elementtype":break;case"attributetype":break;case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":break;case"row":break;default:xe=!1}break;case"smarttags":break;default:xe=!1;break}if(xe||l[3].match(/!\[CDATA/))break;if(!c[c.length-1][1])throw"Unrecognized tag: "+l[3]+"|"+c.join("|");if(c[c.length-1][0]==="customdocumentproperties"){if(l[0].slice(-2)==="/>")break;l[1]==="/"?Ije(T,J,U,s.slice(R,l.index)):(U=l,R=l.index+l[0].length);break}if(n.WTF)throw"Unrecognized tag: "+l[3]+"|"+c.join("|")}var le={};return!n.bookSheets&&!n.bookProps&&(le.Sheets=u),le.SheetNames=p,le.Workbook=K,le.SSF=fs(cn),le.Props=L,le.Custprops=T,le}function Lj(e,t){switch(P_(t=t||{}),t.type||"base64"){case"base64":return J2(zi(e),t);case"binary":case"buffer":case"file":return J2(e,t);case"array":return J2(nu(e),t)}}function Lje(e){var t={},n=e.content;if(n.l=28,t.AnsiUserType=n.read_shift(0,"lpstr-ansi"),t.AnsiClipboardFormat=Zxe(n),n.length-n.l<=4)return t;var s=n.read_shift(4);if(s==0||s>40||(n.l-=4,t.Reserved1=n.read_shift(0,"lpstr-ansi"),n.length-n.l<=4)||(s=n.read_shift(4),s!==1907505652)||(t.UnicodeClipboardFormat=eye(n),s=n.read_shift(4),s==0||s>40))return t;n.l-=4,t.Reserved2=n.read_shift(0,"lpwstr")}var zje=[60,1084,2066,2165,2175];function Wje(e,t,n,s,i){var a=s,o=[],l=n.slice(n.l,n.l+a);if(i&&i.enc&&i.enc.insitu&&l.length>0)switch(e){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:break;case 133:break;default:i.enc.insitu(l)}o.push(l),n.l+=a;for(var c=cl(n,n.l),d=zj[c],u=0;d!=null&&zje.indexOf(c)>-1;)a=cl(n,n.l+2),u=n.l+4,c==2066?u+=4:(c==2165||c==2175)&&(u+=12),l=n.slice(u,n.l+4+a),o.push(l),n.l+=4+a,d=zj[c=cl(n,n.l)];var p=tc(o);cs(p,0);var m=0;p.lens=[];for(var x=0;x<o.length;++x)p.lens.push(m),m+=o[x].length;if(p.length<s)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+p.length+" < "+s;return t.f(p,p.length,i)}function so(e,t,n){if(e.t!=="z"&&e.XF){var s=0;try{s=e.z||e.XF.numFmtId||0,t.cellNF&&(e.z=cn[s])}catch(a){if(t.WTF)throw a}if(!t||t.cellText!==!1)try{e.t==="e"?e.w=e.w||iu[e.v]:s===0||s=="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=_m(e.v):e.w=Kd(e.v):e.w=ha(s,e.v,{date1904:!!n,dateNF:t&&t.dateNF})}catch(a){if(t.WTF)throw a}if(t.cellDates&&s&&e.t=="n"&&op(cn[s]||String(s))){var i=Ed(e.v);i&&(e.t="d",e.v=new Date(i.y,i.m-1,i.d,i.H,i.M,i.S,i.u))}}}function Xg(e,t,n){return{v:e,ixfe:t,t:n}}function $je(e,t){var n={opts:{}},s={},i=t.dense?[]:{},a={},o={},l=null,c=[],d="",u={},p,m="",x,w,y,v,j={},k=[],S,_,F=[],A=[],C={Sheets:[],WBProps:{date1904:!1},Views:[{}]},D={},P=function(He){return He<8?zd[He]:He<64&&A[He-8]||zd[He]},L=function(He,St,Ct){var Se=St.XF.data;if(!(!Se||!Se.patternType||!Ct||!Ct.cellStyles)){St.s={},St.s.patternType=Se.patternType;var et;(et=Am(P(Se.icvFore)))&&(St.s.fgColor={rgb:et}),(et=Am(P(Se.icvBack)))&&(St.s.bgColor={rgb:et})}},T=function(He,St,Ct){if(!(G>1)&&!(Ct.sheetRows&&He.r>=Ct.sheetRows)){if(Ct.cellStyles&&St.XF&&St.XF.data&&L(He,St,Ct),delete St.ixfe,delete St.XF,p=He,m=an(He),(!o||!o.s||!o.e)&&(o={s:{r:0,c:0},e:{r:0,c:0}}),He.r<o.s.r&&(o.s.r=He.r),He.c<o.s.c&&(o.s.c=He.c),He.r+1>o.e.r&&(o.e.r=He.r+1),He.c+1>o.e.c&&(o.e.c=He.c+1),Ct.cellFormula&&St.f){for(var Se=0;Se<k.length;++Se)if(!(k[Se][0].s.c>He.c||k[Se][0].s.r>He.r)&&!(k[Se][0].e.c<He.c||k[Se][0].e.r<He.r)){St.F=Sn(k[Se][0]),(k[Se][0].s.c!=He.c||k[Se][0].s.r!=He.r)&&delete St.f,St.f&&(St.f=""+Fs(k[Se][1],o,He,W,R));break}}Ct.dense?(i[He.r]||(i[He.r]=[]),i[He.r][He.c]=St):i[m]=St}},R={enc:!1,sbcch:0,snames:[],sharedf:j,arrayf:k,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!t&&!!t.cellStyles,WTF:!!t&&!!t.wtf};t.password&&(R.password=t.password);var U,I=[],H=[],V=[],X=[],N=!1,W=[];W.SheetNames=R.snames,W.sharedf=R.sharedf,W.arrayf=R.arrayf,W.names=[],W.XTI=[];var O=0,G=0,M=0,z=[],K=[],Y;R.codepage=1200,Oa(1200);for(var J=!1;e.l<e.length-1;){var Q=e.l,ie=e.read_shift(2);if(ie===0&&O===10)break;var ae=e.l===e.length?0:e.read_shift(2),re=zj[ie];if(re&&re.f){if(t.bookSheets&&O===133&&ie!==133)break;if(O=ie,re.r===2||re.r==12){var pe=e.read_shift(2);if(ae-=2,!R.enc&&pe!==ie&&((pe&255)<<8|pe>>8)!==ie)throw new Error("rt mismatch: "+pe+"!="+ie);re.r==12&&(e.l+=10,ae-=10)}var Z={};if(ie===10?Z=re.f(e,ae,R):Z=Wje(ie,re,e,ae,R),G==0&&[9,521,1033,2057].indexOf(O)===-1)continue;switch(ie){case 34:n.opts.Date1904=C.WBProps.date1904=Z;break;case 134:n.opts.WriteProtect=!0;break;case 47:if(R.enc||(e.l=0),R.enc=Z,!t.password)throw new Error("File is password-protected");if(Z.valid==null)throw new Error("Encryption scheme unsupported");if(!Z.valid)throw new Error("Password is incorrect");break;case 92:R.lastuser=Z;break;case 66:var Ne=Number(Z);switch(Ne){case 21010:Ne=1200;break;case 32768:Ne=1e4;break;case 32769:Ne=1252;break}Oa(R.codepage=Ne),J=!0;break;case 317:R.rrtabid=Z;break;case 25:R.winlocked=Z;break;case 439:n.opts.RefreshAll=Z;break;case 12:n.opts.CalcCount=Z;break;case 16:n.opts.CalcDelta=Z;break;case 17:n.opts.CalcIter=Z;break;case 13:n.opts.CalcMode=Z;break;case 14:n.opts.CalcPrecision=Z;break;case 95:n.opts.CalcSaveRecalc=Z;break;case 15:R.CalcRefMode=Z;break;case 2211:n.opts.FullCalc=Z;break;case 129:Z.fDialog&&(i["!type"]="dialog"),Z.fBelow||((i["!outline"]||(i["!outline"]={})).above=!0),Z.fRight||((i["!outline"]||(i["!outline"]={})).left=!0);break;case 224:F.push(Z);break;case 430:W.push([Z]),W[W.length-1].XTI=[];break;case 35:case 547:W[W.length-1].push(Z);break;case 24:case 536:Y={Name:Z.Name,Ref:Fs(Z.rgce,o,null,W,R)},Z.itab>0&&(Y.Sheet=Z.itab-1),W.names.push(Y),W[0]||(W[0]=[],W[0].XTI=[]),W[W.length-1].push(Z),Z.Name=="_xlnm._FilterDatabase"&&Z.itab>0&&Z.rgce&&Z.rgce[0]&&Z.rgce[0][0]&&Z.rgce[0][0][0]=="PtgArea3d"&&(K[Z.itab-1]={ref:Sn(Z.rgce[0][0][1][2])});break;case 22:R.ExternCount=Z;break;case 23:W.length==0&&(W[0]=[],W[0].XTI=[]),W[W.length-1].XTI=W[W.length-1].XTI.concat(Z),W.XTI=W.XTI.concat(Z);break;case 2196:if(R.biff<8)break;Y!=null&&(Y.Comment=Z[1]);break;case 18:i["!protect"]=Z;break;case 19:Z!==0&&R.WTF&&console.error("Password verifier: "+Z);break;case 133:a[Z.pos]=Z,R.snames.push(Z.name);break;case 10:{if(--G)break;if(o.e){if(o.e.r>0&&o.e.c>0){if(o.e.r--,o.e.c--,i["!ref"]=Sn(o),t.sheetRows&&t.sheetRows<=o.e.r){var te=o.e.r;o.e.r=t.sheetRows-1,i["!fullref"]=i["!ref"],i["!ref"]=Sn(o),o.e.r=te}o.e.r++,o.e.c++}I.length>0&&(i["!merges"]=I),H.length>0&&(i["!objects"]=H),V.length>0&&(i["!cols"]=V),X.length>0&&(i["!rows"]=X),C.Sheets.push(D)}d===""?u=i:s[d]=i,i=t.dense?[]:{}}break;case 9:case 521:case 1033:case 2057:{if(R.biff===8&&(R.biff={9:2,521:3,1033:4}[ie]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[Z.BIFFVer]||8),R.biffguess=Z.BIFFVer==0,Z.BIFFVer==0&&Z.dt==4096&&(R.biff=5,J=!0,Oa(R.codepage=28591)),R.biff==8&&Z.BIFFVer==0&&Z.dt==16&&(R.biff=2),G++)break;if(i=t.dense?[]:{},R.biff<8&&!J&&(J=!0,Oa(R.codepage=t.codepage||1252)),R.biff<5||Z.BIFFVer==0&&Z.dt==4096){d===""&&(d="Sheet1"),o={s:{r:0,c:0},e:{r:0,c:0}};var xe={pos:e.l-ae,name:d};a[xe.pos]=xe,R.snames.push(d)}else d=(a[Q]||{name:""}).name;Z.dt==32&&(i["!type"]="chart"),Z.dt==64&&(i["!type"]="macro"),I=[],H=[],R.arrayf=k=[],V=[],X=[],N=!1,D={Hidden:(a[Q]||{hs:0}).hs,name:d}}break;case 515:case 3:case 2:i["!type"]=="chart"&&(t.dense?(i[Z.r]||[])[Z.c]:i[an({c:Z.c,r:Z.r})])&&++Z.c,S={ixfe:Z.ixfe,XF:F[Z.ixfe]||{},v:Z.val,t:"n"},M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T({c:Z.c,r:Z.r},S,t);break;case 5:case 517:S={ixfe:Z.ixfe,XF:F[Z.ixfe],v:Z.val,t:Z.t},M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T({c:Z.c,r:Z.r},S,t);break;case 638:S={ixfe:Z.ixfe,XF:F[Z.ixfe],v:Z.rknum,t:"n"},M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T({c:Z.c,r:Z.r},S,t);break;case 189:for(var he=Z.c;he<=Z.C;++he){var le=Z.rkrec[he-Z.c][0];S={ixfe:le,XF:F[le],v:Z.rkrec[he-Z.c][1],t:"n"},M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T({c:he,r:Z.r},S,t)}break;case 6:case 518:case 1030:{if(Z.val=="String"){l=Z;break}if(S=Xg(Z.val,Z.cell.ixfe,Z.tt),S.XF=F[S.ixfe],t.cellFormula){var ge=Z.formula;if(ge&&ge[0]&&ge[0][0]&&ge[0][0][0]=="PtgExp"){var $e=ge[0][0][1][0],ft=ge[0][0][1][1],Qe=an({r:$e,c:ft});j[Qe]?S.f=""+Fs(Z.formula,o,Z.cell,W,R):S.F=((t.dense?(i[$e]||[])[ft]:i[Qe])||{}).F}else S.f=""+Fs(Z.formula,o,Z.cell,W,R)}M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T(Z.cell,S,t),l=Z}break;case 7:case 519:if(l)l.val=Z,S=Xg(Z,l.cell.ixfe,"s"),S.XF=F[S.ixfe],t.cellFormula&&(S.f=""+Fs(l.formula,o,l.cell,W,R)),M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T(l.cell,S,t),l=null;else throw new Error("String record expects Formula");break;case 33:case 545:{k.push(Z);var Ve=an(Z[0].s);if(x=t.dense?(i[Z[0].s.r]||[])[Z[0].s.c]:i[Ve],t.cellFormula&&x){if(!l||!Ve||!x)break;x.f=""+Fs(Z[1],o,Z[0],W,R),x.F=Sn(Z[0])}}break;case 1212:{if(!t.cellFormula)break;if(m){if(!l)break;j[an(l.cell)]=Z[0],x=t.dense?(i[l.cell.r]||[])[l.cell.c]:i[an(l.cell)],(x||{}).f=""+Fs(Z[0],o,p,W,R)}}break;case 253:S=Xg(c[Z.isst].t,Z.ixfe,"s"),c[Z.isst].h&&(S.h=c[Z.isst].h),S.XF=F[S.ixfe],M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T({c:Z.c,r:Z.r},S,t);break;case 513:t.sheetStubs&&(S={ixfe:Z.ixfe,XF:F[Z.ixfe],t:"z"},M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T({c:Z.c,r:Z.r},S,t));break;case 190:if(t.sheetStubs)for(var ze=Z.c;ze<=Z.C;++ze){var at=Z.ixfe[ze-Z.c];S={ixfe:at,XF:F[at],t:"z"},M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T({c:ze,r:Z.r},S,t)}break;case 214:case 516:case 4:S=Xg(Z.val,Z.ixfe,"s"),S.XF=F[S.ixfe],M>0&&(S.z=z[S.ixfe>>8&63]),so(S,t,n.opts.Date1904),T({c:Z.c,r:Z.r},S,t);break;case 0:case 512:G===1&&(o=Z);break;case 252:c=Z;break;case 1054:if(R.biff==4){z[M++]=Z[1];for(var Nt=0;Nt<M+163&&cn[Nt]!=Z[1];++Nt);Nt>=163&&Ld(Z[1],M+163)}else Ld(Z[1],Z[0]);break;case 30:{z[M++]=Z;for(var _e=0;_e<M+163&&cn[_e]!=Z;++_e);_e>=163&&Ld(Z,M+163)}break;case 229:I=I.concat(Z);break;case 93:H[Z.cmo[0]]=R.lastobj=Z;break;case 438:R.lastobj.TxO=Z;break;case 127:R.lastobj.ImData=Z;break;case 440:for(v=Z[0].s.r;v<=Z[0].e.r;++v)for(y=Z[0].s.c;y<=Z[0].e.c;++y)x=t.dense?(i[v]||[])[y]:i[an({c:y,r:v})],x&&(x.l=Z[1]);break;case 2048:for(v=Z[0].s.r;v<=Z[0].e.r;++v)for(y=Z[0].s.c;y<=Z[0].e.c;++y)x=t.dense?(i[v]||[])[y]:i[an({c:y,r:v})],x&&x.l&&(x.l.Tooltip=Z[1]);break;case 28:{if(R.biff<=5&&R.biff>=2)break;x=t.dense?(i[Z[0].r]||[])[Z[0].c]:i[an(Z[0])];var be=H[Z[2]];x||(t.dense?(i[Z[0].r]||(i[Z[0].r]=[]),x=i[Z[0].r][Z[0].c]={t:"z"}):x=i[an(Z[0])]={t:"z"},o.e.r=Math.max(o.e.r,Z[0].r),o.s.r=Math.min(o.s.r,Z[0].r),o.e.c=Math.max(o.e.c,Z[0].c),o.s.c=Math.min(o.s.c,Z[0].c)),x.c||(x.c=[]),w={a:Z[1],t:be.TxO.t},x.c.push(w)}break;case 2173:dbe(F[Z.ixfe],Z.ext);break;case 125:{if(!R.cellStyles)break;for(;Z.e>=Z.s;)V[Z.e--]={width:Z.w/256,level:Z.level||0,hidden:!!(Z.flags&1)},N||(N=!0,T_(Z.w/256)),Hf(V[Z.e+1])}break;case 520:{var Re={};Z.level!=null&&(X[Z.r]=Re,Re.level=Z.level),Z.hidden&&(X[Z.r]=Re,Re.hidden=!0),Z.hpt&&(X[Z.r]=Re,Re.hpt=Z.hpt,Re.hpx=Tm(Z.hpt))}break;case 38:case 39:case 40:case 41:i["!margins"]||Qh(i["!margins"]={}),i["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[ie]]=Z;break;case 161:i["!margins"]||Qh(i["!margins"]={}),i["!margins"].header=Z.header,i["!margins"].footer=Z.footer;break;case 574:Z.RTL&&(C.Views[0].RTL=!0);break;case 146:A=Z;break;case 2198:U=Z;break;case 140:_=Z;break;case 442:d?D.CodeName=Z||D.name:C.WBProps.CodeName=Z||"ThisWorkbook";break}}else re||console.error("Missing Info for XLS Record 0x"+ie.toString(16)),e.l+=ae}return n.SheetNames=Ao(a).sort(function(Xe,He){return Number(Xe)-Number(He)}).map(function(Xe){return a[Xe].name}),t.bookSheets||(n.Sheets=s),!n.SheetNames.length&&u["!ref"]?(n.SheetNames.push("Sheet1"),n.Sheets&&(n.Sheets.Sheet1=u)):n.Preamble=u,n.Sheets&&K.forEac
899h(function(Xe,He){n.Sheets[n.SheetNames[He]]["!autofilter"]=Xe}),n.Strings=c,n.SSF=fs(cn),R.enc&&(n.Encryption=R.enc),U&&(n.Themes=U),n.Metadata={},_!==void 0&&(n.Metadata.Country=_),W.names.length>0&&(C.Names=W.names),n.Workbook=C,n}var H6={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function Uje(e,t,n){var s=jn.find(e,"/!DocumentSummaryInformation");if(s&&s.size>0)try{var i=F6(s,aye,H6.DSI);for(var a in i)t[a]=i[a]}catch(d){if(n.WTF)throw d}var o=jn.find(e,"/!SummaryInformation");if(o&&o.size>0)try{var l=F6(o,oye,H6.SI);for(var c in l)t[c]==null&&(t[c]=l[c])}catch(d){if(n.WTF)throw d}t.HeadingPairs&&t.TitlesOfParts&&(D9(t.HeadingPairs,t.TitlesOfParts,t,n),delete t.HeadingPairs,delete t.TitlesOfParts)}function g7(e,t){t||(t={}),P_(t),HM(),t.codepage&&p_(t.codepage);var n,s;if(e.FullPaths){if(jn.find(e,"/encryption"))throw new Error("File is password-protected");n=jn.find(e,"!CompObj"),s=jn.find(e,"/Workbook")||jn.find(e,"/Book")}else{switch(t.type){case"base64":e=Pa(zi(e));break;case"binary":e=Pa(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e));break}cs(e,0),s={content:e}}var i,a;if(n&&Lje(n),t.bookProps&&!t.bookSheets)i={};else{var o=bn?"buffer":"array";if(s&&s.content)i=$je(s.content,t);else if((a=jn.find(e,"PerfectOffice_MAIN"))&&a.content)i=Xh.to_workbook(a.content,(t.type=o,t));else if((a=jn.find(e,"NativeContent_MAIN"))&&a.content)i=Xh.to_workbook(a.content,(t.type=o,t));else throw(a=jn.find(e,"MN0"))&&a.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");t.bookVBA&&e.FullPaths&&jn.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(i.vbaraw=Fbe(e))}var l={};return e.FullPaths&&Uje(e,l,t),i.Props=i.Custprops=l,t.bookFiles&&(i.cfb=e),i}var Ay={0:{f:kwe},1:{f:Fwe},2:{f:Owe},3:{f:Rwe},4:{f:Twe},5:{f:Bwe},6:{f:zwe},7:{f:Iwe},8:{f:Hwe},9:{f:Vwe},10:{f:$we},11:{f:Uwe},12:{f:Awe},13:{f:Mwe},14:{f:Dwe},15:{f:Nwe},16:{f:u7},17:{f:Wwe},18:{f:Pwe},19:{f:k_},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:yje},40:{},42:{},43:{f:$ve},44:{f:Wve},45:{f:Uve},46:{f:Hve},47:{f:Vve},48:{},49:{f:qxe},50:{},51:{f:fbe},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:H9},62:{f:Lwe},63:{f:xbe},64:{f:eje},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:Ps,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:Zwe},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:Ewe},148:{f:_we,p:16},151:{f:Kwe},152:{},153:{f:gje},154:{},155:{},156:{f:mje},157:{},158:{},159:{T:1,f:ove},160:{T:-1},161:{T:1,f:su},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:qwe},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1}
vendor: 6,054 bytes, line 899
899,322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:ube},336:{T:-1},337:{f:pbe,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:Pj},357:{},358:{},359:{},360:{T:1},361:{},362:{f:V9},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:Ywe},427:{f:Xwe},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:Qwe},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:Cwe},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:Gwe},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:Pj},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:_be},633:{T:1},634:{T:-1},635:{T:1,f:kbe},636:{T:-1},637:{f:Kxe},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:aje},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:tje},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},zj={6:{f:Y2},10:{f:Yl},12:{f:Fr},13:{f:Fr},14:{f:vr},15:{f:vr},16:{f:As},17:{f:vr},18:{f:vr},19:{f:Fr}
vendor: 11,561 bytes, lines 899-900
899,20:{f:R6},21:{f:R6},23:{f:V9},24:{f:I6},25:{f:vr},26:{},27:{},28:{f:j1e},29:{},34:{f:vr},35:{f:D6},38:{f:As},39:{f:As},40:{f:As},41:{f:As},42:{f:vr},43:{f:vr},47:{f:Cve},49:{f:r1e},51:{f:Fr},60:{},61:{f:e1e},64:{f:vr},65:{f:n1e},66:{f:Fr},77:{},80:{},81:{},82:{},85:{f:Fr},89:{},90:{},91:{},92:{f:qye},93:{f:k1e},94:{},95:{f:vr},96:{},97:{},99:{f:vr},125:{f:H9},128:{f:p1e},129:{f:Gye},130:{f:Fr},131:{f:vr},132:{f:vr},133:{f:Kye},134:{},140:{f:T1e},141:{f:Fr},144:{},146:{f:R1e},151:{},152:{},153:{},154:{},155:{},156:{f:Fr},157:{},158:{},160:{f:O1e},161:{f:I1e},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:c1e},190:{f:d1e},193:{f:Yl},197:{},198:{},199:{},200:{},201:{},202:{f:vr},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:Fr},220:{},221:{f:vr},222:{},224:{f:f1e},225:{f:Hye},226:{f:Yl},227:{},229:{f:S1e},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:Yye},253:{f:s1e},255:{f:Xye},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:M9},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:vr},353:{f:Yl},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:m1e},431:{f:vr},432:{},433:{},434:{},437:{},438:{f:E1e},439:{f:vr},440:{f:F1e},441:{},442:{f:s0},443:{},444:{f:Fr},445:{},446:{},448:{f:Yl},449:{f:Zye,r:2},450:{f:Yl},512:{f:T6},513:{f:B1e},515:{f:h1e},516:{f:i1e},517:{f:N6},519:{f:M1e},520:{f:Jye},523:{},545:{f:P6},549:{f:A6},566:{},574:{f:t1e},638:{f:l1e},659:{},1048:{},1054:{f:a1e},1084:{},1212:{f:v1e},2048:{f:A1e},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:Gg},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:Yl},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:D1e,r:12},2173:{f:cbe,r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:vr,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:y1e,r:12},2197:{},2198:{f:rbe,r:12},2199:{},2200:{},2201:{},2202:{f:b1e,r:12},2203:{f:Yl},2204:{},2205:{},2206:{},2207:{},2211:{f:Qye},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:Fr},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:P1e},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:N1e},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:T6},1:{},2:{f:$1e},3:{f:W1e},4:{f:z1e},5:{f:N6},7:{f:U1e},8:{},9:{f:Gg},11:{},22:{f:Fr},30:{f:o1e},31:{},32:{},33:{f:P6},36:{},37:{f:A6},50:{f:V1e},62:{},52:{},67:{},68:{f:Fr},69:{},86:{},126:{},127:{f:L1e},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:H1e},223:{},234:{},354:{},421:{},518:{f:Y2},521:{f:Gg},536:{f:I6},547:{f:D6},561:{},579:{},1030:{f:Y2},1033:{f:Gg},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function Ca(e,t,n,s){var i=t;if(!isNaN(i)){var a=(n||[]).length||0,o=e.next(4);o.write_shift(2,i),o.write_shift(2,a),a>0&&_9(n)&&e.push(n)}}function q6(e,t){var n=t||{},s=n.dense?[]:{};e=e.replace(/<!--.*?-->/g,"");var i=e.match(/<table/i);if(!i)throw new Error("Invalid HTML: could not find <table>");var a=e.match(/<\/table/i),o=i.index,l=a&&a.index||e.length,c=hxe(e.slice(o,l),/(:?<tr[^>]*>)/i,"<tr>"),d=-1,u=0,p=0,m=0,x={s:{r:1e7,c:1e7},e:{r:0,c:0}},w=[];for(o=0;o<c.length;++o){var y=c[o].trim(),v=y.slice(0,3).toLowerCase();if(v=="<tr"){if(++d,n.sheetRows&&n.sheetRows<=d){--d;break}u=0;continue}if(!(v!="<td"&&v!="<th")){var j=y.split(/<\/t[dh]>/i);for(l=0;l<j.length;++l){var k=j[l].trim();if(k.match(/<t[dh]/i)){for(var S=k,_=0;S.charAt(0)=="<"&&(_=S.indexOf(">"))>-1;)S=S.slice(_+1);for(var F=0;F<w.length;++F){var A=w[F];A.s.c==u&&A.s.r<d&&d<=A.e.r&&(u=A.e.c+1,F=-1)}var C=Zt(k.slice(0,k.indexOf(">")));m=C.colspan?+C.colspan:1,((p=+C.rowspan)>1||m>1)&&w.push({s:{r:d,c:u},e:{r:d+(p||1)-1,c:u+m-1}});var D=C.t||C["data-t"]||"";if(!S.length){u+=m;continue}if(S=f9(S),x.s.r>d&&(x.s.r=d),x.e.r<d&&(x.e.r=d),x.s.c>u&&(x.s.c=u),x.e.c<u&&(x.e.c=u),!S.length){u+=m;continue}var P={t:"s",v:S};n.raw||!S.trim().length||D=="s"||(S==="TRUE"?P={t:"b",v:!0}:S==="FALSE"?P={t:"b",v:!1}:isNaN(La(S))?isNaN(Vf(S).getDate())||(P={t:"d",v:es(S)},n.cellDates||(P={t:"n",v:Qs(P.v)}),P.z=n.dateNF||cn[14]):P={t:"n",v:La(S)}),n.dense?(s[d]||(s[d]=[]),s[d][u]=P):s[an({r:d,c:u})]=P,u+=m}}}}return s["!ref"]=Sn(x),w.length&&(s["!merges"]=w),s}function Vje(e,t,n,s){for(var i=e["!merges"]||[],a=[],o=t.s.c;o<=t.e.c;++o){for(var l=0,c=0,d=0;d<i.length;++d)if(!(i[d].s.r>n||i[d].s.c>o)&&!(i[d].e.r<n||i[d].e.c<o)){if(i[d].s.r<n||i[d].s.c<o){l=-1;break}l=i[d].e.r-i[d].s.r+1,c=i[d].e.c-i[d].s.c+1;break}if(!(l<0)){var u=an({r:n,c:o}),p=s.dense?(e[n]||[])[o]:e[u],m=p&&p.v!=null&&(p.h||v_(p.w||(Sl(p),p.w)||""))||"",x={};l>1&&(x.rowspan=l),c>1&&(x.colspan=c),s.editable?m='<span contenteditable="true">'+m+"</span>":p&&(x["data-t"]=p&&p.t||"z",p.v!=null&&(x["data-v"]=p.v),p.z!=null&&(x["data-z"]=p.z),p.l&&(p.l.Target||"#").charAt(0)!="#"&&(m='<a href="'+p.l.Target+'">'+m+"</a>")),x.id=(s.id||"sjs")+"-"+u,a.push(Txe("td",m,x))}}var w="<tr>";return w+a.join("")+"</tr>"}var Hje='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',qje="</body></html>";function Gje(e,t){var n=e.match(/<table[\s\S]*?>[\s\S]*?<\/table>/gi);if(!n||n.length==0)throw new Error("Invalid HTML: could not find <table>");if(n.length==1)return Wc(q6(n[0],t),t);var s=O_();return n.forEach(function(i,a){M_(s,q6(i,t),"Sheet"+(a+1))}),s}function Kje(e,t,n){var s=[];return s.join("")+"<table"+(n&&n.id?' id="'+n.id+'"':"")+">"}function Yje(e,t){var n=t||{},s=n.header!=null?n.header:Hje,i=n.footer!=null?n.footer:qje,a=[s],o=lp(e["!ref"]);n.dense=Array.isArray(e),a.push(Kje(e,o,n));for(var l=o.s.r;l<=o.e.r;++l)a.push(Vje(e,o,l,n));return a.push("</table>"+i),a.join("")}function x7(e,t,n){var s=n||{},i=0,a=0;if(s.origin!=null)if(typeof s.origin=="number")i=s.origin;else{var o=typeof s.origin=="string"?Ys(s.origin):s.origin;i=o.r,a=o.c}var l=t.getElementsByTagName("tr"),c=Math.min(s.sheetRows||1e7,l.length),d={s:{r:0,c:0},e:{r:i,c:a}};if(e["!ref"]){var u=lp(e["!ref"]);d.s.r=Math.min(d.s.r,u.s.r),d.s.c=Math.min(d.s.c,u.s.c),d.e.r=Math.max(d.e.r,u.e.r),d.e.c=Math.max(d.e.c,u.e.c),i==-1&&(d.e.r=i=u.e.r+1)}var p=[],m=0,x=e["!rows"]||(e["!rows"]=[]),w=0,y=0,v=0,j=0,k=0,S=0;for(e["!cols"]||(e["!cols"]=[]);w<l.length&&y<c;++w){var _=l[w];if(G6(_)){if(s.display)continue;x[y]={hidden:!0}}var F=_.children;for(v=j=0;v<F.length;++v){var A=F[v];if(!(s.display&&G6(A))){var C=A.hasAttribute("data-v")?A.getAttribute("data-v"):A.hasAttribute("v")?A.getAttribute("v"):f9(A.innerHTML),D=A.getAttribute("data-z")||A.getAttribute("z");for(m=0;m<p.length;++m){var P=p[m];P.s.c==j+a&&P.s.r<y+i&&y+i<=P.e.r&&(j=P.e.c+1-a,m=-1)}S=+A.getAttribute("colspan")||1,((k=+A.getAttribute("rowspan")||1)>1||S>1)&&p.push({s:{r:y+i,c:j+a},e:{r:y+i+(k||1)-1,c:j+a+(S||1)-1}});var L={t:"s",v:C},T=A.getAttribute("data-t")||A.getAttribute("t")||"";C!=null&&(C.length==0?L.t=T||"z":s.raw||C.trim().length==0||T=="s"||(C==="TRUE"?L={t:"b",v:!0}:C==="FALSE"?L={t:"b",v:!1}:isNaN(La(C))?isNaN(Vf(C).getDate())||(L={t:"d",v:es(C)},s.cellDates||(L={t:"n",v:Qs(L.v)}),L.z=s.dateNF||cn[14]):L={t:"n",v:La(C)})),L.z===void 0&&D!=null&&(L.z=D);var R="",U=A.getElementsByTagName("A");if(U&&U.length)for(var I=0;I<U.length&&!(U[I].hasAttribute("href")&&(R=U[I].getAttribute("href"),R.charAt(0)!="#"));++I);R&&R.charAt(0)!="#"&&(L.l={Target:R}),s.dense?(e[y+i]||(e[y+i]=[]),e[y+i][j+a]=L):e[an({c:j+a,r:y+i})]=L,d.e.c<j+a&&(d.e.c=j+a),j+=S}}++y}return p.length&&(e["!merges"]=(e["!merges"]||[]).concat(p)),d.e.r=Math.max(d.e.r,y-1+i),e["!ref"]=Sn(d),y>=c&&(e["!fullref"]=Sn((d.e.r=l.length-w+y-1+i,d))),e}function y7(e,t){var n=t||{},s=n.dense?[]:{};return x7(s,e,t)}function Xje(e,t){return Wc(y7(e,t),t)}function G6(e){var t="",n=Jje(e);return n&&(t=n(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function Jje(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}function Qje(e){var t=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(s,i){return Array(parseInt(i,10)+1).join(" ")}).replace(/<text:tab[^>]*\/>/g,"	").replace(/<text:line-break\/>/g,`
900`),n=Fn(t.replace(/<[^>]*>/g,""));return[n]}var K6={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function v7(e,t){var n=t||{},s=b_(e),i=[],a,o,l={name:""},c="",d=0,u,p,m={},x=[],w=n.dense?[]:{},y,v,j={value:""},k="",S=0,_=[],F=-1,A=-1,C={s:{r:1e6,c:1e7},e:{r:0,c:0}},D=0,P={},L=[],T={},R=0,U=0,I=[],H=1,V=1,X=[],N={Names:[]},W={},O=["",""],G=[],M={},z="",K=0,Y=!1,J=!1,Q=0;for(Em.lastIndex=0,s=s.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");y=Em.exec(s);)switch(y[3]=y[3].replace(/_.*$/,"")){case"table":case"工作表":y[1]==="/"?(C.e.c>=C.s.c&&C.e.r>=C.s.r?w["!ref"]=Sn(C):w["!ref"]="A1:A1",n.sheetRows>0&&n.sheetRows<=C.e.r&&(w["!fullref"]=w["!ref"],C.e.r=n.sheetRows-1,w["!ref"]=Sn(C)),L.length&&(w["!merges"]=L),I.length&&(w["!rows"]=I),u.name=u.名称||u.name,typeof JSON<"u"&&JSON.stringify(u),x.push(u.name),m[u.name]=w,J=!1):y[0].charAt(y[0].length-2)!=="/"&&(u=Zt(y[0],!1),F=A=-1,C.s.r=C.s.c=1e7,C.e.r=C.e.c=0,w=n.dense?[]:{},L=[],I=[],J=!0);break;case"table-row-group":y[1]==="/"?--D:++D;break;case"table-row":case"行":if(y[1]==="/"){F+=H,H=1;break}if(p=Zt(y[0],!1),p.行号?F=p.行号-1:F==-1&&(F=0),H=+p["number-rows-repeated"]||1,H<10)for(Q=0;Q<H;++Q)D>0&&(I[F+Q]={level:D});A=-1;break;case"covered-table-cell":y[1]!=="/"&&++A,n.sheetStubs&&(n.dense?(w[F]||(w[F]=[]),w[F][A]={t:"z"}):w[an({r:F,c:A})]={t:"z"}),k="",_=[];break;case"table-cell":case"数据":if(y[0].charAt(y[0].length-2)==="/")++A,j=Zt(y[0],!1),V=parseInt(j["number-columns-repeated"]||"1",10),v={t:"z",v:null},j.formula&&n.cellFormula!=!1&&(v.f=$6(Fn(j.formula))),(j.数据类型||j["value-type"])=="string"&&(v.t="s",v.v=Fn(j["string-value"]||""),n.dense?(w[F]||(w[F]=[]),w[F][A]=v):w[an({r:F,c:A})]=v),A+=V-1;else if(y[1]!=="/"){++A,k="",S=0,_=[],V=1;var ie=H?F+H-1:F;if(A>C.e.c&&(C.e.c=A),A<C.s.c&&(C.s.c=A),F<C.s.r&&(C.s.r=F),ie>C.e.r&&(C.e.r=ie),j=Zt(y[0],!1),G=[],M={},v={t:j.数据类型||j["value-type"],v:null},n.cellFormula)if(j.formula&&(j.formula=Fn(j.formula)),j["number-matrix-columns-spanned"]&&j["number-matrix-rows-spanned"]&&(R=parseInt(j["number-matrix-rows-spanned"],10)||0,U=parseInt(j["number-matrix-columns-spanned"],10)||0,T={s:{r:F,c:A},e:{r:F+R-1,c:A+U-1}},v.F=Sn(T),X.push([T,v.F])),j.formula)v.f=$6(j.formula);else for(Q=0;Q<X.length;++Q)F>
vendor: 30,454 bytes, lines 900-903
900=X[Q][0].s.r&&F<=X[Q][0].e.r&&A>=X[Q][0].s.c&&A<=X[Q][0].e.c&&(v.F=X[Q][1]);switch((j["number-columns-spanned"]||j["number-rows-spanned"])&&(R=parseInt(j["number-rows-spanned"],10)||0,U=parseInt(j["number-columns-spanned"],10)||0,T={s:{r:F,c:A},e:{r:F+R-1,c:A+U-1}},L.push(T)),j["number-columns-repeated"]&&(V=parseInt(j["number-columns-repeated"],10)),v.t){case"boolean":v.t="b",v.v=ir(j["boolean-value"]);break;case"float":v.t="n",v.v=parseFloat(j.value);break;case"percentage":v.t="n",v.v=parseFloat(j.value);break;case"currency":v.t="n",v.v=parseFloat(j.value);break;case"date":v.t="d",v.v=es(j["date-value"]),n.cellDates||(v.t="n",v.v=Qs(v.v)),v.z="m/d/yy";break;case"time":v.t="n",v.v=uxe(j["time-value"])/86400,n.cellDates&&(v.t="d",v.v=F1(v.v)),v.z="HH:MM:SS";break;case"number":v.t="n",v.v=parseFloat(j.数据数值);break;default:if(v.t==="string"||v.t==="text"||!v.t)v.t="s",j["string-value"]!=null&&(k=Fn(j["string-value"]),_=[]);else throw new Error("Unsupported value type "+v.t)}}else{if(Y=!1,v.t==="s"&&(v.v=k||"",_.length&&(v.R=_),Y=S==0),W.Target&&(v.l=W),G.length>0&&(v.c=G,G=[]),k&&n.cellText!==!1&&(v.w=k),Y&&(v.t="z",delete v.v),(!Y||n.sheetStubs)&&!(n.sheetRows&&n.sheetRows<=F))for(var ae=0;ae<H;++ae){if(V=parseInt(j["number-columns-repeated"]||"1",10),n.dense)for(w[F+ae]||(w[F+ae]=[]),w[F+ae][A]=ae==0?v:fs(v);--V>0;)w[F+ae][A+V]=fs(v);else for(w[an({r:F+ae,c:A})]=v;--V>0;)w[an({r:F+ae,c:A+V})]=fs(v);C.e.c<=A&&(C.e.c=A)}V=parseInt(j["number-columns-repeated"]||"1",10),A+=V-1,V=0,v={},k="",_=[]}W={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(y[1]==="/"){if((a=i.pop())[0]!==y[3])throw"Bad state: "+a}else y[0].charAt(y[0].length-2)!=="/"&&i.push([y[3],!0]);break;case"annotation":if(y[1]==="/"){if((a=i.pop())[0]!==y[3])throw"Bad state: "+a;M.t=k,_.length&&(M.R=_),M.a=z,G.push(M)}else y[0].charAt(y[0].length-2)!=="/"&&i.push([y[3],!1]);z="",K=0,k="",S=0,_=[];break;case"creator":y[1]==="/"?z=s.slice(K,y.index):K=y.index+y[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if(y[1]==="/"){if((a=i.pop())[0]!==y[3])throw"Bad state: "+a}else y[0].charAt(y[0].length-2)!=="/"&&i.push([y[3],!1]);k="",S=0,_=[];break;case"scientific-number":break;case"currency-symbol":break;case"currency-style":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if(y[1]==="/"){if(P[l.name]=c,(a=i.pop())[0]!==y[3])throw"Bad state: "+a}else y[0].charAt(y[0].length-2)!=="/"&&(c="",l=Zt(y[0],!1),i.push([y[3],!0]));break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":case"page-layout":break;case"style":break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":switch(i[i.length-1][0]){case"time-style":case"date-style":o=Zt(y[0],!1),c+=K6[y[3]][o.style==="long"?1:0];break}break;case"fraction":break;case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(i[i.length-1][0]){case"time-style":case"date-style":o=Zt(y[0],!1),c+=K6[y[3]][o.style==="long"?1:0];break}break;case"boolean-style":break;case"boolean":break;case"text-style":break;case"text":if(y[0].slice(-2)==="/>")break;if(y[1]==="/")switch(i[i.length-1][0]){case"number-style":case"date-style":case"time-style":c+=s.slice(d,y.index);break}else d=y.index+y[0].length;break;case"named-range":o=Zt(y[0],!1),O=X2(o["cell-range-address"]);var re={Name:o.name,Ref:O[0]+"!"+O[1]};J&&(re.Sheet=x.length),N.Names.push(re);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":case"电子表格":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":case"文本串":if(["master-styles"].indexOf(i[i.length-1][0])>-1)break;if(y[1]==="/"&&(!j||!j["string-value"])){var pe=Qje(s.slice(S,y.index));k=(k.length>0?k+`
901`:"")+pe[0]}else Zt(y[0],!1),S=y.index+y[0].length;break;case"s":break;case"database-range":if(y[1]==="/")break;try{O=X2(Zt(y[0])["target-range-address"]),m[O[0]]["!autofilter"]={ref:O[1]}}catch{}break;case"date":break;case"object":break;case"title":case"标题":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break;case"database-ranges":break;case"filter":break;case"filter-and":break;case"filter-or":break;case"filter-condition":break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":break;case"event-listener":break;case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":break;case"properties":break;case"property":break;case"a":if(y[1]!=="/"){if(W=Zt(y[0],!1),!W.href)break;W.Target=Fn(W.href),delete W.href,W.Target.charAt(0)=="#"&&W.Target.indexOf(".")>-1?(O=X2(W.Target.slice(1)),W.Target="#"+O[0]+"!"+O[1]):W.Target.match(/^\.\.[\\\/]/)&&(W.Target=W.Target.slice(3))}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(y[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(n.WTF)throw new Error(y)}}var Z={Sheets:m,SheetNames:x,Workbook:N};return n.bookSheets&&delete Z.Sheets,Z}function Y6(e,t){t=t||{},ra(e,"META-INF/manifest.xml")&&hye(Er(e,"META-INF/manifest.xml"),t);var n=Ti(e,"content.xml");if(!n)throw new Error("Missing content.xml in ODS / UOF file");var s=v7(Jn(n),t);return ra(e,"meta.xml")&&(s.Props=R9(Er(e,"meta.xml"))),s}function X6(e,t){return v7(e,t)}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function D_(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Wj(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):Jn(nu(e))}function $j(e){var t=e.reduce(function(i,a){return i+a.length},0),n=new Uint8Array(t),s=0;return e.forEach(function(i){n.set(i,s),s+=i.length}),n}function J6(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>>24}function Zje(e,t){for(var n=(e[t+15]&127)<<7|e[t+14]>>1,s=e[t+14]&1,i=t+13;i>=t;--i)s=s*256+e[i];return(e[t+15]&128?-s:s)*Math.pow(10,n-6176)}function Nm(e,t){var n=t?t[0]:0,s=e[n]&127;e:if(e[n++]>=128&&(s|=(e[n]&127)<<7,e[n++]<128||(s|=(e[n]&127)<<14,e[n++]<128)||(s|=(e[n]&127)<<21,e[n++]<128)||(s+=(e[n]&127)*Math.pow(2,28),++n,e[n++]<128)||(s+=(e[n]&127)*Math.pow(2,35),++n,e[n++]<128)||(s+=(e[n]&127)*Math.pow(2,42),++n,e[n++]<128)))break e;return t&&(t[0]=n),s}function Wr(e){var t=0,n=e[t]&127;e:if(e[t++]>=128){if(n|=(e[t]&127)<<7,e[t++]<128||(n|=(e[t]&127)<<14,e[t++]<128)||(n|=(e[t]&127)<<21,e[t++]<128))break e;n|=(e[t]&127)<<28}return n}function Ns(e){for(var t=[],n=[0];n[0]<e.length;){var s=n[0],i=Nm(e,n),a=i&7;i=Math.floor(i/8);var o=0,l;if(i==0)break;switch(a){case 0:{for(var c=n[0];e[n[0]++]>=128;);l=e.slice(c,n[0])}break;case 5:o=4,l=e.slice(n[0],n[0]+o),n[0]+=o;break;case 1:o=8,l=e.slice(n[0],n[0]+o),n[0]+=o;break;case 2:o=Nm(e,n),l=e.slice(n[0],n[0]+o),n[0]+=o;break;case 3:case 4:default:throw new Error("PB Type ".concat(a," for Field ").concat(i," at offset ").concat(s))}var d={data:l,type:a};t[i]==null?t[i]=[d]:t[i].push(d)}return t}function I_(e,t){return(e==null?void 0:e.map(function(n){return t(n.data)}))||[]}function eSe(e){for(var t,n=[],s=[0];s[0]<e.length;){var i=Nm(e,s),a=Ns(e.slice(s[0],s[0]+i));s[0]+=i;var o={id:Wr(a[1][0].data),messages:[]};a[2].forEach(function(l){var c=Ns(l.data),d=Wr(c[3][0].data);o.messages.push({meta:c,data:e.slice(s[0],s[0]+d)}),s[0]+=d}),(t=a[3])!=null&&t[0]&&(o.merge=Wr(a[3][0].data)>>>0>0),n.push(o)}return n}function tSe(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var n=[0],s=Nm(t,n),i=[];n[0]<t.length;){var a=t[n[0]]&3;if(a==0){var o=t[n[0]++]>>2;if(o<60)++o;else{var l=o-59;o=t[n[0]],l>1&&(o|=t[n[0]+1]<<8),l>2&&(o|=t[n[0]+2]<<16),l>3&&(o|=t[n[0]+3]<<24),o>>>=0,o++,n[0]+=l}i.push(t.slice(n[0],n[0]+o)),n[0]+=o;continue}else{var c=0,d=0;if(a==1?(d=(t[n[0]]>>2&7)+4,c=(t[n[0]++]&224)<<3,c|=t[n[0]++]):(d=(t[n[0]++]>>2)+1,a==2?(c=t[n[0]]|t[n[0]+1]<<8,n[0]+=2):(c=(t[n[0]]|t[n[0]+1]<<8|t[n[0]+2]<<16|t[n[0]+3]<<24)>>>0,n[0]+=4)),i=[$j(i)],c==0)throw new Error("Invalid offset 0");if(c>i[0].length)throw new Error("Invalid offset beyond length");if(d>=c)for(i.push(i[0].slice(-c)),d-=c;d>=i[i.length-1].length;)i.push(i[i.length-1]),d-=i[i.length-1].length;i.push(i[0].slice(-c,-c+d))}}var u=$j(i);if(u.length!=s)throw new Error("Unexpected length: ".concat(u.length," != ").concat(s));return u}function nSe(e){for(var t=[],n=0;n<e.length;){var s=e[n++],i=e[n]|e[n+1]<<8|e[n+2]<<16;n+=3,t.push(tSe(s,e.slice(n,n+i))),n+=i}if(n!==e.length)throw new Error("data is not a valid framed stream!");return $j(t)}function rSe(e,t,n,s){var i=D_(e),a=i.getUint32(4,!0),o=(s>1?12:8)+J6(a&(s>1?3470:398))*4,l=-1,c=-1,d=NaN,u=new Date(2001,0,1);a&512&&(l=i.getUint32(o,!0),o+=4),o+=J6(a&(s>1?12288:4096))*4,a&16&&(c=i.getUint32(o,!0),o+=4),a&32&&(d=i.getFloat64(o,!0),o+=8),a&64&&(u.setTime(u.getTime()+i.getFloat64(o,!0)*1e3),o+=8);var p;switch(e[2]){case 0:break;case 2:p={t:"n",v:d};break;case 3:p={t:"s",v:t[c]};break;case 5:p={t:"d",v:u};break;case 6:p={t:"b",v:d>0};break;case 7:p={t:"n",v:d/86400};break;case 8:p={t:"e",v:0};break;case 9:if(l>-1)p={t:"s",v:n[l]};else if(c>-1)p={t:"s",v:t[c]};else if(!isNaN(d))p={t:"n",v:d};else throw new Error("Unsupported cell type ".concat(e.slice(0,4)));break;default:throw new Error("Unsupported cell type ".concat(e.slice(0,4)))}return p}function sSe(e,t,n){var s=D_(e),i=s.getUint32(8,!0),a=12,o=-1,l=-1,c=NaN,d=NaN,u=new Date(2001,0,1);i&1&&(c=Zje(e,a),a+=16),i&2&&(d=s.getFloat64(a,!0),a+=8),i&4&&(u.setTime(u.getTime()+s.getFloat64(a,!0)*1e3),a+=8),i&8&&(l=s.getUint32(a,!0),a+=4),i&16&&(o=s.getUint32(a,!0),a+=4);var p;switch(e[1]){case 0:break;case 2:p={t:"n",v:c};break;case 3:p={t:"s",v:t[l]};break;case 5:p={t:"d",v:u};break;case 6:p={t:"b",v:d>0};break;case 7:p={t:"n",v:d/86400};break;case 8:p={t:"e",v:0};break;case 9:if(o>-1)p={t:"s",v:n[o]};else throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(i&31," : ").concat(e.slice(0,4)));break;case 10:p={t:"n",v:c};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(i&31," : ").concat(e.slice(0,4)))}return p}function iSe(e,t,n){switch(e[0]){case 0:case 1:case 2:case 3:return rSe(e,t,n,e[0]);case 5:return sSe(e,t,n);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function wc(e){var t=Ns(e);return Nm(t[1][0].data)}function Q6(e,t){var n=Ns(t.data),s=Wr(n[1][0].data),i=n[3],a=[];return(i||[]).forEach(function(o){var l=Ns(o.data),c=Wr(l[1][0].data)>>>0;switch(s){case 1:a[c]=Wj(l[3][0].data);break;case 8:{var d=e[wc(l[9][0].data)][0],u=Ns(d.data),p=e[wc(u[1][0].data)][0],m=Wr(p.meta[1][0].data);if(m!=2001)throw new Error("2000 unexpected reference to ".concat(m));var x=Ns(p.data);a[c]=x[3].map(function(w){return Wj(w.data)}).join("")}break}}),a}function aSe(e,t){var n,s,i,a,o,l,c,d,u,p,m,x,w,y,v=Ns(e),j=Wr(v[1][0].data)>>>0,k=Wr(v[2][0].data)>>>0,S=((s=(n=v[8])==null?void 0:n[0])==null?void 0:s.data)&&Wr(v[8][0].data)>0||!1,_,F;if((a=(i=v[7])==null?void 0:i[0])!=null&&a.data&&t!=0)_=(l=(o=v[7])==null?void 0:o[0])==null?void 0:l.data,F=(d=(c=v[6])==null?void 0:c[0])==null?void 0:d.data;else if((p=(u=v[4])==null?void 0:u[0])!=null&&p.data&&t!=1)_=(x=(m=v[4])==null?void 0:m[0])==null?void 0:x.data,F=(y=(w=v[3])==null?void 0:w[0])==null?void 0:y.data;else throw"NUMBERS Tile missing ".concat(t," cell storage");for(var A=S?4:1,C=D_(_),D=[],P=0;P<_.length/2;++P){var L=C.getUint16(P*2,!0);L<65535&&D.push([P,L])}if(D.length!=k)throw"Expected ".concat(k," cells, found ").concat(D.length);var T=[];for(P=0;P<D.length-1;++P)T[D[P][0]]=F.subarray(D[P][1]*A,D[P+1][1]*A);return D.length>=1&&(T[D[D.length-1][0]]=F.subarray(D[D.length-1][1]*A)),{R:j,cells:T}}function oSe(e,t){var n,s=Ns(t.data),i=(n=s==null?void 0:s[7])!=null&&n[0]?Wr(s[7][0].data)>>>0>0?1:0:-1,a=I_(s[5],function(o){return aSe(o,i)});return{nrows:Wr(s[4][0].data)>>>0,data:a.reduce(function(o,l){return o[l.R]||(o[l.R]=[]),l.cells.forEach(function(c,d){if(o[l.R][d])throw new Error("Duplicate cell r=".concat(l.R," c=").concat(d));o[l.R][d]=c}),o},[])}}function lSe(e,t,n){var s,i=Ns(t.data),a={s:{r:0,c:0},e:{r:0,c:0}};if(a.e.r=(Wr(i[6][0].data)>>>0)-1,a.e.r<0)throw new Error("Invalid row varint ".concat(i[6][0].data));if(a.e.c=(Wr(i[7][0].data)>>>0)-1,a.e.c<0)throw new Error("Invalid col varint ".concat(i[7][0].data));n["!ref"]=Sn(a);var o=Ns(i[4][0].data),l=Q6(e,e[wc(o[4][0].data)][0]),c=(s=o[17])!=null&&s[0]?Q6(e,e[wc(o[17][0].data)][0]):[],d=Ns(o[3][0].data),u=0;d[1].forEach(function(p){var m=Ns(p.data),x=e[wc(m[2][0].data)][0],w=Wr(x.meta[1][0].data);if(w!=6002)throw new Error("6001 unexpected reference to ".concat(w));var y=oSe(e,x);y.data.forEach(function(v,j){v.forEach(function(k,S){var _=an({r:u+j,c:S}),F=iSe(k,l,c);F&&(n[_]=F)})}),u+=y.nrows})}function cSe(e,t){var n=Ns(t.data),s={"!ref":"A1"},i=e[wc(n[2][0].data)],a=Wr(i[0].meta[1][0].data);if(a!=6001)throw new Error("6000 unexpected reference to ".concat(a));return lSe(e,i[0],s),s}function dSe(e,t){var n,s=Ns(t.data),i={name:(n=s[1])!=null&&n[0]?Wj(s[1][0].data):"",sheets:[]},a=I_(s[2],wc);return a.forEach(function(o){e[o].forEach(function(l){var c=Wr(l.meta[1][0].data);c==6e3&&i.sheets.push(cSe(e,l))})}),i}function uSe(e,t){var n=O_(),s=Ns(t.data),i=I_(s[1],wc);if(i.forEach(function(a){e[a].forEach(function(o){var l=Wr(o.meta[1][0].data);if(l==2){var c=dSe(e,o);c.sheets.forEach(function(d,u){M_(n,d,u==0?c.name:c.name+"_"+u,!0)})}})}),n.SheetNames.length==0)throw new Error("Empty NUMBERS file");return n}function Q2(e){var t,n,s,i,a={},o=[];if(e.FullPaths.forEach(function(c){if(c.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(c){if(c.name.match(/\.iwa$/)){var d;try{d=nSe(c.content)}catch(p){return console.log("?? "+c.content.length+" "+(p.message||p))}var u;try{u=eSe(d)}catch(p){return console.log("## "+(p.message||p))}u.forEach(function(p){a[p.id]=p.messages,o.push(p.id)})}}),!o.length)throw new Error("File has no messages");var l=((i=(s=(n=(t=a==null?void 0:a[1])==null?void 0:t[0])==null?void 0:n.meta)==null?void 0:s[1])==null?void 0:i[0].data)&&Wr(a[1][0].meta[1][0].data)==1&&a[1][0];if(l||o.forEach(function(c){a[c].forEach(function(d){var u=Wr(d.meta[1][0].data)>>>0;if(u==1)if(!l)l=d;else throw new Error("Document has multiple roots")})}),!l)throw new Error("Cannot find Document root");return uSe(a,l)}function fSe(e){return function(n){for(var s=0;s!=e.length;++s){var i=e[s];n[i[0]]===void 0&&(n[i[0]]=i[1]),i[2]==="n"&&(n[i[0]]=Number(n[i[0]]))}}}function P_(e){fSe([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}function pSe(e){return uf.WS.indexOf(e)>-1?"sheet":e==uf.CS?"chart":e==uf.DS?"dialog":e==uf.MS?"macro":e&&e.length?e:"sheet"}function hSe(e,t){if(!e)return 0;try{e=t.map(function(s){return s.id||(s.id=s.strRelID),[s.name,e["!id"][s.id].Target,pSe(e["!id"][s.id].Type)]})}catch{return null}return!e||e.length===0?null:e}function mSe(e,t,n,s,i,a,o,l,c,d,u,p){try{a[s]=Kh(Ti(e,n,!0),t);var m=Er(e,t),x;switch(l){case"sheet":x=wje(m,t,i,c,a[s],d,u,p);break;case"chart":if(x=jje(m,t,i,c,a[s],d,u,p),!x||!x["!drawel"])break;var w=Dh(x["!drawel"].Target,t),y=Bj(w),v=bbe(Ti(e,w,!0),Kh(Ti(e,y,!0),w)),j=Dh(v,w),k=Bj(j);x=sje(Ti(e,j,!0),j,c,Kh(Ti(e,k,!0),j),d,x);break;case"macro":x=Sje(m,t,i,c,a[s],d,u,p);break;case"dialog":x=kje(m,t,i,c,a[s],d,u,p);break;default:throw new Error("Unrecognized sheet type "+l)}o[s]=x;var S=[];a&&a[s]&&Ao(a[s]).forEach(function(_){var F="";if(a[s][_].Type==uf.CMNT){F=Dh(a[s][_].Target,t);var A=Fje(Er(e,F,!0),F,c);if(!A||!A.length)return;O6(x,A,!1)}a[s][_].Type==uf.TCMNT&&(F=Dh(a[s][_].Target,t),S=S.concat(jbe(Er(e,F,!0),c)))}),S&&S.length&&O6(x,S,!0,c.people||[])}catch(_){if(c.WTF)throw _}}function Zi(e){return e.charAt(0)=="/"?e.slice(1):e}function gSe(e,t){if(r9(),t=t||{},P_(t),ra(e,"META-INF/manifest.xml")||ra(e,"objectdata.xml"))return Y6(e,t);if(ra(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(typeof Q2<"u"){if(e.FileIndex)return Q2(e);var n=jn.utils.cfb_new();return d6(e).forEach(function(I){xxe(n,I,gxe(e,I))}),Q2(n)}throw new Error("Unsupported NUMBERS file")}if(!ra(e,"[Content_Types].xml"))throw ra(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):ra(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var s=d6(e),i=fye(Ti(e,"[Content_Types].xml")),a=!1,o,l;if(i.workbooks.length===0&&(l="xl/workbook.xml",Er(e,l,!0)&&i.workbooks.push(l)),i.workbooks.length===0){if(l="xl/workbook.bin",!Er(e,l,!0))throw new Error("Could not find workbook");i.workbooks.push(l),a=!0}i.workbooks[0].slice(-3)=="bin"&&(a=!0);var c={},d={};if(!t.bookSheets&&!t.bookProps){if(Jh=[],i.sst)try{Jh=Eje(Er(e,Zi(i.sst)),i.sst,t)}catch(I){if(t.WTF)throw I}t.cellStyles&&i.themes.length&&(c=Cje(Ti(e,i.themes[0].replace(/^\//,""),!0)||"",i.themes[0],t)),i.style&&(d=_je(Er(e,Zi(i.style)),i.style,c,t))}i.links.map(function(I){try{var H=Kh(Ti(e,Bj(Zi(I))),I);return Tje(Er(e,Zi(I)),H,I,t)}catch{}});var u=bje(Er(e,Zi(i.workbooks[0])),i.workbooks[0],t),p={},m="";i.coreprops.length&&(m=Er(e,Zi(i.coreprops[0]),!0),m&&(p=R9(m)),i.extprops.length!==0&&(m=Er(e,Zi(i.extprops[0]),!0),m&&xye(m,p,t)));var x={};(!t.bookSheets||t.bookProps)&&i.custprops.length!==0&&(m=Ti(e,Zi(i.custprops[0]),!0),m&&(x=vye(m,t)));var w={};if((t.bookSheets||t.bookProps)&&(u.Sheets?o=u.Sheets.map(function(H){return H.name}):p.Worksheets&&p.SheetNames.length>0&&(o=p.SheetNames),t.bookProps&&(w.Props=p,w.Custprops=x),t.bookSheets&&typeof o<"u"&&(w.SheetNames=o),t.bookSheets?w.SheetNames:t.bookProps))return w;o={};var y={};t.bookDeps&&i.calcchain&&(y=Aje(Er(e,Zi(i.calcchain)),i.calcchain));var v=0,j={},k,S;{var _=u.Sheets;p.Worksheets=_.length,p.SheetNames=[];for(var F=0;F!=_.length;++F)p.SheetNames[F]=_[F].name}var A=a?"bin":"xml",C=i.workbooks[0].lastIndexOf("/"),D=(i.workbooks[0].slice(0,C+1)+"_rels/"+i.workbooks[0].slice(C+1)+".rels").replace(/^\//,"");ra(e,D)||(D="xl/_rels/workbook."+A+".rels");var P=Kh(Ti(e,D,!0),D.replace(/_rels.*/,"s5s"));(i.metadata||[]).length>=1&&(t.xlmeta=Nje(Er(e,Zi(i.metadata[0])),i.metadata[0],t)),(i.people||[]).length>=1&&(t.people=Sbe(Er(e,Zi(i.people[0])),t)),P&&(P=hSe(P,u.Sheets));var L=Er(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(v=0;v!=p.Worksheets;++v){var T="sheet";if(P&&P[v]?(k="xl/"+P[v][1].replace(/[\/]?xl\//,""),ra(e,k)||(k=P[v][1]),ra(e,k)||(k=D.replace(/_rels\/.*$/,"")+P[v][1]),T=P[v][2]):(k="xl/worksheets/sheet"+(v+1-L)+"."+A,k=k.replace(/sheet0\./,"sheet.")),S=k.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&t.sheets!=null)switch(typeof t.sheets){case"number":if(v!=t.sheets)continue e;break;case"string":if(p.SheetNames[v].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var R=!1,U=0;U!=t.sheets.length;++U)typeof t.sheets[U]=="number"&&t.sheets[U]==v&&(R=1),typeof t.sheets[U]=="string"&&t.sheets[U].toLowerCase()==p.SheetNames[v].toLowerCase()&&(R=1);if(!R)continue e}}mSe(e,k,S,p.SheetNames[v],v,j,o,T,t,u,c,d)}return w={Directory:i,Workbook:u,Props:p,Custprops:x,Deps:y,Sheets:o,SheetNames:p.SheetNames,Strings:Jh,Styles:d,Themes:c,SSF:fs(cn)},t&&t.bookFiles&&(e.files?(w.keys=s,w.files=e.files):(w.keys=[],w.files={},e.FullPaths.forEach(function(I,H){I=I.replace(/^Root Entry[\/]/,""),w.keys.push(I),w.files[I]=e.FileIndex[H]}))),t&&t.bookVBA&&(i.vba.length>0?w.vbaraw=Er(e,Zi(i.vba[0]),!0):i.defaults&&i.defaults.bin===Ebe&&(w.vbaraw=Er(e,"xl/vbaProject.bin",!0))),w}function xSe(e,t){var n=t||{},s="Workbook",i=jn.find(e,s);try{if(s="/!DataSpaces/Version",i=jn.find(e,s),!i||!i.content)throw new Error("ECMA-376 Encrypted file missing "+s);if(cve(i.content),s="/!DataSpaces/DataSpaceMap",i=jn.find(e,s),!i||!i.content)throw new Error("ECMA-376 Encrypted file missing "+s);var a=uve(i.content);if(a.length!==1||a[0].comps.length!==1||a[0].comps[0].t!==0||a[0].name!=="StrongEncryptionDataSpace"||a[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+s);if(s="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",i=jn.find(e,s),!i||!i.content)throw new Error("ECMA-376 Encrypted file missing "+s);var o=fve(i.content);if(o.length!=1||o[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+s);if(s="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",i=jn.find(e,s),!i||!i.content)throw new Error("ECMA-376 Encrypted file missing "+s);hve(i.content)}catch{}if(s="/EncryptionInfo",i=jn.find(e,s),!i||!i.content)throw new Error("ECMA-376 Encrypted file missing "+s);var l=mve(i.content);if(s="/EncryptedPackage",i=jn.find(e,s),!i||!i.content)throw new Error("ECMA-376 Encrypted file missing "+s);if(l[0]==4&&typeof decrypt_agile<"u")return decrypt_agile(l[1],i.content,n.password||"",n);if(l[0]==2&&typeof decrypt_std76<"u")return decrypt_std76(l[1],i.content,n.password||"",n);throw new Error("File is password-protected")}function B_(e,t){var n="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":n=zi(e.slice(0,12));break;case"binary":n=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function ySe(e,t){return jn.find(e,"EncryptedPackage")?xSe(e,t):g7(e,t)}function vSe(e,t){var n,s=e,i=t||{};return i.type||(i.type=bn&&Buffer.isBuffer(e)?"buffer":"base64"),n=c9(s,i),gSe(n,i)}function b7(e,t){var n=0;e:for(;n<e.length;)switch(e.charCodeAt(n)){case 10:case 13:case 32:++n;break;case 60:return Lj(e.slice(n),t);default:break e}return Fm.to_workbook(e,t)}function bSe(e,t){var n="",s=B_(e,t);switch(t.type){case"base64":n=zi(e);break;case"binary":n=e;break;case"buffer":n=e.toString("binary");break;case"array":n=Yd(e);break;default:throw new Error("Unrecognized type "+t.type)}return s[0]==239&&s[1]==187&&s[2]==191&&(n=Jn(n)),t.type="binary",b7(n,t)}function wSe(e,t){var n=e;return t.type=="base64"&&(n=zi(n)),n=km.utils.decode(1200,n.slice(2),"str"),t.type="binary",b7(n,t)}function jSe(e){return e.match(/[^\x00-\x7F]/)?Ih(e):e}function Z2(e,t,n,s){return s?(n.type="string",Fm.to_workbook(e,n)):Fm.to_workbook(t,n)}function Uj(e,t){HM();var n=t||{};if(typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer)return Uj(new Uint8Array(e),(n=fs(n),n.type="array",n));typeof Uint8Array<"u"&&e instanceof Uint8Array&&!n.type&&(n.type=typeof Deno<"u"?"buffer":"array");var s=e,i=[0,0,0,0],a=!1;if(n.cellStyles&&(n.cellNF=!0,n.sheetStubs=!0),bf={},n.dateNF&&(bf.dateNF=n.dateNF),n.type||(n.type=bn&&Buffer.isBuffer(e)?"buffer":"base64"),n.type=="file"&&(n.type=bn?"buffer":"binary",s=cxe(e),typeof Uint8Array<"u"&&!bn&&(n.type="array")),n.type=="string"&&(a=!0,n.type="binary",n.codepage=65001,s=jSe(e)),n.type=="array"&&typeof Uint8Array<"u"&&e instanceof Uint8Array&&typeof ArrayBuffer<"u"){var o=new ArrayBuffer(3),l=new Uint8Array(o);if(l.foo="bar",!l.foo)return n=fs(n),n.type="array",Uj(h_(s),n)}switch((i=B_(s,n))[0]){case 208:if(i[1]===207&&i[2]===17&&i[3]===224&&i[4]===161&&i[5]===177&&i[6]===26&&i[7]===225)return ySe(jn.read(s,n),n);break;case 9:if(i[1]<=8)return g7(s,n);break;case 60:return Lj(s,n);case 73:if(i[1]===73&&i[2]===42&&i[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(i[1]===68)return X1e(s,n);break;case 84:if(i[1]===65&&i[2]===66&&i[3]===76)return K1e.to_workbook(s,n);break;case 80:return i[1]===75&&i[2]<9&&i[3]<9?vSe(s,n):Z2(e,s,n,a);case 239:return i[3]===60?Lj(s,n):Z2(e,s,n,a);case 255:if(i[1]===254)return wSe(s,n);if(i[1]===0&&i[2]===2&&i[3]===0)return Xh.to_workbook(s,n);break;case 0:if(i[1]===0&&(i[2]>=2&&i[3]===0||i[2]===0&&(i[3]===8||i[3]===9)))return Xh.to_workbook(s,n);break;case 3:case 131:case 139:case 140:return B6.to_workbook(s,n);case 123:if(i[1]===92&&i[2]===114&&i[3]===116)return Eve.to_workbook(s,n);break;case 10:case 13:case 32:return bSe(s,n);case 137:if(i[1]===80&&i[2]===78&&i[3]===71)throw new Error("PNG Image File is not a spreadsheet");break}return q1e.indexOf(i[0])>-1&&i[2]<=12&&i[3]<=31?B6.to_workbook(s,n):Z2(e,s,n,a)}function SSe(e,t,n,s,i,a,o,l){var c=ps(n),d=l.defval,u=l.raw||!Object.prototype.hasOwnProperty.call(l,"raw"),p=!0,m=i===1?[]:{};if(i!==1)if(Object.defineProperty)try{Object.defineProperty(m,"__rowNum__",{value:n,enumerable:!1})}catch{m.__rowNum__=n}else m.__rowNum__=n;if(!o||e[n])for(var x=t.s.c;x<=t.e.c;++x){var w=o?e[n][x]:e[s[x]+c];if(w===void 0||w.t===void 0){if(d===void 0)continue;a[x]!=null&&(m[a[x]]=d);continue}var y=w.v;switch(w.t){case"z":if(y==null)break;continue;case"e":y=y==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+w.t)}if(a[x]!=null){if(y==null)if(w.t=="e"&&y===null)m[a[x]]=null;else if(d!==void 0)m[a[x]]=d;else if(u&&y===null)m[a[x]]=null;else continue;else m[a[x]]=u&&(w.t!=="n"||w.t==="n"&&l.rawNumbers!==!1)?y:Sl(w,y,l);y!=null&&(p=!1)}}return{row:m,isempty:p}}function Vj(e,t){if(e==null||e["!ref"]==null)return[];var n={t:"n",v:0},s=0,i=1,a=[],o=0,l="",c={s:{r:0,c:0},e:{r:0,c:0}},d=t||{},u=d.range!=null?d.range:e["!ref"];switch(d.header===1?s=1:d.header==="A"?s=2:Array.isArray(d.header)?s=3:d.header==null&&(s=0),typeof u){case"string":c=gr(u);break;case"number":c=gr(e["!ref"]),c.s.r=u;break;default:c=u}s>0&&(i=0);var p=ps(c.s.r),m=[],x=[],w=0,y=0,v=Array.isArray(e),j=c.s.r,k=0,S={};v&&!e[j]&&(e[j]=[]);var _=d.skipHidden&&e["!cols"]||[],F=d.skipHidden&&e["!rows"]||[];for(k=c.s.c;k<=c.e.c;++k)if(!(_[k]||{}).hidden)switch(m[k]=zr(k),n=v?e[j][k]:e[m[k]+p],s){case 1:a[k]=k-c.s.c;break;case 2:a[k]=m[k];break;case 3:a[k]=d.header[k-c.s.c];break;default:if(n==null&&(n={w:"__EMPTY",t:"s"}),l=o=Sl(n,null,d),y=S[o]||0,!y)S[o]=1;else{do l=o+"_"+y++;while(S[l]);S[o]=y,S[l]=1}a[k]=l}for(j=c.s.r+i;j<=c.e.r;++j)if(!(F[j]||{}).hidden){var A=SSe(e,c,j,m,s,a,v,d);(A.isempty===!1||(s===1?d.blankrows!==!1:d.blankrows))&&(x[w++]=A.row)}return x.length=w,x}var Z6=/"/g;function kSe(e,t,n,s,i,a,o,l){for(var c=!0,d=[],u="",p=ps(n),m=t.s.c;m<=t.e.c;++m)if(s[m]){var x=l.dense?(e[n]||[])[m]:e[s[m]+p];if(x==null)u="";else if(x.v!=null){c=!1,u=""+(l.rawNumbers&&x.t=="n"?x.v:Sl(x,null,l));for(var w=0,y=0;w!==u.length;++w)if((y=u.charCodeAt(w))===i||y===a||y===34||l.forceQuotes){u='"'+u.replace(Z6,'""')+'"';break}u=="ID"&&(u='"ID"')}else x.f!=null&&!x.F?(c=!1,u="="+x.f,u.indexOf(",")>=0&&(u='"'+u.replace(Z6,'""')+'"')):u="";d.push(u)}return l.blankrows===!1&&c?null:d.join(o)}function w7(e,t){var n=[],s=t??{};if(e==null||e["!ref"]==null)return"";var i=gr(e["!ref"]),a=s.FS!==void 0?s.FS:",",o=a.charCodeAt(0),l=s.RS!==void 0?s.RS:`
902`,c=l.charCodeAt(0),d=new RegExp((a=="|"?"\\|":a)+"+$"),u="",p=[];s.dense=Array.isArray(e);for(var m=s.skipHidden&&e["!cols"]||[],x=s.skipHidden&&e["!rows"]||[],w=i.s.c;w<=i.e.c;++w)(m[w]||{}).hidden||(p[w]=zr(w));for(var y=0,v=i.s.r;v<=i.e.r;++v)(x[v]||{}).hidden||(u=kSe(e,i,v,p,o,c,a,s),u!=null&&(s.strip&&(u=u.replace(d,"")),(u||s.blankrows!==!1)&&n.push((y++?l:"")+u)));return delete s.dense,n.join("")}function _Se(e,t){t||(t={}),t.FS="	",t.RS=`
903`;var n=w7(e,t);return n}function CSe(e){var t="",n,s="";if(e==null||e["!ref"]==null)return[];var i=gr(e["!ref"]),a="",o=[],l,c=[],d=Array.isArray(e);for(l=i.s.c;l<=i.e.c;++l)o[l]=zr(l);for(var u=i.s.r;u<=i.e.r;++u)for(a=ps(u),l=i.s.c;l<=i.e.c;++l)if(t=o[l]+a,n=d?(e[u]||[])[l]:e[t],s="",n!==void 0){if(n.F!=null){if(t=n.F,!n.f)continue;s=n.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(n.f!=null)s=n.f;else{if(n.t=="z")continue;if(n.t=="n"&&n.v!=null)s=""+n.v;else if(n.t=="b")s=n.v?"TRUE":"FALSE";else if(n.w!==void 0)s="'"+n.w;else{if(n.v===void 0)continue;n.t=="s"?s="'"+n.v:s=""+n.v}}c[c.length]=t+"="+s}return c}
903function j7(e,t,n){var s=n||{},i=+!s.skipHeader,a=e||{},o=0,l=0;if(a&&s.origin!=null)if(typeof s.origin=="number")o=s.origin;else{var c=typeof s.origin=="string"?Ys(s.origin):s.origin;o=c.r,l=c.c}var d,u={s:{c:0,r:0},e:{c:l,r:o+t.length-1+i}};if(a["!ref"]){var p=gr(a["!ref"]);u.e.c=Math.max(u.e.c,p.e.c),u.e.r=Math.max(u.e.r,p.e.r),o==-1&&(o=p.e.r+1,u.e.r=o+t.length-1+i)}else o==-1&&(o=0,u.e.r=t.length-1+i);var m=s.header||[],x=0;t.forEach(function(y,v){Ao(y).forEach(function(j){(x=m.indexOf(j))==-1&&(m[x=m.length]=j);var k=y[j],S="z",_="",F=an({c:l+x,r:o+v+i});d=Rm(a,F),k&&typeof k=="object"&&!(k instanceof Date)?a[F]=k:(typeof k=="number"?S="n":typeof k=="boolean"?S="b":typeof k=="string"?S="s":k instanceof Date?(S="d",s.cellDates||(S="n",k=Qs(k)),_=s.dateNF||cn[14]):k===null&&s.nullError&&(S="e",k=0),d?(d.t=S,d.v=k,delete d.w,delete d.R,_&&(d.z=_)):a[F]=d={t:S,v:k},_&&(d.z=_))})}),u.e.c=Math.max(u.e.c,l+m.length-1);var w=ps(o);if(i)for(x=0;x<m.length;++x)a[zr(x+l)+w]={t:"s",v:m[x]};return a["!ref"]=Sn(u),a}function ESe(e,t){return j7(null,e,t)}function Rm(e,t,n){if(typeof t=="string"){if(Array.isArray(e)){var s=Ys(t);return e[s.r]||(e[s.r]=[]),e[s.r][s.c]||(e[s.r][s.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?Rm(e,an(t)):Rm(e,an({r:t,c:n||0}))}function FSe(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var n=e.SheetNames.indexOf(t);if(n>-1)return n;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function O_(){return{SheetNames:[],Sheets:{}}}function M_(e,t,n,s){var i=1;if(!n)for(;i<=65535&&e.SheetNames.indexOf(n="Sheet"+i)!=-1;++i,n=void 0);if(!n||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(s&&e.SheetNames.indexOf(n)>=0){var a=n.match(/(^.*?)(\d+)$/);i=a&&+a[2]||0;var o=a&&a[1]||n;for(++i;i<=65535&&e.SheetNames.indexOf(n=o+i)!=-1;++i);}if(fje(n),e.SheetNames.indexOf(n)>=0)throw new Error("Worksheet with name |"+n+"| already exists!");return e.SheetNames.push(n),e.Sheets[n]=t,n}function ASe(e,t,n){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var s=FSe(e,t);
903switch(e.Workbook.Sheets[s]||(e.Workbook.Sheets[s]={}),n){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+n)}e.Workbook.Sheets[s].Hidden=n}function TSe(e,t){return e.z=t,e}function S7(e,t,n){return t?(e.l={Target:t},n&&(e.l.Tooltip=n)):delete e.l,e}function NSe(e,t,n){return S7(e,"#"+t,n)}function RSe(e,t,n){e.c||(e.c=[]),e.c.push({t,a:n||"SheetJS"})}function DSe(e,t,n,s){for(var i=typeof t!="string"?t:gr(t),a=typeof t=="string"?t:Sn(t),o=i.s.r;o<=i.e.r;++o)for(var l=i.s.c;l<=i.e.c;++l){var c=Rm(e,o,l);c.t="n",c.F=a,delete c.v,o==i.s.r&&l==i.s.c&&(c.f=n,s&&(c.D=!0))}return e}var ISe={encode_col:zr,encode_row:ps,encode_cell:an,encode_range:Sn,decode_col:S_,decode_row:j_,split_cell:Hxe,decode_cell:Ys,decode_range:lp,format_cell:Sl,sheet_add_aoa:E9,sheet_add_json:j7,sheet_add_dom:x7,aoa_to_sheet:cp,json_to_sheet:ESe,table_to_sheet:y7,table_to_book:Xje,sheet_to_csv:w7,sheet_to_txt:_Se,sheet_to_json:Vj,sheet_to_html:Yje,sheet_to_formulae:CSe,sheet_to_row_object_array:Vj,sheet_get_cell:Rm,book_new:O_,book_append_sheet:M_,book_set_sheet_visibility:ASe,cell_set_number_format:TSe,cell_set_hyperlink:S7,cell_set_internal_link:NSe,cell_add_comment:RSe,sheet_set_array_formula:DSe,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const Jg=100,Qg=50,PSe=[".pdf",".docx",".doc"];function BSe(e){const t=((e==null?void 0:e.name)||"").toLowerCase();return PSe.some(n=>t.endsWith(n))}function OSe(e){return!e&&e!==0?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function MSe({step:e}){const t=["Selecionar","Extrair","Revisar"];return r.jsx("div",{className:"flex items-center gap-1 mb-5",children:t.map((n,s)=>{const i=s+1,a=e===i,o=e>i;return r.jsxs(Rn.Fragment,{children:[r.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded ${a?"bg-indigo-50":""}`,children:[r.jsx("div",{className:`w-5 h-5 rounded-full text-[10px] font-semibold flex items-center justify-center ${o?"bg-green-500 text-white":a?"bg-indigo-600 text-white":"bg-gray-200 text-gray-500"}`,children:o?"✓":i}),r.jsx("span",{className:`text-[11px] font-medium ${a?"text-indigo-700":o?"text-gray-700":"text-gray-400"}`,children:n})]}),i<t.length&&r.jsx(Qr,{size:12,className:"text-gray-300"})]},n)})})}function LSe({wsId:e,jobId:t,jobName:n,availableJobs:s,selectedJobId:i,setSelectedJobId:a,onClose:o,onSuccess:l,onStartBackground:c}){const[d,u]=g.useState(1),[p,m]=g.useState([]),[x,w]=g.useState(""),[y,v]=g.useState(!1),j=g.useRef(null),[k,S]=g.useState({current:0,total:0}),[_,F]=g.useState([]),A=g.useRef(!1),[C,D]=g.useState({batch:0,totalBatches:0,processed:0,total:0}),[P,L]=g.useState(!1),[T,R]=g.useState(null),U=g.useRef(!1);g.useEffect(()=>()=>{A.current=!0,U.current=!0},[]);const I=K=>{w("");const Y=Array.from(K||[]);if(Y.length===0)return;const J=Y.filter(BSe),Q=Y.length-J.length;m(ie=>{const ae=Z=>`${Z.name}::${Z.size}`,re=new Set(ie.map(ae)),pe=[...ie];for(const Z of J)re.has(ae(Z))||(pe.push(Z),re.add(ae(Z)));return pe.length>Jg?(w(`Limite de ${Jg} arquivos. Os excedentes foram ignorados.`),pe.slice(0,Jg)):(Q>0&&w(`${Q} arquivo(s) ignorado(s) — apenas PDF, DOCX e DOC são aceitos.`),pe)})},H=K=>{m(Y=>Y.filter((J,Q)=>Q!==K))},V=K=>{K.preventDefault(),v(!1),I(K.dataTransfer.files)},X=async()=>{var Y;if(p.length===0)return;u(2),F([]),A.current=!1,S({current:0,total:p.length});const K=[];for(let J=0;J<p.length&&!A.current;J++){const Q=p[J];S({current:J+1,total:p.length});try{const ie=await ne.integrations.Core.UploadFile({file:Q}),ae=((Y=ie==null?void 0:ie.data)==null?void 0:Y.file_url)||(ie==null?void 0:ie.file_url);if(!ae)throw new Error("Upload falhou");const re=await ne.functions.invoke("parseProfileFromCV",{file_url:ae,file_name:Q.name}),pe=(re==null?void 0:re.data)||re;if(!(pe!=null&&pe.success))throw new Error((pe==null?void 0:pe.message)||(pe==null?void 0:pe.error)||"Extração falhou");const Z=pe.profile||pe,Ne=Z.full_name||Z.name||"";if(!Ne)throw new Error("Nome não identificado no CV");K.push({success:!0,fileName:Q.name,full_name:Ne,email:Z.email||"",phone:Z.phone||"",headline:Z.headline||Z.current_title||"",current_company:Z.current_company||"",location:Z.location||"",linkedin_url:Z.linkedin_url||"",salary_expectation:Z.salary_expectation||null,cv_file_url:ae})}catch(ie){K.push({success:!1,fileName:Q.name,error:(ie==null?void 0:ie.message)||"Erro desconhecido"})}F([...K])}u(3)},N=_.filter(K=>K.success),W=_.filter(K=>!K.success),O=async()=>
903{if(N.length===0)return;u(4),L(!0),U.current=!1;const K=N.map(Q=>({full_name:Q.full_name,email:Q.email||void 0,phone:Q.phone||void 0,headline:Q.headline||void 0,current_company:Q.current_company||void 0,location:Q.location||void 0,linkedin_url:Q.linkedin_url||void 0,salary_expectation:Q.salary_expectation||void 0,cv_file_url:Q.cv_file_url||void 0})),Y=[];for(let Q=0;Q<K.length;Q+=Qg)Y.push(K.slice(Q,Q+Qg));const J={imported:0,already_existed:0,failed:0,results:[]};D({batch:0,totalBatches:Y.length,processed:0,total:K.length});for(let Q=0;Q<Y.length&&!U.current;Q++){D({batch:Q+1,totalBatches:Y.length,processed:Q*Qg,total:K.length});try{const ie=t||i||null,ae={workspace_id:e,candidates:Y[Q]};ie&&(ae.job_id=ie);const re=await ne.functions.invoke("bulkImportCandidates",ae),pe=(re==null?void 0:re.data)||re;pe!=null&&pe.success?(J.imported+=pe.imported||0,J.already_existed+=pe.already_existed||0,J.failed+=pe.failed||0,Array.isArray(pe.results)&&pe.results.forEach(Z=>J.results.push({...Z,batchIndex:Q}))):(J.failed+=Y[Q].length,Y[Q].forEach((Z,Ne)=>{J.results.push({index:Ne,success:!1,error:(pe==null?void 0:pe.error)||"Erro no lote",full_name:Z.full_name,batchIndex:Q})}))}catch(ie){J.failed+=Y[Q].length,Y[Q].forEach((ae,re)=>{J.results.push({index:re,success:!1,error:(ie==null?void 0:ie.message)||"Erro de rede",full_name:ae.full_name,batchIndex:Q})})}D({batch:Q+1,totalBatches:Y.length,processed:Math.min((Q+1)*Qg,K.length),total:K.length})}L(!1),R(J)},G=k.total>0?Math.round(k.current/k.total*100):0,M=C.total>0?Math.round(C.processed/C.total*100):0,z=d===2||P;return r.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[r.jsxs("div",{className:"overflow-y-auto p-6 flex-1 min-h-0",children:[r.jsx(MSe,{step:d===4?3:d}),d===1&&r.jsxs("div",{children:[r.jsxs("div",{onDragOver:K=>{K.preventDefault(),v(!0)},onDragLeave:()=>v(!1),onDrop:V,onClick:()=>{var K;return(K=j.current)==null?void 0:K.click()},className:`border-2 border-dashed rounded-xl p-8 text-center cursor-pointer transition ${y?"border-indigo-400 bg-indigo-50":"border-gray-300 bg-gray-50 hover:bg-gray-100"}`,children:[r.jsx(Ha,{size:28,className:"mx-auto mb-2 text-gray-400"}),r.jsx("p",{className:"text-sm font-medium text-gray-700 mb-1",children:"Arraste vários CVs ou clique para selecionar"}),r.jsxs("p",{className:"text-[11px] text-gray-400 mt-1",children:[".pdf, .docx, .doc — até ",Jg," arquivos"]}),r.jsx("input",{ref:j,type:"file",multiple:!0,accept:".pdf,.docx,.doc",onChange:K=>{I(K.target.files),K.target.value=""},className:"hidden"})]}),x&&r.jsxs("div",{className:"mt-3 text-xs text-amber-700 bg-amber-50 border border-amber-100 rounded px-3 py-2 flex items-start gap-2",children:[r.jsx(xl,{size:13,className:"flex-shrink-0 mt-0.5"}),x]}),p.length>0&&r.jsxs("div",{className:"mt-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsxs("span",{className:"text-xs font-medium text-gray-700",children:[p.length," arquivo",p.length!==1?"s":""," selecionado",p.length!==1?"s":""]}),r.jsx("button",{onClick:()=>m([]),className:"text-[11px] text-gray-500 hover:text-red-600",children:"Limpar tudo"})]}),r.jsx("div",{className:"border border-gray-200 rounded-lg overflow-y-auto",style:{maxHeight:200},children:p.map((K,Y)=>r.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-100 last:border-b-0 text-xs",children:[r.jsx(ui,{size:14,className:"text-gray-400 flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-gray-800 truncate",title:K.name,children:K.name}),r.jsx("div",{className:"text-[10px] text-gray-400",children:OSe(K.size)})]}),r.jsx("button",{onClick:()=>H(Y),className:"text-gray-400 hover:text-red-600 p-1",title:"Remover",children:r.jsx(zn,{size:13})})]},`${K.name}-${Y}`))})]})]}),d===2&&r.jsxs("div",{className:"py-6",children:[c&&r.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 mb-4",children:r.jsx("p",{className:"text-xs text-blue-800",children:"Aguarde a conclusão para revisar os resultados ou feche e continue trabalhando enquanto processamos sua solicitação."})}),r.jsx("div",{className:"flex items-center justify-center mb-4",children:r.jsx(rt,{size:28,className:"text-indigo-600 animate-spin"})}),r.jsxs("p",{className:"text-center text-sm font-medium text-gray-900 mb-1",children:["Extraindo dados do CV ",k.current,"/",k.total]}),r.jsx("p",{className:"text-center text-xs text-gray-500 mb-4",children:"A IA está lendo cada currículo. Isso pode levar alguns segundos por arquivo."}),r.jsx("div",{className:"bg-gray-100 rounded-full h-2 overflow-hidden",children:r.jsx("div",{className:"bg-indigo-600 h-full transition-all duration-300",style:{width:`${G}%`}})}),r.jsxs("p",{className:"text-center text-[11px] text-gray-400 mt-2",children:[G,"%"]})]}),d===3&&r.jsxs("div",{children:[r.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[r.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg px-3 py-2",children:[r.jsx("div",{className:"text-[10px] text-gray-500 uppercase",children:"Total"}),r.jsx("div",{className:"text-base font-semibold text-gray-900",children:_.length})]}),r.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg px-3 py-2",children:[r.jsx("div",{className:"text-[10px] text-green-700 uppercase",children:"Extraídos"}),r.jsx("div",{className:"text-base font-semibold text-green-700",children:N.length})]}),r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg px-3 py-2",children:[r.jsx("div",{className:"text-[10px] text-red-700 uppercase",children:"Falhas"}),r.jsx("div",{className:"text-base font-semibold text-red-700",children:W.length})]})]}),r.jsx("p",{className:"text-xs text-gray-600 mb-2 font-medium",children:"Resultado da extração:"}),r.jsx("div",{className:"border border-gray-200 rounded-lg overflow-x-auto",style:{maxHeight:320},children:r.jsxs("table",{className:"w-full text-xs",children:[r.jsx("thead",{className:"bg-gray-50 sticky top-0",children:r.jsxs("tr",{children:[r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500 w-6"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Arquivo"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Nome"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Email"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Telefone"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Cargo"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Empresa"})]})}),r.jsx("tbody",{children:_.map((K,Y)=>r.jsxs("tr",{className:`border-t border-gray-100 ${K.success?"":"bg-red-50"}`,children:[r.jsx("td",{className:"px-2 py-1.5",children:K.success?r.jsx(Mi,{size:13,className:"text-green-500"}):r.jsx(xl,{size:13,className:"text-red-500"})}),r.jsx("td",{className:"px-2 py-1.5 text-gray-600 truncate max-w-[140px]",title:K.fileName,children:K.fileName}),K.success?r.jsxs(r.Fragment,{children:[r.jsx("td",{className:"px-2 py-1.5 text-gray-800",children:K.full_name}),r.jsx("td",{className:"px-2 py-1.5 text-gray-600",children:K.email||"—"}),r.jsx("td",{className:"px-2 py-1.5 text-gray-600",children:K.phone||"—"}),r.jsx("td",{className:"px-2 py-1.5 text-gray-600",children:K.headline||"—"}),r.jsx("td",{className:"px-2 py-1.5 text-gray-600",children:K.current_company||"—"})]}):r.jsx("td",{colSpan:5,className:"px-2 py-1.5 text-red-600 italic",children:K.error})]},Y))})]})}),!t&&r.jsxs("div",{className:"mt-4 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:"Enviar candidatos para uma vaga? (opcional)"}),r.jsxs("select",{value:i||"",onChange:K=>a(K.target.value||null),className:"w-full border border-gray-200 rounded-lg text-xs px-3 py-2 bg-white focus:outline-none focus:border-blue-300",children:[r.jsx("option",{value:"",children:"Apenas adicionar ao pool (sem vaga)"}),s.map(K=>r.jsx("option",{value:K.id,children:K.title},K.id))]}),r.jsx("p",{className:"text-[11px] text-gray-500 mt-1",children:i?"Candidatos serão adicionados ao pool e enviados para a vaga selecionada.":"Candidatos serão adicionados ao pool do workspace. Você pode enviá-los para vagas depois."})]}),t&&r.jsxs("div",{className:"mt-3 text-xs text-blue-900 bg-blue-50 border border-blue-100 rounded-lg px-3 py-2",children:["Os candidatos serão importados para a vaga: ",r.jsx("strong",{children:n||"—"}),"."]})]}),d===4&&r.jsxs("div",{children:[P&&r.jsxs("div",{className:"py-6",children:[r.jsx("div",{className:"flex items-center justify-center mb-4",children:r.jsx(rt,{size:28,className:"text-indigo-600 animate-spin"})}),r.jsxs("p",{className:"text-center text-sm font-medium text-gray-900 mb-1",children:["Importando lote ",C.batch,"/",C.totalBatches]}),r.jsxs("p",{className:"text-center text-xs text-gray-500 mb-4",children:[C.processed,"/",C.total," candidatos"]}),r.jsx("div",{className:"bg-gray-100 rounded-full h-2 overflow-hidden",children:r.jsx("div",{className:"bg-indigo-600 h-full transition-all duration-300",style:{width:`${M}%`}})}),r.jsxs("p",{className:"text-center text-[11px] text-gray-400 mt-2",children:[M,"%"]})]}),!P&&T&&r.jsxs("div",{children:[r.jsx("div",{className:"flex items-center justify-center mb-4",children:r.jsx(Mi,{size:36,className:"text-green-500"})}),r.jsx("h3",{className:"text-center text-base font-semibold text-gray-900 mb-1",children:"Importação concluída"}),r.jsxs("p",{className:"text-center text-xs text-gray-500 mb-4",children:[T.imported+T.already_existed+T.failed," candidato(s) processado(s)"]}),r.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[r.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg px-3 py-2 text-center",children:[r.jsx("div",{className:"text-lg font-semibold text-green-700",children:T.imported}),r.jsx("div",{className:"text-[10px] text-green-700 uppercase",children:"Importados"})]}),r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg px-3 py-2 text-center",children:[r.jsx("div",{className:"text-lg font-semibold text-blue-700",children:T.already_existed}),r.jsx("div",{className:"text-[10px] text-blue-700 uppercase",children:"Já existiam"})]}),r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg px-3 py-2 text-center",children:[r.jsx("div",{className:"text-lg font-semibold text-red-700",children:T.failed}),r.jsx("div",{className:"text-[10px] text-red-700 uppercase",children:"Falhas"})]})]}),T.failed>0&&r.jsxs("div",{className:"border border-red-100 rounded-lg overflow-hidden",children:[r.jsx("div",{className:"bg-red-50 px-3 py-1.5 text-[11px] font-semibold text-red-700 uppercase",children:"Detalhes das falhas"}),r.jsx("div",{className:"max-h-40 overflow-y-auto",children:r.jsx("table",{className:"w-full text-xs",children:r.jsx("tbody",{children:T.results.filter(K=>!K.success).slice(0,50).map((K,Y)=>r.jsxs("tr",{className:"border-t border-red-50",children:[r.jsx("td",{className:"px-3 py-1.5 text-gray-700",children:K.full_name||"—"}),r.jsx("td",{className:"px-3 py-1.5 text-red-600 text-[11px]",children:K.error})]},Y))})})})]})]})]})]}),r.jsxs("div",{className:"flex justify-between items-center p-4 border-t border-gray-100 flex-shrink-0",children:[d===2&&c?r.jsx("button",{onClick:()=>
903{A.current=!0,c(p,t||i||null),o()},className:"text-sm px-3 py-2 text-blue-600 hover:text-blue-800 font-medium",children:"Fechar e continuar em background"}):r.jsx("button",{onClick:()=>{A.current=!0,U.current=!0,o()},disabled:z,className:"text-sm px-3 py-2 text-gray-600 hover:text-gray-900 disabled:opacity-50",children:d===4&&!P?"Fechar":"Cancelar"}),r.jsxs("div",{className:"flex gap-2",children:[d===1&&r.jsxs("button",{onClick:X,disabled:p.length===0,className:"text-sm px-4 py-2 bg-indigo-600 text-white rounded-lg font-medium hover:bg-indigo-700 disabled:bg-gray-300 disabled:cursor-not-allowed",children:["Extrair dados de ",p.length," CV",p.length!==1?"s":""]}),d===3&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>u(1),className:"text-sm px-3 py-2 text-gray-600 hover:text-gray-900",children:"Voltar"}),r.jsxs("button",{onClick:O,disabled:N.length===0,className:"text-sm px-4 py-2 bg-indigo-600 text-white rounded-lg font-medium hover:bg-indigo-700 disabled:bg-gray-300 disabled:cursor-not-allowed",children:["Importar ",N.length," candidato",N.length!==1?"s":""]})]}),d===4&&!P&&r.jsx("button",{onClick:()=>{l==null||l(),o()},className:"text-sm px-4 py-2 bg-indigo-600 text-white rounded-lg font-medium hover:bg-indigo-700",children:"Concluir"})]})]})]})}const zSe=[{key:"__ignore__",label:"Ignorar"},{key:"first_name",label:"Primeiro nome"},{key:"last_name",label:"Sobrenome"},{key:"full_name",label:"Nome completo"},{key:"email",label:"Email"},{key:"phone",label:"Telefone"},{key:"headline",label:"Cargo / Headline"},{key:"current_company",label:"Empresa atual"},{key:"location",label:"Localização"},{key:"linkedin_url",label:"LinkedIn URL"},{key:"salary_expectation",label:"Salário"}],eN={first_name:["primeiro nome","first name","first_name","firstname","nome"],last_name:["sobrenome","last name","last_name","lastname","último nome","ultimo nome"],full_name:["nome completo","full name","full_name","fullname","candidato","nome completo do candidato"],email:["email","e-mail","e_mail","mail"],phone:["telefone","phone","tel","celular","whatsapp"],headline:["cargo","headline","título","titulo","title","função","funcao","posição","posicao"],current_company:["empresa","company","empresa atual","current_company"],location:["cidade","location","localização","localizacao","local"],linkedin_url:["linkedin","linkedin_url","linkedinurl","linked in"],salary_expectation:["salário","salario","salary","remuneração","remuneracao"]},fh=50;function k7(e){return String(e||"").trim().toLowerCase()}function WSe(e){const t=k7(e);if(!t)return"__ignore__";for(const[n,s]of Object.entries(eN))if(s.some(i=>t===i))return n;for(const[n,s]of Object.entries(eN))if(s.some(i=>t.includes(i)))return n;return"__ignore__"}function $Se(e,t){if(Object.values(t).includes("last_name"))return t;const i={...t};return Object.entries(t).forEach(([a,o])=>{o==="first_name"&&k7(e[Number(a)])==="nome"&&(i[a]="full_name")}),i}function USe({step:e}){const t=["Upload","Mapear","Revisar","Importar"];return r.jsx("div",{className:"flex items-center gap-1 mb-5",children:t.map((n,s)=>{const i=s+1,a=e===i,o=e>i;return r.jsxs(Rn.Fragment,{children:[r.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded ${a?"bg-indigo-50":""}`,children:[r.jsx("div",{className:`w-5 h-5 rounded-full text-[10px] font-semibold flex items-center justify-center ${o?"bg-green-500 text-white":a?"bg-indigo-600 text-white":"bg-gray-200 text-gray-500"}`,children:o?"✓":i}),r.jsx("span",{className:`text-[11px] font-medium ${a?"text-indigo-700":o?"text-gray-700":"text-gray-400"}`,children:n})]}),i<t.length&&r.jsx(Qr,{size:12,className:"text-gray-300"})]},n)})})}function _7({isOpen:e,onClose:t,wsId:n,jobId:s,jobName:i,onSuccess:a,onStartBackground:o}){const[l,c]=g.useState("csv"),[d,u]=g.useState(1),[p,m]=g.useState([]),[x,w]=g.useState([]),[y,v]=g.useState({}),[j,k]=g.useState(""),[S,_]=g.useState(""),[F,A]=g.useState(!1),[C,D]=g.useState({batch:0,totalBatches:0,processed:0,total:0}),[P,L]=g.useState(!1),[T,R]=g.useState(null),U=g.useRef(!1),I=g.useRef(null),[H,V]=g.useState([]),[X,N]=g.useState(null);g.useEffect(()=>{e||(c("csv"),u(1),m([]),w([]),v({}),k(""),_(""),A(!1),D({batch:0,totalBatches:0,processed:0,total:0}),L(!1),R(null),V([]),N(null),U.current=!1)},[e]),g.useEffect(()=>{if(!e||s||!n)return;let Q=!1;return(async()=>{try{const ie=await ne.entities.Job.filter({workspace_id:n});if(Q)return;const ae=(ie||[]).filter(re=>["published","paused"].includes(re.status));V(ae)}catch{}})(),()=>{Q=!0}},[e,s,n]),g.useEffect(()=>{if(!e)return;const Q=ie=>{ie.key==="Escape"&&!P&&W()};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[e,P]);const W=()=>{U.current=!0,t()},O=async Q=>{if(Q){_(""),k(Q.name);try{const ie=await Q.arrayBuffer(),ae=Uj(ie,{type:"array"}),re=ae.Sheets[ae.SheetNames[0]],pe=ISe.sheet_to_json(re,{header:1,defval:"",blankrows:!1});if(!pe||pe.length===0){_("Arquivo vazio.");return}const Z=(pe[0]||[]).map(he=>String(he||"").trim()),Ne=pe.slice(1).filter(he=>Array.isArray(he)&&he.some(le=>String(le||"").trim()!==""));if(Z.length===0){_("Não foi possível identificar os cabeçalhos.");return}const te={};Z.forEach((he,le)=>{te[le]=WSe(he)});const xe=$Se(Z,te);m(Z),w(Ne),v(xe),u(2)}catch(ie){_((ie==null?void 0:ie.message)||"Erro ao ler arquivo.")}}},G=Q=>{var ae;Q.preventDefault(),A(!1);const ie=(ae=Q.dataTransfer.files)==null?void 0:ae[0];ie&&O(ie)},M=g.useMemo(()=>{const Q=Object.values(y);return Q.includes("full_name")||Q.includes("first_name")},[y]),z=g.useMemo(()=>x.map(Q=>{const ie={};
903return Object.entries(y).forEach(([ae,re])=>{if(re==="__ignore__")return;const pe=Q[Number(ae)],Z=pe==null?"":String(pe).trim();if(Z)if(re==="salary_expectation"){const Ne=Number(Z.replace(/[^\d.,-]/g,"").replace(",","."));!isNaN(Ne)&&Ne>0&&(ie[re]=Ne)}else ie[re]=Z}),!ie.full_name&&(ie.first_name||ie.last_name)&&(ie.full_name=[ie.first_name,ie.last_name].filter(Boolean).join(" ")),ie}),[x,y]),K=g.useMemo(()=>{let Q=0,ie=0;const ae=new Map;let re=0;return z.forEach((pe,Z)=>{if(!pe.full_name){ie++;return}if(Q++,pe.email){const Ne=pe.email.toLowerCase();ae.has(Ne)?re++:ae.set(Ne,Z)}}),{valid:Q,invalid:ie,duplicates:re,total:z.length}},[z]),Y=async()=>{const Q=Object.values(y),ie=Q.includes("first_name"),ae=Q.includes("last_name"),re=Q.includes("full_name"),pe=z.filter(te=>te.full_name).map(te=>{const xe={...te};return(ie||ae)&&(re||delete xe.full_name),xe});if(pe.length===0)return;u(4),L(!0),U.current=!1;const Z=[];for(let te=0;te<pe.length;te+=fh)Z.push(pe.slice(te,te+fh));const Ne={imported:0,already_existed:0,failed:0,results:[]};D({batch:0,totalBatches:Z.length,processed:0,total:pe.length});for(let te=0;te<Z.length&&!U.current;te++){D({batch:te+1,totalBatches:Z.length,processed:te*fh,total:pe.length});try{const xe=s||X||null,he={workspace_id:n,candidates:Z[te]};xe&&(he.job_id=xe);const le=await ne.functions.invoke("bulkImportCandidates",he),ge=(le==null?void 0:le.data)||le;ge!=null&&ge.success?(Ne.imported+=ge.imported||0,Ne.already_existed+=ge.already_existed||0,Ne.failed+=ge.failed||0,Array.isArray(ge.results)&&ge.results.forEach($e=>Ne.results.push({...$e,batchIndex:te}))):(Ne.failed+=Z[te].length,Z[te].forEach(($e,ft)=>{Ne.results.push({index:ft,success:!1,error:(ge==null?void 0:ge.error)||"Erro no lote",full_name:$e.full_name,batchIndex:te})}))}catch(xe){Ne.failed+=Z[te].length,Z[te].forEach((he,le)=>{Ne.results.push({index:le,success:!1,error:(xe==null?void 0:xe.message)||"Erro de rede",full_name:he.full_name,batchIndex:te})})}D({batch:te+1,totalBatches:Z.length,processed:Math.min((te+1)*fh,pe.length),total:pe.length})}L(!1),R(Ne)};if(!e)return null;const J=C.total>0?Math.round(C.processed/C.total*100):0;return r.jsx("div",{onClick:()=>!P&&W(),style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.5)",zIndex:1600,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:Q=>Q.stopPropagation(),className:"bg-white rounded-xl shadow-2xl w-full max-w-2xl flex flex-col",style:{maxHeight:"85vh"},children:[r.jsxs("div",{className:"flex items-start justify-between p-6 pb-4 border-b border-gray-100 flex-shrink-0",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Importar candidatos"}),r.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:s?`Para a vaga: ${i||"—"}`:"Para o pool do workspace"})]}),r.jsx("button",{onClick:W,disabled:P,className:"p-1 rounded hover:bg-gray-100 text-gray-500 disabled:opacity-50",children:r.jsx(Jt,{size:18})})]}),r.jsxs("div",{className:"flex border-b border-gray-200 px-6 flex-shrink-0",children:[r.jsx("button",{onClick:()=>c("csv"),disabled:P,className:`px-4 py-2 text-xs font-medium border-b-2 transition ${l==="csv"?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"} disabled:opacity-50`,children:"CSV / Excel"}),r.jsx("button",{onClick:()=>c("cv"),disabled:P,className:`px-4 py-2 text-xs font-medium border-b-2 transition ${l==="cv"?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"} disabled:opacity-50`,children:"Upload CVs"})]}),l==="cv"&&r.jsx(LSe,{wsId:n,jobId:s,jobName:i,availableJobs:H,selectedJobId:X,setSelectedJobId:N,onClose:W,onSuccess:a,onStartBackground:o}),l==="csv"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"overflow-y-auto p-6 flex-1",children:[r.jsx(USe,{step:d}),d===1&&r.jsxs("div",{children:[r.jsxs("div",{onDragOver:Q=>{Q.preventDefault(),A(!0)},onDragLeave:()=>A(!1),onDrop:G,onClick:()=>{var Q;return(Q=I.current)==null?void 0:Q.click()},className:`border-2 border-dashed rounded-xl p-12 text-center cursor-pointer transition ${F?"border-indigo-400 bg-indigo-50":"border-gray-300 bg-gray-50 hover:bg-gray-100"}`,children:[r.jsx(Ha,{size:32,className:"mx-auto mb-3 text-gray-400"}),r.jsx("p",{className:"text-sm font-medium text-gray-700 mb-1",children:"Arraste um arquivo CSV ou Excel"}),r.jsx("p",{className:"text-xs text-gray-500",children:"ou clique para selecionar"}),r.jsx("p",{className:"text-[11px] text-gray-400 mt-3",children:".csv, .xlsx, .xls"}),r.jsx("input",{ref:I,type:"file",accept:".csv,.xlsx,.xls",onChange:Q=>{var ie;return O((ie=Q.target.files)==null?void 0:ie[0])},className:"hidden"})]}),S&&r.jsxs("div",{className:"mt-3 text-xs text-red-600 bg-red-50 border border-red-100 rounded px-3 py-2 flex items-start gap-2",children:[r.jsx(xl,{size:13,className:"flex-shrink-0 mt-0.5"}),S]})]}),d===2&&r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-3 text-xs text-gray-600",children:[r.jsx(c8,{size:13,className:"text-gray-400"}),r.jsx("span",{className:"font-medium",children:j}),r.jsxs("span",{className:"text-gray-400",children:["• ",x.length," linha",x.length!==1?"s":""]})]}),r.jsxs("p",{className:"text-xs text-gray-500 mb-3",children:["Mapeie as colunas do seu arquivo para os campos do Summit.",r.jsx("span",{className:"text-red-500",children:" *"})," Nome completo é obrigatório."]}),r.jsx("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"text-left text-[10px] font-semibold uppercase tracking-wider text-gray-500 px-3 py-2",children:"Coluna do arquivo"}),r.jsx("th",{className:"text-left text-[10px] font-semibold uppercase tracking-wider text-gray-500 px-3 py-2",children:"Campo Summit"})]})}),r.jsx("tbody",{children:p.map((Q,ie)=>r.jsxs("tr",{className:"border-t border-gray-100",children:[r.jsx("td",{className:"px-3 py-2 text-xs text-gray-700",children:Q||r.jsxs("em",{className:"text-gray-400",children:["Coluna ",ie+1]})}),r.jsx("td",{className:"px-3 py-2",children:r.jsx("select",{value:y[ie]||"__ignore__",onCh
903ange:ae=>v(re=>({...re,[ie]:ae.target.value})),className:"w-full border border-gray-200 rounded text-xs px-2 py-1 bg-white focus:outline-none focus:border-indigo-300",children:zSe.map(ae=>r.jsx("option",{value:ae.key,children:ae.label},ae.key))})})]},ie))})]})}),!M&&r.jsxs("div",{className:"mt-3 text-xs text-amber-700 bg-amber-50 border border-amber-100 rounded px-3 py-2 flex items-start gap-2",children:[r.jsx(xl,{size:13,className:"flex-shrink-0 mt-0.5"}),"Mapeie o ",r.jsx("strong",{children:"nome completo"})," ou o ",r.jsx("strong",{children:"primeiro nome"}),"."]})]}),d===3&&r.jsxs("div",{children:[r.jsxs("div",{className:"grid grid-cols-4 gap-2 mb-4",children:[r.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg px-3 py-2",children:[r.jsx("div",{className:"text-[10px] text-gray-500 uppercase",children:"Total"}),r.jsx("div",{className:"text-base font-semibold text-gray-900",children:K.total})]}),r.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg px-3 py-2",children:[r.jsx("div",{className:"text-[10px] text-green-700 uppercase",children:"Válidos"}),r.jsx("div",{className:"text-base font-semibold text-green-700",children:K.valid})]}),r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg px-3 py-2",children:[r.jsx("div",{className:"text-[10px] text-red-700 uppercase",children:"Com erro"}),r.jsx("div",{className:"text-base font-semibold text-red-700",children:K.invalid})]}),r.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg px-3 py-2",children:[r.jsx("div",{className:"text-[10px] text-amber-700 uppercase",children:"Duplicados"}),r.jsx("div",{className:"text-base font-semibold text-amber-700",children:K.duplicates})]})]}),r.jsx("p",{className:"text-xs text-gray-600 mb-2 font-medium",children:"Preview (primeiras 10 linhas):"}),r.jsx("div",{className:"border border-gray-200 rounded-lg overflow-x-auto",style:{maxHeight:280},children:r.jsxs("table",{className:"w-full text-xs",children:[r.jsx("thead",{className:"bg-gray-50 sticky top-0",children:r.jsxs("tr",{children:[r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Nome"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Email"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Telefone"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Cargo"}),r.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase text-gray-500",children:"Empresa"})]})}),r.jsx("tbody",{children:z.slice(0,10).map((Q,ie)=>r.jsxs("tr",{className:`border-t border-gray-100 ${Q.full_name?"":"bg-red-50"}`,children:[r.jsx("td",{className:"px-2 py-1.5",children:Q.full_name||r.jsx("span",{className:"text-red-600 italic",children:"Vazio"})}),r.jsx("td",{className:"px-2 py-1.5 text-gray-600",children:Q.email||"—"}),r.jsx("td",{className:"px-2 py-1.5 text-gray-600",children:Q.phone||"—"}),r.jsx("td",{className:"px-2 py-1.5 text-gray-600",children:Q.headline||"—"}),r.jsx("td",{className:"px-2 py-1.5 text-gray-600",children:Q.current_company||"—"})]},ie))})]})}),!s&&r.jsxs("div",{className:"mt-4 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:"Enviar candidatos para uma vaga? (opcional)"}),r.jsxs("select",{value:X||"",onChange:Q=>N(Q.target.value||null),className:"w-full border border-gray-200 rounded-lg text-xs px-3 py-2 bg-white focus:outline-none focus:border-blue-300",children:[r.jsx("option",{value:"",children:"Apenas adicionar ao pool (sem vaga)"}),H.map(Q=>r.jsx("option",{value:Q.id,children:Q.title},Q.id))]}),r.jsx("p",{className:"text-[11px] text-gray-500 mt-1",children:X?"Candidatos serão adicionados ao pool e enviados para a vaga selecionada.":"Candidatos serão adicionados ao pool do workspace. Você pode enviá-los para vagas depois."})]}),s&&r.jsxs("div",{className:"mt-3 text-xs text-blue-900 bg-blue-50 border border-blue-100 rounded-lg px-3 py-2",children:["Os candidatos serão importados para a vaga: ",r.jsx("strong",{children:i||"—"}),"."]})]}),d===4&&r.jsxs("div",{children:[P&&r.jsxs("div",{className:"py-6",children:[r.jsx("div",{className:"flex items-center justify-center mb-4",children:r.jsx(rt,{size:28,className:"text-indigo-600 animate-spin"})}),r.jsxs("p",{className:"text-center text-sm font-medium text-gray-900 mb-1",children:["Processando lote ",C.batch,"/",C.totalBatches]}),r.jsxs("p",{className:"text-center text-xs text-gray-500 mb-4",children:[C.processed,"/",C.total," candidatos"]}),r.jsx("div",{className:"bg-gray-100 rounded-full h-2 overflow-hidden",children:r.jsx("div",{className:"bg-indigo-600 h-full transition-all duration-300",style:{width:`${J}%`}})}),r.jsxs("p",{className:"text-center text-[11px] text-gray-400 mt-2",children:[J,"%"]})]}),!P&&T&&r.jsxs("div",{children:[r.jsx("div",{className:"flex items-center justify-center mb-4",children:r.jsx(Mi,{size:36,className:"text-green-500"})}),r.jsx("h3",{className:"text-center text-base font-semibold text-gray-900 mb-1",children:"Importação concluída"}),r.jsxs("p",{className:"text-center text-xs text-gray-500 mb-4",children:[T.imported+T.already_existed+T.failed," candidato(s) processado(s)"]}),r.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[r.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg px-3 py-2 text-center",children:[r.jsx("div",{className:"text-lg font-semibold text-green-700",children:T.imported}),r.jsx("div",{className:"text-[10px] text-green-700 uppercase",children:"Importados"})]}),r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg px-3 py-2 text-center",children:[r.jsx("div",{className:"text-lg font-semibold text-blue-700",children:T.already_existed}),r.jsx("div",{className:"text-[10px] text-blue-700 uppercase",children:"Já existiam"})]}),r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg px-3 py-2 text-center",children:[r.jsx("div",{className:"text-lg font-semibold text-red-700",children:T.failed}),r.jsx("div",{className:"text-[10px] text-red-700 uppercase",children:"Falhas"})]})]}),T.failed>0&&r.jsxs("div",{className:"border border-red-100 rounded-lg overflow-hidden",children:[r.jsx("div",{className:"bg-red-50 px-3 py-1.5 text-[11px] font-semibold text-red-700 uppercase",children:"Detalhes das falhas"}),r.jsx("div",{className:"max-h-40 overflow-y-auto",children:r.jsx("table",{className:"w-full text-xs",children:r.jsx("tbody",{children:T.results.filter(Q=>!Q.success).slice(0,50).map((Q,ie)=>r.jsxs("tr",{className:"border-t border-red-50",children:[r.jsx("td",{className:"px-3 py-1.5 text-gray-700",children:Q.full_name||`Linha ${Q.batchIndex*fh+Q.index+2}`}),r.jsx("td",{className:"px-3 py-1.5 text-red-600 text-[11px]",children:Q.error})]},ie))})})})]})]})]})]}),r.jsxs("div",{className:"flex justify-between items-center p-4 border-t border-gray-100 flex-shrink-0",children:[r.jsx("button",{onClick:W,disabled:P,className:"text-sm px-3 py-2 text-gray-600 hover:text-gray-900 disabled:opacity-50",children:d===4&&!P?"Fechar":"Cancelar"}),r.jsxs("div",{className:"flex gap-2",children:[d===2&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>u(1),className:"text-sm px-3 py-2 text-gray-600 hover:text-gray-900",children:"Voltar"}),r.jsx("button",{onClick:()=>u(3),disabled:!M,className:"text-sm px-4 py-2 bg-indigo-600 text-white rounded-lg font-medium hover:bg-indigo-700 disabled:bg-gray-300 disabled:cursor-not-allowed",children:"Continuar"})]}),d===3&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>u(2),className:"text-sm px-3 py-2 text-gray-600 hover:text-gray-900",children:"Voltar"}),r.jsxs("button",{onClick:Y,disabled:K.valid===0,className:"text-sm px-4 py-2 bg-indigo-600 text-white rounded-lg font-medium hover:bg-indigo-700 disabled:bg-gray-300 disabled:cursor-not-allowed",children:["Importar ",K.valid," candidato",K.valid!==1?"s":""]})]}),d===4&&!P&&r.jsx("button",{onClick:()=>{a==null||a(),t()},className:"text-sm px-4 py-2 bg-indigo-600 text-white rounded-lg font-medium hover:bg-indigo-700",children:"Concluir"})]})]})]})]})})}const Zg=[{key:"full_name",label:"Nome completo",default:!0},{key:"email",label:"Email",default:!0},{key:"phone",label:"Telefone",default:!0},{key:"headline",label:"Headline",default:!0},{key:"current_title",label:"Cargo atual",default:!1},{key:"current_company",label:"Empresa atual",default:!1},{key:"location",label:"Localização",default:!1},{key:"linkedin_url",label:"LinkedIn",default:!1},{key:"salary_expectation",label:"Salário pretendido",default:!1},{key:"languages",label:"Idiomas",default:!1},{key:"job_title",label:"Vaga",default:!0},{key:"stage",label:"Etapa",default:!0},{key:"source",label:"Fonte",default:!1},{key:"applied_at",label:"Data de aplicação",default:!1},{key:"rating_score",label:"Rating",default:!1}];function tN(e){if(e==null||e==="")return"";const t=String(e);return t.includes(",")||t.includes('"')||t.includes(`
904`)?'"'+t.replace(/"/g,'""')+'"':t}function C7({isOpen:e,onClose:t,data:n,fileName:s="candidatos"}){const[i,a]=g.useState(()=>{const u=new Set;return Zg.forEach(p=>{p.default&&u.add(p.key)}),u});if(!e)return null;const o=u=>{a(p=>{const m=new Set(p);return m.has(u)?m.delete(u):m.add(u),m})},l=()=>a(new Set(Zg.map(u=>u.key))),c=()=>a(new Set),d=()=>{const u=Zg.filter(k=>i.has(k.key));if(u.length===0)return;const p=u.map(k=>tN(k.label)).join(","),m=(n||[]).map(k=>u.map(S=>{let _=k[S.key];return S.key==="languages"&&Array.isArray(_)&&(_=_.map(F=>typeof F=="string"?F:`${F.language||""} (${F.level||""})`).join("; ")),S.key==="salary_expectation"&&typeof _=="number"&&_>
9040&&(_=`R$ ${_.toLocaleString("pt-BR",{maximumFractionDigits:0})}`),tN(_)}).join(",")),w="\uFEFF"+p+`
905`+m.join(`
906`),y=new Blob([w],{type:"text/csv;charset=utf-8;"}),v=URL.createObjectURL(y),j=document.createElement("a");j.href=v,j.download=`${s}_${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(j),j.click(),document.body.removeChild(j),URL.revokeObjectURL(v),t()};return r.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center"},onClick:t,children:r.jsxs("div",{onClick:u=>u.stopPropagation(),style:{background:"#FFFFFF",borderRadius:12,width:420,maxHeight:"80vh",display:"flex",flexDirection:"column",boxShadow:"0 24px 48px rgba(0,0,0,0.12)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #E2E8F0"},children:[r.jsx("h3",{style:{fontSize:15,fontWeight:500,color:"#111827",margin:0},children:"Exportar candidatos"}),r.jsx("button",{onClick:t,style:{background:"transparent",border:"none",cursor:"pointer",color:"#9CA3AF",padding:4},children:r.jsx(Jt,{size:16})})]}),r.jsxs("div",{style:{padding:"16px 20px",overflowY:"auto",flex:1},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[r.jsxs("span",{style:{fontSize:12,color:"#6B7280"},children:[(n==null?void 0:n.length)||0," candidato(s) · ",i.size," campo(s)"]}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("button",{onClick:l,style:{fontSize:11,color:"#6C24F5",background:"transparent",border:"none",cursor:"pointer",fontWeight:500},children:"Todos"}),r.jsx("button",{onClick:c,style:{fontSize:11,color:"#9CA3AF",background:"transparent",border:"none",cursor:"pointer"},children:"Nenhum"})]})]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Zg.map(u=>r.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",borderRadius:6,cursor:"pointer",background:i.has(u.key)?"#F5F3FF":"transparent",transition:"background 80ms"},children:[r.jsx("input",{type:"checkbox",checked:i.has(u.key),onChange:()=>o(u.key),style:{width:14,height:14,accentColor:"#6C24F5",cursor:"pointer"}}),r.jsx("span",{style:{fontSize:13,color:"#374151"},children:u.label})]},u.key))})]}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,padding:"12px 20px",borderTop:"1px solid #E2E8F0"},children:[r.jsx("button",{onClick:t,style:{padding:"8px 16px",fontSize:13,fontWeight:500,color:"#374151",background:"#FFFFFF",border:"1px solid #E2E8F0",borderRadius:8,cursor:"pointer"},children:"Cancelar"}),r.jsxs("button",{onClick:d,disabled:i.size===0,style:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",fontSize:13,fontWeight:500,color:"#FFFFFF",background:i.size===0?"#D1D5DB":"#6C24F5",border:"none",borderRadius:8,cursor:i.size===0?"not-allowed":"pointer"},children:[r.jsx(Wa,{size:14}),"Exportar CSV"]})]})]})})}const Uu="#6C24F5",Ea="#E2E8F0";function VSe(e){var n,s;if(!e)return"?";const t=e.trim().split(/\s+/);return(((n=t[0])==null?void 0:n[0])||"")+(((s=t[t.length-1])==null?void 0:s[0])||"")}function HSe({isOpen:e,onClose:t,jobId:n,jobTitle:s,workspaceId:i,candidates:a=[]}){const[o,l]=g.useState(""),[c,d]=g.useState(""),[u,p]=g.useState(new Set(a.map(N=>N.talent_profile_id))),[m,x]=g.useState({}),[w,y]=g.useState(!0),[v,j]=g.useState(!0),[k,S]=g.useState(!0),[_,F]=g.useState(!0),[A,C]=g.useState(14),[D,P]=g.useState(!1),[L,T]=g.useState(null),[R,U]=g.useState(!1);if(!e)return null;const I=N=>{p(W=>{const O=new Set(W);return O.has(N)?O.delete(N):O.add(N),O})},H=()=>{u.size===a.length?p(new Set):p(new Set(a.map(N=>N.talent_profile_id)))},V=async()=>{if(u.size===0||D)return;P(!0);const N=[...u],W={};N.forEach(M=>{var z;(z=m[M])!=null&&z.trim()&&(W[M]=m[M].trim())});const O=await ne.functions.invoke("createHiringManagerLink",{workspace_id:i,job_id:n,candidate_ids:N,recruiter_notes:W,hiring_manager_name:o.trim(),hiring_manager_email:c.trim(),show_salary:w,show_rating:v,show_cv:k,show_assessments:_,expires_in_days:A}).catch(()=>null),G=(O==null?void 0:O.data)||O;G!=null&&G.success&&G.token&&T(`${window.location.origin}/review/${G.token}`),P(!1)},X=()=>{L&&(navigator.clipboard.writeText(L).catch(()=>{}),U(!0),setTimeout(()=>U(!1),2500))};return r.jsxs("div",{onClick:t,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.35)",zIndex:2e3,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:[r.jsxs("div",{onClick:N=>N.stopPropagation(),style:{background:"#fff",borderRadius:12,width:"90vw",maxWidth:520,maxHeight:"80vh",display:"flex",flexDirection:"column",boxShadow:"0 20px 60px -10px rgba(0,0,0,0.15)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${Ea}`},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx(f8,{size:16,color:Uu}),r.jsx("h3",{style:{fontSize:15,fontWeight:600,color:"#1A1F36",margin:0},children:"Compartilhar com gestor"})]}),r.jsx("button",{onClick:t,style:{background:"none",border:"none",cursor:"pointer",padding:4}
906,children:r.jsx(Jt,{size:18,color:"#9CA3AF"})})]}),r.jsx("div",{style:{flex:1,overflowY:"auto",padding:"16px 20px"},children:L?r.jsxs("div",{style:{textAlign:"center",padding:"20px 0"},children:[r.jsx("div",{style:{width:48,height:48,borderRadius:12,background:"#EAF3DE",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px"},children:r.jsx(fn,{size:24,color:"#639922"})}),r.jsx("h4",{style:{fontSize:15,fontWeight:600,color:"#1A1F36",marginBottom:6},children:"Link criado!"}),r.jsx("p",{style:{fontSize:12,color:"#6B7280",marginBottom:16},children:"Compartilhe este link com o gestor para revisar os candidatos"}),r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[r.jsx("input",{readOnly:!0,value:L,style:{flex:1,padding:"10px 12px",fontSize:12,borderRadius:8,border:`1px solid ${Ea}`,background:"#F6F8FA",color:"#374151",outline:"none"},onClick:N=>N.target.select()}),r.jsxs("button",{onClick:X,style:{display:"flex",alignItems:"center",gap:6,padding:"10px 16px",fontSize:12,fontWeight:500,borderRadius:8,border:"none",cursor:"pointer",color:"#fff",background:Uu},children:[r.jsx(Js,{size:13})," ",R?"Copiado!":"Copiar"]})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{fontSize:12,color:"#6B7280",marginBottom:14},children:["Vaga: ",r.jsx("strong",{style:{color:"#1A1F36"},children:s})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,marginBottom:16},children:[r.jsxs("div",{children:[r.jsx("label",{style:{fontSize:11,fontWeight:500,color:"#6B7280",display:"block",marginBottom:4},children:"Nome do gestor"}),r.jsx("input",{value:o,onChange:N=>l(N.target.value),placeholder:"Opcional",style:{width:"100%",padding:"8px 10px",fontSize:12,borderRadius:8,border:`1px solid ${Ea}`,outline:"none",boxSizing:"border-box"}})]}),r.jsxs("div",{children:[r.jsx("label",{style:{fontSize:11,fontWeight:500,color:"#6B7280",display:"block",marginBottom:4},children:"Email do gestor"}),r.jsx("input",{value:c,onChange:N=>d(N.target.value),placeholder:"Opcional",style:{width:"100%",padding:"8px 10px",fontSize:12,borderRadius:8,border:`1px solid ${Ea}`,outline:"none",boxSizing:"border-box"}})]})]}),r.jsxs("div",{style:{marginBottom:16},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[r.jsxs("label",{style:{fontSize:11,fontWeight:500,color:"#6B7280"},children:["Candidatos (",u.size,"/",a.length,")"]}),r.jsx("button",{onClick:H,style:{fontSize:11,color:Uu,background:"none",border:"none",cursor:"pointer",fontWeight:500},children:u.size===a.length?"Desmarcar todos":"Selecionar todos"})]}),r.jsx("div",{style:{border:`1px solid ${Ea}`,borderRadius:12,maxHeight:220,overflowY:"auto"},children:a.map(N=>{const W=u.has(N.talent_profile_id);return r.jsxs("div",{style:{borderBottom:"1px solid #F0F2F5"},children:[r.jsxs("div",{onClick:()=>I(N.talent_profile_id),style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",cursor:"pointer"},children:[r.jsx("input",{type:"checkbox",checked:W,readOnly:!0,style:{accentColor:Uu,width:14,height:14,cursor:"pointer"}}),r.jsx("div",{style:{width:28,height:28,borderRadius:"50%",background:"#EEF2FF",display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,color:"#4338CA",flexShrink:0},children:VSe(N.full_name)}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:12,fontWeight:500,color:"#1A1F36",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:N.full_name}),N.headline&&r.jsx("div",{style:{fontSize:10,color:"#9CA3AF",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:N.headline})]})]}),W&&r.jsx("div",{style:{padding:"0 12px 8px 46px"},children:r.jsx("input",{value:m[N.talent_profile_id]||"",onChange:O=>x(G=>({...G,[N.talent_profile_id]:O.target.value})),placeholder:"Nota para o gestor sobre este candidato...",style:{width:"100%",padding:"6px 8px",fontSize:11,borderRadius:6,border:`1px solid ${Ea}`,outline:"none",boxSizing:"border-box"}})})]},N.talent_profile_id)})})]}),r.jsxs("div",{style:{marginBottom:16},children:[r.jsx("label",{style:{fontSize:11,fontWeight:500,color:"#6B7280",display:"block",marginBottom:8},children:"Visibilidade"}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[{label:"Mostrar salário",checked:w,set:y},{label:"Mostrar rating IA",checked:v,set:j},{label:"Mostrar currículo",checked:k,set:S},{label:"Mostrar avaliações",checked:_,set:F}].map(N=>r.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:"#374151",cursor:"pointer"},children:[r.jsx("input",{type:"checkbox",checked:N.checked,onChange:W=>N.set(W.target.checked),style:{accentColor:Uu,width:13,height:13}}),N.label]},N.label))})]}),r.jsxs("div",{style:{marginBottom:8},children:[r.jsx("label",{style:{fontSize:11,fontWeight:500,color:"#6B7280",display:"block",marginBottom:4},children:"Expiração"}),r.jsxs("select",{value:A,onChange:N=>C(Number(N.target.value)),style:{padding:"8px 10px",fontSize:12,borderRadius:8,border:`1px solid ${Ea}`,background:"#fff",outline:"none",width:"100%"},children:[r.jsx("option",{value:1,children:"24 horas"}),r.jsx("option",{value:7,children:"7 dias"}),r.jsx("option",{value:14,children:"14 dias"}),r.jsx("option",{value:30,children:"30 dias"})]})]})]})}),!L&&r.jsxs("div",{style:{padding:"12px 20px",borderTop:`1px solid ${Ea}`,display:"flex",justifyContent:"flex-end",gap:8},children:[r.jsx("button",{onClick:t,style:{padding:"8px 16px",fontSize:12,fontWeight:500,borderRadius:8,border:`1px solid ${Ea}`,background:"#fff",color:"#374151",cursor:"pointer"},children:"Cancelar"}),r.jsxs("button",{onClick:V,disabled:u.size===0||D,style:{display:"flex",alignItems:"center",gap:6,padding:"8px 18px",fontSize:12,fontWeight:600,borderRadius:8,border:"none",cursor:"pointer",color:"#fff",background:Uu,opacity:u.size===0||D?.5:1},children:[D&&r.jsx(rt,{size:13,style:{animation:"spin 1s linear infinite"}}),"Gerar link"]})]}),L&&r.jsx("div",{style:{padding:"12px 20px",borderTop:`1px solid ${Ea}`,display:"flex",justifyContent:"flex-end"},children:r.jsx("button",{onClick:t,style:{padding:"8px 16px",fontSize:12,fontWeight:500,borderRadius:8,border:`1px solid ${Ea}`,background:"#fff",color:"#374151",cursor:"pointer"},children:"Fechar"})})]}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]})}const nN=50;function E7({wsId:e,onDone:t}={}){const[n,s]=g.useState(null),i=g.useRef(!1),a=g.useCallback(()=>{i.current=!0},[]),o=g.useCallback(()=>{s(null),i.current=!1},[]),l=g.useCallback(async(c,d)=>{var w;if(!c||c.length===0||!e)return;i.current=!1,s({status:"extracting",total:c.length,current:0});const u=[];let p=0;for(let y=0;y<c.length;y++){if(i.current){s(v=>v&&{...v,status:"cancelled",current:y});return}s(v=>v&&{...v,current:y+1});try{const v=await ne.integrations.Core.UploadFile({file:c[y]}
906),j=((w=v==null?void 0:v.data)==null?void 0:w.file_url)||(v==null?void 0:v.file_url);if(!j)throw new Error("Upload falhou");const k=await ne.functions.invoke("parseProfileFromCV",{file_url:j,file_name:c[y].name}),S=(k==null?void 0:k.data)||k;if(!(S!=null&&S.success))throw new Error((S==null?void 0:S.message)||"Extração falhou");const _=S.profile||S,F=_.full_name||_.name||"";if(!F)throw new Error("Nome não identificado");u.push({full_name:F,email:_.email||void 0,phone:_.phone||void 0,headline:_.headline||_.current_title||void 0,current_company:_.current_company||void 0,location:_.location||void 0,linkedin_url:_.linkedin_url||void 0,salary_expectation:_.salary_expectation||void 0,cv_file_url:j})}catch{p++}}if(i.current){s(y=>y&&{...y,status:"cancelled"});return}s({status:"importing",total:u.length,current:0,extractionErrors:p});let m=0,x=0;for(let y=0;y<u.length;y+=nN){if(i.current){s(j=>j&&{...j,status:"cancelled"});return}const v=u.slice(y,y+nN);try{const j={workspace_id:e,candidates:v};d&&(j.job_id=d);const k=await ne.functions.invoke("bulkImportCandidates",j),S=(k==null?void 0:k.data)||k;S!=null&&S.success?(m+=S.imported||0,x+=S.failed||0):x+=v.length}catch{x+=v.length}s(j=>j&&{...j,current:Math.min(y+v.length,u.length)})}if(s({status:"done",total:c.length,current:c.length,imported:m,failed:x,extractionErrors:p}),typeof t=="function")try{t()}catch{}},[e,t]);return{bgState:n,start:l,cancel:a,dismiss:o}}function F7({bgState:e,onCancel:t,onDismiss:n}){if(!e)return null;const{status:s,total:i,current:a,imported:o,failed:l,extractionErrors:c}=e,d=i>0?Math.min(100,Math.round(a/i*100)):0;if(s==="extracting"||s==="importing"){const u=s==="extracting"?`Extraindo dados dos CVs... ${a}/${i}`:`Importando candidatos... ${a}/${i}`;return r.jsxs("div",{className:"flex items-center gap-3 bg-blue-50 border border-blue-200 rounded-lg px-4 py-3 mb-3",children:[r.jsx(rt,{size:14,className:"animate-spin text-blue-600 flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-xs font-medium text-blue-800",children:u}),r.jsx("div",{className:"w-full bg-blue-100 rounded-full h-1.5 mt-1.5",children:r.jsx("div",{className:"bg-blue-600 h-1.5 rounded-full transition-all duration-300",style:{width:`${d}%`}})})]}),r.jsx("button",{onClick:t,className:"text-xs text-blue-600 hover:text-blue-800 font-medium flex-shrink-0",children:"Cancelar"})]})}return s==="done"?r.jsxs("div",{className:"flex items-center gap-3 bg-green-50 border border-green-200 rounded-lg px-4 py-2.5 mb-3",children:[r.jsxs("span",{className:"text-xs text-green-800",children:[o||0," candidato(s) importado(s).",l>0&&` ${l} falha(s).`,c>0&&` ${c} CV(s) não extraído(s).`]}),r.jsx("button",{onClick:n,className:"ml-auto text-green-600 hover:text-green-800 flex-shrink-0","aria-label":"Fechar",children:r.jsx(Jt,{size:14})})]}):s==="cancelled"?r.jsxs("div",{className:"flex items-center gap-3 bg-amber-50 border border-amber-200 rounded-lg px-4 py-2.5 mb-3",children:[r.jsxs("span",{className:"text-xs text-amber-800",children:["Importação cancelada. ",a," de ",i," processados."]}),r.jsx("button",{onClick:n,className:"ml-auto text-amber-600 hover:text-amber-800 flex-shrink-0","aria-label":"Fechar",children:r.jsx(Jt,{size:14})})]}):null}const qSe=288,GSe="transparent",KSe="#FFFFFF",co="#E2E8F0",Ia="#111827",sl="#6B7280",Hj="#6C24F5",L_=g.createContext(null);function YSe({size:e=14}){return r.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#25D366",xmlns:"http://www.w3.org/2000/svg",children:r.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.001-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"})})}function ph({children:e,onClick:t,title:n,color:s}){return r.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),t==null||t(i)},onMouseDown:i=>i.stopPropagation(),title:n,style:{background:"transparent",border:"none",padding:2,cursor:"pointer",display:"inline-flex",alignItems:"center",color:s||"#D1D5DB",transition:"color 120ms ease",flexShrink:0},onMouseEnter:i=>{s||(i.currentTarget.style.color="#6B7280")},onMouseLeave:i=>{s||(i.currentTarget.style.color="#D1D5DB")},children:e})}function XSe({application:e,isDragging:t,onClick:n,stages:s,onQuickMove:i,jobId:a}){var K,Y;const o=g.useContext(L_),l=(o==null?void 0:o.atsGrowthOrAbove)||!1,c=(o==null?void 0:o.isSelected(e.id))||!1,d=(o==null?void 0:o.recruiterFirstName)||"eu",u=o==null?void 0:o.showToast,p=Md(e),m=p.full_name||"Candidato",x=m.split(" ")[0]||"tudo bem",w=p.headline||p.current_title||"",y=e.email||p.email||"",v=e.phone||p.phone||"",j=e.linkedin_url||p.linkedin_url||"",k=e.avatar_url||p.avatar_url||"",S=p.cv_file_url||"",F=((K=(Array.isArray(e.attachments)?e.attachments:[]).find(J=>(J==null?void 0:J.file_url)&&!(J!=null&&J.removed)))==null?void 0:K.file_url)||"",A=S||F,C=Number(e.salary_expectation||p.salary_expectation||0),D=C>
9060?`R$ ${C.toLocaleString("pt-BR",{maximumFractionDigits:0})}`:"",P=pae(e),L=hae(P),T=P!=null&&P>7,R=e.talent_profile_id?`/app/candidatos/${e.talent_profile_id}${a?`?from_job=${a}`:""}`:null,U=g.useRef(null),I=J=>{U.current={x:J.clientX,y:J.clientY}},H=J=>{const Q=U.current;if(!Q)return;const ie=Math.abs(J.clientX-Q.x),ae=Math.abs(J.clientY-Q.y);U.current=null,ie>=5||ae>=5},V=async J=>{var ie;if(!J)return;let Q=!1;try{(ie=navigator.clipboard)!=null&&ie.writeText&&(await navigator.clipboard.writeText(J),Q=!0)}catch{}if(!Q)try{const ae=document.createElement("textarea");ae.value=J,ae.style.position="fixed",ae.style.left="-9999px",document.body.appendChild(ae),ae.focus(),ae.select(),document.execCommand("copy"),document.body.removeChild(ae),Q=!0}catch{}u==null||u(Q?"Copiado!":"Não foi possível copiar")},[X,N]=g.useState(!1),[W,O]=g.useState(!1),G=J=>{J.stopPropagation(),J.preventDefault(),O(!0)},M={id:e.talent_profile_id,full_name:m,first_name:x,email:y,phone:v,salary_current:Number(p.salary_current||0),salary_expectation:C},z=r.jsxs("div",{className:"card-with-menu",onMouseDown:I,onMouseUp:H,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),style:{position:"relative",background:KSe,border:`1px solid ${t?Hj:c?"#C7D2FE":"#E2E8F0"}`,borderRadius:8,padding:"8px 12px",marginBottom:6,cursor:"grab",transition:"border-color 120ms ease, box-shadow 120ms ease",boxShadow:t?"0 8px 24px rgba(108, 36, 245, 0.25)":X?"0 4px 10px rgba(15,23,42,0.08)":"0 1px 2px rgba(0,0,0,0.04)"},children:[i&&r.jsx(vge,{application:e,candidateName:m,stages:s,onMove:(J,Q)=>i(e,J,Q),onEdit:o!=null&&o.onEdit?()=>o.onEdit(e):void 0,onSendToJob:o!=null&&o.onSendToJob?()=>o.onSendToJob(e):void 0,onRemove:o!=null&&o.onRemove?()=>o.onRemove(e):void 0}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("input",{type:"checkbox",checked:c,onChange:J=>{J.stopPropagation(),o==null||o.toggle(e.id)},onClick:J=>J.stopPropagation(),onMouseDown:J=>J.stopPropagation(),style:{width:16,height:16,cursor:"pointer",accentColor:Hj,margin:0,flexShrink:0}}),k?r.jsx("img",{src:k,alt:m,style:{width:24,height:24,borderRadius:"50%",objectFit:"cover",display:"block",flexShrink:0}}):r.jsx("div",{style:{width:24,height:24,borderRadius:"50%",background:"#EEF2FF",color:"#4338CA",fontSize:10,fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:fae(m)}),r.jsxs("div",{style:{flex:1,minWidth:0,fontSize:13,fontWeight:500,color:Ia,display:"flex",alignItems:"center",gap:6,overflow:"hidden"},children:[r.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:m}),j&&r.jsx("a",{href:Qm(j),target:"_blank",rel:"noopener noreferrer",onClick:J=>J.stopPropagation(),onMouseDown:J=>J.stopPropagation(),title:"Abrir perfil no LinkedIn",style:{display:"inline-flex",marginLeft:6,flexShrink:0,lineHeight:0},children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14",fill:"#0A66C2","aria-label":"LinkedIn",children:r.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})})]}),l&&(()=>{const J=e.rating_score,Q=typeof J=="number"&&!isNaN(J),ae=2*Math.PI*15,re=Q?ae-ae*J/100:ae;let pe="#E2E8F0";return Q&&(J<=30?pe="#DC2626":J<=50?pe="#D97706":J<=70?pe="#EAB308":J<=80?pe="#16A34A":J<=90?pe="#2563EB":pe="#6C2BD9"),r.jsxs("div",{title:Q?`Rating: ${J}`:"Sem avaliação",style:{position:"relative",width:36,height:36,flexShrink:0},children:[r.jsxs("svg",{viewBox:"0 0 36 36",width:36,height:36,children:[r.jsx("circle",{cx:18,cy:18,r:15,fill:"none",stroke:"#E2E8F0",strokeWidth:3}),Q&&r.jsx("circle",{cx:18,cy:18,r:15,fill:"none",stroke:pe,strokeWidth:3,strokeDasharray:ae,strokeDashoffset:re,strokeLinecap:"round",transform:"rotate(-90 18 18)"})]}),r.jsx("span",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:600,color:"#1A1A1A"},children:Q?J:"—"})]})})()]}),w&&r.jsx("div",{style:{paddingLeft:32,fontSize:11,color:sl,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:2},children:w}),y&&(xo(y)?r.jsxs("div",{style:{paddingLeft:32,display:"flex",alignItems:"center",gap:6,marginTop:2,minWidth:0}
906,children:[r.jsx(mr,{size:12,style:{color:"#9CA3AF",flexShrink:0}}),r.jsx("button",{type:"button",onClick:G,onMouseDown:J=>J.stopPropagation(),className:"hover:underline",style:{fontSize:11,color:"#B45309",fontStyle:"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",background:"transparent",border:"none",padding:0,cursor:"pointer",minWidth:0,flex:1,textAlign:"left"},title:"Enviar email",children:"Informe o e-mail"}),r.jsx(ph,{title:"Enviar email",onClick:J=>G(J),color:"#6C24F5",children:r.jsx(mr,{size:12})})]}):r.jsxs("div",{style:{paddingLeft:32,display:"flex",alignItems:"center",gap:6,marginTop:2,minWidth:0},children:[r.jsx(mr,{size:12,style:{color:"#9CA3AF",flexShrink:0}}),r.jsx("button",{type:"button",onClick:G,onMouseDown:J=>J.stopPropagation(),className:"hover:underline",style:{fontSize:11,color:"#6C24F5",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",background:"transparent",border:"none",padding:0,cursor:"pointer",minWidth:0,flex:1,textAlign:"left"},title:y,children:y}),r.jsx(ph,{title:"Enviar email",onClick:J=>G(J),color:"#6C24F5",children:r.jsx(mr,{size:12})}),r.jsx(ph,{title:"Copiar e-mail",onClick:()=>V(y),children:r.jsx(Js,{size:12})})]})),v&&r.jsxs("div",{style:{paddingLeft:32,display:"flex",alignItems:"center",gap:6,marginTop:2,minWidth:0},children:[r.jsx(xS,{size:12,style:{color:"#9CA3AF",flexShrink:0}}),r.jsx("span",{style:{fontSize:11,color:"#4B5563",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:v}),r.jsx(ph,{title:"Abrir no WhatsApp",onClick:()=>{const J=mae(v);if(!J)return;const Q=`Oi, ${x}. Aqui é o ${d}, tudo bem?`,ie=`https://wa.me/${J}?text=${encodeURIComponent(Q)}`;window.open(ie,"_blank","noopener,noreferrer")},color:"#25D366",children:r.jsx(YSe,{size:12})}),r.jsx(ph,{title:"Copiar telefone",onClick:()=>V(v),children:r.jsx(Js,{size:12})})]}),A&&r.jsxs("div",{style:{paddingLeft:32,display:"flex",alignItems:"center",gap:6,marginTop:2},children:[r.jsx(wH,{size:12,style:{color:"#9CA3AF",flexShrink:0}}),r.jsx("a",{href:A,target:"_blank",rel:"noopener noreferrer",onClick:J=>J.stopPropagation(),onMouseDown:J=>J.stopPropagation(),style:{fontSize:11,color:"#6B7280",textDecoration:"none"},children:"Currículo"})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:6,paddingTop:6,borderTop:"1px solid #F9FAFB",minHeight:18,gap:8},children:[r.jsx("span",{style:{fontSize:10,color:T?"#F59E0B":"#9CA3AF",fontWeight:500},children:L||""}),D&&r.jsx("span",{style:{fontSize:11,color:"#2563EB",fontWeight:600,marginRight:28},children:D})]}),W&&Ka.createPortal(r.jsx(Cc,{candidateProfile:M,job:null,workspaceId:(o==null?void 0:o.workspaceId)||e.workspace_id||((Y=e.talent_profile)==null?void 0:Y.workspace_id)||p.workspace_id||null,onClose:()=>O(!1),onSent:()=>O(!1)}),document.body)]});return R?r.jsx("a",{href:R,onClick:J=>{if(t){J.preventDefault();return}const Q=U.current;if(Q){const ie=Math.abs(J.clientX-Q.x),ae=Math.abs(J.clientY-Q.y);if(ie>=5||ae>=5){J.preventDefault();return}}},style:{textDecoration:"none",color:"inherit",display:"block"},children:z}):z}function JSe({stage:e}){return e.is_terminal&&e.internal_status==="hired"?r.jsx(Mi,{size:14,style:{color:"#6EE7B7"}}):e.is_terminal&&e.internal_status==="rejected"?r.jsx(Jt,{size:14,style:{color:"#FCA5A5"}}):e.internal_status==="standby"?r.jsx(gS,{size:14,style:{color:"#FCD34D"}}):null}function QSe({stage:e,applications:t,onCardClick:n,stages:s,onQuickMove:i,jobId:a}){const o=g.useContext(L_),l=t.map(d=>d.id),c=l.length>0&&l.every(d=>o==null?void 0:o.isSelected(d));return r.jsxs("div",{style:{width:qSe,flexShrink:0,background:"transparent",border:"none",borderRadius:0,display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[r.jsxs("div",{style:{padding:"10px 12px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,flexShrink:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[r.jsx("input",{type:"checkbox",checked:c,disabled:l.length===0,onChange:d=>{var u;
906d.stopPropagation(),(u=o==null?void 0:o.toggleMany)==null||u.call(o,l,!c)},onClick:d=>d.stopPropagation(),style:{width:14,height:14,cursor:l.length===0?"not-allowed":"pointer",accentColor:Hj,borderRadius:4,flexShrink:0,margin:0}}),r.jsx(JSe,{stage:e}),r.jsx("span",{style:{fontSize:11,fontWeight:600,color:"#9CA3AF",letterSpacing:.6,textTransform:"uppercase",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),r.jsx("span",{style:{fontSize:10,padding:"1px 7px",borderRadius:999,background:"#F6F8FA",color:"#6B7280",fontWeight:500,flexShrink:0},children:t.length})]}),r.jsx(l_,{droppableId:e.id,children:(d,u)=>r.jsxs("div",{ref:d.innerRef,...d.droppableProps,style:{flex:1,padding:"4px 8px 8px",overflowY:"auto",background:u.isDraggingOver?"rgba(108, 36, 245, 0.05)":"transparent",transition:"background 120ms ease",minHeight:60},children:[t.length===0&&r.jsx("div",{style:{fontSize:11,color:"#D1D5DB",textAlign:"center",padding:"20px 0",fontStyle:"italic"},children:"Sem candidatos"}),t.map((p,m)=>r.jsx(o_,{draggableId:p.id,index:m,children:(x,w)=>r.jsx("div",{ref:x.innerRef,...x.draggableProps,...x.dragHandleProps,style:x.draggableProps.style,children:r.jsx(XSe,{application:p,isDragging:w.isDragging,onClick:n,stages:s,onQuickMove:i,jobId:a})})},p.id)),d.placeholder]})})]})}function ZSe({searchInput:e,onSearchInput:t,salaryMinInput:n,onSalaryMinInput:s,salaryMaxInput:i,onSalaryMaxInput:a,ratingMinInput:o,onRatingMinInput:l,ratingMaxInput:c,onRatingMaxInput:d,viewMode:u,onViewMode:p,sortBy:m,onSortBy:x,visibleCount:w,showViewToggle:y=!0}){return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap",padding:"8px 24px",borderBottom:"1px solid #E2E8F0",background:"transparent",flexShrink:0},children:[r.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center"},children:[r.jsx(Ua,{size:13,style:{position:"absolute",left:10,color:"#9CA3AF",pointerEvents:"none"}}),r.jsx("input",{type:"text",value:e,onChange:v=>t(v.target.value),placeholder:"Buscar candidato...",style:{width:240,background:"#FFFFFF",border:`1px solid ${co}`,borderRadius:8,fontSize:12,padding:"6px 10px 6px 30px",color:Ia,outline:"none",fontFamily:"inherit"},onFocus:v=>{v.currentTarget.style.borderColor="#93C5FD",v.currentTarget.style.boxShadow="0 0 0 3px #DBEAFE"},onBlur:v=>{v.currentTarget.style.borderColor=co,v.currentTarget.style.boxShadow="none"}})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{fontSize:11,color:sl},children:"Salário:"}),r.jsx("input",{type:"number",value:n,onChange:v=>s(v.target.value),placeholder:"Min",style:{width:80,background:"#FFFFFF",border:`1px solid ${co}`,borderRadius:6,fontSize:12,padding:"5px 8px",color:Ia,outline:"none",fontFamily:"inherit"}}),r.jsx("input",{type:"number",value:i,onChange:v=>a(v.target.value),placeholder:"Max",style:{width:80,background:"#FFFFFF",border:`1px solid ${co}`,borderRadius:6,fontSize:12,padding:"5px 8px",color:Ia,outline:"none",fontFamily:"inherit"}})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{fontSize:11,color:sl},children:"Rating:"}),r.jsx("input",{type:"number",value:o,onChange:v=>l(v.target.value),placeholder:"Min",style:{width:70,background:"#FFFFFF",border:`1px solid ${co}`,borderRadius:6,fontSize:12,padding:"5px 8px",color:Ia,outline:"none",fontFamily:"inherit"}}),r.jsx("input",{type:"number",value:c,onChange:v=>d(v.target.value),placeholder:"Max",style:{width:70,background:"#FFFFFF",border:`1px solid ${co}`,borderRadius:6,fontSize:12,padding:"5px 8px",color:Ia,outline:"none",fontFamily:"inherit"}})]}),r.jsxs("div",{style:{marginLeft:"auto",fontSize:12,color:sl,fontWeight:500,whiteSpace:"nowrap"},children:[w," ",w===1?"candidato":"candidatos"]}),y&&r.jsx("div",{style:{display:"flex",background:"#F6F8FA",borderRadius:8,padding:2,gap:2},children:[{mode:"kanban",svg:r.jsxs(r.Fragment,{children:[r.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),r.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),r.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),r.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]})},{mode:"list",svg:r.jsxs(r.Fragment,{children:[r.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),r.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),r.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}].map(({mode:v,svg:j})=>r.jsx("button",{type:"button",onClick:()=>p(v),title:v,style:{padding:"4px 8px",borderRadius:6,border:"none",background:u===v?"#FFFFFF":"transparent",color:u===v?Ia:"#9CA3AF",boxShadow:u===v?"0 1px 2px rgba(0,0,0,0.05)":"none",cursor:"pointer",display:"flex"},children:r.jsx("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:j})},v))}),r.jsxs("select",{value:m,onChange:v=>x(v.target.value),style:{background:"#FFFFFF",border:`1px solid ${co}`,borderRadius:6,fontSize:12,padding:"6px 8px",color:Ia,outline:"none",fontFamily:"inherit",curs
906or:"pointer"},children:[r.jsx("option",{value:"recent",children:"Mais recente"}),r.jsx("option",{value:"salary_asc",children:"Salário ↑"}),r.jsx("option",{value:"salary_desc",children:"Salário ↓"}),r.jsx("option",{value:"rating_asc",children:"Rating ↑"}),r.jsx("option",{value:"rating_desc",children:"Rating ↓"})]})]})}function eke({embedded:e=!1,jobId:t=null,hasAts:n=!0}={}){var xi,Ls,du,ya,qc,Mo,zs,Gc;const{user:s}=tr(),{entitlements:i}=Xa(),a=["growth","enterprise"].includes((xi=i==null?void 0:i.ats)==null?void 0:xi.plan_key),o=["starter","growth","enterprise"].includes((Ls=i==null?void 0:i.ats)==null?void 0:Ls.plan_key),[l,c]=g.useState(null),[d,u]=g.useState([]),[p,m]=g.useState(""),[x,w]=g.useState([]),[y,v]=g.useState([]),[j,k]=g.useState([]),[S,_]=g.useState(null),[F,A]=g.useState(!0),[C,D]=g.useState(!1),[P,L]=g.useState(null),T=g.useRef(null),R=g.useRef(null),U=g.useRef(0),I=g.useRef(!1),H=g.useCallback(()=>{R.current&&(cancelAnimationFrame(R.current),R.current=null),U.current=0},[]),V=g.useCallback(()=>{const Ae=T.current;if(!Ae||U.current===0){R.current=null;return}Ae.scrollLeft+=U.current,R.current=requestAnimationFrame(V)},[]),X=g.useCallback(Ae=>{var we;if(!I.current)return;const Ge=T.current;if(!Ge)return;const Tt=(((we=Ae.touches)==null?void 0:we[0])||Ae).clientX;if(Tt==null)return;const wt=Ge.getBoundingClientRect(),It=100,en=15;let wn=0;const Je=Tt-wt.left,oe=wt.right-Tt;if(Je<It&&Je>=0){const qe=(It-Je)/It;wn=-Math.ceil(qe*en)}else if(oe<It&&oe>=0){const qe=(It-oe)/It;wn=Math.ceil(qe*en)}U.current=wn,wn!==0&&!R.current?R.current=requestAnimationFrame(V):wn===0&&R.current&&(cancelAnimationFrame(R.current),R.current=null)},[V]),N=g.useCallback(()=>{I.current=!0,window.addEventListener("mousemove",X),window.addEventListener("touchmove",X,{passive:!0})},[X]),W=g.useCallback(()=>{I.current=!1,H(),window.removeEventListener("mousemove",X),window.removeEventListener("touchmove",X)},[H,X]);g.useEffect(()=>()=>{H(),window.removeEventListener("mousemove",X),window.removeEventListener("touchmove",X)},[H,X]);const O=g.useCallback(async()=>{var Ae;if(s!=null&&s.email){A(!0),L(null);try{const Ge=await ne.functions.invoke("getWorkspaceId",{user_email:s.email}),ht=((Ae=Ge==null?void 0:Ge.data)==null?void 0:Ae.workspace_id)||(Ge==null?void 0:Ge.workspace_id);if(!ht){L("Workspace não encontrado."),A(!1);return}c(ht);const wt=(await ne.entities.Job.filter({workspace_id:ht})||[]).filter(It=>["published","paused","closed"].includes(It.status));u(wt);{const It=new URLSearchParams(window.location.search).get("job");It&&wt.some(en=>en.id===It)&&m(It)}t&&m(t)}catch(Ge){L((Ge==null?void 0:Ge.message)||"Falha ao carregar vagas.")}finally{A(!1)}}},[s==null?void 0:s.email,t]);g.useEffect(()=>{O()},[O]),g.useEffect(()=>{t&&t!==p&&m(t)},[t]);const G=g.useCallback(async(Ae,Ge=!1)=>{if(!(!l||!Ae)){Ge||D(!0),L(null);try{await ne.functions.invoke("ensureWorkspacePipelineTemplate",{workspace_id:l});const ht=await ne.functions.invoke("ensureJobPipeline",{workspace_id:l,job_id:Ae}),Tt=(ht==null?void 0:ht.data)||ht;if(!(Tt!=null&&Tt.success))throw new Error((Tt==null?void 0:Tt.error)||"Falha ao inicializar pipeline.");const wt=[...Tt.stages||[]].sort((oe,we)=>(oe.order??0)-(we.order??0));w(wt);const It=await ne.functions.invoke("listJobApplications",{workspace_id:l,job_id:Ae}),en=(It==null?void 0:It.data)||It,wn=(en==null?void 0:en.applications)||[];k(Array.isArray(en==null?void 0:en.duplicate_groups)?en.duplicate_groups:[]);const Je=wn.map(oe=>{var we;return{...oe,id:oe.id||oe.application_id,current_stage_id:oe.current_stage_id||((we=oe.talent_profile)==null?void 0:we.current_stage_id)||null}});v(Je)}catch(ht){L((ht==null?void 0:ht.message)||"Falha ao carregar pipeline.")}finally{Ge||D(!1)}}},[l]);g.useEffect(()=>{p?G(p):(w([]),v([]))},[p,G]);const[M,z]=g.useState(null),K=g.useCallback(Ae=>{const Ge=x.find(ht=>ht.id===Ae);return(Ge==null?void 0:Ge.internal_status)==="rejected"},[x]),Y=g.useCallback(async(Ae,Ge,ht,Tt={})=>{var wt;try{const It={workspace_id:l,application_id:Ae,to_stage_id:Ge,...Tt},en=await ne.functions.invoke("moveApplicationToStage",It),wn=(en==null?void 0:en.data)||en;if(!(wn!=null&&wn.success))throw new Error((wn==null?void 0:wn.error)||"Falha ao mover");v(oe=>oe.map(we=>{var qe;return we.id===Ae?{...we,current_stage_id:Ge,status:((qe=wn.application)==null?void 0:qe.status)||we.status}:we}));const Je=(wt=ht.find(oe=>oe.id===Ae))==null?void 0:wt.current_stage_id;try{await ne.functions.invoke("executeStageAutomations",{job_application_id:Ae,new_stage_id:Ge,old_stage_id:Je})}catch(oe){console.warn("executeStageAutomations failed:",(oe==null?void 0:oe.message)||oe)}}
906catch(It){throw v(ht),L((It==null?void 0:It.message)||"Falha ao mover candidato."),It}},[l]),J=async Ae=>{W();const{destination:Ge,source:ht,draggableId:Tt}=Ae;if(!Ge||Ge.droppableId===ht.droppableId)return;const wt=Ge.droppableId,It=Tt,en=y;if(v(wn=>wn.map(Je=>Je.id===It?{...Je,current_stage_id:wt}:Je)),K(wt)){z({appId:It,toStageId:wt,prevApps:en});return}try{await Y(It,wt,en)}catch{}},Q=g.useCallback(async(Ae,Ge,ht={})=>{if(!l||!(Ae!=null&&Ae.id)||!Ge)return;const Tt=y;if(v(It=>It.map(en=>en.id===Ae.id?{...en,current_stage_id:Ge}:en)),K(Ge)&&!ht.rejection_reason_id&&!ht.reason_code&&!ht.reasonCode){z({appId:Ae.id,toStageId:Ge,prevApps:Tt});return}const wt={};ht.reasonCode&&(wt.reason_code=ht.reasonCode),ht.reasonNote&&(wt.reason_note=ht.reasonNote),ht.rejection_reason_id&&(wt.rejection_reason_id=ht.rejection_reason_id),ht.rejection_notes&&(wt.rejection_notes=ht.rejection_notes),await Y(Ae.id,Ge,Tt,wt)},[l,y,K,Y]),[ie,ae]=g.useState(null),re=g.useCallback(Ae=>{if(Ae!=null&&Ae.talent_profile_id){const Ge=p?`?from_job=${p}`:"";window.location.href=`/app/candidatos/${Ae.talent_profile_id}${Ge}`}},[p]),pe=g.useCallback(()=>ae(null),[]),Z=g.useCallback((Ae,Ge,ht)=>{v(Tt=>Tt.map(wt=>wt.id===Ae?{...wt,current_stage_id:Ge,status:ht||wt.status}:wt))},[]),[Ne,te]=g.useState(!1),[xe,he]=g.useState(!1),[le,ge]=g.useState(!1),[$e,ft]=g.useState(null),[Qe,Ve]=g.useState(null),[ze,at]=g.useState(!1),[Nt,_e]=g.useState(!1),be=g.useRef({jobId:null,loadBoard:null});g.useEffect(()=>{be.current={jobId:p,loadBoard:G}},[p,G]);const{bgState:Re,start:Xe,cancel:He,dismiss:St}=E7({wsId:l,onDone:()=>{const{jobId:Ae,loadBoard:Ge}=be.current;Ae&&Ge&&Ge(Ae,!0)}}),Ct=g.useCallback(async Ae=>{v(Ge=>Ge.filter(ht=>
906ht.id!==Ae));try{await ne.entities.JobApplication.update(Ae,{status:"removed_by_recruiter",current_stage_id:null})}catch{p&&G(p)}},[p,G]),Se=g.useCallback(Ae=>{te(!1),Ae&&p&&G(p)},[p,G]),[et,bt]=g.useState(()=>new Set);g.useEffect(()=>{bt(new Set)},[p]);const Ot=g.useCallback(async()=>{const Ae=Array.from(et);Ae.length&&(v(Ge=>Ge.filter(ht=>!Ae.includes(ht.id))),bt(new Set),Promise.allSettled(Ae.map(Ge=>ne.entities.JobApplication.update(Ge,{status:"removed_by_recruiter",current_stage_id:null}))).then(()=>{p&&setTimeout(()=>G(p,!0),1e3)}))},[et,p,G]),sn=g.useCallback(()=>{const Ae=Array.from(et),Ge=[...new Set(y.filter(ht=>Ae.includes(ht.id)).map(ht=>ht.talent_profile_id).filter(Boolean))];Ge.length>0&&Ve(Ge)},[et,y]),[Vt,Un]=g.useState(null),nr=g.useCallback(()=>{const Ae=Array.from(et),ht=y.filter(Tt=>Ae.includes(Tt.id)).map(Tt=>{const wt=Md(Tt),It=wt.full_name||"";return{talent_profile_id:Tt.talent_profile_id||null,full_name:It,first_name:It.split(" ")[0]||"",email:wt.email||Tt.email||"",phone:wt.phone||Tt.phone||"",salary_current:Number(wt.salary_current||0),salary_expectation:Number(Tt.salary_expectation||wt.salary_expectation||0)}});ht.length>0&&Un(ht)},[et,y]),xr=g.useCallback(()=>{at(!0)},[]),dr=g.useCallback(()=>{_e(!0)},[]),hs=g.useMemo(()=>{if(!Nt)return[];const Ae=Array.from(et);return y.filter(Ge=>Ae.includes(Ge.id)).map(Ge=>{const ht=Ge.talent_profile||(Ge.profile_snapshot_json?(()=>{try{return JSON.parse(Ge.profile_snapshot_json)}catch{return{}}})():{});return{talent_profile_id:Ge.talent_profile_id,full_name:ht.full_name||"Candidato",headline:ht.headline||ht.current_title||"",avatar_url:ht.avatar_url||""}})},[Nt,et,y]),mi=g.useMemo(()=>{if(!ze)return[];const Ae=Array.from(et),Ge=y.filter(wt=>Ae.includes(wt.id)),ht=x.reduce((wt,It)=>(wt[It.id]=It,wt),{}),Tt=d.find(wt=>wt.id===p);return Ge.map(wt=>{const It=wt.talent_profile||(()=>{if(typeof wt.profile_snapshot_json=="string")try{return JSON.parse(wt.profile_snapshot_json)}catch{return{}}return{}})(),en=ht[wt.current_stage_id],wn=It.email||wt.email||"",Je=typeof wn=="string"&&wn.includes("@summit.internal");return{full_name:It.full_name||"",email:Je?"":wn,phone:It.phone||wt.phone||"",headline:It.headline||It.current_title||"",current_title:It.current_title||"",current_company:It.current_company||"",location:It.location||"",linkedin_url:It.linkedin_url||wt.linkedin_url||"",salary_expectation:Number(wt.salary_expectation||It.salary_expectation||0),languages:It.languages||[],job_title:(Tt==null?void 0:Tt.title)||"",stage:(en==null?void 0:en.name)||"",source:It.source||wt.origin||"",applied_at:wt.applied_at?new Date(wt.applied_at).toLocaleDateString("pt-BR"):"",rating_score:wt.rating_score!=null?wt.rating_score:""}})},[ze,et,y,x,d,p]),Ur=g.useCallback((Ae,Ge)=>{const ht=Array.from(et);!Ae||!ht.length||(v(Tt=>Tt.map(wt=>ht.includes(wt.id)?{...wt,current_stage_id:Ae}:wt)),bt(new Set),Promise.allSettled(ht.map(Tt=>ne.functions.invoke("moveApplicationToStage",{workspace_id:l,application_id:Tt,to_stage_id:Ae,...Ge||{}}))).then(Tt=>{Tt.some(wt=>wt.status==="rejected")&&(console.error("Bulk failures:",Tt.filter(wt=>wt.status==="rejected")),p&&G(p))}))},[et,l,p,G]),Ue=g.useCallback((Ae,Ge)=>{const ht=x.find(Tt=>Tt.is_terminal&&Tt.internal_status==="rejected");ht&&Ur(ht.id,{rejection_reason_id:Ae,rejection_notes:Ge})},[x,Ur]),Et=g.useCallback(()=>{const Ae=x.find(Ge=>Ge.internal_status==="standby");Ae&&Ur(Ae.id)},[x,Ur]),[mt,Ht]=g.useState(""),[ke,Ze]=g.useState(!1),Be=g.useRef(null),xt=g.useCallback(Ae=>{Ht(Ae),Ze(!0),Be.current&&clearTimeout(Be.current),Be.current=setTimeout(()=>Ze(!1),2e3)},[]);g.useEffect(()=>()=>{Be.current&&clearTimeout(Be.current)},[]);const yt=g.useCallback(async()=>{const Ae=Array.from(et),Ge=y.filter(wt=>Ae.includes(wt.id));if(Ge.length===0)return;xt("Gerando rating para "+Ge.length+" candidato(s)...");let ht=0,Tt=0;for(const wt of Ge)try{const It=await ne.functions.invoke("rateCandidate",{application_id:wt.id}),en=(It==null?void 0:It.data)||It;en!=null&&en.success?(ht++,v(wn=>wn.map(Je=>Je.id===wt.id?{...Je,rating_score:en.rating_score,rated_at:en.rated_at}:Je))):Tt++}catch{Tt++}xt(Tt===0?"Rating gerado para "+ht+" candidato(s)":ht+" sucesso(s), "+Tt+" falha(s)"),bt(new Set),p&&setTimeout(()=>G(p,!0),1e3)},[et,y,p,G,xt]),dt=((s==null?void 0:s.name)||(s==null?void 0:s.full_name)||"").split(" ")[0]||"eu",ee=g.useMemo(()=>({isSelected:Ae=>et.has(Ae),toggle:Ae=>bt(Ge=>{const ht=new Set(Ge);return ht.has(Ae)?ht.delete(Ae):ht.add(Ae),ht}),toggleMany:(Ae,Ge)=>bt(ht=>{const Tt=new Set(ht);return Ae.forEach(wt=>{Ge?Tt.add(wt):Tt.delete(wt)}),Tt}),showToast:xt,recruiterFirstName:dt,workspaceId:l,onEdit:Ae=>ft(Ae),onSendToJob:Ae=>Ve(Ae!=null&&Ae.talent_profile_id?[Ae.talent_profile_id]:[]),onRemove:Ae=>Ct(Ae.id),atsGrowthOrAbove:a}),[et,xt,dt,l,Ct,a]),fe=d.find(Ae=>Ae.id===p),[ce,ue]=g.useState("kanban"),de=n?ce:"list",me=n?ue:()=>{},[De,Me]=g.useState(""),[Fe,Ie]=g.useState(""),[Pe,tt]=g.useState(""),[pt,_t]=g.useState(""),[lt,ot]=g.useState(""),[Yt,An]=g.useState(""),[hn,Wn]=g.useState(""),[ms,Dr]=g.useState(""),[gs,Vn]=g.useState(""),[Wi,Hn]=g.useState(""),[g
906i,Hc]=g.useState("recent");g.useEffect(()=>{const Ae=setTimeout(()=>Ie(De.trim().toLowerCase()),300);return()=>clearTimeout(Ae)},[De]),g.useEffect(()=>{const Ae=setTimeout(()=>{ot(Pe),An(pt)},500);return()=>clearTimeout(Ae)},[Pe,pt]),g.useEffect(()=>{const Ae=setTimeout(()=>{Vn(hn),Hn(ms)},500);return()=>clearTimeout(Ae)},[hn,ms]),g.useEffect(()=>{Me(""),Ie(""),tt(""),_t(""),ot(""),An(""),Wn(""),Dr(""),Vn(""),Hn(""),Hc("recent")},[p]);const Sr=x.filter(Ae=>!Ae.is_archived),xa=Sr.length>0?[...Sr].sort((Ae,Ge)=>(Ae.order??0)-(Ge.order??0))[0].id:null,xs=g.useMemo(()=>{const Ae=oe=>{const we=Md(oe),qe=Number(oe.salary_expectation||we.salary_expectation||0);return qe>0?qe:null},Ge=lt!==""?Number(lt):null,ht=Yt!==""?Number(Yt):null,Tt=gs!==""?Number(gs):null,wt=Wi!==""?Number(Wi):null,It=y.filter(oe=>{const we=Md(oe);if(Fe&&![we.full_name,we.headline,we.current_company,we.current_title].some(At=>At&&At.toLowerCase().includes(Fe)))return!1;const qe=Ae(oe);if(qe!=null&&(Ge!=null&&!isNaN(Ge)&&qe<Ge||ht!=null&&!isNaN(ht)&&qe>ht))return!1;if(Tt!=null||wt!=null){const st=oe.rating_score!=null?Number(oe.rating_score):null;if(st==null||Tt!=null&&!isNaN(Tt)&&st<Tt||wt!=null&&!isNaN(wt)&&st>wt)return!1}return!0}),en=Sr.reduce((oe,we)=>(oe[we.id]=It.filter(qe=>(qe.current_stage_id&&qe.current_stage_id!==""?qe.current_stage_id:xa)===we.id),oe),{}),wn=oe=>{const we=Number(oe.rating_score);return we>0?we:null},Je=(oe,we)=>{if(gi==="salary_asc"||gi==="salary_desc"){const At=Ae(oe),qt=Ae(we);return At==null&&qt==null?0:At==null?1:qt==null?-1:gi==="salary_asc"?At-qt:qt-At}if(gi==="rating_asc"||gi==="rating_desc"){const At=wn(oe),qt=wn(we);return At==null&&qt==null?0:At==null?1:qt==null?-1:gi==="rating_asc"?At-qt:qt-At}const qe=new Date(oe.updated_date||oe.created_at||0).getTime();return new Date(we.updated_date||we.created_at||0).getTime()-qe};return Object.keys(en).forEach(oe=>{en[oe]=[...en[oe]].sort(Je)}),en},[y,Sr,xa,Fe,lt,Yt,gs,Wi,gi]),ei=g.useMemo(()=>Object.values(xs).reduce((Ae,Ge)=>Ae+Ge.length,0),[xs]);return r.jsx(L_.Provider,{value:ee,children:r.jsxs("div",{style:{height:"calc(100vh - 56px)",background:GSe,color:Ia,display:"flex",flexDirection:"column",overflow:"hidden",width:"100%",maxWidth:"none"},children:[!e&&r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16,padding:"12px 24px",borderBottom:`1px solid ${co}`,background:"#FFFFFF",flexShrink:0,minHeight:48},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:sl,minWidth:0},children:[r.jsx("span",{style:{cursor:"pointer"},onMouseEnter:Ae=>Ae.currentTarget.style.color=Ia,onMouseLeave:Ae=>Ae.currentTarget.style.color=sl,children:"ATS"}),r.jsx(Qr,{size:12,style:{color:"#D1D5DB"}}),r.jsx("span",{style:{fontWeight:500,color:"#374151",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:320},children:(fe==null?void 0:fe.title)||"—"}),r.jsx(Qr,{size:12,style:{color:"#D1D5DB"}}),r.jsx("span",{children:"Pipeline"})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n&&r.jsx("button",{type:"button",onClick:()=>te(!0),disabled:!p||C,title:"Configurar pipeline","aria-label":"Configurar pipeline",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:6,background:"transparent",border:"1px solid transparent",borderRadius:6,color:sl,cursor:!p||C?"not-allowed":"pointer",opacity:!p||C?.4:1,transition:"background 120ms ease, color 120ms ease"},onMouseEnter:Ae=>{p&&!C&&(Ae.currentTarget.style.background="#F3F4F6",Ae.currentTarget.style.color=Ia)},onMouseLeave:Ae=>{Ae.currentTarget.style.background="transparent",Ae.currentTarget.style.color=sl},children:r.jsx(Gf,{size:15})}),!e&&r.jsxs(r.Fragment,{children:[r.jsx(On,{size:13,style:{color:sl}}),r.jsxs("select",{value:p,onChange:Ae=>m(Ae.target.value),disabled:F,style:{minWidth:240,padding:"6px 10px",fontSize:12,background:"#FFFFFF",color:"#111827",border:`1px solid ${co}`,borderRadius:6,outline:"none",cursor:F?"not-allowed":"pointer",fontFamily:"inherit"},children:[r.jsx("option",{value:"",children:F?"Carregando vagas...":"Selecione uma vaga"}),d.map(Ae=>r.jsxs("option",{value:Ae.id,children:[Ae.title," ",Ae.status!=="published"?`(${Ae.status})`:""]},Ae.id))]})]})]})]}),p&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,paddingRight:20,flexShrink:0},children:[r.jsx("div",{style:{flex:1,minWidth:0},children:r.jsx(ZSe,{searchInput:De,onSearchInput:Me,salaryMinInput:Pe,onSalaryMinInput:tt,salaryMaxInput:pt,onSalaryMaxInput:_t,ratingMinInput:hn,onRatingMinInput:Wn,ratingMaxInput:ms,onRatingMaxInput:Dr,viewMode:de,onViewMode:me,sortBy:gi,onSortBy:Hc,visibleCount:ei,showViewToggle:n})}),n&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[r.jsxs("button",{onClick:()=>ge(!0),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 14px",fontSize:13,fontWeight:500,color:"#374151",background:"#FFFFFF",border:"1px solid #E2E8F0",borderRadius:8,cursor:"pointer",fontFamily:"inherit",whiteSpace:"nowrap"},children:[r.jsx(Wa,{size:14}),"Importar"]}),r.jsx("button",{onClick:()=>he(!0),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 14px",fontSize:13,fontWeight:500,color:"#FFFFFF",background:"#6C24F5",border:"none",borderRadius:8,cursor:"pointer",fontFamily:"inherit",whiteSpace:"nowrap"},children:"+ Candidato"})]})]}),et.size>0&&r.jsx(Cge,{selectedCount:et.size,stages:Sr,workspaceId:l,onBulkMove:Ur,onBulkReject:Ue,onBulkStandby:Et,onBulkSendToJob:sn,onBulkSendEmail:nr,onBulkRemove:Ot,onExport:xr,onShare:dr,onRating:yt,onClearSelection:()=>bt(new Set),atsStarterOrAbove:o,atsGrowthOrAbove:a,currentPlan:((du=i==null?void 0:i.ats)==null?void 0:du.plan_key)||"free"}),Re&&r.jsx("div",{style:{padding:"0 20px",flexShrink:0},children:r.jsx(F7,{bgState:Re,onCancel:He,onDismiss:St})}),r.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",padding:"12px 20px 0",width:"100%",maxWidth:"100%"},children:[p&&j.length>0&&r.jsxs("div",{style:{background:"#FFFBEB",border:"1px solid #FDE68A",borderRadius:8,padding:"10px 14px",marginBottom:10,display:"flex",alignItems:"center",gap:10,color:"#92400E",fontSize:13,flexShrink:0},children:[r.jsx(xl,{size:16}),r.jsxs("span",{style:{flex:1},children:[j.length," candidato(s) com candidaturas duplicadas nesta vaga."]}),r.jsx("button",{onClick:()=>_(j[0]),style:{padding:"4px 12px",fontSize:12,background:"#D97706",color:"#FFFFFF",border:"none",borderRadius:6,cursor:"pointer",fontFamily:"inherit",fontWeight:500},children:"Resolver"})]}),P&&r.jsxs("div",{style:{background:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",borderRadius:8,padding:"10px 14px",marginBottom:10,display:"flex",alignItems:"center",gap:10,color:"#B91C1C",fontSize:13,flexShrink:0},children:[r.jsx(xl,{size:16}),r.jsx("span",{style:{flex:1},children:P}),r.jsx("button",{onClick:()=>p?G(p):O(),style:{padding:"4px 10px",fontSize:12,background:"transparent",color:"#B91C1C",border:"1px solid rgba(239, 68, 68, 0.4)",borderRadius:6,cursor:"pointer",fontFamily:"inherit"},children:"Tentar novamente"})]}),!p&&!F&&r.jsxs("div",{style:{background:"#FFFFFF",border:`1px dashed ${co}`,borderRadius:12,padding:"64px 24px",textAlign:"center",color:"#6B7280",margin:"auto"}
906,children:[r.jsx(On,{size:32,style:{color:"#9CA3AF",marginBottom:12}}),r.jsx("p",{style:{fontSize:14,margin:0},children:"Selecione uma vaga para visualizar o pipeline"})]}),p&&C&&r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"80px 0",color:"#6B7280",margin:"auto"},children:[r.jsx(rt,{size:20,style:{animation:"spin 1s linear infinite",marginRight:10}}),r.jsx("span",{style:{fontSize:13},children:"Carregando pipeline..."})]}),p&&!C&&Sr.length>0&&de==="list"&&r.jsx(kge,{applications:Object.values(xs).flat(),stages:Sr,selectedIds:et,onToggleSelect:Ae=>ee.toggle(Ae),onSelectAll:()=>{const Ae=Object.values(xs).flat(),Ge=Ae.length>0&&Ae.every(ht=>et.has(ht.id));bt(ht=>{const Tt=new Set(ht);return Ge?Ae.forEach(wt=>Tt.delete(wt.id)):Ae.forEach(wt=>Tt.add(wt.id)),Tt})},onOpenDrawer:re,onQuickMove:Q,wsId:l}),p&&!C&&Sr.length>0&&de==="kanban"&&r.jsx(i_,{onDragStart:N,onDragEnd:J,children:r.jsx("div",{ref:T,style:{display:"flex",gap:12,overflowX:"auto",overflowY:"hidden",paddingBottom:12,alignItems:"stretch",flex:1,minHeight:0},children:Sr.map(Ae=>r.jsx(QSe,{stage:Ae,applications:xs[Ae.id]||[],onCardClick:re,stages:Sr,onQuickMove:Q,jobId:p},Ae.id))})})]}),r.jsx(gge,{open:Ne,jobTitle:((ya=d.find(Ae=>Ae.id===p))==null?void 0:ya.title)||"",jobId:p,workspaceId:l,stages:Sr,applicationsByStageId:xs,onClose:Se}),r.jsx(QP,{open:!!ie,application:ie,stages:Sr,workspaceId:l,onClose:pe,onMoved:Z,onEdit:()=>ie&&ft(ie),onSendToJob:()=>(ie==null?void 0:ie.talent_profile_id)&&Ve([ie.talent_profile_id]),onRemove:()=>{ie&&(Ct(ie.id),ae(null))}}),$e&&r.jsx(d_,{isOpen:!0,candidate:$e,onClose:()=>ft(null),onSaved:()=>{ft(null),p&&G(p,!0)}}),S&&r.jsx(Tge,{isOpen:!0,group:S,applications:y,stages:Sr,workspaceId:l,onClose:()=>_(null),onResolved:()=>{_(null),p&&G(p,!0)}}),Vt&&r.jsx(Cc,{candidates:Vt,job:fe||null,workspaceId:l,onClose:()=>Un(null),onSent:Ae=>{Ae&&Ae.sent>0&&Ae.failed===0&&bt(new Set)}}),Qe&&r.jsx(u_,{isOpen:!0,candidateIds:Qe,candidateCount:Qe.length,wsId:l,currentJobId:p,onClose:()=>Ve(null),onSent:()=>{Ve(null),bt(new Set)}}),le&&p&&r.jsx(_7,{isOpen:le,onClose:()=>ge(!1),wsId:l,jobId:p,jobName:((qc=d.find(Ae=>Ae.id===p))==null?void 0:qc.title)||"",onSuccess:()=>{ge(!1),p&&G(p,!0)},onStartBackground:(Ae,Ge)=>Xe(Ae,Ge)}),M&&r.jsx(kk,{workspaceId:l,onConfirm:async({rejectionReasonId:Ae,rejectionNotes:Ge})=>{const{appId:ht,toStageId:Tt,prevApps:wt}=M;z(null);try{await Y(ht,Tt,wt,{rejection_reason_id:Ae,rejection_notes:Ge})}catch{}},onCancel:()=>{v(M.prevApps),z(null)}}),xe&&p&&r.jsx(UM,{isOpen:xe,onClose:()=>he(!1),wsId:l,jobId:p,jobName:((Mo=d.find(Ae=>Ae.id===p))==null?void 0:Mo.title)||"",onSuccess:Ae=>{if(he(!1),Ae&&x.length>0){const Ge=[...x].filter(ht=>!ht.is_archived).sort((ht,Tt)=>(ht.order??0)-(Tt.order??0))[0];if(Ge){const ht={id:Ae.application_id||"temp_"+Date.now(),talent_profile_id:Ae.talent_profile_id||null,job_id:p,status:"submitted",current_stage_id:Ge.id,origin:"sourcing_manual",updated_date:new Date().toISOString(),talent_profile:{full_name:Ae.full_name,email:Ae.email,phone:Ae.phone,headline:Ae.headline,current_company:Ae.current_company,salary_expectation:Ae.salary_expectation}};v(Tt=>[...Tt,ht])}}setTimeout(()=>G(p,!0),2e3),setTimeout(()=>G(p,!0),6e3)}}),Nt&&r.jsx(HSe,{isOpen:Nt,onClose:()=>_e(!1),jobId:p,jobTitle:((zs=d.find(Ae=>Ae.id===p))==null?void 0:zs.title)||"",workspaceId:l,candidates:hs}),ze&&r.jsx(C7,{isOpen:ze,onClose:()=>at(!1),data:mi,fileName:`candidatos_${(((Gc=d.find(Ae=>Ae.id===p))==null?void 0:Gc.title)||"pipeline").replace(/\s+/g,"_").toLowerCase()}`}),r.jsx("div",{"aria-live":"polite",style:{position:"fixed",bottom:24,left:"50%",transform:`translateX(-50%) translateY(${ke?0:8}px)`,background:"#1F2937",color:"#FFFFFF",fontSize:12,fontWeight:500,padding:"6px 14px",borderRadius:8,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.18)",opacity:ke?1:0,pointerEvents:"none",transition:"opacity 180ms ease, transform 180ms ease",zIndex:2e3},children:mt}),r.jsx("style",{children:"@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideInRight{from{transform:translateX(100%)}to{transform:translateX(0)}}.card-with-menu:hover .card-kebab-btn{opacity:1 !important}"})]})})}const tke="#6C24F5";function nke(e){if(!e)return"—";const t=new Date(e),n=s=>String(s).padStart(2,"0");return`${n(t.getDate())}/${n(t.getMonth()+1)}/${t.getFullYear()} ${n(t.getHours())}:${n(t.getMinutes())}`}function rke(e){if(!e)return"—";const t=new Date(e),n=s=>String(s).padStart(2,"0");return`${n(t.getDate())}/${n(t.getMonth()+1)}/${t.getFullYear()}`}function A7(e){return e?new Date(e)<new Date:!1}function ske(e){if(!e)return 0;try{return JSON.parse(e).length}catch{return 0}}function ike({status:e,expiresAt:t}){const n=A7(t);return e==="revoked"?r.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 8px",borderRadius:999,background:"#F6F8FA",color:"#6B7280"},children:"Revogado"}):n||e==="expired"?r.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 8px",borderRadius:999,background:"#FEE2E2",color:"#DC2626"},children:"Expirado"}):r.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 8px",borderRadius:999,background:"#DCFCE7",color:"#16A34A"},children:"Ativo"})}function ake({jobId:e,workspaceId:t}){const[n,s]=g.useState([]),[i,a]=g.useState(!0),[o,l]=g.useState(""),[c,d]=g.useState(null),u=g.useCallback(async()=>
906{if(!e)return;a(!0);const w=await ne.entities.HiringManagerLink.filter({job_id:e},"-created_date").catch(()=>[]);s(w||[]),a(!1)},[e]);g.useEffect(()=>{u()},[u]);const p=w=>{l(w),setTimeout(()=>l(""),2500)},m=w=>{const y=`${window.location.origin}/review/${w}`;navigator.clipboard.writeText(y).catch(()=>{}),p("Link copiado!")},x=async w=>{d(w),await ne.entities.HiringManagerLink.update(w,{status:"revoked"}).catch(()=>{}),await u(),d(null),p("Link revogado")};return i?r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"80px 0",color:"#9CA3AF"},children:[r.jsx(rt,{size:20,style:{animation:"spin 1s linear infinite"}}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}):n.length===0?r.jsxs("div",{style:{width:"100%",padding:"64px 0",margin:0,textAlign:"center"},children:[r.jsx($a,{size:36,style:{color:"#D1D5DB",margin:"0 auto 14px"}}),r.jsx("h3",{style:{fontSize:16,fontWeight:600,color:"#1A1F36",marginBottom:6},children:"Nenhum link compartilhado para esta vaga"}),r.jsx("p",{style:{fontSize:13,color:"#6B7280",maxWidth:420,margin:"0 auto",lineHeight:1.5},children:"Selecione candidatos no pipeline e clique em Compartilhar na barra de ações."})]}):r.jsxs("div",{style:{width:"100%",padding:0,margin:0},children:[r.jsxs("div",{style:{width:"100%",background:"#FFFFFF",border:"1px solid #E2E8F0",borderRadius:12,overflow:"hidden"},children:[r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.4fr 1fr 1fr 0.9fr 0.7fr 0.6fr 0.6fr 100px",gap:0,padding:"10px 16px",background:"#FAFBFC",borderBottom:"1px solid #E2E8F0",fontSize:10,fontWeight:600,color:"#9CA3AF",textTransform:"uppercase",letterSpacing:"0.05em",position:"sticky",top:0,zIndex:1},children:[r.jsx("div",{children:"Gestor"}),r.jsx("div",{children:"Criado por"}),r.jsx("div",{children:"Criado em"}),r.jsx("div",{children:"Expira em"}),r.jsx("div",{children:"Candidatos"}),r.jsx("div",{children:"Views"}),r.jsx("div",{children:"Status"}),r.jsx("div",{style:{textAlign:"right"},children:"Ações"})]}),n.map(w=>{const y=A7(w.expires_at),v=w.status==="active"&&!y,j=ske(w.candidate_ids);return r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.4fr 1fr 1fr 0.9fr 0.7fr 0.6fr 0.6fr 100px",gap:0,padding:"10px 16px",borderBottom:"1px solid #E2E8F0",fontSize:12,color:"#374151",alignItems:"center"},children:[r.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:500},children:w.hiring_manager_name||w.hiring_manager_email||"Sem nome"}),r.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#6B7280",fontSize:11},children:w.created_by_name||"—"}),r.jsx("div",{style:{color:"#6B7280",fontSize:11},children:nke(w.created_date)}),r.jsx("div",{style:{fontSize:11},children:y?r.jsx("span",{style:{color:"#DC2626",fontWeight:500},children:"Expirado"}):r.jsx("span",{style:{color:"#6B7280"},children:rke(w.expires_at)})}),r.jsxs("div",{style:{fontSize:11,color:"#6B7280"},children:[j," candidato",j!==1?"s":""]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:11,color:"#6B7280"},children:[r.jsx(cS,{size:11})," ",w.view_count||0]}),r.jsx("div",{children:r.jsx(ike,{status:w.status,expiresAt:w.expires_at})}),r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:4},children:[r.jsx("button",{onClick:()=>window.open(`/review/${w.token}`,"_blank"),title:"Abrir link",style:{background:"none",border:"none",cursor:"pointer",padding:4,color:tke,display:"flex",alignItems:"center"},children:r.jsx($a,{size:13})}),r.jsx("button",{onClick:()=>m(w.token),title:"Copiar link",style:{background:"none",border:"none",cursor:"pointer",padding:4,color:"#6B7280",display:"flex",alignItems:"center"},children:r.jsx(Js,{size:13})}),v&&r.jsx("button",{onClick:()=>x(w.id),disabled:c===w.id,title:"Revogar",style:{background:"none",border:"none",cursor:c===w.id?"not-allowed":"pointer",padding:4,color:"#DC2626",display:"flex",alignItems:"center",opacity:c===w.id?.5:1},children:r.jsx(yl,{size:13})})]})]},w.id)})]}),o&&r.jsx("div",{style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",background:"#1F2937",color:"#fff",fontSize:12,fontWeight:500,padding:"8px 16px",borderRadius:8,zIndex:2e3,boxShadow:"0 8px 24px rgba(0,0,0,0.15)"},children:o})]})}const oke=new Set(["removed_by_recruiter","withdrawn","expired"]);function lke(){var F,A,C,D,P,L;const{id:e}=Do(),t=In(),{entitlements:n}=Xa(),[s,i]=g.useState(null),[a,o]=g.useState(!0),[l,c]=g.useState("candidatos"),[d,u]=g.useState(0),p=(F=n==null?void 0:n.ats)==null?void 0:F.unlocked,m=(A=n==null?void 0:n.assessments)==null?void 0:A.unlocked,x=(C=n==null?void 0:n.talent_bank)==null?void 0:C.unlocked,w=!1,y=(D=n==null?void 0:n.ats)==null?void 0:D.plan_key,v=["starter","growth","enterprise"].includes(y),j=["growth","enterprise"].includes(y);g.useEffect(()=>{e&&Promise.all([ne.entities.Job.filter({id:e}),ne.entities.JobApplication.filter({job_id:e})]).then(([T,R])=>{T!=null&&T[0]&&i(T[0]);const U=(R||[]).filter(I=>!oke.has(I.status));u(U.length)}).catch(console.error).finally(()=>o(!1))},[e]);const k=[{key:"candidatos",label:"Candidatos",icon:Nr,always:!0},{key:"sourcing",label:"Sourcing",icon:Ua,show:x},{key:"avaliacoes",label:"Avaliações",icon:za,show:m},{key:"analises",label:"Análises",icon:ts,show:v},{key:"automacoes",label:"Automações",icon:Wx,show:j},{key:"compartilhamento",label:"Compartilhamento",icon:$a,show:j},{key:"definicoes",label:"Definições",icon:aF,show:p},{key:"empresa",label:"Empresa",icon:jc,show:w}].filter(T=>T.always||T.show);if(a)return r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"50vh",color:"var(--sv-ink-3)"},children:[r.jsx("div",{style:{width:24,height:24,border:"3px solid var(--sv-border)",borderTopColor:"var(--sv-accent)",borderRadius:"50%",animation:"spin 0.8s linear infinite"}}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]});if(!s)return r.jsx("div",{style:{padding:40,textAlign:"center",color:"var(--sv-ink-3)",fontFamily:"var(--sv-font)"},children:"Vaga não encontrada"});const _={draft:{label:"Rascunho",color:"#6B7280",bg:"#F6F8FA"},published:{label:"Publicada",color:"#15803D",bg:"#DCFCE7"},paused:{label:"Pausada",color:"#B45309",bg:"#FEF3C7"},closed:{label:"Encerrada",color:"#6B7280",bg:"#F6F8FA"},deleted:{label:"Excluída",color:"#B91C1C",bg:"#FEE2E2"}}[s.status]||{label:s.status,color:"#6B7280",bg:"#F6F8FA"};return r.jsxs("div",{style:{fontFamily:"var(--sv-font)"},children:[r.jsxs("div",{style:{background:"var(--sv-surface)",borderBottom:"1px solid var(--sv-border)",padding:"20px 32px 0"},children:[r.jsxs("button",{onClick:()=>t("/app/vagas"),style:{display:"inline-flex",alignItems:"center",gap:4,fontSize:13,fontWeight:500,color:"var(--sv-ink-2)",background:"none",border:"none",cursor:"pointer",padding:0,marginBottom:14,fontFamily:"inherit"},children:[r.jsx(Sc,{size:14})," Vagas"]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,marginBottom:18},children:[r.jsx("div",{style:{width:46,height:46,borderRadius:11,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--sv-accent-muted)",color:"var(--sv-accent)",fontSize:18,fontWeight:700},children:s.company_logo_url?r.jsx("img",{src:s.company_logo_url,alt:"",style:{width:"100%",height:"100%",borderRadius:11,objectFit:"cover"}}):(P=(s.company_name||s.title||"V")[0])==null?void 0:P.toUpperCase()}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[r.jsx("h1",{style:{fontSize:22,fontWeight:600,letterSpacing:"-0.025em",color:"var(--sv-ink)",margin:0},children:s.title}),r.jsx("span",{style:{fontSize:12,fontWeight:500,padding:"2px 10px",borderRadius:999,background:_.bg,color:_.color},children:_.label})]}),r.jsxs("div",{style:{fontSize:13,color:"var(--sv-ink-2)",marginTop:4,display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[s.company_name&&r.jsx("span",{children:s.company_name}),s.location&&r.jsxs(r.Fragment,{children:[r.jsx("span",{style:{color:"var(--sv-ink-3)"},children:"·"}),r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:3},children:[r.jsx(ma,{size:11}),s.location]})]}),s.work_model&&r.jsxs(r.Fragment,{children:[r.jsx("span",{style:{color:"var(--sv-ink-3)"},children:"·"}),r.jsx("span",{children:s.work_model==="remote"?"Remoto":s.work_model==="hybrid"?"Híbrido":"Presencial"})]}),s.contract_type&&r.jsxs(r.Fragment,{children:[r.jsx("span",{style:{color:"var(--sv-ink-3)"},children:"·"}),r.jsx("span",{children:(L=s.contract_type)==null?void 0:L.toUpperCase()})]}),r.jsx("span",{style:{color:"var(--sv-ink-3)"},children:"·"}),r.jsxs("span",{style:{color:"var(--sv-d-green)",fontWeight:600},children:[d," candidatos"]})]})]}),!p&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"14px 20px",background:"linear-gradient(135deg, #0F0B2E, #1A1145, #0F0B2E)",borderRadius:8},children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",lineHeight:1.3},children:[r.jsx("span",{style:{fontSize:13,fontWeight:500,color:"#FFFFFF"},children:"Pipeline visual completo"}
906),r.jsx("span",{style:{fontSize:12,color:"#9CA3AF",marginTop:2},children:"Kanban, automações, e-mail e agendamento"})]}),r.jsxs("button",{onClick:()=>t("/app/conta/plano"),style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:13,fontWeight:500,color:"#FFFFFF",background:"#6C24F5",padding:"8px 18px",borderRadius:8,border:"none",cursor:"pointer",whiteSpace:"nowrap",fontFamily:"inherit"},children:["Conhecer o ATS",r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M5 12h14M13 5l7 7-7 7"})})]})]})]}),r.jsx("div",{style:{display:"flex",gap:0},children:k.map(T=>{const R=T.icon,U=l===T.key;return r.jsxs("button",{onClick:()=>c(T.key),style:{display:"flex",alignItems:"center",gap:6,padding:"10px 16px",fontSize:13,fontWeight:U?600:500,color:U?"var(--sv-accent)":"var(--sv-ink-2)",borderBottom:U?"2px solid var(--sv-accent)":"2px solid transparent",marginBottom:-1,background:"none",border:"none",borderBottomStyle:"solid",borderBottomWidth:2,cursor:"pointer",fontFamily:"inherit",whiteSpace:"nowrap"},children:[r.jsx(R,{size:15,strokeWidth:1.5}),T.label]},T.key)})})]}),r.jsxs("div",{children:[l==="candidatos"&&r.jsx("div",{children:r.jsx(eke,{embedded:!0,jobId:e,hasAts:!!p})}),l==="sourcing"&&r.jsxs("div",{style:{padding:"48px 32px",textAlign:"center"},children:[r.jsx(Ua,{size:36,style:{color:"var(--sv-ink-3)",margin:"0 auto 14px"}}),r.jsx("h3",{style:{fontSize:16,fontWeight:600,color:"var(--sv-ink)",marginBottom:6},children:"Sourcing"}),r.jsx("p",{style:{fontSize:13,color:"var(--sv-ink-2)",maxWidth:420,margin:"0 auto",lineHeight:1.5},children:"Encontre e capture candidatos do LinkedIn direto para esta vaga usando a extensão Chrome Summit."})]}),l==="avaliacoes"&&r.jsxs("div",{style:{padding:"48px 32px",textAlign:"center"},children:[r.jsx(za,{size:36,style:{color:"var(--sv-ink-3)",margin:"0 auto 14px"}}),r.jsx("h3",{style:{fontSize:16,fontWeight:600,color:"var(--sv-ink)",marginBottom:6},children:"Avaliações"}),r.jsx("p",{style:{fontSize:13,color:"var(--sv-ink-2)",maxWidth:420,margin:"0 auto",lineHeight:1.5},children:"Envie testes comportamentais, cognitivos e de idiomas para os candidatos desta vaga."})]}),l==="analises"&&r.jsxs("div",{style:{padding:"48px 32px",textAlign:"center"},children:[r.jsx(ts,{size:36,style:{color:"var(--sv-ink-3)",margin:"0 auto 14px"}}),r.jsx("h3",{style:{fontSize:16,fontWeight:600,color:"var(--sv-ink)",marginBottom:6},children:"Análises da vaga"}),r.jsx("p",{style:{fontSize:13,color:"var(--sv-ink-2)",maxWidth:420,margin:"0 auto",lineHeight:1.5},children:"Funil, tempo por etapa, taxa de conversão e insights desta vaga."})]}),l==="automacoes"&&r.jsxs("div",{style:{padding:"48px 32px",textAlign:"center"},children:[r.jsx(Wx,{size:36,style:{color:"var(--sv-ink-3)",margin:"0 auto 14px"}}),r.jsx("h3",{style:{fontSize:16,fontWeight:600,color:"var(--sv-ink)",marginBottom:6},children:"Automações"}),r.jsx("p",{style:{fontSize:13,color:"var(--sv-ink-2)",maxWidth:420,margin:"0 auto",lineHeight:1.5},children:"Regras automáticas desta vaga: mover candidatos, enviar e-mails e disparar avaliações por etapa."})]}),l==="compartilhamento"&&r.jsx(ake,{jobId:e,workspaceId:(s==null?void 0:s.workspace_id)||""}),l==="definicoes"&&r.jsxs("div",{style:{padding:"48px 32px",textAlign:"center"},children:[r.jsx(aF,{size:36,style:{color:"var(--sv-ink-3)",margin:"0 auto 14px"}}),r.jsx("h3",{style:{fontSize:16,fontWeight:600,color:"var(--sv-ink)",marginBottom:6},children:"Definições"}),r.jsx("p",{style:{fontSize:13,color:"var(--sv-ink-2)",maxWidth:420,margin:"0 auto",lineHeight:1.5},children:"Etapas do pipeline, campos customizados e motivos de rejeição desta vaga."})]}),l==="empresa"&&r.jsxs("div",{style:{padding:"48px 32px",textAlign:"center"},children:[r.jsx(jc,{size:36,style:{color:"var(--sv-ink-3)",margin:"0 auto 14px"}}),r.jsx("h3",{style:{fontSize:16,fontWeight:600,color:"var(--sv-ink)",marginBottom:6},children:"Empresa"}),r.jsx("p",{style:{fontSize:13,color:"var(--sv-ink-2)",maxWidth:420,margin:"0 auto",lineHeight:1.5},children:"Contatos, contratos e histórico da empresa-cliente vinculada a esta vaga."})]})]})]})}function cke(){var v,j,k;const{user:e}=tr(),{entitlements:t}=Xa(),n=In(),[s,i]=g.useState({jobs:0,applications:0,hires:0}),[a,o]=g.useState([]),[l,c]=g.useState(!0),d=new Date().getHours(),u=d<12?"Bom dia":d<18?"Boa tarde":"Boa noite",p=((v=e==null?void 0:e.name)==null?void 0:v.split(" ")[0])||"usuário";g.useEffect(()=>{m()},[e==null?void 0:e.email]);async function m(){var S,_;
906try{if(!(e!=null&&e.email))return;const F=await ne.functions.invoke("getWorkspaceId",{user_email:e.email}),A=((S=F==null?void 0:F.data)==null?void 0:S.workspace_id)||(F==null?void 0:F.workspace_id);if(!A){c(!1);return}const[C,D,P]=await Promise.all([ne.entities.Job.filter({workspace_id:A,status:"published"}),ne.entities.JobApplication.filter({workspace_id:A}),ne.entities.Job.filter({workspace_id:A},"-created_date",5)]),L={};(D||[]).forEach(R=>{R.job_id&&(L[R.job_id]=(L[R.job_id]||0)+1)});const T=(P||[]).map(R=>({...R,_apps_count:L[R.id]??R.applications_count??0}));i({jobs:(C==null?void 0:C.length)||0,applications:(D==null?void 0:D.length)||0,hires:((_=D==null?void 0:D.filter(R=>R.status==="hired"))==null?void 0:_.length)||0}),o(T)}catch(F){console.error("CockpitPage loadData:",F)}finally{c(!1)}}const x=(j=t==null?void 0:t.ats)==null?void 0:j.unlocked,w=(k=t==null?void 0:t.assessments)==null?void 0:k.unlocked,y={Briefcase:On,CheckCircle:s8,Calendar:kl,Users:Nr};return r.jsxs("div",{children:[r.jsxs("div",{style:{marginBottom:8},children:[r.jsxs("h1",{style:{fontSize:28,fontWeight:600,letterSpacing:"-0.04em",lineHeight:1.15,color:"#1A1F36",margin:0},children:[u,", ",p]}),r.jsx("p",{style:{fontSize:14,color:"#697386",marginTop:4,marginBottom:0},children:"Aqui está o resumo da sua operação de recrutamento."})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:0,border:"1px solid #E3E8EE",borderRadius:12,background:"#FFFFFF",margin:"20px 0",boxShadow:"0 1px 3px rgba(0,0,0,0.04)"},children:[r.jsxs("div",{style:{padding:"20px 22px",position:"relative"},children:[r.jsx("div",{style:{fontSize:12,color:"#697386",fontWeight:500,marginBottom:6},children:"Candidaturas"}),r.jsx("div",{style:{fontSize:28,fontWeight:600,letterSpacing:"-0.03em",lineHeight:1,color:"#1A1F36"},children:l?"—":s.applications}),r.jsxs("div",{style:{fontSize:12,color:"#A3ACB9",marginTop:8,display:"flex",alignItems:"center",gap:5},children:[r.jsx("span",{style:{color:"#0E6245",background:"#E6F7EF",fontSize:11,fontWeight:600,padding:"1px 6px",borderRadius:4},children:"+12%"}),"no período"]}),r.jsx("div",{style:{position:"absolute",right:0,top:16,bottom:16,width:1,background:"#E3E8EE"}})]}),r.jsxs("div",{style:{padding:"20px 22px",position:"relative"},children:[r.jsx("div",{style:{fontSize:12,color:"#697386",fontWeight:500,marginBottom:6},children:"Vagas abertas"}),r.jsx("div",{style:{fontSize:28,fontWeight:600,letterSpacing:"-0.03em",lineHeight:1,color:"#1A1F36"},children:l?"—":s.jobs}),r.jsxs("div",{style:{fontSize:12,color:"#A3ACB9",marginTop:8,display:"flex",alignItems:"center",gap:5},children:[r.jsx("span",{style:{color:"#0E6245",background:"#E6F7EF",fontSize:11,fontWeight:600,padding:"1px 6px",borderRadius:4},children:"+3"}),"em recrutamento"]}),r.jsx("div",{style:{position:"absolute",right:0,top:16,bottom:16,width:1,background:"#E3E8EE"}})]}),r.jsxs("div",{style:{padding:"20px 22px",position:"relative"},children:[r.jsx("div",{style:{fontSize:12,color:"#697386",fontWeight:500,marginBottom:6},children:"Contratações"}),r.jsx("div",{style:{fontSize:28,fontWeight:600,letterSpacing:"-0.03em",lineHeight:1,color:"#1A1F36"},children:l?"—":s.hires}),r.jsxs("div",{style:{fontSize:12,color:"#A3ACB9",marginTop:8,display:"flex",alignItems:"center",gap:5},children:[r.jsxs("span",{style:{color:"#0E6245",background:"#E6F7EF",fontSize:11,fontWeight:600,padding:"1px 6px",borderRadius:4},children:["+",s.hires]}),"fechadas no mês"]}),r.jsx("div",{style:{position:"absolute",right:0,top:16,bottom:16,width:1,background:"#E3E8EE"}})]}),r.jsxs("div",{style:{padding:"20px 22px"},children:[r.jsx("div",{style:{fontSize:12,color:"#697386",fontWeight:500,marginBottom:6},children:"Em processo"}),r.jsx("div",{style:{fontSize:28,fontWeight:600,letterSpacing:"-0.03em",lineHeight:1,color:"#1A1F36"},children:l?"—":s.applications-s.hires}),r.jsx("div",{style:{fontSize:12,color:"#A3ACB9",marginTop:8},children:"no período"})]})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.5fr 1fr",gap:16},children:[r.jsxs("div",{style:{background:"#FFFFFF",border:"1px solid #E3E8EE",borderRadius:12,boxShadow:"0 1px 3px rgba(0,0,0,0.04)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"18px 20px 0"},children:[r.jsx("h3",{style:{fontSize:16,fontWeight:600,letterSpacing:"-0.02em",color:"#1A1F36",margin:0},children:"Vagas recentes"}),r.jsx(ut,{to:"/app/vagas",style:{fontSize:12,fontWeight:600,color:"#6C24F5",textDecoration:"none"},children:"Ver todas →"})]}),r.jsx("div",{style:{padding:"18px 20px"},children:l?r.jsx("p",{style:{color:"#697386",fontSize:13,margin:0},children:"Carregando..."}):a.length===0?r.jsxs("div",{style:{textAlign:"center",padding:"16px 0",color:"#697386"},children:[r.jsx(On,{size:24,style:{margin:"0 auto 8px",opacity:.5}}),r.jsx("p",{style:{fontSize:13,margin:0},children:"Nenhuma vaga criada ainda"}),r.jsx("button",{onClick:()=>n("/app/vagas"),style:{marginTop:12,fontSize:12,fontWeight:600,color:"#FFFFFF",background:"#6C24F5",padding:"8px 16px",borderRadius:8,border:"none",cursor:"pointer"},children:"Criar primeira vaga"})]}):a.map((S,_)=>{const F=S.company_name||S.title||"V",A=String(F).split("").reduce((P,L)=>P+L.charCodeAt(0),0)%360,C=S._apps_count??S.applications_count??0,D=[S.location_city,S.location_state].filter(
906Boolean).join("/")||(S.work_format==="remoto"?"Remoto":"");return r.jsxs("div",{onClick:()=>n(`/app/vagas/${S.id}`),style:{display:"flex",alignItems:"center",gap:10,padding:"10px 0",borderTop:_>0?"1px solid #E3E8EE":"none",cursor:"pointer"},children:[r.jsx("div",{style:{width:28,height:28,borderRadius:"50%",display:"grid",placeItems:"center",color:"#fff",fontWeight:600,fontSize:10.5,background:`hsl(${A}, 55%, 50%)`,flexShrink:0},children:F[0].toUpperCase()}),r.jsxs("div",{style:{flex:1,minWidth:0,lineHeight:1.3},children:[r.jsx("div",{style:{fontSize:13,fontWeight:550,color:"#1A1F36",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S.title}),r.jsxs("div",{style:{fontSize:11.5,color:"#A3ACB9"},children:[S.is_confidential?"Empresa Confidencial":S.company_name||"—",D?` · ${D}`:"",` · ${C} candidatura${C!==1?"s":""}`]})]}),r.jsx("span",{style:{fontSize:11,fontWeight:600,padding:"3px 8px",borderRadius:20,background:S.status==="published"?"#E6F7EF":"#F0F2F5",color:S.status==="published"?"#1EA672":"#697386",whiteSpace:"nowrap"},children:S.status==="published"?"Aberta":S.status==="draft"?"Rascunho":S.status==="paused"?"Em pausa":"Encerrada"})]},S.id)})})]}),r.jsxs("div",{style:{background:"#FFFFFF",border:"1px solid #E3E8EE",borderRadius:12,boxShadow:"0 1px 3px rgba(0,0,0,0.04)",alignSelf:"start"},children:[r.jsx("div",{style:{padding:"18px 20px 0"},children:r.jsx("h3",{style:{fontSize:16,fontWeight:600,letterSpacing:"-0.02em",color:"#1A1F36",margin:0},children:"Acesso rápido"})}),r.jsx("div",{style:{padding:"18px 20px"},children:[{icon:"Briefcase",label:"Vagas",to:"/app/vagas",show:!0},{icon:"CheckCircle",label:"Avaliações",to:"/app/assessments",show:w},{icon:"Calendar",label:"Agenda",to:"/app/agenda",show:x},{icon:"Users",label:"Configurações",to:"/app/conta",show:!0}].filter(S=>S.show!==!1).map((S,_)=>{const F=y[S.icon];return r.jsxs(ut,{to:S.to,style:{display:"flex",alignItems:"center",gap:10,padding:"10px 8px",margin:"0 -8px",borderTop:_>0?"1px solid #E3E8EE":"none",textDecoration:"none",color:"inherit",cursor:"pointer",borderRadius:6,transition:"background 0.08s"},onMouseEnter:A=>{A.currentTarget.style.background="#F0F2F5"},onMouseLeave:A=>{A.currentTarget.style.background="transparent"},children:[F&&r.jsx(F,{size:16,style:{color:"#A3ACB9",flexShrink:0}}),r.jsx("span",{style:{flex:1,fontSize:13,fontWeight:550,color:"#1A1F36"},children:S.label}),r.jsx(Qr,{size:14,style:{color:"#A3ACB9",flexShrink:0}})]},S.to)})})]})]})]})}const dke=[{grupo:"Educação",items:[["Education Management","Gestão educacional"],["E-Learning","Ensino a distância"],["Higher Education","Ensino superior"],["Primary/Secondary Education","Educação básica"],["Research","Pesquisa"]]},{grupo:"Construção",items:[["Building Materials","Materiais de construção"],["Civil Engineering","Engenharia civil"],["Construction","Construção"],["Architecture & Planning","Arquitetura e urbanismo"],["Design","Design"]]},{grupo:"Serviços corporativos",items:[["Accounting","Contabilidade"],["Business Supplies & Equipment","Suprimentos e equipamentos"],["Environmental Services","Serviços ambientais"],["Events Services","Eventos"],["Executive Office","Escritório executivo"],["Facilities Services","Facilities"],["Human Resources","Recursos humanos"],["Information Services","Serviços de informação"],["Management Consulting","Consultoria empresarial"],["Outsourcing/Offshoring","Terceirização"],["Professional Training & Coaching","Treinamento e desenvolvimento"],["Security & Investigations","Segurança e investigação"],["Staffing & Recruiting","Recrutamento e seleção"]]},{grupo:"Varejo",items:[["Retail","Varejo"],["Supermarkets","Supermercados"],["Wholesale","Atacado"]]},{grupo:"Energia e mineração",items:[["Mining & Metals","Mineração e metalurgia"],["Oil & Energy","Petróleo e energia"],["Utilities","Serviços públicos (utilities)"]]},{grupo:"Indústria",items:[["Automotive","Automotivo"],["Aviation & Aerospace","Aviação e aeroespacial"],["Chemicals","Química"],["Defense & Space","Defesa e espaço"],["Electrical & Electronic Manufacturing","Elétrica e eletrônica"],["Food Production","Produção de alimentos"],["Glass, Ceramics & Concrete","Vidro, cerâmica e concreto"],["Industrial Automation","Automação industrial"],["Machinery","Máquinas e equipamentos"],["Mechanical or Industrial Engineering","Engenharia mecânica e industrial"],["Packaging & Containers","Embalagens"],["Pa
906per & Forest Products","Papel e celulose"],["Plastics","Plásticos"],["Railroad Manufacture","Material ferroviário"],["Renewables & Environment","Energias renováveis e meio ambiente"],["Shipbuilding","Construção naval"],["Textiles","Têxtil"]]},{grupo:"Financeiro",items:[["Banking","Bancos"],["Capital Markets","Mercado de capitais"],["Financial Services","Serviços financeiros"],["Insurance","Seguros"],["Investment Banking","Banco de investimento"],["Investment Management","Gestão de investimentos"],["Venture Capital & Private Equity","Venture capital e private equity"]]},{grupo:"Lazer e turismo",items:[["Airlines/Aviation","Companhias aéreas"],["Gambling & Casinos","Apostas e cassinos"],["Hospitality","Hotelaria"],["Leisure, Travel & Tourism","Lazer, viagens e turismo"],["Restaurants","Restaurantes"],["Recreational Facilities & Services","Clubes e recreação"],["Sports","Esportes"]]},{grupo:"Artes",items:[["Arts & Crafts","Artesanato"],["Fine Art","Belas artes"],["Performing Arts","Artes cênicas"],["Photography","Fotografia"]]},{grupo:"Saúde",items:[["Biotechnology","Biotecnologia"],["Hospital & Health Care","Hospitais e saúde"],["Medical Device","Dispositivos médicos"],["Medical Practice","Clínicas e consultórios"],["Mental Health Care","Saúde mental"],["Pharmaceuticals","Farmacêutica"],["Veterinary","Veterinária"]]},{grupo:"Hardware e redes",items:[["Computer Hardware","Hardware"],["Computer Networking","Redes"],["Nanotechnology","Nanotecnologia"],["Semiconductors","Semicondutores"],["Telecommunications","Telecomunicações"],["Wireless","Wireless"]]},{grupo:"Imobiliário",items:[["Commercial Real Estate","Imobiliário comercial"],["Real Estate","Imobiliário"]]},{grupo:"Jurídico",items:[["Alternative Dispute Resolution","Mediação e arbitragem"],["Law Practice","Advocacia"],["Legal Services","Serviços jurídicos"]]},{grupo:"Bens de consumo",items:[["Apparel & Fashion","Moda e vestuário"],["Consumer Electronics","Eletrônicos de consumo"],["Consumer Goods","Bens de consumo"],["Consumer Services","Serviços ao consumidor"],["Cosmetics","Cosméticos"],["Food & Beverages","Alimentos e bebidas"],["Furniture","Móveis"],["Luxury Goods & Jewelry","Luxo e joalheria"],["Sporting Goods","Artigos esportivos"],["Tobacco","Tabaco"],["Wine and Spirits","Vinhos e destilados"]]},{grupo:"Agropecuária",items:[["Dairy","Laticínios"],["Farming","Agricultura"],["Fishery","Pesca"],["Ranching","Pecuária"]]},{grupo:"Mídia e comunicação",items:[["Market Research","Pesquisa de mercado"],["Marketing & Advertising","Marketing e publicidade"],["Newspapers","Jornais"],["Online Media","Mídia online"],["Printing","Gráfica"],["Public Relations & Communications","Relações públicas"],["Publishing","Editorial"],["Translation & Localization","Tradução e localização"],["Writing & Editing","Redação e edição"]]},{grupo:"Terceiro setor",items:[["Civic & Social Organization","Organização civil e social"],["Fundraising","Captação de recursos"],["Individual & Family Services","Serviços a indivíduos e famílias"],["International Trade & Development","Comércio e desenvolvimento internacional"],["Libraries","Bibliotecas"],["Museums & Institutions","Museus e instituições"],["Non-Profit Organization Management","Gestão de ONGs"],["Philanthropy","Filantropia"],["Program Development","Desenvolvimento de programas"],["Religious Institutions","Instituições religiosas"],["Think Tanks","Think tanks"]]},{grupo:"Software e TI",items:[["Computer & Network Security","Segurança da informação"],["Computer Software","Software"],["Information Technology & Services","Tecnologia da informação"],["Internet","Internet"]]},{grupo:"Transporte e logística",items:[["Import & Export","Importação e exportação"],["Logistics & Supply Chain","Logística e supply chain"],["Maritime","Marítimo"],["Package/Freight Delivery","Entregas e encomendas"],["Transportation/Trucking/Railroad","Transporte rodoviário e ferroviário"],["Warehousing","Armazenagem"]]},{grupo:"Entretenimento",items:[["Animation","Animação"],["Broadcast Media","Rádio e TV"],["Computer Games","Jogos"],["Entertainment","Entretenimento"],["Media Production","Produção de mídia"],["Mobile Games","Jogos mobile"],["Motion Pictures & Film","Cinema"],["Music","Música"]]},{grupo:"Bem-estar",items:[["Alternative Medicine","Medicina alternativa"],["Health, Wellness & Fitness","Saúde, bem-estar e fitness"]]},{grupo:"Segurança pública",items:[["Law Enforcement","Polícia"],["Military","Forças armadas"],["Public Safety","Segurança pública"]]},{grupo:"Administração pública",items:[["Government Administration","Administração pública"],["Government Relations","Relações governamentais"],["International Affairs","Relações internacionais"],["Judiciary","Judiciário"],["Legislative Office","Legislativo"],["Political Organization","Organização política"],["Public Policy","Políticas públicas"]]}],ff=dke.flatMap(e=>e.items.map(([t,n])=>({value:t,label:n})));function uke(e){if(!e)return null;const t=String(e).trim().toLowerCase(),n=ff.find(s=>
906s.value.toLowerCase()===t);return n?n.value:String(e).trim()}function rN(e){if(!e)return"";const t=String(e).trim().toLowerCase(),n=ff.find(s=>s.value.toLowerCase()===t);return n?n.label:String(e).trim()}const Kr={brand:"#6C24F5",brandSoft:"#EFEEFF",ink:"#0A2540",ink2:"#425466",ink3:"#697386",line:"#E6E8EB",paper:"#FFFFFF"},We={page:{minHeight:"100vh",background:"#ffffff",display:"flex",flexDirection:"column",fontFamily:"'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},topbar:{padding:"1.25rem 2rem",borderBottom:"1px solid #f0f0f0",display:"flex",alignItems:"center"},logo:{height:28,objectFit:"contain"},body:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:"3rem 1.5rem"},wrap:{width:"100%",maxWidth:480},wrapWide:{width:"100%",maxWidth:560},steps:{display:"flex",alignItems:"center",gap:8,marginBottom:"2.5rem"},stepDot:{width:8,height:8,borderRadius:"50%",background:"#e5e7eb",transition:"background 0.2s"},stepDotActive:{background:"#111827"},stepDotDone:{background:"#111827"},eyebrow:{fontSize:12,fontWeight:500,letterSpacing:"0.08em",textTransform:"uppercase",color:"#9ca3af",marginBottom:10},title:{fontSize:28,fontWeight:700,color:Kr.ink,marginBottom:8,letterSpacing:"-0.025em",lineHeight:1.2},subtitle:{fontSize:15,color:Kr.ink2,lineHeight:1.6,marginBottom:"2rem"},fieldGroup:{marginBottom:"1.25rem"},label:{display:"block",fontSize:13,fontWeight:500,color:"#374151",marginBottom:6},input:{width:"100%",padding:"10px 14px",border:"1px solid #e5e7eb",borderRadius:8,fontSize:14,color:"#111827",outline:"none",background:"#fff",transition:"border-color 0.15s",boxSizing:"border-box"},btnPrimary:{width:"100%",padding:"12px 24px",background:Kr.ink,color:"#fff",border:"none",borderRadius:8,fontSize:15,fontWeight:600,cursor:"pointer",marginTop:"1.5rem",letterSpacing:"-0.01em",transition:"opacity 0.15s"},btnSecondary:{width:"100%",padding:"12px 24px",background:"none",color:"#6b7280",border:"none",borderRadius:8,fontSize:14,cursor:"pointer",marginTop:8},avatarWrap:{display:"flex",alignItems:"center",gap:16,marginBottom:"1.5rem"},avatarCircle:{width:64,height:64,borderRadius:"50%",background:"#f3f4f6",border:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:22,color:"#9ca3af",overflow:"hidden",flexShrink:0,cursor:"pointer"},avatarImg:{width:"100%",height:"100%",objectFit:"cover"},avatarLabel:{fontSize:13,color:"#6b7280",lineHeight:1.5},avatarBtn:{fontSize:13,fontWeight:500,color:"#111827",background:"none",border:"1px solid #e5e7eb",borderRadius:6,padding:"6px 14px",cursor:"pointer",marginTop:6},successIcon:{width:56,height:56,borderRadius:14,background:"#f0fdf4",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"1.5rem"},quickList:{background:"#f9fafb",border:"1px solid #f0f0f0",borderRadius:10,padding:"1.25rem 1.5rem",marginBottom:"1.5rem"},quickItem:{display:"flex",alignItems:"center",gap:12,padding:"8px 0",fontSize:14,color:"#374151"},quickNum:{width:22,height:22,borderRadius:"50%",background:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:600,color:"#6b7280",flexShrink:0},moduleGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))",gap:16,marginTop:24,marginBottom:8},moduleCard:{border:`1px solid ${Kr.line}`,borderRadius:10,padding:"18px 16px",background:Kr.paper,transition:"all 200ms ease",position:"relative",minHeight:240,display:"flex",flexDirection:"column"},moduleCardSelected:{background:"#0A1628",borderColor:"#0A1628"},moduleHeader:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:10,flex:1},moduleIcon:{width:40,height:40,borderRadius:10,background:Kr.brandSoft,color:Kr.brand,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},moduleIconSelected:{background:"rgba(0, 230, 118, 0.15)",color:"#00E676"},moduleBody:{flex:1,minWidth:0,width:"100%"},moduleTitle:{fontSize:15,fontWeight:600,color:Kr.ink,marginBottom:4,letterSpacing:"-0.01em"},moduleTitleSelected:{color:"#FFFFFF"},moduleDesc:{fontSize:12.5,color:Kr.ink2,lineHeight:1.45,marginBottom:6},moduleDescSelected:{color:"rgba(255,255,255,0.7)"},moduleAux:{fontSize:11.5,color:Kr.ink3,marginTop:4},moduleAuxSelected:{color:"rgba(255,255,255,0.65)"},moduleFooter:{marginTop:12,width:"100%"},checkbox:{width:20,height:20,borderRadius:6,border:`1.5px solid ${Kr.line}`,background:Kr.paper,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",flexShrink:0,transition:"all 200ms ease"},checkboxChecked:{background:"#00E676",borderColor:"#00E676"},checkboxDisabled:{cursor:"not-allowed",opacity:.85},notifyLabel:{fontSize:12.5,fontWeight:500,color:Kr.ink2},notifyLabelSelected:{color:"#FFFFFF"},errorMsg:{fontSize:13,color:"#dc2626",marginTop:12}};function fke(){const e=In(),{user:t,isLoadingAuth:n}=tr(),[s,i]=g.useState(1),[a,o]=g.useState(!1),[l,c]=g.useState(""),[d,u]=g.useState(""),[p,m]=g.useState(""),[x,w]=g.useState(null),[y,v]=g.useState(null),[j,k]=g.useState("entrada"),[S,_]=g.useState(""),[F,A]=g.useState(""),[C,D]=g.useState(""),[P,L]=g.useState(""),[T,R]=g.useState(""),[U,I]=g.useState(""),[H,V]=g.useState(!1),[X,N]=g.useState(""),[W,O]=g.useState(!1),[G,M]=g.useState(!1),[z,K]=g.useState((t==null?void 0:t.full_name)||""),[Y,J]=g.useState(""),[Q,ie]=g.useState(null),[ae,re]=g.useState(null),[pe,Z]=g.useState("manual"),[Ne,te]=g.useState(null),[xe,he]=g.useState(!1),[le,ge]=g.useState(!1),[$e,ft]=g.useState(""),[Qe,Ve]=g.useState(""),ze=Se=>{u(Se.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/--+/g,"-"))},at=Se=>{c(Se),ze(Se)},Nt=Se=>{const et=Se.target.files[0];if(!et)return;w(et);const bt=new FileReader;bt.onload=Ot=>
906v(Ot.target.result),bt.readAsDataURL(et)},_e=Se=>{const et=Se.target.files[0];if(!et)return;ie(et);const bt=new FileReader;bt.onload=Ot=>re(Ot.target.result),bt.readAsDataURL(et)},be=async()=>{const Se=S.trim();if(!Se){N("Cole a URL do LinkedIn da empresa.");return}V(!0),N("");try{const et=await ne.functions.invoke("enrichCompanyFromApollo",{linkedin_url:Se}),bt=(et==null?void 0:et.data)||et;if(!(bt!=null&&bt.success)||!(bt!=null&&bt.data)){N((bt==null?void 0:bt.message)||"Nao encontramos essa empresa."),V(!1);return}const Ot=bt.data;Ot.name&&c(Ot.name),Ot.name&&ze(Ot.name),Ot.website_url&&m(Ot.website_url.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")),Ot.industry&&A(uke(Ot.industry)),Ot.short_description&&D(Ot.short_description),Ot.city&&L(Ot.city),Ot.phone&&R(Ot.phone),Ot.logo_url&&v(Ot.logo_url),k("revisao")}catch(et){N((et==null?void 0:et.message)||"Erro ao buscar empresa.")}finally{V(!1)}},Re=async()=>{const Se=U.replace(/\D/g,"");if(Se.length===14){O(!0);try{const bt=await(await fetch("https://brasilapi.com.br/api/cnpj/v1/"+Se)).json();bt.razao_social&&c(Ot=>Ot||bt.razao_social),bt.nome_fantasia&&c(Ot=>Ot||bt.nome_fantasia),bt.nome_fantasia&&ze(bt.nome_fantasia),bt.municipio&&L(bt.municipio),bt.ddd_telefone_1&&R(bt.ddd_telefone_1),M(!0)}catch(et){console.error("CNPJ lookup error:",et)}finally{O(!1)}}},Xe=async()=>{var Se,et,bt,Ot;if(l.trim()){o(!0),Ve("");try{let sn=null;if(x){const nr=await ne.integrations.Core.UploadFile({file:x});sn=(nr==null?void 0:nr.file_url)||(nr==null?void 0:nr.url)||null}const Vt=await ne.functions.invoke("createWorkspace",{name:l.trim(),slug:d||l.toLowerCase().replace(/\s+/g,"-"),logo_url:sn||(y&&!x?y:""),site:p,setor:F,description:C,endereco_municipio:P,telefone:T,cnpj:U.replace(/\D/g,"").length===14?U:""}),Un=(Se=Vt==null?void 0:Vt.data)==null?void 0:Se.workspace;if(!(Un!=null&&Un.id))throw new Error(((et=Vt==null?void 0:Vt.data)==null?void 0:et.error)||"Não foi possível criar o workspace.");te(Un),typeof window.gtag=="function"&&window.gtag("event","conversion",{send_to:"AW-16550056688/c-3yCNTj4KAcEPCl19M9",value:1,currency:"BRL"}),i(2)}catch(sn){console.error("Erro no handleStep1:",sn),Ve(((Ot=(bt=sn==null?void 0:sn.response)==null?void 0:bt.data)==null?void 0:Ot.error)||(sn==null?void 0:sn.message)||"Não foi possível criar o workspace. Tente novamente.")}finally{o(!1)}}},He=async()=>{o(!0);try{let Se=null;if(Q)try{const bt=await ne.integrations.Core.UploadFile({file:Q});Se=(bt==null?void 0:bt.file_url)||(bt==null?void 0:bt.url)||null}catch(bt){console.error("Erro no upload da foto:",bt)}const et={};z.trim()&&(et.name=z.trim()),Y.trim()&&(et.job_title=Y.trim()),Se&&(et.photo_url=Se),ae&&!Q&&(et.photo_url=ae),Object.keys(et).length>0&&await ne.auth.updateMe(et);try{Ne!=null&&Ne.id&&z.trim()&&await ne.functions.invoke("updateMemberProfile",{workspace_id:Ne.id,full_name:z.trim()})}catch(bt){console.error("Erro ao atualizar Membership.full_name:",bt)}i(3)}catch(Se){console.error("Erro no handleStep2:",Se),i(3)}finally{o(!1)}},St=async()=>{var et,bt,Ot,sn;if(a)return;o(!0),ft("");const Se=Ne==null?void 0:Ne.id;try{if(Se&&(xe===!0||le===!0)){const Vt=await ne.functions.invoke("addModulesToWorkspace",{workspace_id:Se,assessments:xe===!0,ats:le===!0});if(!((et=Vt==null?void 0:Vt.data)!=null&&et.success))throw new Error(((bt=Vt==null?void 0:Vt.data)==null?void 0:bt.error)||"Erro ao ativar módulos.")}i(4)}catch(Vt){console.error("handleStep3 error:",Vt),ft(((sn=(Ot=Vt==null?void 0:Vt.response)==null?void 0:Ot.data)==null?void 0:sn.error)||(Vt==null?void 0:Vt.message)||"Erro ao processar seleção. Tente novamente.")}finally{o(!1)}},Ct=()=>{e("/app")};return r.jsxs("div",{style:We.page,children:[r.jsx("div",{style:We.topbar,children:r.jsx("img",{src:"https://i.imgur.com/MVgsUJ5.png",alt:"Summit Inc.",style:We.logo})}),r.jsx("div",{style:We.body,children:r.jsxs("div",{style:s===3?We.wrapWide:We.wrap,children:[s<4&&r.jsx("div",{style:We.steps,children:[1,2,3].map(Se=>r.jsx("div",{style:{...We.stepDot,...s===Se?We.stepDotActive:s>Se?We.stepDotDone:{}}},Se))}),s===1&&j==="entrada"&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:We.eyebrow,children:"Passo 1 de 3"}),r.jsx("div",{style:We.title,children:"Vamos criar sua empresa"}),r.jsx("div",{style:We.subtitle,children:"Cole o LinkedIn da empresa. A gente monta o cadastro e voce so confere."}),r.jsxs("div",{style:We.fieldGroup,children:[r.jsx("label",{style:We.label,children:"LinkedIn da empresa"}),r.jsx("input",{style:We.input,placeholder:"linkedin.com/company/sua-empresa",value:S,onChange:Se=>_(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"})]}),X&&r.jsx("div",{style:{color:"#CD3D64",fontSize:13,marginBottom:12},children:X}),r.jsx("button",{style:{...We.btnPrimary,opacity:!S.trim()||H?.5:1}
906,onClick:be,disabled:!S.trim()||H,children:H?"Buscando...":"Buscar dados da empresa"}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,margin:"1.5rem 0"},children:[r.jsx("div",{style:{flex:1,height:"0.5px",background:"#e5e7eb"}}),r.jsx("span",{style:{fontSize:12,color:"#9ca3af"},children:"ou"}),r.jsx("div",{style:{flex:1,height:"0.5px",background:"#e5e7eb"}})]}),r.jsx("button",{style:We.btnSecondary,onClick:()=>k("manual"),children:"Preencher manualmente"})]}),s===1&&j==="revisao"&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:We.eyebrow,children:"Passo 1 de 3"}),r.jsx("div",{style:We.title,children:"Achamos sua empresa"}),r.jsx("div",{style:We.subtitle,children:"Confira e ajuste o que precisar."}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:"1.5rem",paddingBottom:"1.5rem",borderBottom:"1px solid #e5e7eb"},children:[r.jsx("div",{style:{width:56,height:56,borderRadius:10,background:"#f3f4f6",border:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",flexShrink:0},children:y?r.jsx("img",{src:y,alt:"logo",style:{width:"100%",height:"100%",objectFit:"contain"}}):r.jsx("span",{style:{fontSize:22,color:"#9ca3af"},children:"+"})}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:13,color:"#6b7280",lineHeight:1.5},children:"Logo vindo do LinkedIn"}),r.jsx("button",{style:We.avatarBtn,onClick:()=>document.getElementById("logo-input").click(),children:"Trocar"}),r.jsx("input",{id:"logo-input",type:"file",accept:"image/*",style:{display:"none"},onChange:Nt})]})]}),r.jsxs("div",{style:We.fieldGroup,children:[r.jsx("label",{style:We.label,children:"Nome da empresa"}),r.jsx("input",{style:We.input,value:l,onChange:Se=>at(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,marginBottom:"1rem"},children:[r.jsxs("div",{children:[r.jsx("label",{style:We.label,children:"Site"}),r.jsx("input",{style:We.input,value:p,onChange:Se=>m(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"})]}),r.jsxs("div",{children:[r.jsx("label",{style:We.label,children:"Setor"}),r.jsx("input",{style:We.input,list:"setores-list",value:rN(F)||F,onChange:Se=>{const et=ff.find(bt=>bt.label===Se.target.value);A(et?et.value:Se.target.value)},onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"}),r.jsx("datalist",{id:"setores-list",children:ff.map(Se=>r.jsx("option",{value:Se.label},Se.value))})]})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,marginBottom:"1.5rem"},children:[r.jsxs("div",{children:[r.jsx("label",{style:We.label,children:"Cidade"}),r.jsx("input",{style:We.input,value:P,onChange:Se=>L(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"})]}),r.jsxs("div",{children:[r.jsx("label",{style:We.label,children:"Telefone"}),r.jsx("input",{style:We.input,value:T,onChange:Se=>R(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"})]})]}),r.jsxs("div",{style:{background:"#f9fafb",borderRadius:8,padding:16,marginBottom:"1.5rem"},children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,marginBottom:4},children:"Completar com o CNPJ?"}),r.jsx("div",{style:{fontSize:13,color:"#697386",marginBottom:12,lineHeight:1.6},children:"Crie o perfil da sua empresa com os dados do CNPJ e simplifique seu cadastro financeiro — emissao de notas fiscais, por exemplo."}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("input",{style:{...We.input,flex:1},placeholder:"00.000.000/0001-00",value:U,onChange:Se=>M(!1)||I(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"}),r.jsx("button",{style:{...We.avatarBtn,whiteSpace:"nowrap",opacity:W?.5:1},onClick:Re,disabled:W,children:W?"...":"Buscar"})]}),G&&r.jsx("div",{style:{fontSize:12,color:"#1B8E5A",marginTop:8},children:"Dados do CNPJ preenchidos."}),r.jsx("div",{style:{fontSize:12,color:"#9ca3af",marginTop:8},children:"Prefere depois? E so preencher em Configuracoes quando quiser."})]}),r.jsx("button",{style:{...We.btnPrimary,opacity:!l.trim()||a?.5:1},onClick:Xe,disabled:!l.trim()||a,children:a?"Criando...":"Criar workspace"}),Qe&&r.jsx("div",{style:We.errorMsg,children:Qe}),r.jsx("button",{style:We.btnSecondary,onClick:()=>{k("entrada"),N("")},children:"Nao e essa empresa? Preencher manualmente"})]}),s===1&&j==="manual"&&r.jsxs(r.Fragment,{children:[r.jsx("button",{style:{...We.btnSecondary,textAlign:"left",padding:0,marginBottom:"1.25rem"},onClick:()=>k("entrada"),children:"← Voltar"}),r.jsx("div",{style:We.eyebrow,children:"Passo 1 de 3"}),r.jsx("div",{style:We.title,children:"Dados da empresa"}),r.jsx("div",{style:We.subtitle,children:"Preencha o que souber. Da para ajustar depois."}),r.jsxs("div",{style:{background:"#f9fafb",borderRadius:8,padding:16,marginBottom:"1.5rem"},children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,marginBottom:4},children:"Tem o CNPJ a mao?"}),r.jsx("div",{style:{fontSize:13,color:"#697386",marginBottom:12,lineHeight:1.6},children:"Crie o perfil da sua empresa com os dados do CNPJ e simplifique seu cadastro financeiro — emissao de notas fiscais, por exemplo."}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("input",{style:{...We.input,flex:1},placeholder:"00.000.000/0001-00",value:U,onChange:Se=>M(!1)||I(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"}
906),r.jsx("button",{style:{...We.avatarBtn,whiteSpace:"nowrap",opacity:W?.5:1},onClick:Re,disabled:W,children:W?"...":"Buscar"})]}),G&&r.jsx("div",{style:{fontSize:12,color:"#1B8E5A",marginTop:8},children:"Dados do CNPJ preenchidos."}),r.jsx("div",{style:{fontSize:12,color:"#9ca3af",marginTop:8},children:"Prefere depois? E so seguir preenchendo abaixo."})]}),r.jsxs("div",{style:We.fieldGroup,children:[r.jsx("label",{style:We.label,children:"Nome da empresa"}),r.jsx("input",{style:We.input,placeholder:"Integrha",value:l,onChange:Se=>at(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,marginBottom:"1rem"},children:[r.jsxs("div",{children:[r.jsx("label",{style:We.label,children:"Site"}),r.jsx("input",{style:We.input,placeholder:"integrha.com.br",value:p,onChange:Se=>m(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"})]}),r.jsxs("div",{children:[r.jsx("label",{style:We.label,children:"Setor"}),r.jsx("input",{style:We.input,list:"setores-list-manual",value:rN(F)||F,onChange:Se=>{const et=ff.find(bt=>bt.label===Se.target.value);A(et?et.value:Se.target.value)},onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"}),r.jsx("datalist",{id:"setores-list-manual",children:ff.map(Se=>r.jsx("option",{value:Se.label},Se.value))})]})]}),r.jsxs("div",{style:We.fieldGroup,children:[r.jsxs("label",{style:We.label,children:["Logo da empresa ",r.jsx("span",{style:{color:"#9ca3af",fontWeight:400},children:"(opcional)"})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14},children:[r.jsx("div",{style:{width:56,height:56,borderRadius:10,background:"#f3f4f6",border:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",cursor:"pointer",flexShrink:0},onClick:()=>document.getElementById("logo-input").click(),children:y?r.jsx("img",{src:y,alt:"logo",style:{width:"100%",height:"100%",objectFit:"contain"}}):r.jsx("span",{style:{fontSize:22,color:"#9ca3af"},children:"+"})}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:13,color:"#6b7280",lineHeight:1.5},children:"JPG ou PNG, ate 2MB."}),r.jsx("button",{style:We.avatarBtn,onClick:()=>document.getElementById("logo-input").click(),children:y?"Trocar logo":"Adicionar logo"})]}),r.jsx("input",{id:"logo-input",type:"file",accept:"image/*",style:{display:"none"},onChange:Nt})]})]}),r.jsx("button",{style:{...We.btnPrimary,opacity:!l.trim()||a?.5:1},onClick:Xe,disabled:!l.trim()||a,children:a?"Criando...":"Criar workspace"}),Qe&&r.jsx("div",{style:We.errorMsg,children:Qe})]}),s===2&&pe==="manual"&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:We.eyebrow,children:"Passo 2 de 3"}),r.jsx("div",{style:We.title,children:"Seu perfil"}),r.jsx("div",{style:We.subtitle,children:"Preencha o que souber. Da para ajustar depois."}),r.jsxs("div",{style:We.avatarWrap,children:[r.jsx("div",{style:We.avatarCircle,onClick:()=>document.getElementById("avatar-input").click(),children:ae?r.jsx("img",{src:ae,alt:"avatar",style:We.avatarImg}):r.jsx("span",{style:{fontSize:28},children:"+"})}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:14,fontWeight:500,color:"#111827"},children:"Foto de perfil"}),r.jsx("div",{style:We.avatarLabel,children:"JPG ou PNG, ate 2MB. Opcional."}),r.jsx("button",{style:We.avatarBtn,onClick:()=>document.getElementById("avatar-input").click(),children:ae?"Trocar foto":"Adicionar foto"})]}),r.jsx("input",{id:"avatar-input",type:"file",accept:"image/*",style:{display:"none"},onChange:_e})]}),r.jsxs("div",{style:We.fieldGroup,children:[r.jsx("label",{style:We.label,children:"Nome completo"}),r.jsx("input",{style:We.input,placeholder:"Ana Silva",value:z,onChange:Se=>K(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"})]}),r.jsxs("div",{style:We.fieldGroup,children:[r.jsx("label",{style:We.label,children:"Cargo"}),r.jsx("input",{style:We.input,placeholder:"Gerente de RH",value:Y,onChange:Se=>J(Se.target.value),onFocus:Se=>Se.target.style.borderColor="#111827",onBlur:Se=>Se.target.style.borderColor="#e5e7eb"})]}),r.jsx("button",{style:{...We.btnPrimary,opacity:a?.5:1},onClick:He,disabled:a,children:a?"Salvando...":"Continuar"})]}),s===3&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:We.eyebrow,children:"Passo 3 de 3"}),r.jsx("div",{style:We.title,children:"Quais modulos voce quer usar?"}),r.jsx("div",{style:We.subtitle,children:"Da para adicionar mais depois."}),r.jsxs("div",{style:We.moduleGrid,children:[r.jsxs("div",{style:{...We.moduleCard,...We.moduleCardSelected},children:[r.jsxs("div",{style:We.moduleHeader,children:[r.jsx("div",{style:{...We.moduleIcon,...We.moduleIconSelected},children:r.jsx(On,{size:20,"aria-hidden":"true"})}),r.jsxs("div",{style:We.moduleBody,children:[r.jsx("div",{style:{...We.moduleTitle,...We.moduleTitleSelected},children:"Summit Jobs"}),r.jsx("div",{style:{...We.moduleDesc,...We.moduleDescSelected},children:"Publique vagas e gerencie candidaturas"}),r.jsx("div",{style:{...We.moduleAux,...We.moduleAuxSelected},children:"Plano Free ativado automaticamente"})]})]}),r.jsx("div",{style:We.moduleFooter,children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("div",{style:{...We.checkbox,...We.checkboxChecked,...We.checkboxDisabled},"aria-label":"Jobs (sempre ativo)",children:r.jsx(fn,{size:14,color:"#FFFFFF",strokeWidth:3,"aria-hidden":"true"})}),r.jsx("span",{style:{...We.notifyLabel,...We.notifyLabelSelected},children:"Incluido"})]})})]}),r.jsxs("div",{style:{...We.moduleCard,...le?We.moduleCardSelected:{},cursor:"pointer"},onClick:()=>ge(Se=>!Se),role:"button","aria-pressed":le,"aria-label":"Selecionar ATS",children:[r.jsxs("div",{style:We.moduleHeader,children:[r.jsx("div",{style:{...We.moduleIcon,...le?We.moduleIconSelected:{}},children:r.jsx(eH,{size:20,"aria-hidden":"true"})}),r.jsxs("div",{style:We.moduleBody,children:[r.jsx("div",{style:{...We.moduleTitle,...le?We.moduleTitleSelected:{}},children:"Summit ATS"}),r.jsx("div",{style:{...We.moduleDesc,...le?We.moduleDescSelected:{}},children:"Gerencie processos seletivos com agilidade"}),r.jsx("div",{style:{...We.moduleAux,...le?We.moduleAuxSelected:{}},children:"Comece gratis"})]})]}),r.jsx("div",{style:We.moduleFooter,children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("div",{style:{...We.checkbox,...le?We.checkboxChecked:{}},children:le&&r.jsx(fn,{size:14,color:"#FFFFFF",strokeWidth:3,"aria-hidden":"true"})}),r.jsx("span",{style:{...We.notifyLabel,...le?We.notifyLabelSelected:{}},children:le?"Selecionado":"Selecionar"})]})})]}),r.jsxs("div",{style:{...We.moduleCard,...xe?We.moduleCardSelected:{},cursor:"pointer"},onClick:()=>he(Se=>!Se),role:"button","aria-pressed":xe,"aria-label":"Selecionar Assessments",children:[r.jsxs("div",{style:We.moduleHeader,children:[r.jsx("div",{style:{...We.moduleIcon,...xe?We.moduleIconSelected:{}},children:r.jsx(ts,{size:20,"aria-hidden":"true"})}),r.jsxs("div",{style:We.moduleBody,children:[r.jsx("div",{style:{...We.moduleTitle,...xe?We.moduleTitleSelected:{}},children:"Summit Assessments"}),r.jsx("div",{style:{...We.moduleDesc,...xe?We.moduleDescSelected:{}}
906,children:"Avalie candidatos com testes cientificos validados"}),r.jsx("div",{style:{...We.moduleAux,...xe?We.moduleAuxSelected:{}},children:"Comecar gratis: 30 creditos/mes"})]})]}),r.jsx("div",{style:We.moduleFooter,children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("div",{style:{...We.checkbox,...xe?We.checkboxChecked:{}},children:xe&&r.jsx(fn,{size:14,color:"#FFFFFF",strokeWidth:3,"aria-hidden":"true"})}),r.jsx("span",{style:{...We.notifyLabel,...xe?We.notifyLabelSelected:{}},children:xe?"Selecionado":"Selecionar"})]})})]}),r.jsxs("div",{style:{...We.moduleCard,background:Kr.brandSoft,border:"2px solid "+Kr.brand,cursor:"default"},children:[r.jsxs("div",{style:We.moduleHeader,children:[r.jsx("div",{style:{...We.moduleIcon,background:Kr.brand,color:"#FFFFFF"},children:r.jsx(aq,{size:20,"aria-hidden":"true"})}),r.jsxs("div",{style:We.moduleBody,children:[r.jsx("div",{style:{...We.moduleTitle,color:Kr.brand},children:"Summit Talent"}),r.jsx("div",{style:{...We.moduleDesc},children:"Encontre candidatos pre-qualificados"})]})]}),r.jsx("div",{style:We.moduleFooter,children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:Kr.brand},children:[r.jsx(w8,{size:18,"aria-hidden":"true"}),r.jsx("span",{style:{fontSize:12,fontWeight:500},children:"Em desenvolvimento"})]})})]})]}),$e&&r.jsx("div",{style:We.errorMsg,children:$e}),r.jsx("button",{style:{...We.btnPrimary,opacity:a?.5:1},onClick:St,disabled:a,children:a?"Salvando...":"Continuar"})]}),s===4&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:We.successIcon,children:r.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:r.jsx("path",{d:"M20 6L9 17L4 12",stroke:"#16a34a",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),r.jsxs("div",{style:We.title,children:["Tudo pronto, ",(z||(t==null?void 0:t.name)||"").split(" ")[0]||"bem-vindo","!"]}),r.jsx("div",{style:We.subtitle,children:"Seu workspace esta configurado. Vamos direto para o painel."}),r.jsxs("div",{style:We.quickList,children:[r.jsxs("div",{style:{fontSize:13,fontWeight:600,color:"#111827",marginBottom:12,display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{children:"✦"})," Inicio rapido"]}),["Publique sua primeira vaga","Importe seus candidatos","Convide seu time"].map((Se,et)=>r.jsxs("div",{style:We.quickItem,children:[r.jsx("div",{style:We.quickNum,children:et+1}),Se]},et))]}),r.jsx("button",{style:We.btnPrimary,onClick:Ct,children:"Entrar no Summit"})]})]})})]})}const pke=`
907@keyframes spin {
908  to { transform: rotate(360deg); }
909}
910`;function hke(){const e=In(),{user:t,isLoadingAuth:n}=tr(),[s,i]=g.useState("Aguarde, estamos fazendo verificações de segurança..."),[a,o]=g.useState(!1);return g.useEffect(()=>{if(n)return;if(!(t!=null&&t.email)){ne.auth.redirectToLogin("/app/verify");return}(async()=>{var c;try{const d=await ne.functions.invoke("acceptWorkspaceInvite",{user_email:t.email}),u=(d==null?void 0:d.data)||d;u!=null&&u.success?(i(`Tudo certo! Direcionando você para o workspace ${u.workspace_name||""}...`),setTimeout(()=>e("/app/conta/geral"),2e3)):(u==null?void 0:u.error)==="email_is_candidate"?(i(u.message),o(!0)):e("/app/onboarding")}catch(d){const u=(c=d==null?void 0:d.response)==null?void 0:c.data;(u==null?void 0:u.error)==="email_is_candidate"?(i(u.message),o(!0)):e("/app/onboarding")}})()},[t,n]),r.jsxs(r.Fragment,{children:[r.jsx("style",{children:pke}),r.jsxs("div",{style:{minHeight:"100vh",background:"#ffffff",display:"flex",flexDirection:"column",fontFamily:"'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[r.jsx("div",{style:{padding:"1.25rem 2rem",borderBottom:"1px solid #f0f0f0",display:"flex",alignItems:"center"},children:r.jsx("img",{src:"https://i.imgur.com/MVgsUJ5.png",alt:"Summit Inc.",style:{height:28,objectFit:"contain"}})}),r.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"0 1.5rem"},children:[!a&&r.jsx("div",{style:{width:32,height:32,border:"4px solid #e5e7eb",borderTopColor:"#111827",borderRadius:"50%",animation:"spin 0.8s linear infinite",marginBottom:16}}),r.jsx("p",{style:{fontSize:14,color:"#6b7280",textAlign:"center",maxWidth:320,lineHeight:1.6,margin:0},children:s})]})]})]})}const mke=[{key:"all",label:"Todos"},{key:"behavioral",label:"Comportamental"},{key:"cognitive",label:"Cognitivo"},{key:"language",label:"Idiomas"},{key:"role_specific",label:"Cargo específico"}],gke=[{key:"all",label:"Qualquer duração"}
910,{key:"short",label:"Até 10 min"},{key:"medium",label:"10–20 min"},{key:"long",label:"20+ min"}],ex={behavioral:{label:"Comportamental",dot:"bg-purple-400",badge:"bg-purple-50 text-purple-700"},cognitive:{label:"Cognitivo",dot:"bg-blue-400",badge:"bg-blue-50 text-blue-700"},language:{label:"Idiomas",dot:"bg-emerald-500",badge:"bg-emerald-50 text-emerald-700"},role_specific:{label:"Cargo específico",dot:"bg-amber-400",badge:"bg-amber-50 text-amber-700"},custom:{label:"Personalizado",dot:"bg-slate-400",badge:"bg-slate-50 text-slate-600"}},sN={behavioral:"bg-purple-50 text-purple-700 border-purple-200",cognitive:"bg-blue-50 text-blue-700 border-blue-200",language:"bg-emerald-50 text-emerald-700 border-emerald-200",role_specific:"bg-amber-50 text-amber-700 border-amber-200",custom:"bg-slate-50 text-slate-600 border-slate-200"};function xke(e,t){return t==="all"?!0:t==="short"?e<=10:t==="medium"?e>10&&e<=20:t==="long"?e>20:!0}function yke(){const[e,t]=g.useState([]),[n,s]=g.useState(!0),[i,a]=g.useState(""),[o,l]=g.useState("all"),[c,d]=g.useState("all"),[u,p]=g.useState(null),[m,x]=g.useState([]),[w,y]=g.useState(null),[v,j]=g.useState(!1),[k,S]=g.useState(1),_=10;g.useEffect(()=>{(async()=>{var X;const U=await ne.entities.AssessmentTemplate.filter({status:"published"},"-created_date");t(U),U.length>0&&p(U[0]),s(!1);const I=await ne.auth.me(),H=await ne.functions.invoke("getWorkspaceId",{user_email:I.email}),V=((X=H==null?void 0:H.data)==null?void 0:X.workspace_id)||(H==null?void 0:H.workspace_id);if(V){const N=await ne.entities.AssessmentCampaign.filter({workspace_id:V,status:"active"});x(N)}})()},[]);const F=e.filter(R=>{const U=(R.name_pt||R.name||"").toLowerCase(),I=(R.description_pt||R.description||"").toLowerCase(),H=i.toLowerCase();return!(H&&!U.includes(H)&&!I.includes(H)||o!=="all"&&R.category!==o||!xke(R.estimated_duration_minutes||0,c))});if(g.useEffect(()=>{F.length>0&&(!u||!F.find(R=>R.id===u.id))&&p(F[0])},[F]),g.useEffect(()=>{S(1)},[i,o,c]),n)return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"w-7 h-7 border-2 border-muted border-t-primary rounded-full animate-spin"})});const A=u?ex[u.category]||ex.custom:null,C=u?sN[u.category]||sN.custom:"",D=u?u.dimensions||[]:[],P=u?u.metadata||{}:{},L=u&&u.category==="behavioral",T=async R=>{var U;y(u.id);try{const H=(await ne.entities.AssessmentCampaign.filter({id:R}))[0],V=((U=H.template_ids)==null?void 0:U.length)>0?H.template_ids:H.template_id?[H.template_id]:[];V.includes(u.id)||await ne.entities.AssessmentCampaign.update(R,{template_ids:[...V,u.id],template_id:V[0]||u.id})}catch(I){console.error(I)}y(null),j(!1)};return r.jsxs("div",{children:[r.jsxs("div",{style:{background:"#FFFFFF",border:"1px solid #E3E8EE",borderRadius:10,padding:"12px 16px",display:"flex",flexDirection:"column",gap:10,marginBottom:20},children:[r.jsxs("div",{style:{position:"relative"},children:[r.jsx(Ua,{size:15,strokeWidth:1.6,style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:"#A3ACB9",pointerEvents:"none"}}),r.jsx("input",{type:"text",placeholder:"Buscar por nome ou descrição...",value:i,onChange:R=>a(R.target.value),style:{width:"100%",paddingLeft:36,paddingRight:14,paddingTop:10,paddingBottom:10,fontSize:13,fontFamily:"inherit",color:"#1A1F36",background:"#FFFFFF",border:"1px solid #E3E8EE",borderRadius:8,boxShadow:"0 1px 3px rgba(0,0,0,.04)",outline:"none"},onFocus:R=>{R.currentTarget.style.borderColor="#6C24F5"},onBlur:R=>{R.currentTarget.style.borderColor="#E3E8EE"}})]}),r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,alignItems:"center"},children:[mke.map(R=>{const U=o===R.key;return r.jsx("button",{onClick:()=>l(R.key),style:{padding:"6px 14px",borderRadius:20,fontSize:12,fontWeight:U?600:500,fontFamily:"inherit",cursor:"pointer",border:U?"1.5px solid #6C24F5":"1.5px solid #D8DEE4",background:U?"#6C24F5":"#FFFFFF",color:U?"#FFFFFF":"#1A1F36",transition:"background 0.15s, border-color 0.15s"},onMouseEnter:I=>{U||(I.currentTarget.style.background="#F0F2F5",I.currentTarget.style.borderColor="#A3A
910CB9")},onMouseLeave:I=>{U||(I.currentTarget.style.background="#FFFFFF",I.currentTarget.style.borderColor="#D8DEE4")},children:R.label},R.key)}),r.jsx("div",{style:{width:1,height:16,background:"#E3E8EE",margin:"0 2px"}}),gke.map(R=>{const U=c===R.key;return r.jsx("button",{onClick:()=>d(R.key),style:{padding:"6px 14px",borderRadius:20,fontSize:12,fontWeight:U?600:500,fontFamily:"inherit",cursor:"pointer",border:U?"1.5px solid #6C24F5":"1.5px solid #D8DEE4",background:U?"#6C24F5":"#FFFFFF",color:U?"#FFFFFF":"#1A1F36",transition:"background 0.15s, border-color 0.15s"},onMouseEnter:I=>{U||(I.currentTarget.style.background="#F0F2F5",I.currentTarget.style.borderColor="#A3ACB9")},onMouseLeave:I=>{U||(I.currentTarget.style.background="#FFFFFF",I.currentTarget.style.borderColor="#D8DEE4")},children:R.label},R.key)})]})]}),F.length===0?r.jsx("div",{className:"text-center py-16 text-sm text-muted-foreground",children:"Nenhum modelo encontrado para os filtros selecionados."}):r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[260px_1fr] gap-3 items-start",children:[(()=>{const R=Math.max(1,Math.ceil(F.length/_)),U=F.slice((k-1)*_,k*_);return r.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden",children:[r.jsxs("div",{className:"px-3.5 py-2.5 border-b border-border flex items-center justify-between",children:[r.jsxs("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:[F.length," modelos"]}),R>1&&r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx("button",{onClick:()=>S(I=>Math.max(1,I-1)),disabled:k===1,className:"w-6 h-6 flex items-center justify-center rounded border border-border text-muted-foreground hover:border-primary/40 hover:text-foreground disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:r.jsx(Sc,{className:"w-3.5 h-3.5"})}),r.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums px-1",children:[k,"/",R]}),r.jsx("button",{onClick:()=>S(I=>Math.min(R,I+1)),disabled:k===R,className:"w-6 h-6 flex items-center justify-center rounded border border-border text-muted-foreground hover:border-primary/40 hover:text-foreground disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:r.jsx(Qr,{className:"w-3.5 h-3.5"})})]})]}),U.map(I=>{const H=ex[I.category]||ex.custom,V=u&&u.id===I.id;return r.jsxs("div",{onClick:()=>p(I),className:"flex items-center gap-3 px-3.5 py-3 border-b border-border cursor-pointer transition-colors last:border-b-0 "+(V?"bg-primary/5":"hover:bg-muted/50"),children:[r.jsx("div",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0 "+H.dot}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:I.name_pt||I.name}),r.jsxs("div",{className:"text-xs text-muted-foreground mt-0.5",children:[H.label," · ",I.estimated_duration_minutes," min"]})]}),V&&r.jsx("div",{className:"w-1 h-4 rounded-full bg-primary flex-shrink-0"})]},I.id)})]})})(),u&&r.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden",children:[r.jsxs("div",{className:"px-6 py-5 border-b border-border",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[r.jsx("h2",{className:"text-base font-semibold text-foreground leading-snug",children:u.name_pt||u.name}),r.jsx("span",{className:"text-xs font-medium px-2.5 py-1 rounded-full "+A.badge,children:A.label})]}),r.jsxs("div",{className:"flex items-center gap-4",children:[u.question_count>0&&r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[r.jsx(ts,{className:"w-3.5 h-3.5"}),u.question_count," questões"]}),u.estimated_duration_minutes>0&&r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[r.jsx(Di,{className:"w-3.5 h-3.5"}),u.estimated_duration_minutes," min"]})]})]}),r.jsxs("div",{className:"px-6 py-5 flex flex-col gap-5",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-1.5",children:"O que mede"}),r.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:u.description_pt||u.description}),D.length>0&&r.jsx("div",{className:"flex flex-wrap gap-1.5 mt-3",children:D.map(R=>r.jsx("span",{className:"text-xs px-2.5 py-1 rounded-full border "+C,children:R.label_pt||R.label},R.key))})]}),P.framework&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-1.5",children:"Base científica"}),r.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:P.framework}),P.autores&&r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:P.autores})]}),P.aplicacoes&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-1.5",children:"Aplicações recomendadas"}),r.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:P.aplicacoes}),P.nivel_cargo&&r.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Nível: ",P.nivel_cargo]})]}),u.instructions_pt&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-1.5",children:"Como interpretar"}),r.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:u.instructions_pt})]}),L&&r.jsx("div",{className:"text-xs text-amber-800 bg-amber-50 border border-amber-200 rounded-lg px-4 py-3 leading-relaxed",children:"Este instrumento foi desenvolvido para fins de desenvolvimento organizacional e mapeamento de perfis profissionais. Não se destina a fins diagnósticos e não substitui a avaliação de um profissional habilitado."})]}),r.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2",children:[r.jsx(ut,{to:"/app/assessments/campaigns/new?template="+u.id,className:"flex-1",children:r.jsx(on,{className:"w-full",children:"Usar modelo"})}),u.status==="published"&&m.length>0&&r.jsxs("div",{className:"relative",children:[r.jsx(on,{variant:"outline",onClick:()=>j(R=>!R),disabled:w===u.id,children:w===u.id?"Adicionando...":"+ Campanha"}),v&&r.jsx("div",{className:"absolute bottom-full right-0 mb-1 w-56 bg-card border border-border rounded-lg shadow-lg z-20 overflow-hidden",children:m.map(R=>r.jsx("button",{onClick:()=>T(R.id),className:"flex items-center w-full px-3 py-2.5 text-sm hover:bg-muted/50 transition-colors text-left",children:R.name},R.id))})]})]})]})]})]})}function vke(e,t){return g.useReducer((n,s)=>t[n][s]??n,e)}var $c=e=>{const{present:t,children:n}=e,s=bke(t),i=typeof n=="function"?n({present:s.isPresent}):g.Children.only(n),a=Mn(s.ref,wke(i));return typeof n=="function"||s.isPresent?g.cloneElement(i,{ref:a}):null};$c.displayName="Presence";function bke(e){const[t,n]=g.useState(),s=g.useRef(null),i=g.useRef(e),a=g.useRef("none"),o=e?"mounted":"unmounted",[l,c]=vke(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const d=tx(s.current);a.current=l==="mounted"?d:"none"},[l]),Is(()=>{const d=s.current,u=i.current;if(u!==e){const m=a.current,x=tx(d);e?c("MOUNT"):x==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(u&&m!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Is(()=>
vendor: 20,113 bytes, line 910
910{if(t){let d;const u=t.ownerDocument.defaultView??window,p=x=>{const y=tx(s.current).includes(CSS.escape(x.animationName));if(x.target===t&&y&&(c("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=x=>{x.target===t&&(a.current=tx(s.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(d=>{s.current=d?getComputedStyle(d):null,n(d)},[])}}function tx(e){return(e==null?void 0:e.animationName)||"none"}function wke(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ew="rovingFocusGroup.onEntryFocus",jke={bubbles:!1,cancelable:!0},l0="RovingFocusGroup",[qj,T7,Ske]=_k(l0),[kke,N7]=Mc(l0,[Ske]),[_ke,Cke]=kke(l0),R7=g.forwardRef((e,t)=>r.jsx(qj.Provider,{scope:e.__scopeRovingFocusGroup,children:r.jsx(qj.Slot,{scope:e.__scopeRovingFocusGroup,children:r.jsx(Eke,{...e,ref:t})})}));R7.displayName=l0;var Eke=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...p}=e,m=g.useRef(null),x=Mn(t,m),w=Ck(a),[y,v]=gm({prop:o,defaultProp:l??null,onChange:c,caller:l0}),[j,k]=g.useState(!1),S=Eo(d),_=T7(n),F=g.useRef(!1),[A,C]=g.useState(0);return g.useEffect(()=>{const D=m.current;if(D)return D.addEventListener(ew,S),()=>D.removeEventListener(ew,S)},[S]),r.jsx(_ke,{scope:n,orientation:s,dir:w,loop:i,currentTabStopId:y,onItemFocus:g.useCallback(D=>v(D),[v]),onItemShiftTab:g.useCallback(()=>k(!0),[]),onFocusableItemAdd:g.useCallback(()=>C(D=>D+1),[]),onFocusableItemRemove:g.useCallback(()=>C(D=>D-1),[]),children:r.jsx(kn.div,{tabIndex:j||A===0?-1:0,"data-orientation":s,...p,ref:x,style:{outline:"none",...e.style},onMouseDown:$t(e.onMouseDown,()=>{F.current=!0}),onFocus:$t(e.onFocus,D=>{const P=!F.current;if(D.target===D.currentTarget&&P&&!j){const L=new CustomEvent(ew,jke);if(D.currentTarget.dispatchEvent(L),!L.defaultPrevented){const T=_().filter(V=>V.focusable),R=T.find(V=>V.active),U=T.find(V=>V.id===y),H=[R,U,...T].filter(Boolean).map(V=>V.ref.current);P7(H,u)}}F.current=!1}),onBlur:$t(e.onBlur,()=>k(!1))})})}),D7="RovingFocusGroupItem",I7=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:i=!1,tabStopId:a,children:o,...l}=e,c=pl(),d=a||c,u=Cke(D7,n),p=u.currentTabStopId===d,m=T7(n),{onFocusableItemAdd:x,onFocusableItemRemove:w,currentTabStopId:y}=u;return g.useEffect(()=>{if(s)return x(),()=>w()},[s,x,w]),r.jsx(qj.ItemSlot,{scope:n,id:d,focusable:s,active:i,children:r.jsx(kn.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...l,ref:t,onMouseDown:$t(e.onMouseDown,v=>{s?u.onItemFocus(d):v.preventDefault()}),onFocus:$t(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:$t(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const j=Tke(v,u.orientation,u.dir);if(j!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let S=m().filter(_=>_.focusable).map(_=>_.ref.current);if(j==="last")S.reverse();else if(j==="prev"||j==="next"){j==="prev"&&S.reverse();const _=S.indexOf(v.currentTarget);S=u.loop?Nke(S,_+1):S.slice(_+1)}setTimeout(()=>P7(S))}}),children:typeof o=="function"?o({isCurrentTabStop:p,hasTabStop:y!=null}):o})})});I7.displayName=D7;var Fke={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ake(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Tke(e,t,n){const s=Ake(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return Fke[s]}function P7(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}function Nke(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var Rke=R7,Dke=I7;function Ike(e){const t=Pke(e),n=g.forwardRef((s,i)=>{const{children:a,...o}=s,l=g.Children.toArray(a),c=l.find(Oke);if(c){const d=c.props.children,u=l.map(p=>p===c?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return r.jsx(t,{...o,ref:i,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return r.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function Pke(e){const t=g.forwardRef((n,s)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const o=Lke(i),l=Mke(a,i.props);return i.type!==g.Fragment&&(l.ref=s?_l(s,o):o),g.cloneElement(i,l)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Bke=Symbol("radix.slottable");function Oke(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Bke}function Mke(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Lke(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gj=["Enter"," "],zke=["ArrowDown","PageUp","Home"],B7=["ArrowUp","PageDown","End"],Wke=[...zke,...B7],$ke={ltr:[...Gj,"ArrowRight"],rtl:[...Gj,"ArrowLeft"]},Uke={ltr:["ArrowLeft"],rtl:["ArrowRight"]},c0="Menu",[Dm,Vke,Hke]=_k(c0),[ou,O7]=Mc(c0,[Hke,h1,N7]),R1=h1(),M7=N7(),[qke,lu]=ou(c0),[Gke,d0]=ou(c0),L7=e=>{const{__scopeMenu:t,open:n=!1,children:s,dir:i,onOpenChange:a,modal:o=!0}=e,l=R1(t),[c,d]=g.useState(null),u=g.useRef(!1),p=Eo(a),m=Ck(i);return g.useEffect(()=>{const x=()=>{u.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>u.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),r.jsx(AB,{...l,children:r.jsx(qke,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:d,children:r.jsx(Gke,{scope:t,onClose:g.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:u,dir:m,modal:o,children:s})})})};L7.displayName=c0;var Kke="MenuAnchor",z_=g.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e,i=R1(n);return r.jsx(TB,{...i,...s,ref:t})});z_.displayName=Kke;var W_="MenuPortal",[Yke,z7]=ou(W_,{forceMount:void 0}),W7=e=>{const{__scopeMenu:t,forceMount:n,children:s,container:i}=e,a=lu(W_,t);return r.jsx(Yke,{scope:t,forceMount:n,children:r.jsx($c,{present:n||a.open,children:r.jsx(m1,{asChild:!0,container:i,children:s})})})};W7.displayName=W_;var fa="MenuContent",[Xke,$_]=ou(fa),$7=g.forwardRef((e,t)=>{const n=z7(fa,e.__scopeMenu),{forceMount:s=n.forceMount,...i}=e,a=lu(fa,e.__scopeMenu),o=d0(fa,e.__scopeMenu);return r.jsx(Dm.Provider,{scope:e.__scopeMenu,children:r.jsx($c,{present:s||a.open,children:r.jsx(Dm.Slot,{scope:e.__scopeMenu,children:o.modal?r.jsx(Jke,{...i,ref:t}):r.jsx(Qke,{...i,ref:t})})})})}),Jke=g.forwardRef((e,t)=>{const n=lu(fa,e.__scopeMenu),s=g.useRef(null),i=Mn(t,s);return g.useEffect(()=>{const a=s.current;if(a)return Bk(a)},[]),r.jsx(U_,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:$t(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Qke=g.forwardRef((e,t)=>{const n=lu(fa,e.__scopeMenu);return r.jsx(U_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Zke=Ike("MenuContent.ScrollLock"),U_=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:s=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:m,onDismiss:x,disableOutsideScroll:w,...y}=e,v=lu(fa,n),j=d0(fa,n),k=R1(n),S=M7(n),_=Vke(n),[F,A]=g.useState(null),C=g.useRef(null),D=Mn(t,C,v.onContentChange),P=g.useRef(0),L=g.useRef(""),T=g.useRef(0),R=g.useRef(null),U=g.useRef("right"),I=g.useRef(0),H=w?x1:g.Fragment,V=w?{as:Zke,allowPinchZoom:!0}:void 0,X=W=>{var Q,ie;const O=L.current+W,G=_().filter(ae=>!ae.disabled),M=document.activeElement,z=(Q=G.find(ae=>ae.ref.current===M))==null?void 0:Q.textValue,K=G.map(ae=>ae.textValue),Y=u_e(K,O,z),J=(ie=G.find(ae=>ae.textValue===Y))==null?void 0:ie.ref.current;(function ae(re){L.current=re,window.clearTimeout(P.current),re!==""&&(P.current=window.setTimeout(()=>ae(""),1e3))})(O),J&&setTimeout(()=>J.focus())};g.useEffect(()=>()=>window.clearTimeout(P.current),[]),Ek();const N=g.useCallback(W=>{var G,M;return U.current===((G=R.current)==null?void 0:G.side)&&p_e(W,(M=R.current)==null?void 0:M.area)},[]);return r.jsx(Xke,{scope:n,searchRef:L,onItemEnter:g.useCallback(W=>{N(W)&&W.preventDefault()},[N]),onItemLeave:g.useCallback(W=>{var O;N(W)||((O=C.current)==null||O.focus(),A(null))},[N]),onTriggerLeave:g.useCallback(W=>{N(W)&&W.preventDefault()},[N]),pointerGraceTimerRef:T,onPointerGraceIntentChange:g.useCallback(W=>{R.current=W},[]),children:r.jsx(H,{...V,children:r.jsx(c1,{asChild:!0,trapped:i,onMountAutoFocus:$t(a,W=>{var O;W.preventDefault(),(O=C.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:r.jsx(l1,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:m,onDismiss:x,children:r.jsx(Rke,{asChild:!0,...S,dir:j.dir,orientation:"vertical",loop:s,currentTabStopId:F,onCurrentTabStopIdChange:A,onEntryFocus:$t(c,W=>{j.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:r.jsx(NB,{role:"menu","aria-orientation":"vertical","data-state":sL(v.open),"data-radix-menu-content":"",dir:j.dir,...k,...y,ref:D,style:{outline:"none",...y.style},onKeyDown:$t(y.onKeyDown,W=>{const G=W.target.closest("[data-radix-menu-content]")===W.currentTarget,M=W.ctrlKey||W.altKey||W.metaKey,z=W.key.length===1;G&&(W.key==="Tab"&&W.preventDefault(),!M&&z&&X(W.key));const K=C.current;if(W.target!==K||!Wke.includes(W.key))return;W.preventDefault();const J=_().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);B7.includes(W.key)&&J.reverse(),c_e(J)}),onBlur:$t(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(P.current),L.current="")}),onPointerMove:$t(e.onPointerMove,Im(W=>{const O=W.target,G=I.current!==W.clientX;if(W.currentTarget.contains(O)&&G){const M=W.clientX>I.current?"right":"left";U.current=M,I.current=W.clientX}}))})})})})})})});$7.displayName=fa;var e_e="MenuGroup",V_=g.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return r.jsx(kn.div,{role:"group",...s,ref:t})});V_.displayName=e_e;var t_e="MenuLabel",U7=g.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return r.jsx(kn.div,{...s,ref:t})});U7.displayName=t_e;var Ty="MenuItem",iN="menu.itemSelect",D1=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:s,...i}=e,a=g.useRef(null),o=d0(Ty,e.__scopeMenu),l=$_(Ty,e.__scopeMenu),c=Mn(t,a),d=g.useRef(!1),u=()=>{const p=a.current;if(!n&&p){const m=new CustomEvent(iN,{bubbles:!0,cancelable:!0});p.addEventListener(iN,x=>s==null?void 0:s(x),{once:!0}),sB(p,m),m.defaultPrevented?d.current=!1:o.onClose()}};return r.jsx(V7,{...i,ref:c,disabled:n,onClick:$t(e.onClick,u),onPointerDown:p=>{var m;(m=e.onPointerDown)==null||m.call(e,p),d.current=!0},onPointerUp:$t(e.onPointerUp,p=>{var m;d.current||(m=p.currentTarget)==null||m.click()}),onKeyDown:$t(e.onKeyDown,p=>{const m=l.searchRef.current!=="";n||m&&p.key===" "||Gj.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});D1.displayName=Ty;var V7=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:s=!1,textValue:i,...a}=e,o=$_(Ty,n),l=M7(n),c=g.useRef(null),d=Mn(t,c),[u,p]=g.useState(!1),[m,x]=g.useState("");return g.useEffect(()=>{const w=c.current;w&&x((w.textContent??"").trim())},[a.children]),r.jsx(Dm.ItemSlot,{scope:n,disabled:s,textValue:i??m,children:r.jsx(Dke,{asChild:!0,...l,focusable:!s,children:r.jsx(kn.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...a,ref:d,onPointerMove:$t(e.onPointerMove,Im(w=>{s?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$t(e.onPointerLeave,Im(w=>o.onItemLeave(w))),onFocus:$t(e.onFocus,()=>p(!0)),onBlur:$t(e.onBlur,()=>p(!1))})})})}),n_e="MenuCheckboxItem",H7=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:s,...i}=e;return r.jsx(X7,{scope:e.__scopeMenu,checked:n,children:r.jsx(D1,{role:"menuitemcheckbox","aria-checked":Ny(n)?"mixed":n,...i,ref:t,"data-state":q_(n),onSelect:$t(i.onSelect,()=>s==null?void 0:s(Ny(n)?!0:!n),{checkForDefaultPrevented:!1})})})});H7.displayName=n_e;var q7="MenuRadioGroup",[r_e,s_e]=ou(q7,{value:void 0,onValueChange:()=>{}}),G7=g.forwardRef((e,t)=>{const{value:n,onValueChange:s,...i}=e,a=Eo(s);return r.jsx(r_e,{scope:e.__scopeMenu,value:n,onValueChange:a,children:r.jsx(V_,{...i,ref:t})})});G7.displayName=q7;var K7="MenuRadioItem",Y7=g.forwardRef((e,t)=>{const{value:n,...s}=e,i=s_e(K7,e.__scopeMenu),a=n===i.value;return r.jsx(X7,{scope:e.__scopeMenu,checked:a,children:r.jsx(D1,{role:"menuitemradio","aria-checked":a,...s,ref:t,"data-state":q_(a),onSelect:$t(s.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});Y7.displayName=K7;var H_="MenuItemIndicator",[X7,i_e]=ou(H_,{checked:!1}),J7=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:s,...i}=e,a=i_e(H_,n);return r.jsx($c,{present:s||Ny(a.checked)||a.checked===!0,children:r.jsx(kn.span,{...i,ref:t,"data-state":q_(a.checked)})})});J7.displayName=H_;var a_e="MenuSeparator",Q7=g.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return r.jsx(kn.div,{role:"separator","aria-orientation":"horizontal",...s,ref:t})});Q7.displayName=a_e;var o_e="MenuArrow",Z7=g.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e,i=R1(n);return r.jsx(RB,{...i,...s,ref:t})});Z7.displayName=o_e;var l_e="MenuSub",[hNe,eL]=ou(l_e),Ph="MenuSubTrigger",tL=g.forwardRef((e,t)=>{const n=lu(Ph,e.__scopeMenu),s=d0(Ph,e.__scopeMenu),i=eL(Ph,e.__scopeMenu),a=$_(Ph,e.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,d={__scopeMenu:e.__scopeMenu},u=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>u,[u]),g.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),c(null)}},[l,c]),r.jsx(z_,{asChild:!0,...d,children:r.jsx(V7,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":sL(n.open),...e,ref:_l(t,i.onTriggerChange),onClick:p=>{var m;(m=e.onClick)==null||m.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:$t(e.onPointerMove,Im(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:$t(e.onPointerLeave,Im(p=>{var x,w;u();const m=(x=n.content)==null?void 0:x.getBoundingClientRect();if(m){const y=(w=n.content)==null?void 0:w.dataset.side,v=y==="right",j=v?-5:5,k=m[v?"left":"right"],S=m[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+j,y:p.clientY},{x:k,y:m.top},{x:S,y:m.top},{x:S,y:m.bottom},{x:k,y:m.bottom}],side:y}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:$t(e.onKeyDown,p=>{var x;const m=a.searchRef.current!=="";e.disabled||m&&p.key===" "||$ke[s.dir].includes(p.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),p.preventDefault())})})})});tL.displayName=Ph;var nL="MenuSubContent",rL=g.forwardRef((e,t)=>{const n=z7(fa,e.__scopeMenu),{forceMount:s=n.forceMount,...i}=e,a=lu(fa,e.__scopeMenu),o=d0(fa,e.__scopeMenu),l=eL(nL,e.__scopeMenu),c=g.useRef(null),d=Mn(t,c);return r.jsx(Dm.Provider,{scope:e.__scopeMenu,children:r.jsx($c,{present:s||a.open,children:r.jsx(Dm.Slot,{scope:e.__scopeMenu,children:r.jsx(U_,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:d,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var p;o.isUsingKeyboardRef.current&&((p=c.current)==null||p.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:$t(e.onFocusOutside,u=>{u.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:$t(e.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:$t(e.onKeyDown,u=>{var x;const p=u.currentTarget.contains(u.target),m=Uke[o.dir].includes(u.key);p&&m&&(a.onOpenChange(!1),(x=l.trigger)==null||x.focus(),u.preventDefault())})})})})})});rL.displayName=nL;function sL(e){return e?"open":"closed"}function Ny(e){return e==="indeterminate"}function q_(e){return Ny(e)?"indeterminate":e?"checked":"unchecked"}function c_e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function d_e(e,t){return e.map((n,s)=>e[(t+s)%e.length])}function u_e(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=d_e(e,Math.max(a,0));i.length===1&&(o=o.filter(d=>d!==n));const c=o.find(d=>d.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function f_e(e,t){const{x:n,y:s}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],d=l.x,u=l.y,p=c.x,m=c.y;u>s!=m>s&&n<(p-d)*(s-u)/(m-u)+d&&(i=!i)}return i}function p_e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return f_e(n,t)}function Im(e){return t=>t.pointerType==="mouse"?e(t):void 0}var h_e=L7,m_e=z_,g_e=W7,x_e=$7,y_e=V_,v_e=U7,b_e=D1,w_e=H7,j_e=G7,S_e=Y7,k_e=J7,__e=Q7,C_e=Z7,E_e=tL,F_e=rL,I1="DropdownMenu",[A_e]=Mc(I1,[O7]),Zs=O7(),[T_e,iL]=A_e(I1),aL=e=>{const{__scopeDropdownMenu:t,children:n,dir:s,open:i,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=Zs(t),d=g.useRef(null),[u,p]=gm({prop:i,defaultProp:a??!1,onChange:o,caller:I1});return r.jsx(T_e,{scope:t,triggerId:pl(),triggerRef:d,contentId:pl(),open:u,onOpenChange:p,onOpenToggle:g.useCallback(()=>p(m=>!m),[p]),modal:l,children:r.jsx(h_e,{...c,open:u,onOpenChange:p,dir:s,modal:l,children:n})})};aL.displayName=I1;var oL="DropdownMenuTrigger",lL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:s=!1,...i}=e,a=iL(oL,n),o=Zs(n);return r.jsx(m_e,{asChild:!0,...o,children:r.jsx(kn.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":s?"":void 0,disabled:s,...i,ref:_l(t,a.triggerRef),onPointerDown:$t(e.onPointerDown,l=>{!s&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:$t(e.onKeyDown,l=>{s||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});lL.displayName=oL;var N_e="DropdownMenuPortal",cL=e=>{const{__scopeDropdownMenu:t,...n}=e,s=Zs(t);return r.jsx(g_e,{...s,...n})};cL.displayName=N_e;var dL="DropdownMenuContent",uL=g.forwardRef((e,t)=>
910{const{__scopeDropdownMenu:n,...s}=e,i=iL(dL,n),a=Zs(n),o=g.useRef(!1);return r.jsx(x_e,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...s,ref:t,onCloseAutoFocus:$t(e.onCloseAutoFocus,l=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:$t(e.onInteractOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,u=c.button===2||d;(!i.modal||u)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});uL.displayName=dL;var R_e="DropdownMenuGroup",D_e=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(y_e,{...i,...s,ref:t})});D_e.displayName=R_e;var I_e="DropdownMenuLabel",fL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(v_e,{...i,...s,ref:t})});fL.displayName=I_e;var P_e="DropdownMenuItem",pL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(b_e,{...i,...s,ref:t})});pL.displayName=P_e;var B_e="DropdownMenuCheckboxItem",hL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(w_e,{...i,...s,ref:t})});hL.displayName=B_e;var O_e="DropdownMenuRadioGroup",M_e=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(j_e,{...i,...s,ref:t})});M_e.displayName=O_e;var L_e="DropdownMenuRadioItem",mL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(S_e,{...i,...s,ref:t})});mL.displayName=L_e;var z_e="DropdownMenuItemIndicator",gL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(k_e,{...i,...s,ref:t})});gL.displayName=z_e;var W_e="DropdownMenuSeparator",xL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(__e,{...i,...s,ref:t})});xL.displayName=W_e;var $_e="DropdownMenuArrow",U_e=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(C_e,{...i,...s,ref:t})});U_e.displayName=$_e;var V_e="DropdownMenuSubTrigger",yL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(E_e,{...i,...s,ref:t})});yL.displayName=V_e;var H_e="DropdownMenuSubContent",vL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=Zs(n);return r.jsx(F_e,{...i,...s,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vL.displayName=H_e;var q_e=aL,G_e=lL,K_e=cL,bL=uL,wL=fL,jL=pL,SL=hL,kL=mL,_L=gL,CL=xL,EL=yL,FL=vL;const G_=q_e,K_=G_e,Y_e=g.forwardRef(({className:e,inset:t,children:n,...s},i)=>r.jsxs(EL,{ref:i,className:pn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...s,children:[n,r.jsx(Qr,{className:"ml-auto"})]}));Y_e.displayName=EL.displayName;const X_e=g.forwardRef(({className:e,...t},n)=>r.jsx(FL,{ref:n,className:pn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));X_e.displayName=FL.displayName;const P1=g.forwardRef(({className:e,sideOffset:t=4,...n},s)=>r.jsx(K_e,{children:r.jsx(bL,{ref:s,sideOffset:t,className:pn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
910de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));P1.displayName=bL.displayName;const vo=g.forwardRef(({className:e,inset:t,...n},s)=>r.jsx(jL,{ref:s,className:pn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));vo.displayName=jL.displayName;const J_e=g.forwardRef(({className:e,children:t,checked:n,...s},i)=>r.jsxs(SL,{ref:i,className:pn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...s,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(_L,{children:r.jsx(fn,{className:"h-4 w-4"})})}),t]}));J_e.displayName=SL.displayName;const Q_e=g.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(kL,{ref:s,className:pn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(_L,{children:r.jsx(uV,{className:"h-2 w-2 fill-current"})})}),t]}));Q_e.displayName=kL.displayName;const Z_e=g.forwardRef(({className:e,inset:t,...n},s)=>r.jsx(wL,{ref:s,className:pn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Z_e.displayName=wL.displayName;const AL=g.forwardRef(({className:e,...t},n)=>r.jsx(CL,{ref:n,className:pn("-mx-1 my-1 h-px bg-muted",e),...t}));AL.displayName=CL.displayName;function eCe(e){const t=tCe(e),n=g.forwardRef((s,i)=>{const{children:a,...o}=s,l=g.Children.toArray(a),c=l.find(rCe);if(c){const d=c.props.children,u=l.map(p=>p===c?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:p);return r.jsx(t,{...o,ref:i,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return r.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function tCe(e){const t=g.forwardRef((n,s)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const o=iCe(i),l=sCe(a,i.props);return i.type!==g.Fragment&&(l.ref=s?_l(s,o):o),g.cloneElement(i,l)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nCe=Symbol("radix.slottable");function rCe(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nCe}function sCe(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function iCe(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var B1="Dialog",[TL,NL]=Mc(B1),[aCe,Ja]=TL(B1),RL=e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=g.useRef(null),c=g.useRef(null),[d,u]=gm({prop:s,defaultProp:i??!1,onChange:a,caller:B1});return r.jsx(aCe,{scope:t,triggerRef:l,contentRef:c,contentId:pl(),titleId:pl(),descriptionId:pl(),open:d,onOpenChange:u,onOpenToggle:g.useCallback(()=>u(p=>!p),[u]),modal:o,children:n})};RL.displayName=B1;var DL="DialogTrigger",IL=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ja(DL,n),a=Mn(t,i.triggerRef);return r.jsx(kn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":J_(i.open),...s,ref:a,onClick:$t(e.onClick,i.onOpenToggle)})});IL.displayName=DL;var Y_="DialogPortal",[oCe,PL]=TL(Y_,{forceMount:void 0}),BL=e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,a=Ja(Y_,t);return r.jsx(oCe,{scope:t,forceMount:n,children:g.Children.map(s,o=>r.jsx($c,{present:n||a.open,children:r.jsx(m1,{asChild:!0,container:i,children:o})}))})};BL.displayName=Y_;var Ry="DialogOverlay",OL=g.forwardRef((e,t)=>
vendor: 4,370 bytes, lines 910-914
910{const n=PL(Ry,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,a=Ja(Ry,e.__scopeDialog);return a.modal?r.jsx($c,{present:s||a.open,children:r.jsx(cCe,{...i,ref:t})}):null});OL.displayName=Ry;var lCe=eCe("DialogOverlay.RemoveScroll"),cCe=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ja(Ry,n);return r.jsx(x1,{as:lCe,allowPinchZoom:!0,shards:[i.contentRef],children:r.jsx(kn.div,{"data-state":J_(i.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),Jd="DialogContent",ML=g.forwardRef((e,t)=>{const n=PL(Jd,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,a=Ja(Jd,e.__scopeDialog);return r.jsx($c,{present:s||a.open,children:a.modal?r.jsx(dCe,{...i,ref:t}):r.jsx(uCe,{...i,ref:t})})});ML.displayName=Jd;var dCe=g.forwardRef((e,t)=>{const n=Ja(Jd,e.__scopeDialog),s=g.useRef(null),i=Mn(t,n.contentRef,s);return g.useEffect(()=>{const a=s.current;if(a)return Bk(a)},[]),r.jsx(LL,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:$t(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:$t(e.onFocusOutside,a=>a.preventDefault())})}),uCe=g.forwardRef((e,t)=>{const n=Ja(Jd,e.__scopeDialog),s=g.useRef(!1),i=g.useRef(!1);return r.jsx(LL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(s.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),LL=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=Ja(Jd,n),c=g.useRef(null),d=Mn(t,c);return Ek(),r.jsxs(r.Fragment,{children:[r.jsx(c1,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:a,children:r.jsx(l1,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":J_(l.open),...o,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),r.jsxs(r.Fragment,{children:[r.jsx(pCe,{titleId:l.titleId}),r.jsx(mCe,{contentRef:c,descriptionId:l.descriptionId})]})]})}),X_="DialogTitle",zL=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ja(X_,n);return r.jsx(kn.h2,{id:i.titleId,...s,ref:t})});zL.displayName=X_;var WL="DialogDescription",$L=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ja(WL,n);return r.jsx(kn.p,{id:i.descriptionId,...s,ref:t})});$L.displayName=WL;var UL="DialogClose",VL=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Ja(UL,n);return r.jsx(kn.button,{type:"button",...s,ref:t,onClick:$t(e.onClick,()=>i.onOpenChange(!1))})});VL.displayName=UL;function J_(e){return e?"open":"closed"}var HL="DialogTitleWarning",[fCe,qL]=_oe(HL,{contentName:Jd,titleName:X_,docsSlug:"dialog"}),pCe=({titleId:e})=>{const t=qL(HL),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
911
912If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
913
914For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},hCe="DialogDescriptionWarning",mCe=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qL(hCe).contentName}}.`;return g.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},GL=RL,gCe=IL,KL=BL,Q_=OL,Z_=ML,eC=zL,tC=$L,nC=VL,xCe=Symbol("radix.slottable");function yCe(e){const t=({children:n})=>r.jsx(r.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=xCe,t}var YL="AlertDialog",[vCe]=Mc(YL,[NL]),El=NL(),XL=e=>{const{__scopeAlertDialog:t,...n}=e,s=El(t);return r.jsx(GL,{...s,...n,modal:!0})};XL.displayName=YL;var bCe="AlertDialogTrigger",wCe=g.forwardRef((e,t)=>
914{const{__scopeAlertDialog:n,...s}=e,i=El(n);return r.jsx(gCe,{...i,...s,ref:t})});wCe.displayName=bCe;var jCe="AlertDialogPortal",JL=e=>{const{__scopeAlertDialog:t,...n}=e,s=El(t);return r.jsx(KL,{...s,...n})};JL.displayName=jCe;var SCe="AlertDialogOverlay",QL=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=El(n);return r.jsx(Q_,{...i,...s,ref:t})});QL.displayName=SCe;var wf="AlertDialogContent",[kCe,_Ce]=vCe(wf),CCe=yCe("AlertDialogContent"),ZL=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:s,...i}=e,a=El(n),o=g.useRef(null),l=Mn(t,o),c=g.useRef(null);return r.jsx(fCe,{contentName:wf,titleName:ez,docsSlug:"alert-dialog",children:r.jsx(kCe,{scope:n,cancelRef:c,children:r.jsxs(Z_,{role:"alertdialog",...a,...i,ref:l,onOpenAutoFocus:$t(i.onOpenAutoFocus,d=>{var u;d.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[r.jsx(CCe,{children:s}),r.jsx(FCe,{contentRef:o})]})})})});ZL.displayName=wf;var ez="AlertDialogTitle",tz=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=El(n);return r.jsx(eC,{...i,...s,ref:t})});tz.displayName=ez;var nz="AlertDialogDescription",rz=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=El(n);return r.jsx(tC,{...i,...s,ref:t})});rz.displayName=nz;var ECe="AlertDialogAction",sz=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=El(n);return r.jsx(nC,{...i,...s,ref:t})});sz.displayName=ECe;var iz="AlertDialogCancel",az=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,{cancelRef:i}=_Ce(iz,n),a=El(n),o=Mn(t,i);return r.jsx(nC,{...a,...s,ref:o})});az.displayName=iz;var FCe=({contentRef:e})=>{const t=`\`${wf}\` requires a description for the component to be accessible for screen reader users.
915
916You can add a description to the \`${wf}\` by passing a \`${nz}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
917
918Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${wf}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
919
920For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ACe=XL,TCe=JL,oz=QL,lz=ZL,cz=sz,dz=az,uz=tz,fz=rz;const pz=ACe,NCe=TCe,hz=g.forwardRef(({className:e,...t},n)=>r.jsx(oz,{className:pn("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:n}));hz.displayName=oz.displayName;const rC=g.forwardRef(({className:e,...t},n)=>r.jsxs(NCe,{children:[r.jsx(hz,{}),r.jsx(lz,{ref:n,className:pn("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})]}));rC.displayName=lz.displayName;const sC=({className:e,...t})=>r.jsx("div",{className:pn("flex flex-col space-y-2 text-center sm:text-left",e),...t});sC.displayName="AlertDialogHeader";const iC=({className:e,...t})=>r.jsx("div",{className:pn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});iC.displayName="AlertDialogFooter";const aC=g.forwardRef(({className:e,...t},n)=>r.jsx(uz,{ref:n,className:pn("text-lg font-semibold",e),...t}));aC.displayName=uz.displayName;const oC=g.forwardRef(({className:e,...t},n)=>r.jsx(fz,{ref:n,className:pn("text-sm text-muted-foreground",e),...t}));
920oC.displayName=fz.displayName;const lC=g.forwardRef(({className:e,...t},n)=>r.jsx(cz,{ref:n,className:pn(LS(),e),...t}));lC.displayName=cz.displayName;const cC=g.forwardRef(({className:e,...t},n)=>r.jsx(dz,{ref:n,className:pn(LS({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));cC.displayName=dz.displayName;const aN={draft:"bg-slate-50 text-slate-600",active:"bg-emerald-50 text-emerald-700",paused:"bg-amber-50 text-amber-700",paused_billing:"bg-red-50 text-red-700",completed:"bg-blue-50 text-blue-700",archived:"bg-muted text-muted-foreground"};function RCe(){const[e,t]=g.useState([]),[n,s]=g.useState({}),[i,a]=g.useState(!0),o=In(),[l,c]=g.useState(null),[d,u]=g.useState(null),p=async m=>{u(m);try{await ne.entities.AssessmentCampaign.delete(m),t(x=>x.filter(w=>w.id!==m))}catch{}u(null),c(null)};return g.useEffect(()=>{(async()=>{var S;const x=await ne.auth.me(),w=await ne.functions.invoke("getWorkspaceId",{user_email:x.email}),y=((S=w==null?void 0:w.data)==null?void 0:S.workspace_id)||(w==null?void 0:w.workspace_id),[v,j]=await Promise.all([y?ne.entities.AssessmentCampaign.filter({workspace_id:y}):[],y?ne.entities.AssessmentInvitation.filter({workspace_id:y}):[]]);v.sort((_,F)=>new Date(F.created_date)-new Date(_.created_date)),t(v);const k={};j.forEach(_=>{_.campaign_id&&(k[_.campaign_id]||(k[_.campaign_id]={total:0,completed:0}),k[_.campaign_id].total+=1,_.status==="completed"&&(k[_.campaign_id].completed+=1))}),s(k),a(!1)})()},[]),i?r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):r.jsxs("div",{children:[e.length===0?r.jsxs("div",{className:"bg-card rounded-xl border border-border p-12 text-center",children:[r.jsx("div",{className:"w-16 h-16 rounded-2xl bg-primary/10 flex items-center justify-center mx-auto mb-4",children:r.jsx(pa,{className:"w-8 h-8 text-primary"})}),r.jsx("h3",{className:"text-lg font-semibold mb-2",children:kt.campaigns.noCampaigns}),r.jsx("p",{className:"text-muted-foreground text-sm max-w-sm mx-auto mb-6",children:kt.campaigns.noCampaignsDesc}),r.jsx(ut,{to:"/app/assessments/campaigns/new",children:r.jsxs(on,{className:"font-medium",children:[r.jsx(Ln,{className:"w-4 h-4 mr-2"}),kt.campaigns.newCampaign]})})]}):r.jsx("div",{className:"bg-card rounded-xl border border-border overflow-hidden",children:r.jsx("div",{className:"divide-y divide-border",children:e.map(m=>{var x,w;return r.jsxs("div",{className:"flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors",children:[r.jsxs(ut,{to:`/app/assessments/campaigns/${m.id}`,className:"flex items-center justify-between flex-1 min-w-0",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:"text-sm font-medium",children:m.name}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[((x=n[m.id])==null?void 0:x.completed)||0," / ",((w=n[m.id])==null?void 0:w.total)||0," ",kt.campaigns.completedOf,m.description?` • ${m.description}`:""]})]}),r.jsx("div",{className:"flex items-center gap-3 ml-4",children:r.jsx("span",{className:`text-xs font-medium px-2.5 py-1 rounded-full ${aN[m.status]||aN.draft}`,children:kt.campaigns.status[m.status]||m.status})})]}),r.jsx("div",{className:"ml-3",onClick:y=>y.stopPropagation(),children:r.jsxs(G_,{children:[r.jsx(K_,{asChild:!0,children:r.jsx("button",{className:"p-2 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(No,{className:"w-4 h-4"})})}),r.jsxs(P1,{align:"end",children:[r.jsxs(vo,{onClick:()=>o(`/app/assessments/campaigns/${m.id}`),children:[r.jsx($r,{className:"w-4 h-4 mr-2"}),"Editar"]}),r.jsxs(vo,{onClick:()=>c(m.id),className:"text-destructive",children:[r.jsx(zn,{className:"w-4 h-4 mr-2"}),"Excluir"]})]})]})})]},m.id)})})}),r.jsx(pz,{open:!!l,onOpenChange:m=>{m||c(null)},children:r.jsxs(rC,{children:[r.jsxs(sC,{children:[r.jsx(aC,{children:"Excluir campanha"}),r.jsx(oC,{children:"Tem certeza que deseja excluir esta campanha? Esta ação não pode ser desfeita."})]}),r.jsxs(iC,{children:[r.jsx(cC,{children:"Cancelar"}),r.jsx(lC,{onClick:()=>p(l),disabled:!!d,className:"bg-red-600 hover:bg-red-700 text-white",children:d?"Excluindo...":"Excluir"})]})]})})]})}function DCe(e){return e.toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit"})}function oN(e){return e.toLocaleDateString("pt-BR")}const lN={D:"inline-flex items-center justify-center w-7 h-6 rounded-md text-xs font-bold bg-red-50 text-red-700 border border-red-200",I:"inline-flex items-center justify-center w-7 h-6 rounded-md text-xs font-bold bg-amber-50 text-amber-700 border border-amber-200",S:"inline-flex items-center justify-center w-7 h-6 rounded-md text-xs font-bold bg-emerald-50 text-emerald-700 border border-emerald-200",C:"inline-flex items-center justify-center w-7 h-6 rounded-md text-xs font-bold bg-blue-50 text-blue-700 border border-blue-200"};function ICe(e){return e==="Destaque"?"inline-flex items-center justify-center px-2 h-6 rounded-md text-xs font-semibold bg-emerald-100 text-emerald-800 border border-emerald-300":e==="Acima do esperado"?"inline-flex items-center justify-center px-2 h-6 rounded-md text-xs font-semibold bg-emerald-50 text-emerald-700 border border-emerald-200":e==="Adequado para o nível"||e==="Adequado"?"inline-flex items-center justify-center px-2 h-6 rounded-md text-xs font-semibold bg-amber-50 text-amber-700 border border-amber-200":e==="Abaixo do esperado"?"inline-flex items-center justify-center px-2 h-6 rounded-md text-xs font-semibold bg-red-50 text-red-700 border border-red-200":"inline-flex items-center justify-center px-2 h-6 rounded-md text-xs font-semibold bg-slate-50 text-slate-600 border border-slate-200"}function PCe(e){const t=(e||"").toLowerCase();return t.includes("muito alto")?"inline-flex items-center justify-center px-2 h-6 rounded-md text-xs font-bold bg-blue-50 text-blue-700 border border-blue-200":t.includes("alto")?"inline-flex items-center justify-center px-2 h-6 rounded-md text-xs font-bold bg-emerald-50 text-emerald-700 border border-emerald-200":t.includes("médio")||t.includes("medio")?"inline-flex items-center justify-center px-2 h-6 rounded-md text-xs font-bold bg-amber-50 text-amber-700 border border-amber-200":"inline-flex items-center justify-center px-2 h-6 rounded-md text-xs font-bold bg-rose-50 text-rose-700 border border-rose-200"}function mz(){const[e,t]=g.useState([]),[n,s]=g.useState(!0),[i,a]=g.useState(""),[o,l]=g.useState(new Set);g.useEffect(()=>{d()},[]);const c=p=>{l(m=>{const x=new Set(m);return x.has(p)?x.delete(p):x.add(p),x})},d=async()=>{var T,R,U;const p=await ne.auth.me(),m=await ne.functions.invoke("getWorkspaceId",{user_email:p.email}),x=((T=m==null?void 0:m.data)==null?void 0:T.workspace_id)||(m==null?void 0:m.workspace_id);if(!x){s(!1);return}const w=await ne.entities.AssessmentResult.filter({workspace_id:x});if(w.sort((I,H)=>new Date(H.computed_at)-new Date(I.computed_at)),!w||w.length===0){s(!1);return}const[y,v]=await Promise.all([ne.entities.AssessmentInvitation.filter({workspace_id:x}),ne.entities.AssessmentCampaign.filter({workspace_id:x})]),j=[...new Set(w.map(I=>
920I.template_id).filter(Boolean))],k=j.length>0?await ne.entities.AssessmentTemplate.filter({id:{$in:j}}):[],S={};for(const I of k)S[I.id]=I;const _=[...new Set(w.map(I=>I.session_id).filter(Boolean))],F=_.length>0?await ne.entities.AssessmentSession.filter({id:{$in:_}}):[],A={};for(const I of F)A[I.id]=I;const C={};for(const I of y)C[I.id]=I;const D={};for(const I of v)D[I.id]=I;const P={};for(const I of w){const H=I.session_id?A[I.session_id]:null,V=H!=null&&H.invitation_id?C[H.invitation_id]:null,X=V?V.id:"orphan-"+I.id,N=S[I.template_id]||null,W=D[I.campaign_id]||null,O=(N==null?void 0:N.category)==="behavioral"&&(N==null?void 0:N.slug)==="disc-v1",G=(N==null?void 0:N.category)==="behavioral"&&!O,M=!O&&!G;let z=null,K=null,Y=null,J=null,Q=null,ie=null;O?(z=I.primary_dimension||null,K=I.profile_label||null,Y=(((R=I.detailed_interpretation)==null?void 0:R.subtitulo)||"").split("·")[0].trim()||z):(J=I.total_score??null,Q=((U=I.dimension_scores)==null?void 0:U.normalized)??null,ie=I.profile_label||null);const ae=I.computed_at?new Date(I.computed_at):new Date(0),re={resultId:I.id,templateName:(N==null?void 0:N.name_pt)||(N==null?void 0:N.name)||"—",templateCategory:(N==null?void 0:N.category)||null,testDate:DCe(ae),testDateFull:oN(ae),isDisc:O,isBehavioral:G,isObjective:M,discLetter:z,discProfileLabel:K,discDimensionName:Y,totalScore:J,normalizedScore:Q,faixaLabel:ie,_date:ae};P[X]?ae>P[X].lastCompletedDate&&(P[X].lastCompletedDate=ae):P[X]={invitationId:X,candidateName:(V==null?void 0:V.full_name)||(V==null?void 0:V.email)||"Candidato",candidateEmail:(V==null?void 0:V.email)||null,candidateInitial:((V==null?void 0:V.full_name)||(V==null?void 0:V.email)||"C")[0].toUpperCase(),campaignName:(W==null?void 0:W.name)||"—",lastCompletedDate:ae,tests:[]},P[X].tests.push(re)}const L=Object.values(P).map(I=>(I.tests.sort((H,V)=>V._date-H._date),I.testsCount=I.tests.length,I.lastCompletedDateLabel=oN(I.lastCompletedDate),I));L.sort((I,H)=>H.lastCompletedDate-I.lastCompletedDate),t(L),s(!1)},u=e.filter(p=>{var x;if(!i)return!0;const m=i.toLowerCase();return p.candidateName.toLowerCase().includes(m)||((x=p.candidateEmail)==null?void 0:x.toLowerCase().includes(m))||p.campaignName.toLowerCase().includes(m)||p.tests.some(w=>w.templateName.toLowerCase().includes(m))});return n?r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):r.jsxs("div",{children:[r.jsxs("div",{className:"relative mb-6 max-w-md",children:[r.jsx(Ua,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),r.jsx(Xr,{placeholder:kt.common.search+"...",value:i,onChange:p=>a(p.target.value),className:"pl-10 h-10"})]}),u.length===0?r.jsxs("div",{className:"bg-card rounded-xl border border-border p-12 text-center",children:[r.jsx("div",{className:"w-16 h-16 rounded-2xl bg-primary/10 flex items-center justify-center mx-auto mb-4",children:r.jsx(ts,{className:"w-8 h-8 text-primary"})}),r.jsx("h3",{className:"text-lg font-semibold mb-2",children:kt.results.noResults}),r.jsx("p",{className:"text-muted-foreground text-sm max-w-sm mx-auto",children:kt.results.noResultsDesc})]}):r.jsx("div",{className:"bg-card rounded-xl border border-border overflow-hidden divide-y divide-border",children:u.map(p=>{const m=o.has(p.invitationId);return r.jsxs("div",{children:[r.jsxs("button",{onClick:()=>c(p.invitationId),className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-sm font-semibold text-primary flex-shrink-0",children:p.candidateInitial}),r.jsxs("div",{className:"min-w-0 text-left",children:[r.jsx("p",{className:"text-sm font-medium truncate",children:p.candidateName}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:[p.campaignName," · última conclusão ",p.lastCompletedDateLabel]})]})]}),r.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 ml-4",children:[r.jsxs("span",{className:"text-xs text-muted-foreground",children:[p.testsCount," teste",p.testsCount!==1?"s":""]}),r.jsx(ar,{className:`w-4 h-4 text-muted-foreground transition-transform duration-200 ${m?"rotate-180":""}`})]})]}),m&&r.jsx("div",{className:"bg-muted/30 border-t border-border divide-y divide-border",children:p.tests.map(x=>r.jsxs(ut,{to:`/app/assessments/results/${x.resultId}`,className:"grid grid-cols-[1fr_80px_1fr_auto] items-center gap-4 px-6 py-2.5 hover:bg-muted/50 transition-colors text-sm",children:[r.jsx("span",{className:"truncate text-foreground",children:x.templateName}),r.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:x.testDate}),r.jsx("div",{className:"min-w-0",children:x.isDisc?r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{className:lN[x.discLetter]||lN.D,children:x.discLetter||"—"}),r.jsxs("span",{className:"text-xs text-foreground truncate",children:[x.discDimensionName,x.discProfileLabel?` · ${x.discProfileLabel}`:""]})]}):x.isBehavioral?r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{className:PCe(x.faixaLabel),children:x.totalScore!=null?`${x.totalScore}`:"—"}),r.jsx("span",{className:"text-xs text-foreground truncate",children:x.faixaLabel||"—"})]}):r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x.normalizedScore!=null&&r.jsxs("span",{className:ICe(x.faixaLabel),children:[x.normalizedScore,"%"]}),r.jsxs("span",{className:"text-xs text-foreground truncate",children:[x.totalScore!=null?`${x.totalScore}${x.maxScore?`/${x.maxScore}`:""} · `:"",x.faixaLabel||"—"]})]})}),r.jsxs("span",{className:"flex items-center gap-1 text-xs text-primary font-medium whitespace-nowrap",children:["Ver relatório",r.jsx(Qr,{className:"w-3.5 h-3.5"})]})]},x.resultId))})]},p.invitationId)})})]})}const BCe=[{key:"library",label:"Modelos"},{key:"campaigns",label:"Campanhas"},{key:"results",label:"Resultados"}];function OCe(){const[e,t]=g.useState({templates:0,campaigns:0,invitations:0,completed:0}),[n,s]=g.useState(!0),[i,a]=g.useState("library");g.useEffect(()=>{o()},[]);const o=async()=>{var v;const c=await ne.auth.me(),d=await ne.functions.invoke("getWorkspaceId",{user_email:c.email}),u=((v=d==null?void 0:d.data)==null?void 0:v.workspace_id)||(d==null?void 0:d.workspace_id),[p,m,x]=await Promise.all([u?ne.entities.AssessmentCampaign.filter({workspace_id:u}):[],ne.entities.AssessmentTemplate.filter({status:"published"}),u?ne.entities.AssessmentInvitation.filter({workspace_id:u}):[]]),w=x.length,y=x.filter(j=>j.status==="completed").length;t({campaigns:p.length,templates:m.length,invitations:w,completed:y}),s(!1)};if(n)return r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:256},children:[r.jsx("div",{style:{width:32,height:32,border:"3px solid #E3E8EE",borderTopColor:"#6C24F5",borderRadius:"50%",animation:"spin 0.8s linear infinite"}}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]});const l=[{label:"Modelos",value:e.templates,foot:"publicados"},{label:"Campanhas",value:e.campaigns,foot:"criadas"},{label:"Convites",value:e.invitations,foot:"enviados"},{label:"Concluídos",value:e.completed,foot:"últimos 30 dias"}];return r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16},children:[r.jsxs("div",{children:[r.jsx("h1",{style:{fontSize:22,fontWeight:700,fontFamily:"'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",letterSpacing:"-0.04em",color:"#1A1F36",margin:0,lineHeight:1.2},children:"Avaliações"}),r.jsx("p",{style:{fontSize:13,color:"#697386",margin:"2px 0 0",lineHeight:1.4},children:"Testes científicos para decidir com dados, não com achismo."})]}),r.jsxs(ut,{to:"/app/assessments/campaigns/new",style:{display:"inline-flex",alignItems:"center",gap:6,background:"#6C24F5",color:"#FFFFFF",fontSize:13,fontWeight:600,padding:"8px 16px",borderRadius:8,textDecoration:"none",whiteSpace:"nowrap",flexShrink:0},children:[r.jsx(Ln,{size:14,strokeWidth:2.5}),"Nova campanha"]})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:0,background:"#FFFFFF",border:"1px solid #E3E8EE",borderRadius:12,boxShadow:"0 1px 3px rgba(0,0,0,.04)",marginTop:20},children:l.map((c,d)=>r.jsxs("div",{style:{padding:"18px 20px",position:"relative"},children:[r.jsx("div",{style:{fontSize:12,color:"#697386",fontWeight:500,marginBottom:4},children:c.label}),r.jsx("div",{style:{fontSize:28,fontWeight:700,fontFamily:"'Geist', 'Switzer', ui-monospace, sans-serif",letterSpacing:"-0.03em",lineHeight:1,color:"#1A1F36"},children:c.value}
920),c.foot&&r.jsx("div",{style:{fontSize:11.5,color:"#A3ACB9",marginTop:2},children:c.foot}),d<l.length-1&&r.jsx("div",{style:{position:"absolute",right:0,top:16,bottom:16,width:1,background:"#E3E8EE"}})]},c.label))}),r.jsx("div",{style:{display:"flex",gap:6,marginTop:16,marginBottom:16},children:BCe.map(c=>{const d=i===c.key;return r.jsx("button",{onClick:()=>a(c.key),style:{padding:"6px 14px",borderRadius:20,fontSize:12.5,fontWeight:d?600:500,cursor:"pointer",border:d?"1.5px solid #6C24F5":"1.5px solid #D8DEE4",transition:"background 0.15s, border-color 0.15s",background:d?"#6C24F5":"#FFFFFF",color:d?"#FFFFFF":"#1A1F36",fontFamily:"inherit"},onMouseEnter:u=>{d||(u.currentTarget.style.background="#F0F2F5",u.currentTarget.style.borderColor="#A3ACB9")},onMouseLeave:u=>{d||(u.currentTarget.style.background="#FFFFFF",u.currentTarget.style.borderColor="#D8DEE4")},children:c.label},c.key)})}),i==="library"&&r.jsx(yke,{}),i==="campaigns"&&r.jsx(RCe,{}),i==="results"&&r.jsx(mz,{})]})}const Dy=g.forwardRef(({className:e,...t},n)=>r.jsx("textarea",{className:pn("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Dy.displayName="Textarea";const gz=GL,MCe=KL,xz=g.forwardRef(({className:e,...t},n)=>r.jsx(Q_,{ref:n,className:pn("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}));xz.displayName=Q_.displayName;const dC=g.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(MCe,{children:[r.jsx(xz,{}),r.jsxs(Z_,{ref:s,className:pn("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),...n,children:[t,r.jsxs(nC,{className:"absolute right-4 top-4 roun
920ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(Jt,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));dC.displayName=Z_.displayName;const uC=({className:e,...t})=>r.jsx("div",{className:pn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});uC.displayName="DialogHeader";const fC=({className:e,...t})=>r.jsx("div",{className:pn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});fC.displayName="DialogFooter";const pC=g.forwardRef(({className:e,...t},n)=>r.jsx(eC,{ref:n,className:pn("text-lg font-semibold leading-none tracking-tight",e),...t}));pC.displayName=eC.displayName;const hC=g.forwardRef(({className:e,...t},n)=>r.jsx(tC,{ref:n,className:pn("text-sm text-muted-foreground",e),...t}));hC.displayName=tC.displayName;function LCe(){const e=In(),n=new URLSearchParams(window.location.search).get("template"),[s,i]=g.useState(1),[a,o]=g.useState([]),[l,c]=g.useState(!0),[d,u]=g.useState(!1),[p,m]=g.useState(null),[x,w]=g.useState(!1),[y,v]=g.useState({name:"",description:"",template_ids:n?[n]:[],language:"pt",confidential:!1,notification_channel:"email"}),[j,k]=g.useState([{name:"",email:"",phone:""}]),[S,_]=g.useState(!1),[F,A]=g.useState("");g.useEffect(()=>{ne.entities.AssessmentTemplate.filter({status:"published"}).then(X=>{o(X),c(!1)})},[]);const C=X=>{v(N=>({...N,template_ids:N.template_ids.includes(X)?N.template_ids.filter(W=>W!==X):[...N.template_ids,X]}))},D=X=>{v(N=>({...N,template_ids:N.template_ids.filter(W=>W!==X)}))},P=()=>k([...j,{name:"",email:"",phone:""}]),L=X=>k(j.filter((N,W)=>W!==X)),T=(X,N,W)=>{const O=[...j];O[X][N]=W,k(O)},R=X=>{const N=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return X.split(`
921`).map(O=>O.trim()).filter(Boolean).map(O=>{const G=O.match(/^(.+?)\s*<([^>]+)>$/);if(G){const M=G[1].trim(),z=G[2].trim();if(N.test(z))return{name:M,email:z,phone:""}}else if(N.test(O))return{name:"",email:O,phone:""};return null}).filter(Boolean)},U=()=>{const X=R(F);if(X.length===0)return;const N=j.filter(W=>W.email.trim()!=="");k([...N,...X]),A(""),_(!1)},I=async()=>{var X;u(!0),m(null);try{const N=await ne.auth.me(),W=await ne.functions.invoke("getWorkspaceId",{user_email:N.email}),O=((X=W==null?void 0:W.data)==null?void 0:X.workspace_id)||(W==null?void 0:W.workspace_id),G=await ne.entities.AssessmentCampaign.create({workspace_id:O,template_id:y.template_ids[0],name:y.name,description:y.description,language:y.language,confidential:y.confidential,notification_channel:y.notification_channel,status:"active",settings:{require_consent:!0,show_results_to_respondent:!1,allow_retake:!1,reminder_enabled:!0}});await ne.entities.AssessmentCampaign.update(G.id,{template_ids:y.template_ids});for(const M of j.filter(z=>z.email)){const z=crypto.randomUUID().replace(/-/g,"").substring(0,16);let K=await ne.entities.TalentProfile.filter({email:M.email,workspace_id:O}),Y;K.length>0?Y=K[0]:Y=await ne.entities.TalentProfile.create({workspace_id:O,full_name:M.name||M.email.split("@")[0],email:M.email,source:"assessment_invite"}),await ne.entities.AssessmentInvitation.create({workspace_id:O,campaign_id:G.id,talent_profile_id:Y.id,email:M.email,full_name:M.name||M.email.split("@")[0],token:z,status:"pending",reminder_count:0})}e(`/app/assessments/campaigns/${G.id}`)}catch(N){m((N==null?void 0:N.message)||"Erro ao criar campanha. Tente novamente."),u(!1)}},H=y.template_ids.map(X=>a.find(N=>N.id===X)).filter(Boolean),V=a.filter(X=>!y.template_ids.includes(X.id));return l?r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):r.jsxs(Jr.div,{initial:{opacity:0}
921,animate:{opacity:1},transition:{duration:.3},children:[r.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[r.jsx("button",{onClick:()=>e(-1),className:"p-2 rounded-md hover:bg-muted transition-colors",children:r.jsx(bo,{className:"w-4 h-4"})}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:kt.createCampaign.title}),r.jsxs("p",{className:"text-muted-foreground text-sm mt-0.5",children:[kt.createCampaign.step," ",s," ",kt.createCampaign.of," 2"]})]})]}),r.jsxs("div",{className:"flex gap-2 mb-8",children:[r.jsx("div",{className:`h-1 flex-1 rounded-full ${s>=1?"bg-primary":"bg-muted"}`}),r.jsx("div",{className:`h-1 flex-1 rounded-full ${s>=2?"bg-primary":"bg-muted"}`})]}),r.jsx("div",{className:"max-w-2xl",children:s===1?r.jsxs("div",{className:"bg-card rounded-xl border border-border p-8 space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(la,{className:"text-sm font-medium",children:kt.createCampaign.campaignName}),r.jsx(Xr,{placeholder:kt.createCampaign.campaignNamePlaceholder,value:y.name,onChange:X=>v({...y,name:X.target.value}),className:"h-11"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(la,{className:"text-sm font-medium",children:kt.createCampaign.description}),r.jsx(Dy,{placeholder:kt.createCampaign.descriptionPlaceholder,value:y.description,onChange:X=>v({...y,description:X.target.value}),rows:3})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(la,{className:"text-sm font-medium",children:"Bateria de testes"}),H.length>0&&r.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:H.map(X=>r.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 bg-primary/10 text-primary rounded-full text-xs font-medium",children:[X.name_pt||X.name,r.jsx("button",{onClick:()=>D(X.id),className:"hover:opacity-70 ml-0.5",children:r.jsx(Jt,{className:"w-3 h-3"})})]},X.id))}),r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>w(X=>!X),className:"flex items-center justify-between w-full h-11 px-3 border border-border rounded-lg text-sm text-muted-foreground hover:border-primary/40 transition-colors bg-background",children:[r.jsx("span",{children:H.length===0?"Selecione os testes da bateria...":`${H.length} teste${H.length!==1?"s":""} selecionado${H.length!==1?"s":""}`}),r.jsx(ar,{className:"w-4 h-4"})]}),x&&r.jsx("div",{className:"absolute top-full left-0 right-0 z-20 mt-1 bg-card border border-border rounded-lg shadow-lg max-h-52 overflow-y-auto",children:V.length===0?r.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"Todos os testes já foram adicionados."}):V.map(X=>r.jsxs("button",{onClick:()=>{C(X.id),w(!1)},className:"flex items-center justify-between w-full px-3 py-2.5 text-sm hover:bg-muted/50 transition-colors text-left",children:[r.jsx("span",{className:"font-medium",children:X.name_pt||X.name}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:[X.estimated_duration_minutes||20," min"]})]},X.id))})]}),a.length===0&&r.jsx("p",{className:"text-xs text-muted-foreground",children:kt.createCampaign.noTemplates})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(la,{className:"text-sm font-medium",children:kt.createCampaign.language}),r.jsxs(cf,{value:y.language,onValueChange:X=>v({...y,language:X}),children:[r.jsx(_d,{className:"h-11",children:r.jsx(df,{})}),r.jsxs(Cd,{children:[r.jsx(ol,{value:"pt",children:kt.createCampaign.languagePt}),r.jsx(ol,{value:"en",children:kt.createCampaign.languageEn})]})]}),r.jsx("p",{className:"text-xs text-muted-foreground",children:kt.createCampaign.languageDesc})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(la,{className:"text-sm font-medium",children:kt.createCampaign.notificationChannel}),r.jsxs(cf,{value:y.notification_channel,onValueChange:X=>v({...y,notification_channel:X}),children:[r.jsx(_d,{className:"h-11",children:r.jsx(df,{})}),r.jsxs(Cd,{children:[r.jsx(ol,{value:"email",children:kt.createCampaign.notificationChannelEmail}),r.jsx(ol,{value:"whatsapp",children:kt.createCampaign.notificationChannelWhatsapp})]})]}),r.jsx("p",{className:"text-xs text-muted-foreground",children:kt.createCampaign.notificationChannelDesc})]}),r.jsxs("div",{className:"flex items-start gap-3 p-4 bg-muted/50 rounded-lg",children:[r.jsx("input",{type:"checkbox",id:"confidential",checked:y.
921confidential,onChange:X=>v({...y,confidential:X.target.checked}),className:"mt-0.5 h-4 w-4 rounded border-input accent-primary"}),r.jsxs("div",{children:[r.jsx("label",{htmlFor:"confidential",className:"text-sm font-medium cursor-pointer",children:kt.createCampaign.confidential}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:kt.createCampaign.confidentialDesc})]})]}),r.jsx("div",{className:"flex justify-end",children:r.jsxs(on,{onClick:()=>i(2),disabled:!y.name||y.template_ids.length===0,className:"font-medium",children:[kt.createCampaign.continue,r.jsx(Rc,{className:"w-4 h-4 ml-2"})]})})]}):r.jsxs("div",{className:"bg-card rounded-xl border border-border p-8 space-y-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold mb-1",children:kt.createCampaign.addRespondents}),r.jsx("p",{className:"text-sm text-muted-foreground",children:kt.createCampaign.addRespondentsDesc})]}),r.jsx("div",{className:"space-y-3",children:j.map((X,N)=>r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(Xr,{placeholder:kt.createCampaign.namePlaceholder,value:X.name,onChange:W=>T(N,"name",W.target.value),className:"h-10 flex-1"}),r.jsx(Xr,{placeholder:kt.createCampaign.emailPlaceholder,type:"email",value:X.email,onChange:W=>T(N,"email",W.target.value),className:"h-10 flex-1"}),r.jsx(Xr,{placeholder:"Telefone (opcional)",type:"tel",value:X.phone,onChange:W=>T(N,"phone",W.target.value),className:"h-10 flex-1"}),j.length>1&&r.jsx("button",{onClick:()=>L(N),className:"p-2 text-muted-foreground hover:text-destructive transition-colors",children:r.jsx(Jt,{className:"w-4 h-4"})})]},N))}),r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsxs("button",{onClick:P,className:"flex items-center gap-2 text-sm text-primary font-medium hover:text-primary/80 transition-colors",children:[r.jsx(Ln,{className:"w-4 h-4"}),kt.createCampaign.addAnother]}),r.jsx("span",{className:"text-muted-foreground text-sm",children:"ou"}),r.jsx("button",{onClick:()=>_(!0),className:"text-sm text-primary font-medium hover:text-primary/80 transition-colors",children:"Importar lista"})]}),p&&r.jsx("p",{className:"text-sm text-destructive bg-destructive/10 px-4 py-2 rounded-lg",children:p}),r.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-border",children:[r.jsxs(on,{variant:"ghost",onClick:()=>i(1),children:["← ",kt.createCampaign.goBack]}),r.jsxs(on,{onClick:I,disabled:d||!j.some(X=>X.email),className:"font-medium",children:[d?kt.createCampaign.creating:kt.createCampaign.createAndSend,!d&&r.jsx(pa,{className:"w-4 h-4 ml-2"})]})]})]})}),r.jsx(gz,{open:S,onOpenChange:_,children:r.jsxs(dC,{className:"max-w-lg",children:[r.jsxs(uC,{children:[r.jsx(pC,{children:"Importar lista de candidatos"}),r.jsxs(hC,{children:["Cole um candidato por linha. Formatos aceitos: ",r.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"Nome <email>"})," ou apenas ",r.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"email"})]})]}),r.jsx(Dy,{rows:8,placeholder:`Ana Silva <[email protected]>
922[email protected]`,value:F,onChange:X=>A(X.target.value),className:"text-sm font-mono"}),r.jsxs(fC,{className:"gap-2",children:[r.jsx(on,{variant:"outline",size:"sm",onClick:()=>{_(!1),A("")},children:"Cancelar"}),r.jsx(on,{size:"sm",onClick:U,disabled:R(F).length===0,children:`Adicionar ${R(F).length} candidato${R(F).length!==1?"s":""} à lista`})]})]})})]})}function zCe({campaign:e,onClose:t,onSaved:n}){const[s,i]=g.useState(e.name),[a,o]=g.useState(!1),l=async()=>{s.trim()&&(o(!0),await ne.entities.AssessmentCampaign.update(e.id,{name:s.trim()}),n(s.trim()),t())};return r.jsxs(Iy,{onClose:t,children:[r.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Editar nome"}),r.jsx(Xr,{value:s,onChange:c=>i(c.target.value),className:"h-10 mb-4",autoFocus:!0,onKeyDown:c=>c.key==="Enter"&&l()}),r.jsxs("div",{className:"flex justify-end gap-2",children:[r.jsx(on,{variant:"outline",size:"sm",onClick:t,children:"Cancelar"}),r.jsx(on,{size:"sm",disabled:a||!s.trim(),onClick:l,children:a?"Salvando...":"Salvar"})]})]})}function WCe({campaign:e,templates:t,onClose:n,onSaved:s}){var S;const{toast:i}=Wm(),a=((S=e.template_ids)==null?void 0:S.length)>0?e.template_ids:e.template_id?[e.template_id]:[],[o,l]=g.useState([...a]),[c,d]=g.useState(!1),[u,p]=g.useState(!0),[m,x]=g.useState(null),w=_=>{l(F=>F.includes(_)?F.filter(A=>A!==_):[...F,_])},y=async()=>{const _=m.id;try{const F=await ne.entities.AssessmentResult.filter({campaign_id:e.id,template_id:_});for(const C of F)await ne.entities.AssessmentResult.delete(C.id);const A=await ne.entities.AssessmentSession.filter({campaign_id:e.id,template_id:_});for(const C of A){const D=await ne.entities.AssessmentResponse.filter({session_id:C.id});for(const P of D)await ne.entities.AssessmentResponse.delete(P.id);await ne.entities.AssessmentSession.delete(C.id)}}catch(F){console.error("Erro ao excluir dados do teste removido:",F)}l(F=>F.filter(A=>A!==_)),x(null),i({title:"Teste removido",description:`${m.name_pt} e seus resultados foram excluídos permanentemente.`})},v=async()=>{o.length!==0&&(d(!0),await ne.entities.AssessmentCampaign.update(e.id,{template_ids:o,template_id:o[0]}),s(o),n())},j=o.map(_=>t.find(F=>
922F.id===_)).filter(Boolean),k=t.filter(_=>!o.includes(_.id));return m?r.jsxs(Iy,{onClose:()=>x(null),children:[r.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[r.jsx("div",{className:"w-10 h-10 rounded-full bg-red-50 flex items-center justify-center flex-shrink-0",children:r.jsx(zn,{className:"w-5 h-5 text-red-600"})}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold mb-1",children:"Remover teste"}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Tem certeza que deseja remover ",r.jsx("strong",{children:m.name_pt}),"? Todos os resultados de candidatos para este teste serão ",r.jsx("strong",{children:"excluídos permanentemente"}),". Esta ação não pode ser desfeita."]})]})]}),r.jsxs("div",{className:"flex justify-end gap-2",children:[r.jsx(on,{variant:"outline",size:"sm",onClick:()=>x(null),children:"Cancelar"}),r.jsx(on,{size:"sm",className:"bg-red-600 hover:bg-red-700 text-white",onClick:y,children:"Sim, remover e excluir dados"})]})]}):r.jsxs(Iy,{onClose:n,children:[r.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Editar bateria de testes"}),u&&r.jsxs("div",{className:"flex items-start gap-2 bg-amber-50 border border-amber-200 text-amber-800 text-xs rounded-lg px-3 py-2.5 mb-4",children:[r.jsx(_o,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),r.jsx("span",{className:"flex-1",children:"Remover um teste exclui permanentemente os resultados dos candidatos para aquele teste."}),r.jsx("button",{onClick:()=>p(!1),className:"ml-1 hover:opacity-70 flex-shrink-0",children:r.jsx(Jt,{className:"w-3.5 h-3.5"})})]}),j.length>0&&r.jsxs("div",{className:"mb-4",children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Testes na campanha:"}),r.jsx("div",{className:"flex flex-wrap gap-2",children:j.map(_=>r.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 bg-primary/10 text-primary rounded-full text-xs font-medium",children:[_.name_pt||_.name,r.jsx("button",{onClick:()=>x(_),className:"hover:opacity-70 transition-opacity ml-0.5",children:r.jsx(Jt,{className:"w-3 h-3"})})]},_.id))})]}),k.length>0&&r.jsxs("div",{className:"mb-4",children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Adicionar da biblioteca:"}),r.jsx("div",{className:"space-y-1.5 max-h-48 overflow-y-auto",children:k.map(_=>r.jsxs("button",{onClick:()=>w(_.id),className:"flex items-center gap-3 w-full px-3 py-2 rounded-lg border border-border hover:bg-muted/50 transition-colors text-left",children:[r.jsx("span",{className:"text-sm font-medium",children:_.name_pt||_.name}),r.jsxs("span",{className:"ml-auto text-xs text-muted-foreground",children:[_.estimated_duration_minutes||20," min"]})]},_.id))})]}),o.length===0&&r.jsx("p",{className:"text-sm text-muted-foreground text-center py-2 mb-4",children:"Adicione pelo menos um teste."}),r.jsxs("div",{className:"flex justify-end gap-2",children:[r.jsx(on,{variant:"outline",size:"sm",onClick:n,children:"Cancelar"}),r.jsx(on,{size:"sm",disabled:c||o.length===0,onClick:v,children:c?"Salvando...":"Salvar"})]})]})}function $Ce({campaign:e,onClose:t}){const n=In(),[s,i]=g.useState(!1),a=async()=>{i(!0);try{await ne.entities.AssessmentCampaign.delete(e.id),n("/app/assessments")}catch{i(!1)}};return r.jsxs(Iy,{onClose:t,children:[r.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Excluir campanha"}),r.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Tem certeza que deseja excluir esta campanha? Esta ação não pode ser desfeita."}),r.jsxs("div",{className:"flex justify-end gap-2",children:[r.jsx(on,{variant:"outline",size:"sm",onClick:t,children:"Cancelar"}),r.jsx(on,{size:"sm",disabled:s,onClick:a,className:"bg-red-600 hover:bg-red-700 text-white",children:s?"Excluindo...":"Excluir"})]})]})}function Iy({children:e,onClose:t}){return r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:t,children:r.jsxs("div",{className:"bg-card rounded-xl border border-border shadow-xl p-6 w-full max-w-md relative",onClick:n=>n.stopPropagation(),children:[r.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-1 rounded-md hover:bg-muted text-muted-foreground",children:r.jsx(Jt,{className:"w-4 h-4"})}),e]})})}function UCe({campaign:e,templates:t,onNameSaved:n,onTemplatesSaved:s}){const[i,a]=g.useState(!1),[o,l]=g.useState(null),c=g.useRef(null);g.useEffect(()=>{const u=p=>{c.current&&!c.current.contains(p.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const d=u=>{l(u),a(!1)};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"relative",ref:c,children:[r.jsx("button",{onClick:()=>a(u=>!u),className:"p-2 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(No,{className:"w-4 h-4"})}),i&&r.jsxs("div",{className:"absolute right-0 top-full mt-1 w-48 bg-card border border-border rounded-lg shadow-lg z-20 overflow-hidden",children:[r.jsxs("button",{onClick:()=>d("rename"),className:"flex items-center gap-2.5 w-full px-3 py-2.5 text-sm hover:bg-muted transition-colors text-left",children:[r.jsx($r,{className:"w-3.5 h-3.5 text-muted-foreground"}),"Editar nome"]}),r.jsxs("button",{onClick:()=>d("tests"),className:"flex items-center gap-2.5 w-full px-3 py-2.5 text-sm hover:bg-muted transition-colors text-left",children:[r.jsx(u8,{className:"w-3.5 h-3.5 text-muted-foreground"}),"Editar testes"]}),r.jsx("div",{className:"border-t border-border"}),r.jsxs("button",{onClick:()=>d("delete"),className:"flex items-center gap-2.5 w-full px-3 py-2.5 text-sm hover:bg-red-50 text-red-600 transition-colors text-left",children:[r.jsx(zn,{className:"w-3.5 h-3.5"}),"Excluir campanha"]})]})]}),o==="rename"&&r.jsx(zCe,{campaign:e,onClose:()=>l(null),onSaved:n}),o==="tests"&&r.jsx(WCe,{campaign:e,templates:t,onClose:()=>l(null),onSaved:s}),o==="delete"&&r.jsx($Ce,{campaign:e,onClose:()=>l(null)})]})}const cN={pending:{bg:"bg-slate-50",text:"text-slate-600",icon:Di,label:kt.campaigns.invitationStatus.pending},sent:{bg:"bg-blue-50",text:"text-blue-600",icon:mr,label:kt.campaigns.invitationStatus.sent},opened:{bg:"bg-amber-50",text:"text-amber-600",icon:$a,label:kt.campaigns.invitationStatus.opened},started:{bg:"bg-purple-50",text:"text-purple-600",icon:Di,label:kt.campaigns.invitationStatus.started},completed:{bg:"bg-emerald-50",text:"text-emerald-600",icon:s8,label:kt.campaigns.invitationStatus.completed},expired:{bg:"bg-red-50",text:"text-red-600",icon:Di,label:kt.campaigns.invitationStatus.expired}};function VCe(){const{id:e}=Do(),{toast:t}=Wm(),[n,s]=g.useState(null),[i,a]=g.useState([]),[o,l]=g.useState([]),[c,d]=g.useState(!0),[u,p]=g.useState({}),[m,x]=g.useState(null),[w,y]=g.useState(null),[v,j]=g.useState({}),[k,S]=g.useState(!1),[_,F]=g.useState(null),[A,C]=g.useState(!1),[D,P]=g.useState({name:"",email:"",ph
922one:""}),[L,T]=g.useState(!1),[R,U]=g.useState(!1),[I,H]=g.useState(""),[V,X]=g.useState(!1),[N,W]=g.useState(null),[O,G]=g.useState([]),[M,z]=g.useState(!1);g.useEffect(()=>{K()},[e]);const K=async()=>{const[ge,$e,ft,Qe]=await Promise.all([ne.entities.AssessmentCampaign.filter({id:e}),ne.entities.AssessmentInvitation.filter({campaign_id:e}),ne.entities.AssessmentTemplate.filter({status:"published"}),ne.entities.AssessmentResult.filter({campaign_id:e})]);s(ge[0]||null),a($e),l(ft);const Ve=[...new Set(Qe.map(_e=>_e.session_id).filter(Boolean))],ze=Ve.length>0?await ne.entities.AssessmentSession.filter({id:{$in:Ve}}):[],at={};for(const _e of ze)at[_e.id]=_e.invitation_id;const Nt={};for(const _e of Qe){const be=_e.session_id?at[_e.session_id]:null;be&&(Nt[be]||(Nt[be]=[]),Nt[be].push({result_id:_e.id,session_id:_e.session_id,template_id:_e.template_id}))}p(Nt),d(!1)},Y=ge=>{const $e=`${window.location.origin}/respond/${ge}`;navigator.clipboard.writeText($e),x(ge),t({title:kt.campaigns.linkCopied,description:kt.campaigns.linkCopiedDesc}),setTimeout(()=>x(null),2e3)},J=ge=>{y(ge.id),j({name:ge.full_name||"",email:ge.email||"",phone:ge.phone||""})},Q=ge=>{v.email!==ge.email?(F(ge),S(!0)):ie(ge)},ie=async ge=>{const $e=v.email!==ge.email;if(await ne.entities.TalentProfile.update(ge.talent_profile_id,{full_name:v.name,email:v.email}),$e){await ne.entities.AssessmentInvitation.delete(ge.id);const ft=crypto.randomUUID().replace(/-/g,"").substring(0,16),Qe=await ne.entities.AssessmentInvitation.create({workspace_id:ge.workspace_id,campaign_id:ge.campaign_id,talent_profile_id:ge.talent_profile_id,email:v.email,full_name:v.name,token:ft,status:"pending",reminder_count:0});ne.functions.invoke("sendAssessmentInvite",{invitation_id:Qe.id}).catch(Ve=>{t({title:"Erro ao enviar convite",description:"O candidato foi criado, mas o email não pôde ser enviado.",variant:"destructive"}),console.error("sendAssessmentInvite error:",Ve)})}else await ne.entities.AssessmentInvitation.update(ge.id,{full_name:v.name,phone:v.phone});await K(),y(null),j({}),F(null),S(!1),t({title:$e?"Email atualizado — link reenviado":"Respondente atualizado",description:$e?`Novo convite enviado para ${v.email}`:""})},ae=async ge=>{if(ge.status==="completed"){t({title:"Erro",description:"Não é possível remover um respondente que já concluiu a avaliação."});return}await ne.entities.AssessmentInvitation.delete(ge.id),a($e=>$e.filter(ft=>ft.id!==ge.id)),t({title:"Respondente removido",description:""})},re=async(ge,$e,ft)=>{const Qe=await ne.entities.AssessmentInvitation.filter({campaign_id:e,email:$e});if(Qe&&Qe.length>0)return{skipped:!0};const Ve=await ne.entities.TalentProfile.filter({email:$e});let ze;Ve&&Ve.length>0?ze=Ve[0].id:ze=(await ne.entities.TalentProfile.create({email:$e,full_name:ge||$e})).id;const at=crypto.randomUUID().replace(/-/g,"").substring(0,16),Nt=await ne.entities.AssessmentInvitation.create({workspace_id:n.workspace_id,campaign_id:e,talent_profile_id:ze,email:$e,full_name:ge||$e,phone:ft||"",token:at,status:"pending",reminder_count:0});return ne.functions.invoke("sendAssessmentInvite",{invitation_id:Nt.id}).catch(()=>{}),{skipped:!1}},pe=async()=>{if(!D.email.trim())return;T(!0),(await re(D.name.trim(),D.email.trim(),D.phone.trim())).skipped?t({title:"Candidato já adicionado",description:"Este candidato já foi adicionado a esta campanha.",variant:"destructive"}):(await K(),P({name:"",email:"",phone:""}),C(!1),t({title:"Candidato adicionado",description:`Convite enviado para ${D.email.trim()}`})),T(!1)},Z=ge=>{const $e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return ge.split(`
923`).map(Qe=>Qe.trim()).filter(Boolean).map(Qe=>{const Ve=Qe.match(/^(.+?)\s*<([^>]+)>$/);if(Ve){const ze=Ve[1].trim(),at=Ve[2].trim();if($e.test(at))return{name:ze,email:at}}else if($e.test(Qe))return{name:"",email:Qe};return null}).filter(Boolean)},Ne=async()=>{const ge=Z(I);if(ge.length===0)return;X(!0);let $e=0,ft=0;for(const{name:Ve,email:ze}of ge)(await re(Ve,ze,"")).skipped?ft++:$e++;await K(),H(""),U(!1);const Qe=ft>0?`${$e} adicionados, ${ft} já existiam`:"";t({title:`${$e} candidato${$e!==1?"s":""} adicionado${$e!==1?"s":""}`,description:Qe}),X(!1)},te=async ge=>{try{await ne.functions.invoke("sendRegeneratedLink",{invitation_id:ge.
923id}),t({title:"Link reenviado com sucesso",description:`Convite enviado para ${ge.email}`})}catch{t({title:"Erro ao reenviar",description:"Não foi possível reenviar o convite.",variant:"destructive"})}},xe=async ge=>{const $e=crypto.randomUUID().replace(/-/g,"").substring(0,16);await ne.entities.AssessmentInvitation.update(ge.id,{token:$e,status:"pending",reminder_count:0}),ne.functions.invoke("sendRegeneratedLink",{invitation_id:ge.id}).catch(()=>{}),await K(),t({title:"Link regenerado",description:"Um novo link foi gerado para este respondente."})},he=async ge=>{W(ge),z(!0);const $e=await ne.entities.AssessmentSession.filter({invitation_id:ge.id});G($e),z(!1)};if(c)return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})});if(!n)return r.jsxs("div",{className:"text-center py-16",children:[r.jsx("p",{className:"text-muted-foreground",children:kt.campaigns.notFound}),r.jsx(ut,{to:"/app/assessments",children:r.jsx(on,{variant:"ghost",className:"mt-4",children:kt.campaigns.backToAssessments})})]});const le=i.filter(ge=>ge.status==="completed").length;return r.jsxs(Jr.div,{initial:{opacity:0}
923,animate:{opacity:1},transition:{duration:.3},children:[r.jsxs("div",{className:"flex items-start justify-between mb-8",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(ut,{to:"/app/assessments",className:"p-2 rounded-md hover:bg-muted transition-colors",children:r.jsx(bo,{className:"w-4 h-4"})}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:n.name}),r.jsxs("p",{className:"text-muted-foreground text-sm mt-0.5",children:[le," / ",i.length," ",kt.campaigns.completedOf]})]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:`text-xs font-medium px-3 py-1.5 rounded-full ${n.status==="active"?"bg-emerald-50 text-emerald-700":n.status==="paused_billing"?"bg-red-50 text-red-700":"bg-muted text-muted-foreground"}`,children:kt.campaigns.status[n.status]||n.status}),r.jsx(UCe,{campaign:n,templates:o,onNameSaved:ge=>s($e=>({...$e,name:ge})),onTemplatesSaved:ge=>s($e=>({...$e,template_ids:ge,template_id:ge[0]}))})]})]}),(()=>{var ft;const $e=(((ft=n.template_ids)==null?void 0:ft.length)>0?n.template_ids:n.template_id?[n.template_id]:[]).map(Qe=>o.find(Ve=>Ve.id===Qe)).filter(Boolean);return $e.length>0?r.jsxs("div",{className:"bg-card rounded-xl border border-border p-4 mb-6",children:[r.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-3",children:"Bateria de testes"}),r.jsx("div",{className:"flex flex-wrap gap-2",children:$e.map(Qe=>r.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted rounded-full text-xs font-medium text-foreground",children:[Qe.name_pt||Qe.name,r.jsxs("span",{className:"text-muted-foreground",children:["· ",Qe.estimated_duration_minutes||20,"min"]})]},Qe.id))})]}):null})(),r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6 mb-6",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsx("span",{className:"text-sm font-medium",children:kt.campaigns.completionProgress}),r.jsxs("span",{className:"text-sm text-muted-foreground",children:[i.length>0?Math.round(le/i.length*100):0,"%"]})]}),r.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-500",style:{width:i.length>0?`${le/i.length*100}%`:"0%"}})})]}),r.jsxs("div",{className:"bg-card rounded-xl border border-border overflow-hidden",children:[r.jsxs("div",{className:"px-6 py-4 border-b border-border flex items-center justify-between",children:[r.jsxs("h3",{className:"font-semibold",children:[kt.campaigns.respondents," (",i.length,")"]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs(on,{size:"sm",variant:"outline",className:"h-8 text-xs font-medium",onClick:()=>{C(ge=>!ge),U(!1)},children:[r.jsx(v8,{className:"w-3.5 h-3.5 mr-1.5"}),"+ Adicionar candidato"]}),r.jsx(on,{size:"sm",variant:"ghost",className:"h-8 text-xs font-medium",onClick:()=>{U(!0),C(!1)},children:"Importar lista"})]})]}),A&&r.jsxs("div",{className:"px-6 py-4 border-b border-border bg-muted/30",children:[r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3",children:[r.jsx(Xr,{placeholder:"Nome completo",value:D.name,onChange:ge=>P($e=>({...$e,name:ge.target.value})),className:"h-9 text-sm"}),r.jsx(Xr,{placeholder:"[email protected]",type:"email",value:D.email,onChange:ge=>P($e=>({...$e,email:ge.target.value})),className:"h-9 text-sm"}),r.jsx(Xr,{placeholder:"Telefone (opcional)",value:D.phone,onChange:ge=>P($e=>({...$e,phone:ge.target.value})),className:"h-9 text-sm"})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(on,{size:"sm",onClick:pe,disabled:!D.email.trim()||L,className:"h-8 text-xs font-medium",children:L?"Adicionando...":"Adicionar"}),r.jsx(on,{size:"sm",variant:"outline",onClick:()=>{C(!1),P({name:"",email:"",phone:""})},className:"h-8 text-xs font-medium",children:"Cancelar"})]})]}),i.length===0?r.jsx("div",{className:"px-6 py-12 text-center text-muted-foreground text-sm",children:kt.campaigns.noInvitations}):r.jsx("div",{className:"divide-y divide-border",children:i.map(ge=>{var Qe,Ve;const $e=cN[ge.status]||cN.pending,ft=$e.icon;return r.jsxs("div",{className:"flex items-center justify-between px-6 py-4",children:[r.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[r.jsx("div",{className:"w-9 h-9 rounded-full bg-muted flex items-center justify-center text-sm font-medium",children:(ge.full_name||ge.email)[0].toUpperCase()}),w===ge.id?r.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Xr,{value:v.name,onChange:ze=>j({...v,name:ze.target.value}),className:"h-8 text-sm",placeholder:"Nome"}),r.jsx(Xr,{value:v.phone,onChange:ze=>j({...v,phone:ze.target.value}),className:"h-8 text-sm",placeholder:"Telefone"})]}),r.jsxs("div",{children:[r.jsx(Xr,{value:v.email,onChange:ze=>j({...v,email:ze.target.value}),className:"h-8 text-sm",placeholder:"Email",type:"email"}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Alterar o email invalidará o link anterior."})]})]}):r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium",children:ge.full_name||ge.email}),r.jsx("p",{className:"text-xs text-muted-foreground",children:ge.email})]})]}),r.jsx("div",{className:"flex items-center gap-3",children:w===ge.id?r.jsxs(r.Fragment,{children:[r.jsx(on,{size:"sm",variant:"default",onClick:()=>Q(ge),className:"h-8 text-xs font-medium",children:"Salvar"}),r.jsx(on,{size:"sm",variant:"outline",onClick:()=>{y(null),j({})},className:"h-8 text-xs font-medium",children:"Cancelar"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("span",{className:`flex items-center gap-1.5 text-xs font-medium px-2.5 py-1 rounded-full ${$e.bg} ${$e.text}`,children:[r.jsx(ft,{className:"w-3 h-3"}),$e.label]}
923),ge.status==="completed"&&((Qe=u[ge.id])==null?void 0:Qe.length)>0&&r.jsx("button",{onClick:()=>he(ge),className:"text-xs text-muted-foreground hover:text-foreground transition-colors underline-offset-2 hover:underline",children:"Ver resultados"}),r.jsx("button",{onClick:()=>Y(ge.token),className:"p-2 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",title:kt.campaigns.copyLink,children:m===ge.token?r.jsx(fn,{className:"w-4 h-4 text-emerald-600"}):r.jsx(Js,{className:"w-4 h-4"})}),ge.status==="completed"&&((Ve=u[ge.id])==null?void 0:Ve.length)>0&&r.jsx("button",{onClick:()=>he(ge),className:"p-2 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",title:kt.campaigns.viewResult,children:r.jsx($a,{className:"w-4 h-4"})}),ge.status==="expired"&&r.jsx("button",{onClick:()=>xe(ge),className:"p-2 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",title:"Regenerar link",children:r.jsx(pa,{className:"w-4 h-4"})}),r.jsxs(G_,{children:[r.jsx(K_,{asChild:!0,children:r.jsx("button",{className:"p-2 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(No,{className:"w-4 h-4"})})}),r.jsxs(P1,{align:"end",children:[r.jsxs(vo,{onClick:()=>J(ge),children:[r.jsx($r,{className:"w-4 h-4 mr-2"}),"Editar"]}),ge.status!=="completed"&&r.jsxs(vo,{onClick:()=>te(ge),children:[r.jsx(pa,{className:"w-4 h-4 mr-2"}),"Reenviar link"]}),ge.status!=="completed"&&r.jsxs(vo,{onClick:()=>ae(ge),className:"text-destructive",children:[r.jsx(zn,{className:"w-4 h-4 mr-2"}),"Remover"]})]})]})]})})]},ge.id)})})]}),N&&r.jsx("div",{className:"fixed inset-0 z-50 flex justify-end",onClick:()=>W(null),children:r.jsxs("div",{className:"w-full max-w-md bg-background border-l border-border h-full overflow-y-auto shadow-2xl",onClick:ge=>ge.stopPropagation(),children:[r.jsxs("div",{className:"px-6 py-5 border-b border-border flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold",children:N.full_name||N.email}),r.jsx("p",{className:"text-xs text-muted-foreground",children:N.email})]}),r.jsx("button",{onClick:()=>W(null),className:"p-2 rounded-md hover:bg-muted",children:r.jsx(Jt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"px-6 py-4",children:[r.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-3",children:"Testes realizados"}),M?r.jsx("p",{className:"text-sm text-muted-foreground",children:"Carregando..."}):(()=>{var ft;const ge=((ft=n.template_ids)==null?void 0:ft.length)>0?n.template_ids:n.template_id?[n.template_id]:[],$e=u[N==null?void 0:N.id]||[];return ge.map(Qe=>{var _e;const Ve=o.find(be=>be.id===Qe),ze=O.find(be=>be.template_id===Qe),at=ze&&(ze.status==="completed"||ze.status==="scored"),Nt=at?(_e=$e.find(be=>be.session_id===ze.id))==null?void 0:_e.result_id:null;return r.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border last:border-0",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium",children:(Ve==null?void 0:Ve.name_pt)||(Ve==null?void 0:Ve.name)||Qe}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:at?r.jsx("span",{className:"text-emerald-600",children:"✓ Concluído"}):r.jsx("span",{children:"Pendente"})})]}),Nt&&r.jsxs(ut,{to:`/app/assessments/results/${Nt}`,className:"text-xs font-medium text-primary hover:underline flex items-center gap-1",children:["Relatório ",r.jsx($a,{className:"w-3 h-3"})]})]},Qe)})})()]})]})}),r.jsx(gz,{open:R,onOpenChange:U,children:r.jsxs(dC,{className:"max-w-lg",children:[r.jsxs(uC,{children:[r.jsx(pC,{children:"Importar lista de candidatos"}),r.jsxs(hC,{children:["Cole um candidato por linha. Formatos aceitos: ",r.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"Nome <email>"})," ou apenas ",r.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"email"})]})]}),r.jsx(Dy,{rows:8,placeholder:`Ana Silva <[email protected]>
924[email protected]
925Maria Souza <[email protected]>`,value:I,onChange:ge=>H(ge.target.value),className:"text-sm font-mono"}),r.jsxs(fC,{className:"gap-2",children:[r.jsx(on,{variant:"outline",size:"sm",onClick:()=>{U(!1),H("")},children:"Cancelar"}),r.jsx(on,{size:"sm",onClick:Ne,disabled:Z(I).length===0||V,children:V?"Importando...":`Importar ${Z(I).length} candidato${Z(I).length!==1?"s":""}`})]})]})}),r.jsx(pz,{open:k,onOpenChange:S,children:r.jsxs(rC,{children:[r.jsxs(sC,{children:[r.jsx(aC,{children:"Alterar email do respondente"}
925),r.jsx(oC,{children:"Alterar o email vai invalidar o link anterior enviado para este candidato. Deseja prosseguir?"})]}),r.jsxs(iC,{children:[r.jsx(cC,{children:"Cancelar"}),r.jsx(lC,{onClick:()=>ie(_),children:"Sim, alterar email"})]})]})})]})}function dN(e){const t=(e||"").toLowerCase();return t.includes("muito alto")?{bg:"bg-blue-50",text:"text-blue-700",border:"border-blue-200",bar:"#3b82f6",ring:"#dbeafe"}:t.includes("alto")?{bg:"bg-emerald-50",text:"text-emerald-700",border:"border-emerald-200",bar:"#10b981",ring:"#d1fae5"}:t.includes("médio")||t.includes("medio")?{bg:"bg-amber-50",text:"text-amber-700",border:"border-amber-200",bar:"#f59e0b",ring:"#fef3c7"}:{bg:"bg-rose-50",text:"text-rose-700",border:"border-rose-200",bar:"#f43f5e",ring:"#ffe4e6"}}function HCe({score:e,label:t,style:n}){const i=2*Math.PI*54,a=i-e/100*i;return r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsxs("div",{className:"relative",style:{width:140,height:140},children:[r.jsxs("svg",{width:"140",height:"140",style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:"70",cy:"70",r:54,fill:"none",stroke:"#f3f4f6",strokeWidth:"10"}),r.jsx("circle",{cx:"70",cy:"70",r:54,fill:"none",stroke:n.bar,strokeWidth:"10",strokeDasharray:i,strokeDashoffset:a,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.8s ease"}})]}),r.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[r.jsx("span",{className:"text-3xl font-bold tracking-tight text-foreground",children:e}),r.jsx("span",{className:"text-xs text-muted-foreground",children:"/ 100"})]})]}),r.jsx("span",{className:`text-xs font-semibold px-3 py-1 rounded-full border ${n.bg} ${n.text} ${n.border}`,children:t})]})}function qCe({label:e,score:t,maxScore:n=100}){const s=Math.max(0,Math.min(100,t/n*100));return r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("span",{className:"text-sm text-foreground w-40 flex-shrink-0",children:e}),r.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-700",style:{width:`${s}%`}})}),r.jsx("span",{className:"text-sm font-semibold text-foreground w-8 text-right",children:t})]})}const GCe={abertura:"Abertura",conscienciosidade:"Conscienc.",extroversao:"Extroversão",amabilidade:"Amabilidade",neuroticismo:"Neuroticismo"},KCe={ei:{label:"ATITUDE — ENERGIA",poloA:"Introversão",poloB:"Extroversão"},sn:{label:"PERCEPÇÃO — INFORMAÇÃO",poloA:"Sensação",poloB:"Intuição"},tf:{label:"JULGAMENTO — DECISÃO",poloA:"Pensamento",poloB:"Sentimento"},jp:{label:"ESTILO DE VIDA — ESTRUTURA",poloA:"Julgamento",poloB:"Percepção"}};function YCe({result:e,template:t,candidateName:n,candidateEmail:s}){var j,k,S,_,F,A,C,D,P,L,T,R,U,I,H,V,X,N,W,O,G,M,z,K,Y;const i=((j=t==null?void 0:t.metadata)==null?void 0:j.result_format)||"multidimensional",a=(t==null?void 0:t.scoring_function)||"",o=(t==null?void 0:t.dimensions)||[],l=e.dimension_scores||{},c=e.profile_label||"—",d=dN(c),u=e.computed_at?new Date(e.computed_at).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"}):"—",p=J=>{const Q=o.find(ie=>ie.key===J);return(Q==null?void 0:Q.label_pt)||(Q==null?void 0:Q.label)||J},m=Object.entries(l).sort((J,Q)=>Q[1]-J[1]),x=e.primary_dimension||((k=m[0])==null?void 0:k[0]),w=p(x),y={card:{background:"#ffffff",border:"1px solid #e5e7eb",borderRadius:12,padding:"1.5rem"},eyebrow:{fontSize:11,fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:"#9ca3af",marginBottom:8}},v=()=>r.jsxs("div",{className:"flex items-center justify-between mb-8 print:hidden",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(ut,{to:"/app/assessments/results",className:"p-2 rounded-md hover:bg-muted transition-colors",children:r.jsx(bo,{className:"w-4 h-4"})}),r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Relatório Individual"})]}),r.jsxs("button",{onClick:()=>window.print(),className:"flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium hover:bg-muted transition-colors border border-border",children:[r.jsx(iF,{className:"w-4 h-4"}),"Imprimir / PDF"]})]});if(a==="calculateBigFiveScore"){const J=((S=e.detailed_interpretation)==null?void 0:S.fatores)||{},Q=((_=e.detailed_interpretation)==null?void 0:_.perfil_combinado)||"—",ie=((F=e.detailed_interpretation)==null?void 0:F.perfil_descricao)||"",ae=(A=e.metadata)==null?void 0:A.neuroticismo_warning,re=((C=e.metadata)==null?void 0:C.neuroticismo_aviso_texto)||"",pe=["abertura","conscienciosidade","extroversao","amabilidade","neuroticismo"];return r.jsxs(Jr.div,{initial:{opacity:0}
925,animate:{opacity:1},transition:{duration:.3},children:[r.jsx(v,{}),r.jsx("div",{style:{maxWidth:720,fontFamily:"'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[r.jsxs("div",{style:{...y.card,display:"flex",alignItems:"center",gap:20},children:[r.jsx("div",{style:{width:52,height:52,borderRadius:"50%",background:"#EEEDFE",display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"#534AB7",flexShrink:0},children:((D=n==null?void 0:n[0])==null?void 0:D.toUpperCase())||"?"}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{fontSize:16,fontWeight:700,color:"#111827",margin:0},children:n||"—"}),r.jsx("p",{style:{fontSize:13,color:"#6b7280",margin:"2px 0 0"},children:s||"—"}),r.jsx("p",{style:{fontSize:12,color:"#9ca3af",margin:"2px 0 0"},children:u})]}),r.jsx("span",{style:{background:"#EEEDFE",color:"#534AB7",fontSize:11,fontWeight:700,padding:"4px 12px",borderRadius:999,letterSpacing:"0.04em",whiteSpace:"nowrap"},children:"Big Five — OCEAN"})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:10},children:pe.map(Z=>{const Ne=J[Z]||{},te=Ne.cor||"#888888";return r.jsxs("div",{style:{...y.card,padding:"1rem",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:11,fontWeight:600,color:"#6b7280",margin:"0 0 6px"},children:GCe[Z]}),r.jsx("p",{style:{fontSize:28,fontWeight:700,color:te,margin:"0 0 4px",letterSpacing:"-0.02em"},children:Ne.score??"—"}),r.jsx("p",{style:{fontSize:11,fontWeight:600,color:te,margin:0},children:Ne.tier||"—"})]},Z)})}),r.jsxs("div",{style:y.card,children:[r.jsx("p",{style:y.eyebrow,children:"Scores por fator"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:14},children:pe.map(Z=>{const Ne=J[Z]||{},te=Ne.cor||"#888888",xe=Ne.score??0,he=o.find(ge=>ge.key===Z),le=(he==null?void 0:he.label_pt)||(he==null?void 0:he.label)||Z;return r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"200px 1fr 36px",alignItems:"center",gap:12},children:[r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:13,fontWeight:600,color:"#111827",margin:0},children:le}),Ne.polo_ativo&&r.jsx("p",{style:{fontSize:11,color:"#9ca3af",margin:"2px 0 0"},children:Ne.polo_ativo})]}),r.jsx("div",{style:{height:8,background:"#f3f4f6",borderRadius:4,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",width:`${xe}%`,background:te,borderRadius:4,transition:"width 0.6s ease"}})}),r.jsx("p",{style:{fontSize:13,fontWeight:700,color:te,textAlign:"right",margin:0},children:xe})]},Z)})})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[r.jsxs("div",{style:{...y.card,borderLeft:"3px solid #1D9E75"},children:[r.jsx("p",{style:{...y.eyebrow,color:"#1D9E75"},children:"Principal força"}),r.jsx("p",{style:{fontSize:13,color:"#374151",margin:0,lineHeight:1.6},children:((P=e.strengths_pt)==null?void 0:P[0])||"Nenhum fator com tier Alto detectado neste resultado. Todos os fatores estão na faixa Médio."})]}),r.jsxs("div",{style:{...y.card,borderLeft:"3px solid #378ADD"},children:[r.jsx("p",{style:{...y.eyebrow,color:"#378ADD"},children:"Dinâmica de equipe"}),r.jsx("p",{style:{fontSize:13,color:"#374151",margin:0,lineHeight:1.6},children:((L=e.strengths_pt)==null?void 0:L[1])||"Perfil equilibrado — sem dominância marcada em nenhuma dimensão."})]}),r.jsxs("div",{style:{...y.card,borderLeft:"3px solid #f59e0b"},children:[r.jsx("p",{style:{...y.eyebrow,color:"#b45309"},children:"Ponto de atenção"}),r.jsx("p",{style:{fontSize:13,color:"#374151",margin:0,lineHeight:1.6},children:((T=e.development_areas)==null?void 0:T[0])||"Nenhuma área crítica de desenvolvimento identificada neste resultado."})]}),r.jsxs("div",{style:{...y.card,borderLeft:"3px solid #7F77DD"},children:[r.jsxs("p",{style:{...y.eyebrow,color:"#534AB7"},children:["Arquétipo — ",Q]}),r.jsx("p",{style:{fontSize:13,color:"#374151",margin:0,lineHeight:1.6},children:ie})]})]}),ae&&r.jsxs("div",{style:{background:"#fffbeb",border:"1px solid #fcd34d",borderRadius:10,padding:"1rem 1.25rem",display:"flex",gap:10},children:[r.jsx("span",{style:{fontSize:18,flexShrink:0},children:"⚠️"}),r.jsx("p",{style:{fontSize:12,color:"#92400e",lineHeight:1.6,margin:0},children:re})]}),r.jsx("p",{style:{fontSize:11,color:"#9ca3af",lineHeight:1.6,borderTop:"1px solid #e5e7eb",paddingTop:14,margin:0},children:"Este instrumento mede autopercepção. Resultados refletem tendências disposicionais, não capacidades fixas. Conscienciosidade tem maior evidência preditiva (r≈0,22). Use como insumo complementar, nunca como critério único."})]})})]})}if(a==="calculateMBTIScore"){const J=e.profile_label||"????",Q=((R=e.detailed_interpretation)==null?void 0:R.arquetipo)||"—",ie=((U=e.detailed_interpretation)==null?void 0:U.eixos)||{};(I=e.detailed_interpretation)!=null&&I.indefinidos;const ae=((H=e.metadata)==null?void 0:H.aviso_estabilidade)||"",re=["ei","sn","tf","jp"];return r.jsxs(Jr.div,{initial:{opacity:0}
925,animate:{opacity:1},transition:{duration:.3},children:[r.jsx(v,{}),r.jsx("div",{style:{maxWidth:720,fontFamily:"'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[r.jsxs("div",{style:{...y.card,display:"flex",alignItems:"center",gap:20},children:[r.jsx("div",{style:{width:52,height:52,borderRadius:"50%",background:"#EEEDFE",display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"#3C3489",flexShrink:0},children:((V=n==null?void 0:n[0])==null?void 0:V.toUpperCase())||"?"}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{fontSize:16,fontWeight:700,color:"#111827",margin:0},children:n||"—"}),r.jsx("p",{style:{fontSize:13,color:"#6b7280",margin:"2px 0 0"},children:s||"—"}),r.jsx("p",{style:{fontSize:12,color:"#9ca3af",margin:"2px 0 0"},children:u})]}),r.jsx("span",{style:{background:"#3C3489",color:"#fff",fontSize:11,fontWeight:700,padding:"4px 12px",borderRadius:999,letterSpacing:"0.04em",whiteSpace:"nowrap"},children:"Tipos Psicológicos"})]}),r.jsxs("div",{style:{...y.card,display:"flex",alignItems:"flex-start",gap:20},children:[r.jsx("div",{style:{width:72,height:72,borderRadius:12,background:"#EEEDFE",border:"2px solid #7F77DD",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r.jsx("span",{style:{fontSize:20,fontWeight:800,color:"#3C3489",letterSpacing:"0.04em"},children:J})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("p",{style:{fontSize:18,fontWeight:700,color:"#111827",margin:"0 0 2px"},children:[J," — ",Q]}),e.summary_pt&&r.jsx("p",{style:{fontSize:13,color:"#374151",lineHeight:1.65,margin:0},children:e.summary_pt})]})]}),r.jsxs("div",{style:y.card,children:[r.jsx("p",{style:y.eyebrow,children:"Posicionamento por eixo"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:20},children:re.map(pe=>{const Z=ie[pe]||{},Ne=Z.score??50,te=Z.cor||"#888888",xe=KCe[pe]||{};return Z.polo_dominante&&Z.letra===(pe==="ei"?"I":pe==="sn"?"S":pe==="tf"?"T":"J")?Z.polo_dominante:xe.poloA,xe.poloB,r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:10,fontWeight:700,letterSpacing:"0.1em",color:"#9ca3af",marginBottom:6,textTransform:"uppercase"},children:xe.label}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:6},children:[r.jsx("span",{style:{fontSize:12,fontWeight:600,color:"#374151"},children:xe.poloA}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:"#374151"},children:xe.poloB})]}),r.jsxs("div",{style:{position:"relative",height:10,background:"#f3f4f6",borderRadius:5,overflow:"visible"},children:[r.jsx("div",{style:{height:"100%",width:`${Ne}%`,background:te,borderRadius:5,transition:"width 0.6s ease"}}),r.jsx("div",{style:{position:"absolute",top:"50%",left:`${Ne}%`,transform:"translate(-50%, -50%)",width:16,height:16,borderRadius:"50%",background:te,border:"2px solid #fff",boxShadow:"0 1px 4px rgba(0,0,0,0.15)"}})]}),r.jsxs("p",{style:{fontSize:12,color:"#6b7280",marginTop:6,textAlign:"center"},children:["Score ",Ne," — ",Z.faixa||"—"]}),Z.recomendacao&&r.jsx("p",{style:{fontSize:11,color:"#9ca3af",marginTop:2,textAlign:"center"},children:Z.recomendacao})]},pe)})})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[r.jsxs("div",{style:{...y.card,borderLeft:"3px solid #1D9E75"},children:[r.jsx("p",{style:{...y.eyebrow,color:"#1D9E75"},children:"Ponto forte principal"}),r.jsx("p",{style:{fontSize:13,color:"#374151",margin:0,lineHeight:1.6},children:((X=e.strengths_pt)==null?void 0:X[0])||"—"})]}),r.jsxs("div",{style:{...y.card,borderLeft:"3px solid #378ADD"},children:[r.jsx("p",{style:{...y.eyebrow,color:"#378ADD"},children:"No trabalho em equipe"}),r.jsx("p",{style:{fontSize:13,color:"#374151",margin:0,lineHeight:1.6},children:((N=e.strengths_pt)==null?void 0:N[1])||"—"})]}),r.jsxs("div",{style:{...y.card,borderLeft:"3px solid #f59e0b"},children:[r.jsx("p",{style:{...y.eyebrow,color:"#b45309"},children:"Ponto de atenção"}),r.jsx("p",{style:{fontSize:13,color:"#374151",margin:0,lineHeight:1.6},children:((W=e.development_areas)==null?void 0:W[0])||"—"})]}
925),r.jsxs("div",{style:{...y.card,borderLeft:"3px solid #D85A30"},children:[r.jsx("p",{style:{...y.eyebrow,color:"#D85A30"},children:"Desenvolvimento"}),r.jsx("p",{style:{fontSize:13,color:"#374151",margin:0,lineHeight:1.6},children:((O=e.development_areas)==null?void 0:O[1])||"—"})]})]}),((G=e.strengths_pt)==null?void 0:G.length)>0&&r.jsxs("div",{style:y.card,children:[r.jsx("p",{style:y.eyebrow,children:"Pontos fortes"}),r.jsx("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",gap:8},children:e.strengths_pt.map((pe,Z)=>r.jsxs("li",{style:{display:"flex",alignItems:"flex-start",gap:8,fontSize:13,color:"#374151"},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"#1D9E75",flexShrink:0,marginTop:5}}),pe]},Z))})]}),((M=e.development_areas)==null?void 0:M.length)>0&&r.jsxs("div",{style:y.card,children:[r.jsx("p",{style:y.eyebrow,children:"Áreas de desenvolvimento"}),r.jsx("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",gap:8},children:e.development_areas.map((pe,Z)=>r.jsxs("li",{style:{display:"flex",alignItems:"flex-start",gap:8,fontSize:13,color:"#374151"},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"#f59e0b",flexShrink:0,marginTop:5}}),pe]},Z))})]}),ae&&r.jsx("div",{style:{background:"#f9fafb",border:"1px solid #e5e7eb",borderRadius:10,padding:"1rem 1.25rem"},children:r.jsxs("p",{style:{fontSize:12,color:"#6b7280",lineHeight:1.65,margin:0},children:[ae," ",r.jsx("strong",{children:"Não utilizar como critério de seleção ou exclusão."})]})})]})})]})}return r.jsxs(Jr.div,{initial:{opacity:0}
925,animate:{opacity:1},transition:{duration:.3},children:[r.jsxs("div",{className:"flex items-center justify-between mb-8 print:hidden",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(ut,{to:"/app/assessments/results",className:"p-2 rounded-md hover:bg-muted transition-colors",children:r.jsx(bo,{className:"w-4 h-4"})}),r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Relatório Individual"})]}),r.jsxs("button",{onClick:()=>window.print(),className:"flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium hover:bg-muted transition-colors border border-border",children:[r.jsx(iF,{className:"w-4 h-4"}),"Imprimir / PDF"]})]}),r.jsxs("div",{className:"max-w-3xl space-y-6",children:[r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6 flex items-center gap-5",children:[r.jsx("div",{className:"w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center text-xl font-bold text-primary flex-shrink-0",children:((z=n==null?void 0:n[0])==null?void 0:z.toUpperCase())||"?"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-lg font-semibold",children:n||"—"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:s||"—"}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[(t==null?void 0:t.name_pt)||(t==null?void 0:t.name)||"Avaliação Comportamental"," · ",u]})]})]}),i==="multidimensional"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6 flex flex-col sm:flex-row items-center gap-8",children:[r.jsx(HCe,{score:e.total_score??0,label:c,style:d}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-2",children:"Score Global"}),e.summary_pt&&r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.summary_pt})]})]}),m.length>0&&r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-5",children:"Resultado por dimensão"}),r.jsx("div",{className:"space-y-4",children:m.map(([J,Q])=>r.jsx(qCe,{label:p(J),score:Q},J))})]})]}),i==="estilo_dominante"&&r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",children:"Perfil dominante"}),r.jsxs("div",{className:`rounded-xl p-6 border ${d.bg} ${d.border}`,children:[r.jsx("p",{className:`text-2xl font-bold ${d.text}`,children:w}),e.summary_pt&&r.jsx("p",{className:"text-sm text-muted-foreground mt-2 leading-relaxed",children:e.summary_pt})]})]}),i==="trait_independente"&&r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map(([J,Q])=>{const ie=dN(Q>=75?"Muito Alto":Q>=50?"Alto":Q>=25?"Médio":"Baixo"),ae=Q>=75?"Muito Alto":Q>=50?"Alto":Q>=25?"Médio":"Baixo";return r.jsxs("div",{className:"bg-card rounded-xl border border-border p-5 flex flex-col items-center gap-3 text-center",children:[r.jsx("p",{className:"text-sm font-semibold",children:p(J)}),r.jsx("span",{className:"text-3xl font-bold",children:Q}),r.jsx("span",{className:`text-xs font-semibold px-2.5 py-1 rounded-full border ${ie.bg} ${ie.text} ${ie.border}`,children:ae})]},J)})}),((K=e.strengths_pt)==null?void 0:K.length)>0&&r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx("div",{className:"w-8 h-8 rounded-lg bg-emerald-50 flex items-center justify-center",children:r.jsx(Uy,{className:"w-4 h-4 text-emerald-600"})}),r.jsx("p",{className:"font-semibold text-sm",children:"Pontos fortes"})]}),r.jsx("ul",{className:"space-y-2",children:e.strengths_pt.map((J,Q)=>r.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 mt-1.5 flex-shrink-0"}),J]},Q))})]}),((Y=e.development_areas)==null?void 0:Y.length)>0&&r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx("div",{className:"w-8 h-8 rounded-lg bg-amber-50 flex items-center justify-center",children:r.jsx(TU,{className:"w-4 h-4 text-amber-600"})}),r.jsx("p",{className:"font-semibold text-sm",children:"Área de desenvolvimento"})]}),r.jsx("ul",{className:"space-y-2",children:e.development_areas.map((J,Q)=>r.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-500 mt-1.5 flex-shrink-0"}),J]},Q))})]}),e.management_tips_pt&&r.jsxs("div",{className:"bg-primary/5 border border-primary/20 rounded-xl p-6",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[r.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:r.jsx(Wy,{className:"w-4 h-4 text-primary"})}),r.jsx("p",{className:"font-semibold text-sm text-primary",children:"Para o gestor"})]}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.management_tips_pt})]}),r.jsxs("div",{className:"text-xs text-muted-foreground border-t border-border pt-4 leading-relaxed",children:[r.jsx("strong",{children:"RC-05 —"})," Este relatório é de uso interno e destina-se exclusivamente ao processo seletivo ou de desenvolvimento para o qual foi gerado. Os resultados refletem tendências comportamentais em contexto profissional e não devem ser utilizados como único critério de decisão. Summit Inc. Assessment Platform."]})]})]})}function XCe({scores:e}){const t=g.useRef(null),n=g.useRef(null);return g.useEffect(()=>{if(!t.current||!e)return;const s=()=>
925{if(window.Chart)i();else{const a=document.createElement("script");a.src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js",a.onload=i,document.head.appendChild(a)}},i=()=>{n.current&&n.current.destroy();const a={D:Number(e.D??0),I:Number(e.I??0),S:Number(e.S??0),C:Number(e.C??0)},o=c=>28+c,l=[o(a.D),o(a.I),o(a.S),o(a.C)];n.current=new window.Chart(t.current,{type:"radar",data:{labels:["Dominância","Influência","Estabilidade","Conformidade"],datasets:[{data:l,backgroundColor:"rgba(55,138,221,0.1)",borderColor:"#378ADD",borderWidth:1.5,pointBackgroundColor:"#378ADD",pointRadius:3}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{r:{min:0,max:56,ticks:{display:!1},grid:{color:"rgba(0,0,0,0.06)"},angleLines:{color:"rgba(0,0,0,0.06)"},pointLabels:{font:{size:12},color:"#9ca3af"}}}}})};return s(),()=>{n.current&&n.current.destroy()}},[e]),r.jsx("canvas",{ref:t,style:{width:"100%",height:"100%"}})}function JCe({scores:e}){const t=g.useRef(null),n=g.useRef(null);return g.useEffect(()=>{if(!t.current||!e)return;const s=()=>
925{if(window.Chart)i();else{const a=document.createElement("script");a.src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js",a.onload=i,document.head.appendChild(a)}},i=()=>{n.current&&n.current.destroy();const a={D:Number(e.D??0),I:Number(e.I??0),S:Number(e.S??0),C:Number(e.C??0)},o=c=>28+c,l=[o(a.D),o(a.I),o(a.S),o(a.C)];n.current=new window.Chart(t.current,{type:"bar",data:{labels:["D","I","S","C"],datasets:[{type:"bar",data:l,backgroundColor:["#E24B4A","#f4cc48","#1D9E75","#378ADD"],borderWidth:0,borderRadius:5,barPercentage:.5},{type:"line",data:l,borderColor:"rgba(0,0,0,0.25)",borderWidth:1.5,pointBackgroundColor:"rgba(0,0,0,0.25)",pointRadius:4,fill:!1,tension:0}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{grid:{display:!1},border:{display:!1},ticks:{font:{size:13,weight:"600"},color:"#6b7280"}},y:{min:0,max:56,grid:{color:"rgba(0,0,0,0.05)"},border:{display:!1},ticks:{display:!1}}}}})};return s(),()=>{n.current&&n.current.destroy()}},[e]),r.jsx("canvas",{ref:t,style:{width:"100%",height:"100%"}})}function nx({icon:e,title:t,content:n,color:s}){return r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[r.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{backgroundColor:s+"15",color:s},children:r.jsx(e,{className:"w-4 h-4"})}),r.jsx("h3",{className:"font-semibold text-sm",children:t})]}),Array.isArray(n)?r.jsx("ul",{className:"space-y-1.5",children:n.map((i,a)=>r.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary mt-1.5 flex-shrink-0"}),i]},a))}):r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n})]})}function QCe(){var C,D,P,L,T,R,U,I,H,V;const{id:e}=Do(),[t,n]=g.useState(null),[s,i]=g.useState(null),[a,o]=g.useState("—"),[l,c]=g.useState("—"),[d,u]=g.useState(!0),[p,m]=g.useState(!1),[x,w]=g.useState(null),[y,v]=g.useState(null),[j,k]=g.useState(null);g.useEffect(()=>{S()},[e]);const S=async()=>{var W,O,G;const N=(await ne.entities.AssessmentResult.filter({id:e}))[0];if(N){const M={...N,summary:N.summary_pt||N.summary||null,strengths:((W=N.strengths_pt)==null?void 0:W.length)>0?N.strengths_pt:N.strengths||[],communication_style:N.communication_style_pt||N.communication_style||null,management_tips:N.management_tips_pt||N.management_tips||null};n(M);const z=((O=N.metadata)==null?void 0:O.category)||null;if(z&&w(z),N.template_id){const Y=(await ne.entities.AssessmentTemplate.filter({id:N.template_id}))[0];i(Y||null),!z&&(Y!=null&&Y.category)&&w(Y.category),(G=Y==null?void 0:Y.metadata)!=null&&G.bloco_labels&&v(Y.metadata.bloco_labels)}if(N.template_id){const K=await ne.entities.ScoringRule.filter({template_id:N.template_id});K[0]&&k(K[0])}if(N.talent_profile_id){const K=await ne.entities.TalentProfile.filter({id:N.talent_profile_id});if(K[0]){K[0].full_name&&o(K[0].full_name),K[0].email&&c(K[0].email),u(!1);return}}if(N.campaign_id){const K=await ne.entities.AssessmentInvitation.filter({campaign_id:N.campaign_id}),Y=K.find(J=>J.status==="completed")||K[0];Y!=null&&Y.full_name&&o(Y.full_name),Y!=null&&Y.email&&c(Y.email)}}u(!1)},_=()=>{navigator.clipboard.writeText(window.location.href),m(!0),setTimeout(()=>m(!1),2e3)};if(d)return r.jsx("div",{className:"flex items-center justify-center h-64",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})});if(!t)return r.jsx("div",{className:"text-center py-16",children:r.jsx("p",{className:"text-muted-foreground",children:"Resultado não encontrado."})});const F=t.dimension_scores||{},A=t.computed_at?new Date(t.computed_at).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"}):"—";if(x==="behavioral"&&s&&s.scoring_function!=="calculateDiscScore")return r.jsx(YCe,{result:t,template:s,candidateName:a,candidateEmail:l});if(x==="cognitive"){const X=t.total_score??0,N=(j==null?void 0:j.max_score)??20,W=((C=t.metadata)==null?void 0:C.faixa)||"",O=W.toLowerCase(),G=((D=t.metadata)==null?void 0:D.bloco_scores)||{},M=((P=t.metadata)==null?void 0:P.recomendacao)||"",z=O.includes("destaque")||O.includes("acima")?"#1
925D9E75":O.includes("adequado")?"#378ADD":"#E24B4A",K=O.includes("destaque")||O.includes("acima")?{bg:"#f0fdf4",text:"#166534",dot:"#1D9E75"}:O.includes("adequado")?{bg:"#EBF4FF",text:"#1e40af",dot:"#378ADD"}:{bg:"#fef2f2",text:"#991b1b",dot:"#E24B4A"},Y=[{key:"abaixo",label:"Abaixo",range:"0–8"},{key:"adequado",label:"Adequado",range:"9–13"},{key:"acima",label:"Acima",range:"14–17"},{key:"destaque",label:"Destaque",range:"18–20"}],Q=y||{sequencias:"Sequências numéricas",analogias:"Analogias verbais",padroes:"Padrões lógicos",situacional:"Raciocínio situacional"},ie={page:{fontFamily:"'Inter', -apple-system, sans-serif",maxWidth:680},card:{background:"#ffffff",border:"1px solid #e5e7eb",borderRadius:12,padding:"1.5rem"},eyebrow:{fontSize:11,fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:"#9ca3af",marginBottom:8}};return r.jsxs(Jr.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:[r.jsxs("div",{className:"flex items-center justify-between mb-8",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(ut,{to:"/app/assessments/results",className:"p-2 rounded-md hover:bg-muted transition-colors",children:r.jsx(bo,{className:"w-4 h-4"})}),r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:kt.results.individualReport})]}),r.jsx("button",{onClick:_,className:"px-3 py-2 rounded-md text-sm font-medium hover:bg-muted transition-colors",children:p?"✓ Link copiado!":"Compartilhar"})]}),r.jsxs("div",{style:ie.page,children:[r.jsxs("div",{style:{...ie.card,display:"flex",alignItems:"center",gap:20,marginBottom:16},children:[r.jsx("div",{style:{width:56,height:56,borderRadius:"50%",background:"#EBF4FF",display:"flex",alignItems:"center",justifyContent:"center",fontSize:22,fontWeight:700,color:"#0C447C",flexShrink:0},children:((L=a[0])==null?void 0:L.toUpperCase())||"?"}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{fontSize:17,fontWeight:700,color:"#111827",margin:0},children:a}),r.jsx("p",{style:{fontSize:13,color:"#6b7280",margin:"2px 0 0"},children:l}),r.jsx("p",{style:{fontSize:12,color:"#9ca3af",margin:"2px 0 0"},children:A})]}),r.jsx("span",{style:{background:"#E6F1FB",color:"#0C447C",fontSize:11,fontWeight:700,padding:"4px 12px",borderRadius:999,letterSpacing:"0.04em",whiteSpace:"nowrap"},children:"Cognitivo"})]}),r.jsxs("div",{style:{...ie.card,textAlign:"center",marginBottom:16},children:[r.jsxs("div",{children:[r.jsx("span",{style:{fontSize:56,fontWeight:700,color:"#111827",letterSpacing:"-0.04em",lineHeight:1},children:X}),r.jsxs("span",{style:{fontSize:22,color:"#9ca3af",fontWeight:400},children:["/",N]})]}),r.jsx("p",{style:{fontSize:11,fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:"#9ca3af",marginTop:6},children:"PONTOS OBTIDOS"}),r.jsx("div",{style:{height:6,background:"#f3f4f6",borderRadius:999,marginTop:16,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",width:`${N>0?X/N*100:0}%`,background:z,borderRadius:999,transition:"width 0.5s"}})}),W&&r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginTop:10,background:K.bg,padding:"4px 12px",borderRadius:999},children:[r.jsx("div",{style:{width:7,height:7,borderRadius:"50%",background:K.dot,flexShrink:0}}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:K.text},children:W})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:8,marginTop:20},children:Y.map(ae=>{const re=O.includes(ae.key);return r.jsxs("div",{style:{background:re?"#EAF3DE":"#f9fafb",border:"1px solid #e5e7eb",borderRadius:8,padding:"10px 8px",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:12,fontWeight:700,color:re?"#27500A":"#111827",margin:0},children:ae.label}),r.jsx("p",{style:{fontSize:11,color:re?"#27500A":"#9ca3af",margin:"2px 0 0"},children:ae.range})]},ae.key)})})]}),t.summary_pt&&r.jsxs("div",{style:{background:"#f9fafb",borderRadius:10,padding:"1.25rem",marginBottom:16},children:[r.jsx("p",{style:ie.eyebrow,children:"Interpretação"}),r.jsx("p",{style:{fontSize:13,color:"#374151",lineHeight:1.65,margin:0},children:t.summary_pt})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,marginTop:4},children:[r.jsxs("div",{style:{...ie.card},children:[r.jsx("p",{style:ie.eyebrow,children:"Acertos por bloco"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Object.entries(G).map(([ae,re])=>r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[r.jsx("span",{style:{fontSize:12,color:"#374151"},children:Q[ae]||ae}),r.jsxs("span",{style:{fontSize:12,fontWeight:600,color:"#111827"},children:[re,"/5"]})]},ae))})]}),r.jsxs("div",{style:{...ie.card},children:[r.jsx("p",{style:ie.eyebrow,children:"Recomendação"}),r.jsx("p",{style:{fontSize:12,color:"#374151",lineHeight:1.6,margin:0},children:M})]})]}),r.jsx("p",{style:{fontSize:11,color:"#9ca3af",textAlign:"center",marginTop:24},children:"20 questões · Summit Inc. Assessment Platform"})]})]})}if(x==="language"){const X=t.total_score??0,N=(j==null?void 0:j.max_score)??20,W=((T=t.metadata)==null?void 0:T.faixa)||t.profile_label||"",O=W.toLowerCase(),G=((R=t.metadata)==null?void 0:R.bloco_scores)||{},M=((U=t.metadata)==null?void 0:U.recomendacao)||"",z=(j==null?void 0:j.thresholds)||[],K=O.includes("destaque")||O.includes("acima")?"#1
925D9E75":O.includes("adequado")?"#378ADD":"#E24B4A",Y=O.includes("destaque")||O.includes("acima")?{bg:"#f0fdf4",text:"#166534",dot:"#1D9E75"}:O.includes("adequado")?{bg:"#EBF4FF",text:"#1e40af",dot:"#378ADD"}:{bg:"#fef2f2",text:"#991b1b",dot:"#E24B4A"},J=pe=>{const Z=(pe||"").toLowerCase();return Z.includes("destaque")?"destaque":Z.includes("acima")?"acima":Z.includes("adequado")?"adequado":"abaixo"},Q=z.length>0?z.map(pe=>{var Z;return{key:J(pe.label_pt),label:((Z=pe.label_pt)==null?void 0:Z.split(" ")[0])||"—",range:`${pe.min}–${pe.max}`}}):[{key:"abaixo",label:"Abaixo",range:`0–${Math.floor(N*.25)}`},{key:"adequado",label:"Adequado",range:`${Math.floor(N*.25)+1}–${Math.floor(N*.5)}`},{key:"acima",label:"Acima",range:`${Math.floor(N*.5)+1}–${Math.floor(N*.75)}`},{key:"destaque",label:"Destaque",range:`${Math.floor(N*.75)+1}–${N}`}],ae=y||{vocabulario:"Vocabulário",gramatica:"Gramática",compreensao:"Compreensão",expressao:"Expressão"},re={page:{fontFamily:"'Inter', -apple-system, sans-serif",maxWidth:680},card:{background:"#ffffff",border:"1px solid #e5e7eb",borderRadius:12,padding:"1.5rem"},eyebrow:{fontSize:11,fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:"#9ca3af",marginBottom:8}};return r.jsxs(Jr.div,{initial:{opacity:0}
925,animate:{opacity:1},transition:{duration:.3},children:[r.jsxs("div",{className:"flex items-center justify-between mb-8",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(ut,{to:"/app/assessments/results",className:"p-2 rounded-md hover:bg-muted transition-colors",children:r.jsx(bo,{className:"w-4 h-4"})}),r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:kt.results.individualReport})]}),r.jsx("button",{onClick:_,className:"px-3 py-2 rounded-md text-sm font-medium hover:bg-muted transition-colors",children:p?"✓ Link copiado!":"Compartilhar"})]}),r.jsxs("div",{style:re.page,children:[r.jsxs("div",{style:{...re.card,display:"flex",alignItems:"center",gap:20,marginBottom:16},children:[r.jsx("div",{style:{width:56,height:56,borderRadius:"50%",background:"#ECFDF5",display:"flex",alignItems:"center",justifyContent:"center",fontSize:22,fontWeight:700,color:"#065F46",flexShrink:0},children:((I=a[0])==null?void 0:I.toUpperCase())||"?"}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{fontSize:17,fontWeight:700,color:"#111827",margin:0},children:a}),r.jsx("p",{style:{fontSize:13,color:"#6b7280",margin:"2px 0 0"},children:l}),r.jsx("p",{style:{fontSize:12,color:"#9ca3af",margin:"2px 0 0"},children:A})]}),r.jsx("span",{style:{background:"#D1FAE5",color:"#065F46",fontSize:11,fontWeight:700,padding:"4px 12px",borderRadius:999,letterSpacing:"0.04em",whiteSpace:"nowrap"},children:"Idioma"})]}),r.jsxs("div",{style:{...re.card,textAlign:"center",marginBottom:16},children:[r.jsxs("div",{children:[r.jsx("span",{style:{fontSize:56,fontWeight:700,color:"#111827",letterSpacing:"-0.04em",lineHeight:1},children:X}),r.jsxs("span",{style:{fontSize:22,color:"#9ca3af",fontWeight:400},children:["/",N]})]}),r.jsx("p",{style:{fontSize:11,fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:"#9ca3af",marginTop:6},children:"PONTOS OBTIDOS"}),r.jsx("div",{style:{height:6,background:"#f3f4f6",borderRadius:999,marginTop:16,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",width:`${N>0?X/N*100:0}%`,background:K,borderRadius:999,transition:"width 0.5s"}})}),W&&r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginTop:10,background:Y.bg,padding:"4px 12px",borderRadius:999},children:[r.jsx("div",{style:{width:7,height:7,borderRadius:"50%",background:Y.dot,flexShrink:0}}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:Y.text},children:W})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Q.length}, 1fr)`,gap:8,marginTop:20},children:Q.map(pe=>{const Z=O.includes(pe.key);return r.jsxs("div",{style:{background:Z?"#EAF3DE":"#f9fafb",border:"1px solid #e5e7eb",borderRadius:8,padding:"10px 8px",textAlign:"center"},children:[r.jsx("p",{style:{fontSize:12,fontWeight:700,color:Z?"#27500A":"#111827",margin:0},children:pe.label}),r.jsx("p",{style:{fontSize:11,color:Z?"#27500A":"#9ca3af",margin:"2px 0 0"},children:pe.range})]},pe.key)})})]}),t.summary_pt&&r.jsxs("div",{style:{background:"#f9fafb",borderRadius:10,padding:"1.25rem",marginBottom:16},children:[r.jsx("p",{style:re.eyebrow,children:"Interpretação"}),r.jsx("p",{style:{fontSize:13,color:"#374151",lineHeight:1.65,margin:0},children:t.summary_pt})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,marginTop:4},children:[r.jsxs("div",{style:{...re.card},children:[r.jsx("p",{style:re.eyebrow,children:"Acertos por bloco"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Object.entries(G).map(([pe,Z])=>r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[r.jsx("span",{style:{fontSize:12,color:"#374151"},children:ae[pe]||pe}),r.jsxs("span",{style:{fontSize:12,fontWeight:600,color:"#111827"},children:[Z,"/5"]})]},pe))})]}),r.jsxs("div",{style:{...re.card},children:[r.jsx("p",{style:re.eyebrow,children:"Recomendação"}),r.jsx("p",{style:{fontSize:12,color:"#374151",lineHeight:1.6,margin:0},children:M})]})]}),r.jsx("p",{style:{fontSize:11,color:"#9ca3af",textAlign:"center",marginTop:24},children:"20 questões · Summit Inc. Assessment Platform"})]})]})}return r.jsxs(Jr.div,{initial:{opacity:0}
925,animate:{opacity:1},transition:{duration:.3},children:[r.jsxs("div",{className:"flex items-center justify-between mb-8",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(ut,{to:"/app/assessments/results",className:"p-2 rounded-md hover:bg-muted transition-colors",children:r.jsx(bo,{className:"w-4 h-4"})}),r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:kt.results.individualReport})]}),r.jsx("button",{onClick:_,className:"px-3 py-2 rounded-md text-sm font-medium hover:bg-muted transition-colors",children:p?"✓ Link copiado!":"Compartilhar"})]}),r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6 mb-6 flex items-center gap-5",children:[r.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center text-2xl font-bold text-primary flex-shrink-0",children:((H=a[0])==null?void 0:H.toUpperCase())||"?"}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-semibold",children:a}),r.jsxs("p",{className:"text-sm text-muted-foreground mt-0.5",children:["DISC · ",A]}),t.profile_label&&r.jsx("span",{className:"inline-block mt-2 text-xs font-medium bg-primary/10 text-primary px-3 py-1 rounded-full",children:t.profile_label})]})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6",children:[r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6",children:[r.jsx("p",{className:"text-xs font-medium uppercase tracking-widest text-muted-foreground mb-4",children:"Mapa comportamental"}),r.jsx("div",{style:{position:"relative",height:240},children:r.jsx(XCe,{scores:F})})]}),r.jsxs("div",{className:"bg-card rounded-xl border border-border p-6",children:[r.jsx("p",{className:"text-xs font-medium uppercase tracking-widest text-muted-foreground mb-4",children:"Intensidade por dimensão"}),r.jsx("div",{style:{position:"relative",height:240},children:r.jsx(JCe,{scores:F})})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.summary&&r.jsx(nx,{icon:HH,title:kt.results.summary,content:t.summary,color:"#6B4FE0"}),((V=t.strengths)==null?void 0:V.length)>0&&r.jsx(nx,{icon:Uy,title:kt.results.strengths,content:t.strengths,color:"#1D9E75"}),t.communication_style&&r.jsx(nx,{icon:mS,title:kt.results.communicationStyle,content:t.communication_style,color:"#f4cc48"}),t.management_tips&&r.jsx(nx,{icon:Wy,title:kt.results.managementTips,content:t.management_tips,color:"#378ADD"})]})]})}function ZCe(){const e=In();return g.useEffect(()=>{const t=setTimeout(()=>{e("/app/conta/plano")},4e3);return()=>clearTimeout(t)},[]),r.jsx("div",{style:{minHeight:"100vh",background:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"},children:r.jsxs("div",{style:{textAlign:"center",maxWidth:480,padding:"0 24px"},children:[r.jsx("div",{style:{width:64,height:64,borderRadius:16,background:"#f0fdf4",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px"},children:r.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",children:r.jsx("path",{d:"M20 6L9 17L4 12",stroke:"#16a34a",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),r.jsx("h1",{style:{fontSize:26,fontWeight:700,color:"#0a2540",marginBottom:12,letterSpacing:"-0.025em"},children:"Pagamento confirmado"}),r.jsx("p",{style:{fontSize:15,color:"#425466",lineHeight:1.7,marginBottom:32},children:"Sua assinatura foi ativada com sucesso. Você será redirecionado em instantes."}),r.jsx("img",{src:"https://i.imgur.com/MVgsUJ5.png",alt:"Summit Inc.",style:{height:20,opacity:.5,margin:"0 auto"}})]})})}const uN=["#6C24F5","#378ADD","#1D9E75","#F59E0B","#E24B4A","#0EA5E9","#8B5CF6","#EC4899","#10B981","#F97316"];function eEe(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function tEe(e){var n;const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?((n=t[0][0])==null?void 0:n.toUpperCase())||"?":(t[0][0]+t[t.length-1][0]).toUpperCase()}function nEe({name:e,size:t=40}){const n=e||"Vaga",s=uN[eEe(n)%uN.length],i=tEe(n);return r.jsx("div",{style:{width:t,height:t,borderRadius:10,background:s,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:600,letterSpacing:"0.02em",flexShrink:0},children:i})}const rEe=[{match:["sourc"],color:"#6C24F5"},{match:["triag","screen"],color:"#378ADD"}
925,{match:["entrev","interv"],color:"#F59E0B"},{match:["propost","offer"],color:"#1D9E75"},{match:["contrat","hired"],color:"#16A34A"},{match:["espera","standby","hold"],color:"#9CA3AF"},{match:["reprov","reject"],color:"#E24B4A"}];function sEe(e){const t=(e||"").toLowerCase();for(const n of rEe)if(n.match.some(s=>t.includes(s)))return n.color;return"#6B7280"}function iEe({jobId:e,workspaceId:t}){const[n,s]=g.useState(!0),[i,a]=g.useState([]),[o,l]=g.useState({}),[c,d]=g.useState(0);return g.useEffect(()=>{if(!e||!t)return;let u=!1;return(async()=>{s(!0);try{const[p,m]=await Promise.all([ne.entities.PipelineStage.filter({workspace_id:t,job_id:e}),ne.entities.JobApplication.filter({job_id:e})]);if(u)return;const x=(p||[]).filter(v=>!v.is_archived).sort((v,j)=>(v.order||0)-(j.order||0)),w=(m||[]).filter(v=>v.status!=="removed_by_recruiter"&&v.status!=="withdrawn"&&v.status!=="expired"),y={};w.forEach(v=>{const j=v.current_stage_id||"_no_stage";y[j]=(y[j]||0)+1}),a(x),l(y),d(w.length)}finally{u||s(!1)}})(),()=>{u=!0}},[e,t]),n?r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"20px 0",color:"#9CA3AF"},children:r.jsx(rt,{size:14,style:{animation:"spin 0.8s linear infinite"}})}):c===0||i.length===0?r.jsx("div",{style:{padding:"16px 0",fontSize:13,color:"#9CA3AF",textAlign:"center"},children:"Nenhum candidato nesta vaga"}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,padding:"16px 0 4px"},children:i.map(u=>{const p=o[u.id]||0,m=c>0?p/c*100:0,x=sEe(u.name);return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx("div",{style:{width:120,fontSize:12,color:"#374151",flexShrink:0},children:u.name}),r.jsx("div",{style:{flex:1,height:8,background:"#F3F4F6",borderRadius:99,overflow:"hidden"},children:r.jsx("div",{style:{width:`${m}%`,height:"100%",background:x,borderRadius:99,transition:"width 240ms cubic-bezier(0.4, 0, 0.2, 1)"}})}),r.jsx("div",{style:{width:32,textAlign:"right",fontSize:12,fontWeight:500,color:"var(--sv-ink)",fontVariantNumeric:"tabular-nums"},children:p})]},u.id)})})}const jf={ink2:"#374151",border:"#E5E7EB",bg:"#FFFFFF",accent:"#6C24F5",accentDeep:"#5A1ED4"};function pd({children:e,onClick:t,disabled:n}){return r.jsx("button",{onClick:t,disabled:n,style:{padding:"8px 16px",fontSize:13,fontWeight:500,color:jf.ink2,background:jf.bg,border:`1px solid ${jf.border}`,borderRadius:8,cursor:n?"not-allowed":"pointer",fontFamily:"inherit"},children:e})}function rx({children:e,onClick:t,disabled:n,saving:s}){return r.jsxs("button",{onClick:t,disabled:n,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 18px",fontSize:13,fontWeight:500,color:"#FFFFFF",background:jf.accent,border:"none",borderRadius:8,cursor:n?"not-allowed":"pointer",opacity:n?.7:1,fontFamily:"inherit"},onMouseEnter:i=>{n||(i.currentTarget.style.background=jf.accentDeep)},onMouseLeave:i=>{n||(i.currentTarget.style.background=jf.accent)},children:[s&&r.jsx(rt,{size:13,style:{animation:"jfdSpin 0.8s linear infinite"}}),e]})}function aEe({isEdit:e,jobStatus:t,saving:n,onCancel:s,onSave:i,onPublish:a}){return e?t==="draft"?r.jsxs(r.Fragment,{children:[r.jsx(pd,{onClick:s,disabled:n,children:"Cancelar"}),r.jsx(pd,{onClick:i,disabled:n,children:n?"Salvando...":"Salvar"}),r.jsx(rx,{onClick:a,disabled:n,saving:n,children:"Publicar"})]}):t==="paused"?r.jsxs(r.Fragment,{children:[r.jsx(pd,{onClick:s,disabled:n,children:"Cancelar"}),r.jsx(pd,{onClick:i,disabled:n,children:n?"Salvando...":"Salvar"}),r.jsx(rx,{onClick:a,disabled:n,saving:n,children:"Retomar"})]}):r.jsxs(r.Fragment,{children:[r.jsx(pd,{onClick:s,disabled:n,children:"Cancelar"}),r.jsx(rx,{onClick:i,disabled:n,saving:n,children:"Salvar alterações"})]}):r.jsxs(r.Fragment,{children:[r.jsx(pd,{onClick:s,disabled:n,children:"Cancelar"}),r.jsx(pd,{onClick:i,disabled:n,children:n?"Salvando...":"Criar vaga"}),r.jsx(rx,{onClick:a,disabled:n,saving:n,children:"Criar e publicar"})]})}const oEe=[{value:"remoto",label:"Remoto"},{value:"hibrido",label:"Híbrido"},{value:"presencial",label:"Presencial"}],lEe=[{value:"clt",label:"CLT"},{value:"pj",label:"PJ"},{value:"estagio",label:"Estágio"},{value:"temporario",label:"Temporário"},{value:"autonomo",label:"Freelancer"}],cEe=[{value:"estagiario",label:"Estágio"},{value:"junior",label:"Júnior"},{value:"pleno",label:"Pleno"},{value:"senior",label:"Sênior"},{value:"especialista",label:"Especialista"},{value:"lideranca",label:"Liderança"}],fN={title:"",work_format:"",contract_type:"",seniority:"",location_city:"",location_state:"",salary_min:"",salary_max:"",description:"",is_confidential:!1,salary_visible:!1,assessment_template_ids:[]},un={ink:"#111827",ink2:"#374151",ink3:"#6B7280",border:"#E5E7EB",bg:"#FFFFFF",inset:"#FAFAFA",accent:"#6C24F5",accentMuted:"#F5F0FF",error:"#B91C1C",errorBg:"#FEF2F2",errorBorder:"#FECACA"},io={width:"100%",padding:"8px 12px",fontSize:13,color:un.ink,background:un.bg,border:`1px solid ${un.border}`,borderRadius:8,outline:"none",fontFamily:"inherit"};function tl({children:e}){return r.jsx("label",{style:{display:"block",fontSize:12,color:un.ink3,marginBottom:6,fontWeight:500},children:e})}function sx({children:e,style:t}){return r.jsx("div",{style:{background:un.bg,border:`1px solid ${un.border}`,borderRadius:12,padding:16,display:"flex",flexDirection:"column",gap:14,...t},children:e})}function dEe({checked:e,onChange:t}){return r.jsx("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>t(!e),style:{position:"relative",width:36,height:20,borderRadius:999,background:e?un.accent:"#D1D5DB",border:"none",cursor:"pointer",transition:"background 140ms",flexShrink:0,padding:0},children:r.jsx("span",{style:{position:"absolute",top:2,left:e?18:2,width:16,height:16,borderRadius:"50%",background:"#FFFFFF",transition:"left 160ms cubic-bezier(0.4,0,0.2,1)",boxShadow:"0 1px 2px rgba(0,0,0,0.15)"}})})}function pN({label:e,hint:t,checked:n,onChange:s}){return r.jsxs("label",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,cursor:"pointer"},children:[r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:13,color:un.ink2,fontWeight:500},children:e}),t&&r.jsx("div",{style:{fontSize:12,color:un.ink3,marginTop:2},children:t})]}),r.jsx(dEe,{checked:n,onChange:s})]})}function uEe({isOpen:e,onClose:t,job:n,workspaceId:s,onSaved:i}){var X;const{entitlements:a}=Xa(),o=!!((X=a==null?void 0:a.assessments)!=null&&X.unlocked),[l,c]=g.useState(fN),[d,u]=g.useState(!1),[p,m]=g.useState(""),[x,w]=g.useState(!1),[y,v]=g.useState(""),j=g.useRef(null),[k,S]=g.useState(!1),[_,F]=g.useState([]),[A,C]=g.useState(""),D=!!n;g.useEffect(()=>{e&&(c(n?{title:n.title||"",work_format:n.work_format||"",contract_type:n.contract_type||"",seniority:n.seniority||"",location_city:n.location_city||"",location_state:n.location_state||"",salary_min:n.salary_min??"",salary_max:n.salary_max??"",description:n.description||"",is_confidential:!!n.is_confidential,salary_visible:!!n.salary_visible,assessment_template_ids:Array.isArray(n.assessment_template_ids)?[...n.assessment_template_ids]:[]}:fN),m(""),v(""),C(""))},[e,n]),g.useEffect(()=>{if(!e||!o)return;let N=!1;return(async()=>{try{const W=await ne.entities.AssessmentTemplate.filter({status:"published"});N||F(W||[])}catch{N||F([])}})(),()=>{N=!0}},[e,o]);function P(N,W){c(O=>({...O,[N]:W}))}async function L(N){var O,G,M,z,K;const W=(O=N.target.files)==null?void 0:O[0];if(N.target.value="",!!W){w(!0),v("");try{let Y="";if(W.name.toLowerCase().endsWith(".txt"))Y=await W.text();else{const{file_url:ie}=await ne.integrations.Core.UploadFile({file:W}),ae=await ne.integrations.Core.ExtractDataFromUploadedFile({file_url:ie,json_schema:{type:"object",properties:{text:{type:"string"}}}});Y=((G=ae==null?void 0:ae.output)==null?void 0:G.text)||(ae==null?void 0:ae.output)||"",typeof Y=="object"&&(Y=JSON.stringify(Y))}if(!Y||Y.trim().length<20){v("Não foi possível ler o conteúdo do arquivo.");return}const J=await ne.functions.invoke("extractJobFromJD",{jd_text:Y}),Q=((M=J==null?void 0:J.data)==null?void 0:M.data)||(J==null?void 0:J.data);if(!((z=J==null?void 0:J.data)!=null&&z.success)||!Q){v(((K=J==null?void 0:J.data)==null?void 0:K.error)||"Não foi possível extrair os dados da vaga.");return}c(ie=>
925({...ie,title:Q.title||ie.title,description:Q.description||ie.description,seniority:Q.seniority||ie.seniority,work_format:Q.work_format||ie.work_format,contract_type:Q.contract_type||ie.contract_type,location_city:Q.location_city||ie.location_city,location_state:Q.location_state||ie.location_state,salary_min:Q.salary_min??ie.salary_min,salary_max:Q.salary_max??ie.salary_max}))}catch(Y){v((Y==null?void 0:Y.message)||"Erro ao processar o arquivo.")}finally{w(!1)}}}async function T(){var N,W,O;if(!l.title.trim()||!l.seniority){m("Preencha o título e a senioridade antes de gerar a descrição.");return}S(!0),m("");try{const G=await ne.functions.invoke("generateJobDescription",{title:l.title.trim(),seniority:l.seniority,company_name:n==null?void 0:n.company_name});(N=G==null?void 0:G.data)!=null&&N.success&&((W=G==null?void 0:G.data)!=null&&W.description)?P("description",G.data.description):m(((O=G==null?void 0:G.data)==null?void 0:O.error)||"Não foi possível gerar a descrição.")}catch(G){m((G==null?void 0:G.message)||"Erro ao gerar a descrição.")}finally{S(!1)}}function R(){if(A){if(l.assessment_template_ids.includes(A)){C("");return}c(N=>({...N,assessment_template_ids:[...N.assessment_template_ids,A]})),C("")}}function U(N){c(W=>({...W,assessment_template_ids:W.assessment_template_ids.filter(O=>O!==N)}))}function I(N){const W=_.find(O=>O.id===N);return(W==null?void 0:W.name_pt)||(W==null?void 0:W.name)||"Avaliação"}function H(N){return(N||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}async function V(N=!1){if(!l.title.trim()){m("O título da vaga é obrigatório.");return}if(!D&&!s){m("Workspace não identificado.");return}const W={title:l.title.trim(),work_format:l.work_format||void 0,contract_type:l.contract_type||void 0,seniority:l.seniority||void 0,location_city:l.location_city.trim()||void 0,location_state:l.location_state.trim()||void 0,salary_min:l.salary_min===""||l.salary_min==null?void 0:Number(l.salary_min),salary_max:l.salary_max===""||l.salary_max==null?void 0:Number(l.salary_max),description:l.description.trim()||void 0,is_confidential:l.is_confidential,salary_visible:l.salary_visible,assessment_template_ids:l.assessment_template_ids};N&&(W.status="published",W.published_at=new Date().toISOString(),n!=null&&n.slug||(W.slug=H(l.title))),u(!0),m("");try{let O,G=!1;if(D){await ne.entities.Job.update(n.id,W),O=n.id;const M=[...n.assessment_template_ids||[]].sort(),z=[...l.assessment_template_ids].sort();G=M.length!==z.length||M.some((K,Y)=>K!==z[Y])}else{const M=await ne.entities.Job.create({...W,workspace_id:s,status:N?"published":"draft"});O=M==null?void 0:M.id,G=l.assessment_template_ids.length>0}G&&O&&ne.functions.invoke("syncJobCampaigns",{job_id:O,template_ids:l.assessment_template_ids}).catch(M=>console.error("syncJobCampaigns failed:",M==null?void 0:M.message)),i==null||i(),t==null||t()}catch(O){m((O==null?void 0:O.message)||"Erro ao salvar a vaga.")}finally{u(!1)}}return e?r.jsxs(r.Fragment,{children:[r.jsx("div",{onClick:t,style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.4)",zIndex:50,animation:"jfdFade 160ms ease"}}),r.jsxs("div",{style:{position:"fixed",top:0,right:0,bottom:0,width:"100%",maxWidth:620,background:un.inset,borderRadius:"12px 0 0 12px",boxShadow:"-8px 0 32px rgba(0,0,0,0.12)",zIndex:51,display:"flex",flexDirection:"column",fontFamily:"var(--sv-font, inherit)",animation:"jfdSlide 220ms cubic-bezier(0.4, 0, 0.2, 1)"},children:[r.jsx("style",{children:`
926          @keyframes jfdFade { from { opacity: 0; } to { opacity: 1; } }
927          @keyframes jfdSlide { from { transform: translateX(100%); } to { transform: translateX(0); } }
928          @keyframes jfdSpin { to { transform: rotate(360deg); } }
929        `}),r.jsxs("div",{style:{padding:"18px 24px",background:un.bg,borderBottom:`1px solid ${un.border}`,display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[r.jsx("h2",{style:{fontSize:16,fontWeight:600,color:un.ink,margin:0},children:D?"Editar vaga":"Nova vaga"}),r.jsx("button",{onClick:t,"aria-label":"Fechar",style:{width:28,height:28,borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center",background:"transparent",border:"none",cursor:"pointer",color:un.ink3},onMouseEnter:N=>N.currentTarget.style.background="#F3F4F6",onMouseLeave:N=>N.currentTarget.style.background="transparent",children:r.jsx(Jt,{size:16})})]}),r.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"16px 20px",display:"flex",flexDirection:"column",gap:14},children:[!D&&r.jsxs(sx,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",ga
929p:12},children:[r.jsx("div",{style:{width:36,height:36,borderRadius:8,flexShrink:0,background:un.accentMuted,color:un.accent,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(Ha,{size:16})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:13,fontWeight:600,color:un.ink},children:"Importar Job Description"}),r.jsx("div",{style:{fontSize:12,color:un.ink3,marginTop:2},children:"Faça upload de um arquivo e a IA preenche os campos automaticamente"})]})]}),r.jsxs("div",{children:[r.jsx("input",{ref:j,type:"file",accept:".txt,.pdf,.docx",onChange:L,style:{display:"none"}}),r.jsx("button",{type:"button",onClick:()=>{var N;return(N=j.current)==null?void 0:N.click()},disabled:x,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",fontSize:13,fontWeight:500,color:un.ink2,background:un.bg,border:`1px solid ${un.border}`,borderRadius:8,cursor:x?"not-allowed":"pointer",fontFamily:"inherit"},children:x?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:13,style:{animation:"jfdSpin 0.8s linear infinite"}})," Processando..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Ha,{size:13})," Selecionar arquivo (.txt, .pdf, .docx)"]})}),y&&r.jsx("div",{style:{fontSize:12,color:un.error,marginTop:8},children:y})]})]}),r.jsxs(sx,{children:[r.jsxs("div",{children:[r.jsx(tl,{children:"Título da vaga *"}),r.jsx("input",{type:"text",value:l.title,onChange:N=>P("title",N.target.value),placeholder:"Ex: Desenvolvedor Full Stack",style:io})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[r.jsxs("div",{children:[r.jsx(tl,{children:"Formato de trabalho"}),r.jsxs("select",{value:l.work_format,onChange:N=>P("work_format",N.target.value),style:io,children:[r.jsx("option",{value:"",children:"Selecionar..."}),oEe.map(N=>r.jsx("option",{value:N.value,children:N.label},N.value))]})]}),r.jsxs("div",{children:[r.jsx(tl,{children:"Tipo de contrato"}),r.jsxs("select",{value:l.contract_type,onChange:N=>P("contract_type",N.target.value),style:io,children:[r.jsx("option",{value:"",children:"Selecionar..."}),lEe.map(N=>r.jsx("option",{value:N.value,children:N.label},N.value))]})]})]}),r.jsxs("div",{children:[r.jsx(tl,{children:"Senioridade"}),r.jsxs("select",{value:l.seniority,onChange:N=>P("seniority",N.target.value),style:io,children:[r.jsx("option",{value:"",children:"Selecionar..."}),cEe.map(N=>r.jsx("option",{value:N.value,children:N.label},N.value))]})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 120px",gap:12},children:[r.jsxs("div",{children:[r.jsx(tl,{children:"Cidade"}),r.jsx("input",{type:"text",value:l.location_city,onChange:N=>P("location_city",N.target.value),placeholder:"Ex: São Paulo",style:io})]}),r.jsxs("div",{children:[r.jsx(tl,{children:"UF"}),r.jsx("input",{type:"text",maxLength:2,value:l.location_state,onChange:N=>P("location_state",N.target.value.toUpperCase()),placeholder:"SP",style:io})]})]}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[r.jsxs("div",{children:[r.jsx(tl,{children:"Salário mínimo (R$)"}),r.jsx("input",{type:"number",value:l.salary_min,onChange:N=>P("salary_min",N.target.value),placeholder:"0",style:io})]}),r.jsxs("div",{children:[r.jsx(tl,{children:"Salário máximo (R$)"}),r.jsx("input",{type:"number",value:l.salary_max,onChange:N=>P("salary_max",N.target.value),placeholder:"0",style:io})]})]}),r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:[r.jsx(tl,{children:"Descrição"}),r.jsx("button",{type:"button",onClick:T,disabled:k,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 10px",fontSize:12,fontWeight:500,color:un.accent,background:un.accentMuted,border:"none",borderRadius:6,cursor:k?"not-allowed":"pointer",fontFamily:"inherit"},children:k?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:11,style:{animation:"jfdSpin 0.8s linear infinite"}})," Gerando..."]}):r.jsxs(r.Fragment,{children:[r.jsx(w8,{size:11})," Gerar com IA"]})})]}),r.jsx("textarea",{value:l.description,onChange:N=>P("description",N.target.value),placeholder:"Descreva responsabilidades, requisitos e benefícios...",rows:8,style:{...io,resize:"vertical",minHeight:160,fontFamily:"inherit",lineHeight:1.5}})]})]}),r.jsxs(sx,{children:[r.jsxs("div",{style:{fontSize:13,fontWeight:600,color:un.ink,display:"flex",alignItems:"center",gap:6},children:[r.jsx(hS,{size:13})," Opções"]}),r.jsx(pN,{label:"Vaga confidencial",hint:"Ocultar nome da empresa na página pública",checked:l.is_confidential,onChange:N=>P("is_confidential",N)}
929),r.jsx(pN,{label:"Mostrar faixa salarial",hint:"Exibir a faixa salarial na página pública da vaga",checked:l.salary_visible,onChange:N=>P("salary_visible",N)})]}),r.jsxs(sx,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10},children:[r.jsx("div",{style:{width:28,height:28,borderRadius:6,flexShrink:0,background:un.accentMuted,color:un.accent,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(Va,{size:14})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:13,fontWeight:600,color:un.ink},children:"Avaliações automáticas"}),r.jsx("div",{style:{fontSize:12,color:un.ink3,marginTop:2},children:"Estes testes serão disparados automaticamente quando candidatos confirmarem candidatura"})]})]}),o?r.jsxs(r.Fragment,{children:[l.assessment_template_ids.length>0&&r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:l.assessment_template_ids.map(N=>r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 8px 4px 10px",fontSize:12,fontWeight:500,color:un.accent,background:un.accentMuted,borderRadius:999},children:[I(N),r.jsx("button",{type:"button",onClick:()=>U(N),"aria-label":"Remover",style:{width:16,height:16,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:"transparent",border:"none",cursor:"pointer",color:un.accent,padding:0},onMouseEnter:W=>W.currentTarget.style.background="rgba(108,36,245,0.15)",onMouseLeave:W=>W.currentTarget.style.background="transparent",children:r.jsx(Jt,{size:11})})]},N))}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsxs("select",{value:A,onChange:N=>C(N.target.value),style:{...io,flex:1},children:[r.jsx("option",{value:"",children:"Adicionar avaliação..."}),_.filter(N=>!l.assessment_template_ids.includes(N.id)).map(N=>r.jsx("option",{value:N.id,children:N.name_pt||N.name},N.id))]}),r.jsx("button",{type:"button",onClick:R,disabled:!A,style:{padding:"8px 14px",fontSize:13,fontWeight:500,color:un.ink2,background:un.bg,border:`1px solid ${un.border}`,borderRadius:8,cursor:A?"pointer":"not-allowed",fontFamily:"inherit",opacity:A?1:.5},children:"Adicionar"})]})]}):r.jsxs("div",{style:{background:"linear-gradient(135deg, #0F0B2E, #1A1145, #0F0B2E)",borderRadius:8,padding:"14px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#FFFFFF"},children:"Ative o Summit Assessments"}),r.jsx("div",{style:{fontSize:12,color:"#9CA3AF",marginTop:2},children:"Dispare testes automaticamente em cada nova candidatura"})]}),r.jsx("button",{type:"button",onClick:()=>{t==null||t(),window.location.href="/app/conta/plano"},style:{padding:"6px 14px",fontSize:12,fontWeight:500,color:"#FFFFFF",background:un.accent,border:"none",borderRadius:6,cursor:"pointer",fontFamily:"inherit",whiteSpace:"nowrap"},children:"Conhecer"})]})]}),p&&r.jsx("div",{style:{padding:"10px 12px",background:un.errorBg,border:`1px solid ${un.errorBorder}`,borderRadius:8,fontSize:12,color:un.error},children:p})]}),r.jsx("div",{style:{padding:"14px 24px",background:un.bg,borderTop:`1px solid ${un.border}`,display:"flex",alignItems:"center",justifyContent:"flex-end",gap:10,flexShrink:0},children:r.jsx(aEe,{isEdit:D,jobStatus:n==null?void 0:n.status,saving:d,onCancel:t,onSave:()=>V(!1),onPublish:()=>V(!0)})})]})]}):null}const hN={remoto:"Remoto",hibrido:"Híbrido",presencial:"Presencial"},mN={clt:"CLT",pj:"PJ",autonomo:"Autônomo",estagio:"Estágio",temporario:"Temporário",cooperado:"Cooperado"},gN={published:{label:"Aberta",bg:"#ECFDF5",color:"#16A34A"},paused:{label:"Em pausa",bg:"#FEF3C7",color:"#D97706"},closed:{label:"Encerrada",bg:"#F3F4F6",color:"#6B7280"},draft:{label:"Rascunho",bg:"#F3F4F6",color:"#6B7280"},deleted:{label:"Encerrada",bg:"#F3F4F6",color:"#6B7280"}},fEe=[{key:"all",label:"Todas"},{key:"published",label:"Abertas"},{key:"draft",label:"Rascunhos"},{key:"paused",label:"Em pausa"},{key:"closed",label:"Encerradas"},{key:"mine",label:"Minhas"}];function pEe({status:e}){const t=gN[e]||gN.draft;return r.jsx("span",{style:{fontSize:11,fontWeight:500,padding:"3px 10px",borderRadius:99,background:t.bg,color:t.color,whiteSpace:"nowrap"},children:t.label})}function hEe({active:e,label:t,onClick:n}){return r.jsx("button",{onClick:n,style:{padding:"6px 16px",borderRadius:99,border:"none",background:e?"#6C24F5":"#F3F4F6",color:e?"#FFFFFF":"#6B7280",fontSize:13,fontWeight:500,cursor:"pointer",fontFamily:"inherit",transition:"background 120ms, color 120ms"},onMouseEnter:s=>{e||(s.currentTarget.style.background="#E5E7EB")},onMouseLeave:s=>{e||(s.currentTarget.style.background="#F3F4F6")},children:t})}function mEe({job:e,applications:t,expanded:n,onToggle:s,onOpen:i,onEdit:a,onPauseResume:o,onClose:l,onDelete:c,workspaceId:d}){const u=t.length,p=Date.now()-2880*60*1e3,m=t.filter(y=>new Date(y.applied_at||y.created_date||0).getTime()>=p).length,x=[];!e.is_confidential&&e.company_name&&x.push(e.company_name);
929const w=[e.location_city,e.location_state].filter(Boolean).join("/");return w&&x.push(w),hN[e.work_format]&&x.push(hN[e.work_format]),mN[e.contract_type]&&x.push(mN[e.contract_type]),r.jsxs("div",{style:{borderBottom:"1px solid #F3F4F6"},children:[r.jsxs("div",{onClick:s,style:{display:"flex",alignItems:"center",gap:14,padding:"16px 20px",cursor:"pointer",transition:"background 100ms"},onMouseEnter:y=>y.currentTarget.style.background="#FAFAFA",onMouseLeave:y=>y.currentTarget.style.background="transparent",children:[r.jsx("div",{onClick:y=>{y.stopPropagation(),i()},style:{cursor:"pointer"},children:r.jsx(nEe,{name:e.company_name||e.title})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[r.jsx("span",{onClick:y=>{y.stopPropagation(),i()},style:{fontSize:14,fontWeight:500,color:"var(--sv-ink)",cursor:"pointer"},onMouseEnter:y=>y.currentTarget.style.textDecoration="underline",onMouseLeave:y=>y.currentTarget.style.textDecoration="none",children:e.title}),e.is_confidential&&r.jsx("span",{style:{fontSize:11,fontWeight:500,padding:"2px 8px",borderRadius:99,background:"#F3F4F6",color:"#6B7280"},children:"Confidencial"})]}),r.jsxs("div",{style:{fontSize:12,color:"#6B7280",marginTop:4,display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[x.map((y,v)=>r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[v===x.indexOf(w)&&w&&r.jsx(ma,{size:11,style:{flexShrink:0}}),y,v<x.length-1&&r.jsx("span",{style:{color:"#D1D5DB",marginLeft:4},children:"·"})]},v)),m>0&&r.jsxs(r.Fragment,{children:[x.length>0&&r.jsx("span",{style:{color:"#D1D5DB"},children:"·"}),r.jsxs("span",{style:{color:"#16A34A",fontWeight:500},children:[m," ",m===1?"novo":"novos"]})]})]})]}),r.jsx(pEe,{status:e.status}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginLeft:4},children:[r.jsxs("div",{style:{textAlign:"right",lineHeight:1.1},children:[r.jsx("div",{style:{fontSize:20,fontWeight:500,color:"var(--sv-ink)",fontVariantNumeric:"tabular-nums"},children:u}),r.jsx("div",{style:{fontSize:11,color:"#6B7280",marginTop:2},children:"candidatos"})]}),r.jsx(ar,{size:16,style:{color:"#9CA3AF",transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)"}})]}),r.jsx("div",{onClick:y=>y.stopPropagation(),children:r.jsxs(G_,{children:[r.jsx(K_,{asChild:!0,children:r.jsx("button",{"aria-label":"Ações da vaga",style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,background:"transparent",border:"none",cursor:"pointer",color:"#9CA3AF",transition:"background 100ms, color 100ms"},onMouseEnter:y=>{y.currentTarget.style.background="#F3F4F6",y.currentTarget.style.color="#374151"},onMouseLeave:y=>{y.currentTarget.style.background="transparent",y.currentTarget.style.color="#9CA3AF"},children:r.jsx(No,{size:16})})}),r.jsxs(P1,{align:"end",className:"w-44",children:[r.jsxs(vo,{onClick:a,className:"text-sm",children:[r.jsx($r,{size:14,className:"mr-2"})," Editar"]}),(e.status==="published"||e.status==="paused")&&r.jsx(vo,{onClick:o,className:"text-sm",children:e.status==="published"?r.jsxs(r.Fragment,{children:[r.jsx(gS,{size:14,className:"mr-2"})," Pausar"]}):r.jsxs(r.Fragment,{children:[r.jsx(g8,{size:14,className:"mr-2"})," Retomar"]})}),e.status!=="closed"&&e.status!=="deleted"&&r.jsxs(vo,{onClick:l,className:"text-sm",children:[r.jsx(yl,{size:14,className:"mr-2"})," Encerrar"]}),r.jsx(AL,{}),r.jsxs(vo,{onClick:c,className:"text-sm text-red-600 focus:text-red-600",children:[r.jsx(zn,{size:14,className:"mr-2"})," Excluir"]})]})]})})]}),r.jsx("div",{style:{maxHeight:n?600:0,overflow:"hidden",transition:"max-height 240ms cubic-bezier(0.4, 0, 0.2, 1)"},children:r.jsx("div",{style:{padding:"0 20px 12px 74px"},children:n&&r.jsx(iEe,{jobId:e.id,workspaceId:d})})})]})}function gEe(){const{user:e}=tr(),t=In(),n=Bs(),[s,i]=g.useState([]),[a,o]=g.useState({}),[l,c]=g.useState(!0),[d,u]=g.useState(null),[p,m]=g.useState("published"),[x,w]=g.useState(null),[y,v]=g.useState(!1),[j,k]=g.useState(null),[S,_]=g.useState(0);g.useEffect(()=>{if(!(e!=null&&e.email))return;let I=!1;return(async()=>{var H;c(!0);try{const V=await ne.functions.invoke("getWorkspaceId",{user_email:e.email}),X=((H=V==null?void 0:V.data)==null?void 0:H.workspace_id)||(V==null?void 0:V.workspace_id);if(I)return;if(u(X),!X){c(!1);return}const[N,W]=await Promise.all([ne.entities.Job.filter({workspace_id:X}),ne.entities.JobApplication.filter({workspace_id:X})]);if(I)return;const O={};
929(W||[]).forEach(M=>{M.status==="removed_by_recruiter"||M.status==="withdrawn"||M.status==="expired"||(O[M.job_id]||(O[M.job_id]=[]),O[M.job_id].push(M))});const G=(N||[]).sort((M,z)=>{const K=M.status==="published"?0:1,Y=z.status==="published"?0:1;return K!==Y?K-Y:new Date(z.updated_date||0)-new Date(M.updated_date||0)});i(G),o(O)}catch(V){console.error("JobsDashboard load error:",V==null?void 0:V.message)}finally{I||c(!1)}})(),()=>{I=!0}},[e==null?void 0:e.email,S]),g.useEffect(()=>{new URLSearchParams(n.search).get("new")==="1"&&(k(null),v(!0),t(n.pathname,{replace:!0}))},[n.search]);const F=g.useMemo(()=>s.filter(I=>p==="all"?I.status!=="deleted":p==="published"?I.status==="published":p==="draft"?I.status==="draft":p==="paused"?I.status==="paused":p==="closed"?I.status==="closed"||I.status==="deleted":p==="mine"?(I.created_by_email||I.created_by)===(e==null?void 0:e.email):!0),[s,p,e==null?void 0:e.email]);function A(I){w(H=>H===I?null:I)}function C(I){t(`/app/vagas/${I}`)}function D(I){k(I),v(!0)}function P(){v(!1),k(null)}function L(){_(I=>I+1)}async function T(I){const H=I.status==="published"?"paused":"published";i(V=>V.map(X=>X.id===I.id?{...X,status:H}:X));try{await ne.entities.Job.update(I.id,{status:H})}catch(V){console.error("Pause/resume failed:",V==null?void 0:V.message),i(X=>X.map(N=>N.id===I.id?{...N,status:I.status}:N))}}async function R(I){if(window.confirm(`Encerrar a vaga "${I.title}"?`)){i(H=>H.map(V=>V.id===I.id?{...V,status:"closed"}:V));try{await ne.entities.Job.update(I.id,{status:"closed",closed_at:new Date().toISOString()})}catch(H){console.error("Close job failed:",H==null?void 0:H.message),i(V=>V.map(X=>X.id===I.id?{...X,status:I.status}:X))}}}async function U(I){if(!window.confirm(`Excluir a vaga "${I.title}"? Esta ação não pode ser desfeita.`))return;const H=s;i(V=>V.filter(X=>X.id!==I.id));try{await ne.functions.invoke("deleteJob",{job_id:I.id})}catch(V){console.error("Delete job failed:",V==null?void 0:V.message),i(H)}}return l?r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"80px 0"},children:[r.jsx(rt,{size:20,style:{animation:"spin 0.8s linear infinite",color:"#6C24F5"}}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}):r.jsxs("div",{style:{fontFamily:"var(--sv-font)"},children:[r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"}),r.jsx("div",{style:{display:"flex",gap:8,marginBottom:20,flexWrap:"wrap"},children:fEe.map(I=>r.jsx(hEe,{label:I.label,active:p===I.key,onClick:()=>m(I.key)},I.key))}),r.jsx("div",{style:{background:"#FFFFFF",border:"1px solid #E5E7EB",borderRadius:12,overflow:"hidden"},children:F.length===0?r.jsx("div",{style:{padding:"48px 24px",textAlign:"center",color:"#6B7280",fontSize:13},children:"Nenhuma vaga nesta visão."}):F.map((I,H)=>r.jsx("div",{style:{borderTop:H===0?"none":void 0},children:r.jsx(mEe,{job:I,applications:a[I.id]||[],expanded:x===I.id,onToggle:()=>A(I.id),onOpen:()=>C(I.id),onEdit:()=>D(I),onPauseResume:()=>T(I),onClose:()=>R(I),onDelete:()=>U(I),workspaceId:d})},I.id))}),r.jsx(uEe,{isOpen:y,onClose:P,job:j,workspaceId:d,onSaved:L})]})}const xEe=[{value:"text",label:"Texto"},{value:"number",label:"Número"},{value:"date",label:"Data"},{value:"boolean",label:"Sim/Não"},{value:"select",label:"Seleção única"},{value:"multi_select",label:"Seleção múltipla"},{value:"pair_list",label:"Lista de duplas (nome + nível)"}],yEe=["email","phone","headline","location","linkedin_url"];function vEe(e){return String(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9\s_-]/g,"").replace(/[\s-]+/g,"_")}function yz({isOpen:e,onClose:t,wsId:n,scope:s="summary",definitions:i,onChanged:a}){const o=s==="list"?"show_in_list":"show_in_summary",l=s==="list"?"order":"order_summary",[c,d]=g.useState([]),[u,p]=g.useState(!1),[m,x]=g.useState(!1),[w,y]=g.useState(""),[v,j]=g.useState("text"),[k,S]=g.useState(""),[_,F]=g.useState("");if(g.useEffect(()=>{const R=[...(i||[]).filter(U=>!String(U.source_path||"").startsWith("__")).filter(U=>s==="summary"?!yEe.includes(U.source_path):!0)].sort((U,I)=>(U[l]||0)-(I[l]||0));d(R)},[i,l,s]),!e)return null;const A=async T=>
929{if(!T.destination||T.destination.index===T.source.index)return;const R=c,U=[...c],[I]=U.splice(T.source.index,1);U.splice(T.destination.index,0,I);const H=U.map((V,X)=>({...V,[l]:X}));d(H);try{const V=H.filter((X,N)=>{var W;return(((W=R.find(O=>O.id===X.id))==null?void 0:W[l])||0)!==N});await Promise.all(V.map(X=>ne.entities.CustomFieldDefinition.update(X.id,{[l]:X[l]}))),a==null||a()}catch{d(R)}},C=async T=>{const R=T[o]!==!0,U=c;d(I=>I.map(H=>H.id===T.id?{...H,[o]:R}:H));try{await ne.entities.CustomFieldDefinition.update(T.id,{[o]:R}),a==null||a()}catch{d(U)}},D=async T=>{if(T.is_native||!window.confirm(`Excluir o campo "${T.field_label}"?`))return;const R=c;d(U=>U.filter(I=>I.id!==T.id));try{await ne.entities.CustomFieldDefinition.delete(T.id),a==null||a()}catch{d(R)}},P=async()=>{const T=w.trim();if(!T||u)return;const R=vEe(T);if(!R){F("Nome inválido.");return}if(c.some(U=>U.field_key===R)){F("Já existe um campo com esse nome.");return}p(!0),F("");try{const U={workspace_id:n,field_key:R,field_label:T,field_type:v,is_native:!1,required:!1,[o]:!0,[l]:c.length};(v==="select"||v==="multi_select"||v==="pair_list")&&(U.options=k.split(",").map(I=>I.trim()).filter(Boolean)),await ne.entities.CustomFieldDefinition.create(U),y(""),j("text"),S(""),x(!1),a==null||a()}catch(U){F((U==null?void 0:U.message)||"Erro ao criar campo.")}p(!1)},L={width:"100%",fontSize:13,fontFamily:"var(--sv-font)",color:"var(--sv-ink)",padding:"7px 10px",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-md)",background:"var(--sv-surface)",outline:"none"};return r.jsx("div",{onClick:t,style:{position:"fixed",inset:0,background:"rgba(15,23,42,0.5)",zIndex:2200,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:T=>T.stopPropagation(),style:{background:"var(--sv-surface)",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-lg)",width:"100%",maxWidth:520,maxHeight:"80vh",display:"flex",flexDirection:"column",fontFamily:"var(--sv-font)",boxShadow:"0 20px 40px rgba(15,23,42,0.18)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 18px",borderBottom:"1px solid var(--sv-border)",flexShrink:0},children:[r.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--sv-ink)"},children:"Exibição de campos"}),r.jsx("button",{onClick:t,style:{background:"none",border:"none",cursor:"pointer",color:"var(--sv-ink-3)",padding:2,display:"grid",placeItems:"center"},children:r.jsx(Jt,{size:16})})]}),r.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"14px 18px"},children:[r.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--sv-ink-3)",marginBottom:8},children:"Campos exibidos"}),r.jsx(i_,{onDragEnd:A,children:r.jsx(l_,{droppableId:"fields",children:T=>r.jsxs("div",{ref:T.innerRef,...T.droppableProps,style:{display:"flex",flexDirection:"column",gap:4},children:[c.map((R,U)=>{const I=R[o]===!0;return r.jsx(o_,{draggableId:String(R.id),index:U,children:(H,V)=>r.jsxs("div",{ref:H.innerRef,...H.draggableProps,style:{display:"flex",alignItems:"center",gap:8,padding:"7px 10px",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-md)",background:"var(--sv-surface)",opacity:I?V.isDragging?.9:1:.5,...H.draggableProps.style},children:[r.jsx("span",{...H.dragHandleProps,style:{display:"grid",placeItems:"center",color:"var(--sv-ink-3)",cursor:"grab"},children:r.jsx(dS,{size:14})}),r.jsx("span",{style:{fontSize:13,color:"var(--sv-ink)",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R.field_label}),R.is_native&&r.jsx("span",{style:{fontSize:10,fontWeight:600,color:"var(--sv-ink-3)",border:"1px solid var(--sv-border)",borderRadius:10,padding:"1px 7px"},children:"Sistema"}),r.jsx("button",{type:"button",onClick:()=>C(R),title:I?"Ocultar":"Exibir",style:{background:"none",border:"none",cursor:"pointer",color:I?"var(--sv-accent)":"var(--sv-ink-3)",padding:2,display:"grid",placeItems:"center"},children:I?r.jsx(cS,{size:14}):r.jsx(l8,{size:14})}),!R.is_native&&r.jsx("button",{type:"button",onClick:()=>D(R),title:"Excluir campo",style:{background:"none",border:"none",cursor:"pointer",color:"#A32D2D",padding:2,display:"grid",placeItems:"center"},children:r.jsx(zn,{size:13})})]})},R.id)}),T.placeholder]})})}),r.jsxs("div",{style:{marginTop:20,paddingTop:14,borderTop:"1px solid var(--sv-border)"},children:[r.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--sv-ink-3)",marginBottom:8},children:"Criar campo personalizado"}),m?r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,color:"var(--sv-ink-2)",marginBottom:3},children:"Nome do campo"}),r.jsx("input",{value:w,onChange:T=>y(T.target.value),style:L,autoFocus:!0})]}),r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,color:"var(--sv-ink-2)",marginBottom:3},children:"Tipo"}
929),r.jsx("select",{value:v,onChange:T=>j(T.target.value),style:L,children:xEe.map(T=>r.jsx("option",{value:T.value,children:T.label},T.value))})]}),(v==="select"||v==="multi_select")&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,color:"var(--sv-ink-2)",marginBottom:3},children:"Opções (separadas por vírgula)"}),r.jsx("input",{value:k,onChange:T=>S(T.target.value),placeholder:"Opção 1, Opção 2",style:L})]}),v==="pair_list"&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,color:"var(--sv-ink-2)",marginBottom:3},children:"Níveis disponíveis (separados por vírgula)"}),r.jsx("input",{value:k,onChange:T=>S(T.target.value),placeholder:"Practitioner, Associate, Professional",style:L}),r.jsx("div",{style:{fontSize:11,color:"var(--sv-ink-3)",marginTop:3},children:"Níveis que poderão ser escolhidos em cada linha do campo."})]}),_&&r.jsx("div",{style:{fontSize:12,color:"#A32D2D"},children:_}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsxs("button",{type:"button",onClick:P,disabled:!w.trim()||u,style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:"#fff",background:"var(--sv-accent)",border:"none",borderRadius:"var(--sv-r-md)",padding:"7px 14px",cursor:!w.trim()||u?"not-allowed":"pointer",opacity:!w.trim()||u?.6:1,fontFamily:"var(--sv-font)"},children:[u&&r.jsx(rt,{size:12,className:"animate-spin"})," Salvar"]}),r.jsx("button",{type:"button",onClick:()=>{x(!1),F("")},style:{fontSize:12,color:"var(--sv-ink-2)",background:"none",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-md)",padding:"7px 14px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Cancelar"})]})]}):r.jsxs("button",{type:"button",onClick:()=>x(!0),style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:"var(--sv-accent)",background:"none",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-md)",padding:"6px 12px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:[r.jsx(Ln,{size:13})," Novo campo"]})]})]}),r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"12px 18px",borderTop:"1px solid var(--sv-border)",flexShrink:0},children:r.jsx("button",{type:"button",onClick:t,style:{fontSize:13,fontWeight:500,color:"var(--sv-ink-2)",background:"none",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-md)",padding:"7px 16px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Fechar"})})]})})}function bEe(e){var n;if(!e)return"?";const t=e.trim().split(/\s+/);return t.length===1?((n=t[0][0])==null?void 0:n.toUpperCase())||"?":(t[0][0]+t[t.length-1][0]).toUpperCase()}function xN(e){return typeof e=="string"&&e.includes("@summit.internal")}const ix={submitted:"Inscrito",shortlisted:"Selecionado",approved:"Aprovado",standby:"Em espera",rejected:"Reprovado",hired:"Contratado",pending_verification:"Pendente",viewed:"Visualizado",withdrawn:"Retirado",expired:"Expirado",removed_by_recruiter:"Removido",pool:"Pool"},ax=({children:e,width:t,minWidth:n,onClick:s})=>r.jsx("th",{onClick:s,style:{width:t,minWidth:n},className:`text-left px-3 py-2.5 text-[11px] font-semibold uppercase tracking-wider text-gray-500 whitespace-nowrap select-none ${s?"cursor-pointer hover:text-gray-700":""}`,children:r.jsx("span",{style:{pointerEvents:"none"},children:e})}),Xl=({children:e,width:t,minWidth:n,style:s,onClick:i,className:a=""})=>r.jsx("td",{style:{width:t,minWidth:n,...s||{}},onClick:i,className:`px-3 py-2.5 text-xs text-gray-900 align-middle ${a}`,children:e});function wEe(e){try{return JSON.parse((e==null?void 0:e.custom_fields_json)||"{}")||{}}catch{return{}}}function vz(e,t){return e.is_native===!0?(t.profile||{})[e.source_path]:wEe(t.wt)[e.field_key]}function bz(e){const t=Number(e||0);return t>0?`R$ ${t.toLocaleString("pt-BR",{maximumFractionDigits:0})}`:""}function yN(e,t){const n=vz(e,t);return e.source_path==="salary_expectation"||e.source_path==="salary_current"?bz(n):e.field_type==="boolean"?n===!0?"Sim":n===!1?"Não":"":Array.isArray(n)?n.join(", "):Ai(n==null?"":String(n))||""}async function jEe(e){if(!e||e.length===0)return[];const t=50,n=[];for(let s=0;s<e.length;s+=t){const i=e.slice(s,s+t);try{const a=await ne.entities.TalentProfile.filter({id:{$in:i}});Array.isArray(a)&&n.push(...a)}catch{for(const a of i)try{const o=await ne.entities.TalentProfile.filter({id:a});o!=null&&o[0]&&n.push(o[0])}catch{}}}return n}function SEe(){var Ur;const{user:e}=tr(),t=In(),[n]=Um(),{openCandidateDrawer:s}=hoe(),{entitlements:i}=Xa(),a=["starter","growth","enterprise"].includes((Ur=i==null?void 0:i.ats)==null?void 0:Ur.plan_key),o=n.get("profile");g.useEffect(()=>{o&&t(`/app/candidatos/${o}`,{replace:!0})},[o,t]);const[l,c]=g.useState(!0),[d,u]=g.useState([]),[p,m]=g.useState([]),[x,w]=g.useState({}),[y,v]=g.useState(""),[j,k]=g.useState("all"),[S,_]=g.useState("all"),[F,A]=g.useState("time"),[C,D]=g.useState("desc"),[P,L]=g.useState(1),T=50,[R,U]=g.useState(()=>new Set),[I,H]=g.useState(null),[V,X]=g.useState(null),[N,W]=g.useState(!1),[O,G]=g.useState(null),[M,z]=g.useState(null),[K,Y]=g.useState([]),[J,Q]=g.useState(!1),[ie,ae]=g.useState(!1),[re,pe]=g.useState(!1),[Z,Ne]=g.useState(null),[te,xe]=g.useState(null),[he,le]=g.useState(null),[ge,$e]=g.useState(!1),ft=g.useRef(null),{bgState:Qe,start:Ve,cancel:ze,dismiss:at}=E7({wsId:O,onDone:()=>{var Ue;(Ue=ft.current)==null||Ue.call(ft)}}),Nt=g.useMemo(()=>K.filter(Ue=>Ue.show_in_list===!0&&!String(Ue.source_path||"").startsWith("__")).sort((Ue,Et)=>(Ue.order||0)-(Et.order||0)),[K]),_e=g.useCallback(async()=>
929{if(O)try{const Ue=await ne.entities.CustomFieldDefinition.filter({workspace_id:O});Y((Ue||[]).sort((Et,mt)=>(Et.order||0)-(mt.order||0)))}catch{}},[O]),be=g.useCallback(async()=>{var Ue;if(e!=null&&e.email){c(!0);try{const Et=await ne.functions.invoke("getWorkspaceId",{user_email:e.email}),mt=((Ue=Et==null?void 0:Et.data)==null?void 0:Ue.workspace_id)||(Et==null?void 0:Et.workspace_id);if(!mt){u([]),c(!1);return}G(mt);try{await ne.functions.invoke("ensureWorkspaceFieldDefinitions",{workspace_id:mt})}catch{}const[Ht,ke,Ze,Be]=await Promise.all([ne.entities.WorkspaceTalent.filter({workspace_id:mt}),ne.entities.JobApplication.filter({workspace_id:mt}),ne.entities.Job.filter({workspace_id:mt}),ne.entities.CustomFieldDefinition.filter({workspace_id:mt}).catch(()=>[])]);Y((Be||[]).sort((de,me)=>(de.order||0)-(me.order||0)));const xt={};(Ze||[]).forEach(de=>{xt[de.id]=de}),w(xt),m(ke||[]);const yt=Ht||[],dt=[...new Set(yt.map(de=>de.talent_profile_id).filter(Boolean))],ee=await jEe(dt),fe={};ee.forEach(de=>{fe[de.id]=de});const ce={};(ke||[]).forEach(de=>{de.talent_profile_id&&(ce[de.talent_profile_id]||(ce[de.talent_profile_id]=[]),ce[de.talent_profile_id].push(de))});const ue=yt.map(de=>{var Pe;const me=fe[de.talent_profile_id]||null,Me=[...ce[de.talent_profile_id]||[]].sort((tt,pt)=>{const _t=new Date(tt.updated_date||tt.applied_at||tt.created_date||0).getTime();return new Date(pt.updated_date||pt.applied_at||pt.created_date||0).getTime()-_t}),Fe=Me[0]||null,Ie=Fe?((Pe=xt[Fe.job_id])==null?void 0:Pe.title)||"—":"Sem vaga";return{workspace_talent:de,profile:me,applications:Me,mostRecentApp:Fe,jobTitle:Ie}}).filter(de=>de.profile);u(ue)}finally{c(!1)}}},[e==null?void 0:e.email]);g.useEffect(()=>{be()},[be]),g.useEffect(()=>{ft.current=be},[be]),g.useEffect(()=>{if(!M)return;const Ue=()=>z(null);return document.addEventListener("mousedown",Ue),()=>document.removeEventListener("mousedown",Ue)},[M]);const Re=async Ue=>{u(Et=>Et.filter(mt=>mt.workspace_talent.id!==Ue));try{await ne.entities.WorkspaceTalent.delete(Ue)}catch{}},Xe=g.useMemo(()=>{const Ue=y.trim().toLowerCase();let Et=d.map(mt=>{const Ht=mt.profile||{},ke=mt.mostRecentApp,Ze=Ht.full_name||"Candidato",Be=Ht.headline||Ht.current_title||"",xt=Ht.email||"",yt=Ht.phone||"",dt=Ht.avatar_url||"",ee=Number(Ht.salary_expectation||0),fe=mt.jobTitle,ce=(ke==null?void 0:ke.status)||"pool",ue=ke?ke.updated_date||ke.applied_at||ke.created_date:mt.workspace_talent.added_at||mt.workspace_talent.created_date;return{wt:mt.workspace_talent,profile:Ht,app:ke,fullName:Ze,headline:Be,email:xt,phone:yt,avatarUrl:dt,salary:ee,jobTitle:fe,stageKey:ce,refDate:ue,rowId:mt.workspace_talent.id}});return Ue&&(Et=Et.filter(mt=>mt.fullName.toLowerCase().includes(Ue)||mt.email.toLowerCase().includes(Ue)||mt.jobTitle.toLowerCase().includes(Ue))),j!=="all"&&(Et=Et.filter(mt=>mt.jobTitle===j)),S!=="all"&&(Et=Et.filter(mt=>mt.stageKey===S)),F&&Et.sort((mt,Ht)=>{if(F==="name")return C==="asc"?mt.fullName.localeCompare(Ht.fullName):Ht.fullName.localeCompare(mt.fullName);if(F==="job")return C==="asc"?mt.jobTitle.localeCompare(Ht.jobTitle):Ht.jobTitle.localeCompare(mt.jobTitle);if(F==="stage"){const Ze=ix[mt.stageKey]||"",Be=ix[Ht.stageKey]||"";return C==="asc"?Ze.localeCompare(Be):Be.localeCompare(Ze)}if(F==="email")return C==="asc"?mt.email.localeCompare(Ht.email):Ht.email.localeCompare(mt.email);if(F==="phone")return C==="asc"?(mt.phone||"").localeCompare(Ht.phone||""):(Ht.phone||"").localeCompare(mt.phone||"");if(F==="time"){const Ze=mt.refDate?new Date(mt.refDate).getTime():0,Be=Ht.refDate?new Date(Ht.refDate).getTime():0;return C==="asc"?Ze-Be:Be-Ze}const ke=Nt.find(Ze=>Ze.field_key===F);if(ke){const Ze=yN(ke,mt),Be=yN(ke,Ht);return C==="asc"?Ze.localeCompare(Be):Be.localeCompare(Ze)}return 0}),Et},[d,y,j,S,F,C,Nt]),He=g.useMemo(()=>Xe.map(Ue=>{const Et=Ue.profile||{},mt=Ue.app;return{full_name:Et.full_name||"",email:xN(Et.email)?"":Et.email||"",phone:Et.phone||"",headline:Et.headline||"",current_title:Et.current_title||"",current_company:Et.current_company||"",location:Et.location||"",linkedin_url:Et.linkedin_url||"",salary_expectation:Number(Et.salary_expectation||0),languages:Et.languages||[],job_title:Ue.jobTitle||"",stage:ix[Ue.stageKey]||Ue.stageKey||"",source:Et.source||(mt==null?void 0:mt.origin)||"",applied_at:mt!=null&&mt.applied_at?new Date(mt.applied_at).toLocaleDateString("pt-BR"):"",rating_score:(mt==null?void 0:mt.rating_score)!=null?mt.rating_score:""}}
929),[Xe]),St=g.useMemo(()=>{const Ue=new Set;return d.forEach(Et=>{Et.jobTitle&&Ue.add(Et.jobTitle)}),Array.from(Ue).sort((Et,mt)=>Et.localeCompare(mt))},[d]),Ct=g.useMemo(()=>{const Ue=new Set;return d.forEach(Et=>{var mt;Ue.add(((mt=Et.mostRecentApp)==null?void 0:mt.status)||"pool")}),Array.from(Ue)},[d]);g.useEffect(()=>{L(1)},[y,j,S,F,C]);const Se=Math.max(1,Math.ceil(Xe.length/T)),et=Math.min(P,Se),bt=(et-1)*T,Ot=Math.min(bt+T,Xe.length),sn=g.useMemo(()=>Xe.slice(bt,Ot),[Xe,bt,Ot]),Vt=Ue=>{F===Ue?D(Et=>Et==="asc"?"desc":"asc"):(A(Ue),D("asc"))},Un=Xe.length>0&&Xe.every(Ue=>R.has(Ue.rowId)),nr=()=>{U(Ue=>{const Et=new Set(Ue);return Un?Xe.forEach(mt=>Et.delete(mt.rowId)):Xe.forEach(mt=>Et.add(mt.rowId)),Et})},xr=Ue=>U(Et=>{const mt=new Set(Et);return mt.has(Ue)?mt.delete(Ue):mt.add(Ue),mt}),dr=Ue=>F!==Ue?r.jsx(ar,{size:12,className:"inline-block ml-1",style:{color:"#D1D5DB"}}):C==="asc"?r.jsx(Dc,{size:12,className:"inline-block ml-1 text-gray-500"}):r.jsx(ar,{size:12,className:"inline-block ml-1 text-gray-500"}),hs=Ue=>{t(`/app/candidatos/${Ue.wt.id}`)},mi=Ue=>{Ue.app?H(Ue.app):H({id:`wt_${Ue.wt.id}`,talent_profile_id:Ue.profile.id,workspace_id:Ue.wt.workspace_id,status:"pool",talent_profile:Ue.profile})};return o?null:r.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"calc(100vh - 74px)",overflow:"hidden"},children:[r.jsxs("div",{className:"flex items-center gap-3 mb-4 flex-wrap",style:{flexShrink:0},children:[r.jsxs("div",{className:"relative",children:[r.jsx(Ua,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none"}),r.jsx("input",{type:"text",value:y,onChange:Ue=>v(Ue.target.value),placeholder:"Buscar por nome, e-mail ou vaga...",className:"w-72 bg-white border border-gray-200 rounded-lg text-xs pl-9 pr-3 py-2 focus:outline-none focus:border-blue-300 focus:ring-2 focus:ring-blue-100"})]}),r.jsxs("select",{value:j,onChange:Ue=>k(Ue.target.value),className:"bg-white border border-gray-200 rounded-lg text-[13px] px-3 py-2 focus:outline-none focus:border-blue-300 focus:ring-2 focus:ring-blue-100 text-gray-700",style:{maxWidth:200},children:[r.jsx("option",{value:"all",children:"Todas as vagas"}),St.map(Ue=>r.jsx("option",{value:Ue,children:Ue},Ue))]}),r.jsxs("select",{value:S,onChange:Ue=>_(Ue.target.value),className:"bg-white border border-gray-200 rounded-lg text-[13px] px-3 py-2 focus:outline-none focus:border-blue-300 focus:ring-2 focus:ring-blue-100 text-gray-700",children:[r.jsx("option",{value:"all",children:"Todas as etapas"}),Ct.map(Ue=>r.jsx("option",{value:Ue,children:ix[Ue]||Ue},Ue))]}),r.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[r.jsxs("div",{className:"text-xs text-gray-500 font-medium",children:[Xe.length," ",Xe.length===1?"candidato":"candidatos"]}),a&&r.jsxs("button",{type:"button",onClick:()=>$e(!0),className:"text-xs bg-white text-gray-600 border border-gray-200 rounded-lg font-medium hover:bg-gray-50 flex items-center gap-1.5 cursor-pointer",style:{padding:"8px 16px"},children:[r.jsx(Wa,{size:12,style:{pointerEvents:"none"}}),r.jsx("span",{style:{pointerEvents:"none"},children:"Exportar"})]}),r.jsxs("button",{type:"button",onClick:()=>Q(!0),className:"text-xs bg-white text-gray-600 border border-gray-200 rounded-lg font-medium hover:bg-gray-50 flex items-center gap-1.5 cursor-pointer",style:{padding:"8px 16px"},children:[r.jsx(Gf,{size:12,style:{pointerEvents:"none"}}),r.jsx("span",{style:{pointerEvents:"none"},children:"Campos"})]}),r.jsxs("button",{type:"button",onClick:()=>ae(!0),className:"text-xs bg-white text-gray-600 border border-gray-200 rounded-lg font-medium hover:bg-gray-50 flex items-center gap-1.5 cursor-pointer",style:{padding:"8px 16px"},children:[r.jsx(Ha,{size:12,style:{pointerEvents:"none"}}),r.jsx("span",{style:{pointerEvents:"none"},children:"Importar"})]}),r.jsx("button",{type:"button",onClick:()=>W(!0),className:"text-xs bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 cursor-pointer",style:{padding:"8px 16px"},children:r.jsx("span",{style:{pointerEvents:"none"},children:"+ Candidato"})})]})]}),r.jsx(F7,{bgState:Qe,onCancel:ze,onDismiss:at}),R.size>0&&r.jsxs("div",{className:"flex items-center gap-3 bg-indigo-50 border border-indigo-200 rounded-lg px-4 py-2.5 mb-3",children:[r.jsxs("span",{className:"text-xs font-medium text-indigo-700",children:[R.size," selecionado(s)"]}),r.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[r.jsxs("button",{onClick:Ue=>{Ue.stopPropagation();const mt=Xe.filter(Ht=>R.has(Ht.rowId)).filter(Ht=>{var ke;return(ke=Ht.profile)==null?void 0:ke.id}).map(Ht=>({id:Ht.profile.id,full_name:Ht.fullName,first_name:Ht.fullName.split(" ")[0]||"",email:Ht.email,phone:Ht.phone,salary_current:Number(Ht.profile.salary_current||0),salary_expectation:Ht.salary}));mt.length>0&&le(mt)},className:"text-xs bg-white text-indigo-600 border border-indigo-200 px-3 py-1.5 rounded-md font-medium hover:bg-indigo-50 flex items-center gap-1.5",children:[r.jsx(mr,{size:12}
929)," Enviar Email"]}),r.jsxs("button",{onClick:()=>{const Ue=[...new Set(Xe.filter(Et=>R.has(Et.rowId)).map(Et=>{var mt;return(mt=Et.profile)==null?void 0:mt.id}).filter(Boolean))];Ue.length>0&&X(Ue)},className:"text-xs bg-blue-600 text-white px-3 py-1.5 rounded-md font-medium hover:bg-blue-700 flex items-center gap-1.5",children:[r.jsx(pa,{size:12})," Enviar pra vaga"]}),r.jsxs("button",{onClick:async()=>{const Ue=Array.from(R);window.confirm(`Remover ${Ue.length} candidato(s) do workspace?`)&&(u(Et=>Et.filter(mt=>!Ue.includes(mt.workspace_talent.id))),U(new Set),Promise.allSettled(Ue.map(Et=>ne.entities.WorkspaceTalent.delete(Et))))},className:"text-xs bg-white text-red-600 border border-red-200 px-3 py-1.5 rounded-md font-medium hover:bg-red-50 flex items-center gap-1.5",children:[r.jsx(zn,{size:12})," Remover"]}),r.jsx("button",{onClick:()=>U(new Set),className:"text-xs text-gray-500 px-2 py-1.5 hover:text-gray-700",children:"Cancelar"})]})]}),l&&r.jsxs("div",{className:"flex items-center justify-center py-20 text-gray-500",children:[r.jsx(rt,{className:"w-5 h-5 animate-spin mr-2"}),r.jsx("span",{className:"text-sm",children:"Carregando candidatos..."})]}),!l&&Xe.length===0&&r.jsxs("div",{className:"bg-white border border-dashed border-gray-200 rounded-lg p-12 text-center text-gray-500",children:[r.jsx(Nr,{className:"w-8 h-8 mx-auto mb-3 text-gray-400"}),r.jsx("p",{className:"text-sm",children:"Nenhum candidato encontrado"})]}),!l&&Xe.length>0&&r.jsx("div",{className:"bg-white border border-gray-100 rounded-lg",style:{flex:1,minHeight:0,overflowY:"auto"},children:r.jsxs("table",{className:"w-full border-collapse",style:{tableLayout:"auto"},children:[r.jsx("thead",{className:"sticky top-0 bg-gray-50 z-10",children:r.jsxs("tr",{className:"border-b border-gray-100",children:[r.jsx(ax,{width:40,children:r.jsx("input",{type:"checkbox",checked:Un,onChange:nr,className:"w-3.5 h-3.5 cursor-pointer accent-indigo-600"})}),r.jsxs(ax,{minWidth:220,onClick:()=>Vt("name"),children:["Candidato ",dr("name")]}),Nt.map(Ue=>r.jsxs(ax,{minWidth:80,onClick:()=>Vt(Ue.field_key),children:[Ue.field_label," ",dr(Ue.field_key)]},Ue.id)),r.jsx(ax,{width:40})]})}),r.jsx("tbody",{children:sn.map((Ue,Et)=>{const mt=R.has(Ue.rowId),Ht=xN(Ue.email);return r.jsxs("tr",{onClick:()=>hs(Ue),className:`border-b border-gray-50 hover:bg-gray-50 transition cursor-pointer ${Et%2===1?"bg-gray-50/40":"bg-white"}`,children:[r.jsx(Xl,{width:40,onClick:ke=>ke.stopPropagation(),children:r.jsx("input",{type:"checkbox",checked:mt,onChange:ke=>{ke.stopPropagation(),xr(Ue.rowId)},onClick:ke=>ke.stopPropagation(),className:"w-3.5 h-3.5 cursor-pointer accent-indigo-600"})}),r.jsx(Xl,{minWidth:220,children:r.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[Ue.avatarUrl?r.jsx("img",{src:Ue.avatarUrl,alt:Ue.fullName,className:"w-6 h-6 rounded-full object-cover flex-shrink-0"}):r.jsx("div",{className:"w-6 h-6 rounded-full bg-indigo-50 text-indigo-700 text-[10px] font-medium flex items-center justify-center flex-shrink-0",children:bEe(Ue.fullName)}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("div",{className:"text-xs font-medium text-gray-900 truncate",children:Ue.fullName}),Ue.headline&&r.jsx("div",{className:"text-[11px] text-gray-500 truncate",children:Ue.headline})]})]})}),Nt.map(ke=>{const Ze=dt=>{dt.stopPropagation(),Ne({id:Ue.profile.id,full_name:Ue.fullName,first_name:Ue.fullName.split(" ")[0]||"",email:Ue.email,phone:Ue.phone,salary_current:Number(Ue.profile.salary_current||0),salary_expectation:Ue.salary});const ee=Ue.app&&x[Ue.app.job_id]?{title:x[Ue.app.job_id].title}:null;xe(ee),pe(!0)};if(ke.is_native===!0&&ke.source_path==="email")return r.jsx(Xl,{minWidth:160,onClick:dt=>dt.stopPropagation(),children:Ue.email?r.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[r.jsx("button",{type:"button",onClick:Ze,className:"text-[11px] truncate text-left bg-transparent border-0 p-0 cursor-pointer hover:underline flex-1 min-w-0",style:{color:Ht?"#B45309":"#6C24F5",fontStyle:Ht?"italic":"normal"},title:Ht?"Informe o e-mail":Ue.email,children:Ht?"Informe o e-mail":Ue.email}),r.jsx("button",{type:"button",onClick:Ze,className:"p-0.5 rounded hover:bg-gray-100 flex-shrink-0",style:{color:"#6C24F5"},title:"Enviar email",children:r.jsx(mr,{size:12})})]}):r.jsx("span",{className:"text-gray-400",children:"—"})},ke.id);const Be=vz(ke,Ue);
929if(ke.is_native===!0&&(ke.source_path==="salary_expectation"||ke.source_path==="salary_current")){const dt=bz(Be);return r.jsx(Xl,{minWidth:90,children:dt?r.jsx("span",{className:"text-[11px] text-blue-600 font-semibold whitespace-nowrap",children:dt}):r.jsx("span",{className:"text-gray-400 text-[11px]",children:"—"})},ke.id)}if(ke.is_native===!0&&ke.source_path==="linkedin_url"){const dt=Ai(Be==null?"":String(Be));return r.jsx(Xl,{minWidth:120,onClick:ee=>ee.stopPropagation(),children:dt?r.jsx("a",{href:/^https?:\/\//i.test(dt)?dt:`https://${dt}`,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] truncate block hover:underline",style:{color:"#6C24F5"},title:dt,children:dt}):r.jsx("span",{className:"text-gray-400 text-[11px]",children:"—"})},ke.id)}if(ke.is_native===!0&&ke.source_path==="cv_file_url"){const dt=Ai(Be==null?"":String(Be));return r.jsx(Xl,{minWidth:100,onClick:ee=>ee.stopPropagation(),children:dt?r.jsx("a",{href:/^https?:\/\//i.test(dt)?dt:`https://${dt}`,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] truncate block hover:underline",style:{color:"#6C24F5"},title:"Ver currículo",children:"Ver currículo"}):r.jsx("span",{className:"text-gray-400 text-[11px]",children:"—"})},ke.id)}let xt="";ke.field_type==="boolean"?xt=Be===!0?"Sim":Be===!1?"Não":"":Array.isArray(Be)?xt=Be.map(dt=>dt&&typeof dt=="object"?[dt.language||dt.name,dt.level].filter(Boolean).join(" "):String(dt)).filter(Boolean).join(", "):xt=Ai(Be==null?"":String(Be))||"";const yt=xt||"—";return r.jsx(Xl,{minWidth:80,children:r.jsx("span",{className:"text-[11px] text-gray-600 truncate block",title:yt,children:yt})},ke.id)}),r.jsx(Xl,{width:40,onClick:ke=>ke.stopPropagation(),children:r.jsxs("div",{className:"relative",onMouseDown:ke=>ke.stopPropagation(),children:[r.jsx("button",{type:"button",onClick:ke=>{ke.stopPropagation(),z(M===Ue.rowId?null:Ue.rowId)},className:"w-6 h-6 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Ações",children:r.jsx(No,{size:14})}),M===Ue.rowId&&r.jsxs("div",{onClick:ke=>ke.stopPropagation(),onMouseDown:ke=>ke.stopPropagation(),className:"absolute right-0 mt-1 bg-white shadow-xl rounded-lg border border-gray-200 py-1 z-50",style:{minWidth:200},children:[r.jsxs("button",{type:"button",onClick:()=>{z(null),mi(Ue)},className:"flex items-center gap-2 w-full text-left px-3 py-2 text-xs hover:bg-gray-50",style:{color:"#185FA5"},children:[r.jsx($r,{size:12})," Editar candidato"]}),r.jsxs("button",{type:"button",onClick:()=>{var ke;z(null),(ke=Ue.profile)!=null&&ke.id&&X([Ue.profile.id])},className:"flex items-center gap-2 w-full text-left px-3 py-2 text-xs hover:bg-gray-50 text-gray-700",children:[r.jsx(pa,{size:12})," Enviar pra vaga"]}),r.jsx("div",{className:"border-t border-gray-100 my-1"}),r.jsxs("button",{type:"button",onClick:()=>{z(null),window.confirm("Remover candidato do workspace?")&&Re(Ue.wt.id)},className:"flex items-center gap-2 w-full text-left px-3 py-2 text-xs hover:bg-gray-50",style:{color:"#A32D2D"},children:[r.jsx(zn,{size:12})," Remover"]})]})]})})]},Ue.rowId)})})]})}),!l&&Xe.length>0&&r.jsxs("div",{className:"flex items-center justify-between",style:{flexShrink:0,background:"#FFFFFF",borderTop:"1px solid #E2E8F0",padding:"12px 20px"},children:[r.jsxs("div",{className:"text-[13px] text-gray-500",children:["Mostrando ",bt+1,"–",Ot," de ",Xe.length]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs(on,{variant:"outline",size:"sm",onClick:()=>L(Ue=>Math.max(1,Ue-1)),disabled:et===1,children:[r.jsx(Sc,{size:13,className:"mr-1"})," Anterior"]}),r.jsxs(on,{variant:"default",size:"sm",style:{background:"#6C24F5",color:"#FFFFFF"},children:["Página ",et," de ",Se]}),r.jsxs(on,{variant:"outline",size:"sm",onClick:()=>L(Ue=>Math.min(Se,Ue+1)),disabled:et===Se,children:["Próxima ",r.jsx(Qr,{size:13,className:"ml-1"})]})]})]}),re&&Z&&r.jsx(Cc,{candidateProfile:Z,job:te,workspaceId:O,onClose:()=>{pe(!1),Ne(null),xe(null)},onSent:()=>{pe(!1),Ne(null),xe(null)}}),he&&r.jsx(Cc,{candidates:he,job:null,workspaceId:O,onClose:()=>le(null),onSent:()=>{U(new Set)}}),I&&r.jsx(d_,{isOpen:!0,candidate:I,onClose:()=>H(null),onSaved:()=>{H(null),be()}}),V&&r.jsx(u_,{isOpen:!0,candidateIds:V,candidateCount:V.length,wsId:O,currentJobId:null,onClose:()=>X(null),onSent:()=>{X(null),U(new Set),be()}}),N&&r.jsx(UM,{isOpen:N,onClose:()=>W(!1),wsId:O,jobId:null,jobName:"",onSuccess:()=>{W(!1),be()}}),J&&r.jsx(yz,{isOpen:J,onClose:()=>Q(!1),wsId:O,scope:"list",definitions:K,onChanged:_e}),ie&&r.jsx(_7,{isOpen:ie,onClose:()=>ae(!1),wsId:O,jobId:null,jobName:"",onSuccess:()=>{ae(!1),be()}
929,onStartBackground:(Ue,Et)=>Ve(Ue,Et)}),ge&&r.jsx(C7,{isOpen:ge,onClose:()=>$e(!1),data:He,fileName:"candidatos_summit"})]})}const kEe="#378ADD",_Ee="#E24B4A",wz=e=>e>40?_Ee:kEe;function CEe({company:e,count:t,percentage:n}){const s=wz(n);return r.jsxs("div",{className:"mb-2 last:mb-0",children:[r.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[r.jsx("span",{className:"text-sm font-medium text-gray-800 truncate flex-1",children:e}),r.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-gray-100 text-gray-700 font-medium flex-shrink-0",children:t})]}),r.jsx("div",{className:"w-full h-1.5 rounded-full bg-gray-100 overflow-hidden",children:r.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.min(100,Math.max(2,n))}%`,background:s}})})]})}function EEe({company:e,count:t,percentage:n}){const s=wz(n);return r.jsxs("div",{className:"mb-2.5 last:mb-0",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[r.jsx("span",{className:"text-sm font-medium text-gray-800 truncate flex-1",children:e}),r.jsx("span",{className:"text-sm font-medium text-gray-900 flex-shrink-0",children:t}),r.jsxs("span",{className:"text-sm text-gray-500 flex-shrink-0 w-14 text-right",children:[Number(n).toFixed(1),"%"]})]}),r.jsx("div",{className:"w-full h-1.5 rounded-full bg-gray-100 overflow-hidden",children:r.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.min(100,Math.max(2,n))}%`,background:s}})})]})}function FEe({huntingGrounds:e,onSeeAll:t}){const n=(e==null?void 0:e.companies)||[],s=!!e,i=n.length>0;return r.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ma,{size:14,className:"text-gray-500"}),r.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Hunting grounds"})]}),i&&r.jsx("button",{type:"button",onClick:t,className:"text-xs text-blue-600 hover:text-blue-700 hover:underline",children:"Ver todas →"})]}),s?i?r.jsxs(r.Fragment,{children:[n.slice(0,5).map(a=>r.jsx(CEe,{company:a.company,count:a.count,percentage:a.percentage},a.company)),e.concentration_risk&&r.jsxs("div",{className:"mt-2 flex items-start gap-1.5 text-xs text-amber-700",children:[r.jsx(_o,{size:12,className:"mt-0.5 flex-shrink-0"}),r.jsx("span",{children:"Risco de concentração: mais de 40% dos candidatos em uma única empresa"})]}),r.jsxs("div",{className:"mt-2 text-xs text-gray-400",children:[e.total_companies," empresa",e.total_companies!==1?"s":""," no pipeline"]})]}):r.jsx("p",{className:"text-xs text-gray-400",children:"Nenhum candidato com empresa informada"}):r.jsx("p",{className:"text-xs text-gray-400",children:"Dados indisponíveis"})]})}function AEe({open:e,onClose:t,huntingGrounds:n}){if(!e)return null;const s=(n==null?void 0:n.companies)||[],i=s.reduce((a,o)=>a+(o.count||0),0);return r.jsx("div",{onClick:t,className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4",style:{zIndex:2e3},children:r.jsxs("div",{onClick:a=>a.stopPropagation(),className:"bg-white rounded-xl p-6 w-full max-w-lg max-h-[80vh] overflow-y-auto shadow-xl",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-base font-semibold text-gray-900",children:"Hunting grounds — todas as empresas"}),r.jsx("button",{type:"button",onClick:t,className:"p-1 rounded hover:bg-gray-100 text-gray-500",children:r.jsx(Jt,{size:18})})]}),s.length===0?r.jsx("p",{className:"text-sm text-gray-400",children:"Nenhum candidato com empresa informada"}):r.jsxs(r.Fragment,{children:[r.jsx("div",{children:s.map(a=>r.jsx(EEe,{company:a.company,count:a.count,percentage:a.percentage},a.company))}),r.jsxs("div",{className:"mt-4 pt-3 border-t border-gray-100 text-xs text-gray-500",children:[(n==null?void 0:n.total_companies)||0," empresa",((n==null?void 0:n.total_companies)||0)!==1?"s":""," ·"," ",i," candidato",i!==1?"s":""]})]})]})})}const jz=[{key:"7d",label:"7 dias",days:7},{key:"30d",label:"30 dias",days:30},{key:"90d",label:"90 dias",days:90},{key:"all",label:"Tudo",days:null},{key:"custom",label:"Personalizado",days:"custom"}];function TEe(e){const t=jz.find(i=>i.key===e);if(!t||t.days===null||t.days==="custom")return{date_start:null,date_end:null};const n=new Date,s=new Date;return s.setDate(n.getDate()-t.days),{date_start:s.toISOString(),date_end:n.toISOString()}}function vN(e){const t=n=>String(n).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function Qd(e,t="—"){return e==null||!Number.isFinite(Number(e))?t:Number(e).toLocaleStr
929ing("pt-BR")}function Wd(e,t=1,n="—"){return e==null||!Number.isFinite(Number(e))?n:Number(e).toFixed(t)+"%"}function Sz(e,t="—"){return e==null||!Number.isFinite(Number(e))?t:Math.round(Number(e))+"d"}function tw(e,t="—"){return e==null||!Number.isFinite(Number(e))?t:"R$ "+Number(e).toLocaleString("pt-BR")}function NEe({active:e,onClick:t,children:n,disabled:s}){return r.jsx("button",{type:"button",onClick:t,disabled:s,className:`text-xs px-3 py-1.5 rounded-full border transition disabled:opacity-50 ${e?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-200 hover:bg-gray-50"}`,children:n})}function Uc({icon:e,title:t,children:n}){return r.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[e&&r.jsx(e,{size:14,className:"text-gray-500"}),r.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:t})]}),r.jsx("span",{className:"text-xs text-gray-400 cursor-default",children:"Expandir"})]}),n]})}function mC({label:e,count:t,total:n,color:s="#3B82F6",suffix:i=""}){const a=n>0?t/n*100:0;return r.jsxs("div",{className:"mb-2 last:mb-0",children:[r.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[r.jsx("span",{className:"text-gray-700 truncate",children:e}),r.jsxs("span",{className:"text-gray-500 ml-2",children:[Qd(t)," ",i]})]}),r.jsx("div",{className:"w-full h-2 rounded-full bg-gray-100 overflow-hidden",children:r.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.min(100,Math.max(2,a))}%`,background:s}})})]})}function REe({funnel:e=[]}){const t=Math.max(1,...e.map(s=>s.count||0)),n=s=>{if(e.length<=1)return"#3B82F6";const i=s/(e.length-1),a=Math.round(59+-43*i),o=Math.round(130+55*i),l=Math.round(246+-117*i);return`rgb(${a},${o},${l})`};return r.jsx(Uc,{icon:ts,title:"Funil de candidatos",children:e.length===0?r.jsx("p",{className:"text-xs text-gray-400",children:"Sem dados de funil."}):e.map((s,i)=>r.jsx(mC,{label:s.stage_name,count:s.count,total:t,color:n(i)},s.stage_id))})}function DEe({passthrough:e=[]}){return r.jsx(Uc,{icon:jU,title:"Taxa de aprovação entre etapas",children:e.length===0?r.jsx("p",{className:"text-xs text-gray-400",children:"Sem dados de conversão."}):r.jsx("div",{className:"space-y-2",children:e.map(t=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[r.jsxs("span",{className:"text-gray-700 truncate",children:[t.from_name," → ",t.to_name]}),r.jsx("span",{className:"text-gray-900 font-medium ml-2",children:Wd(t.rate,0)})]}),r.jsx("div",{className:"w-full h-1.5 rounded-full bg-gray-100 overflow-hidden",children:r.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.min(100,Math.max(0,t.rate||0))}%`,background:(t.rate||0)>=50?"#10B981":"#F59E0B"}})})]},`${t.from_stage_id}-${t.to_stage_id}`))})})}const IEe=["#F09595","#F0997B","#FAC775","#EF9F27","#C0DD97","#97C459","#5DCAA5","#1D9E75","#639922","#3B6D11"],PEe=["0","10","20","30","40","50","60","70","80","90","100"];function BEe({rating:e}){const t=e||{},n=t.count_rated>0,s=Array.isArray(t.distribution)?t.distribution:[],i=Math.max(0,...s.map(w=>w.count||0)),a=28,o=2,l=11,c=14,d=130,u=d-c,p=146,m=t.avg!==null&&t.avg!==void 0&&Number.isFinite(Number(t.avg))?Number(t.avg):null,x=m!==null?l+m/100*(10*a+9*o):null;return r.jsx(Uc,{icon:x8,title:"Curva de avaliação",children:n?r.jsxs(r.Fragment,{children:[r.jsxs("svg",{viewBox:"0 0 320 160",width:"100%",preserveAspectRatio:"xMidYMid meet",style:{display:"block"},children:[s.map((w,y)=>{const v=w.count||0,j=i>0?v/i*(u-16):0,k=l+y*(a+o),S=d-j,_=IEe[y]||"#CBD5E1";return r.jsxs("g",{children:[j>0?r.jsx("rect",{x:k,y:S,width:a,height:j,rx:2,fill:_}):r.jsx("rect",{x:k,y:d-2,width:a,height:2,rx:1,fill:_,opacity:.3}),v>0&&r.jsx("text",{x:k+a/2,y:S-3,textAnchor:"middle",fontSize:"9",fill:"#475569",children:v})]},w.range_start??y)}),PEe.map((w,y)=>{const v=l+y*(a+o);return r.jsx("text",{x:v,y:p,textAnchor:"middle",fontSize:"9",fill:"#94A3B8",children:w},w)}),x!==null&&r.jsxs("g",{children:[r.jsx("line",{x1:x,y1:c-2,x2:x,y2:d,stroke:"#7C3AED",strokeWidth:"1",strokeDasharray:"3 3"}),r.jsx("text",{x,y:c-5,textAnchor:"middle",fontSize:"10",fontWeight:"600",fill:"#7C3AED",children:Number(m).toFixed(0)}),r.jsx("text",{x,y:c+4,textAnchor:"middle",fontSize:"7",fill:"#7C3AED",children:"média"})]})]}),r.jsxs("div",{className:"mt-3 flex items-start justify-between gap-2",children:[r.jsx(ox,{label:"Avaliados",value:Qd(t.count_rated),color:"#0F172A"}),r.jsx(ox,{label:"Mínimo",value:t.min!==null&&t.min!==void 0?Math.round(t.min):"—",color:"#E24B4A"}),r.jsx(ox,{label:"Média",value:m!==null?Number(m).toFixed(1):"—",color:"#534AB7"}),r.jsx(ox,{label:"Máximo",value:t.max!==null&&t.max!==void 0?Math.round(t.max):"—",color:"#639922"})]}),t.stddev!==null&&t.stddev!==void 0&&Number(t.stddev)>0&&r.jsxs("div",{className:"mt-2 text-xs text-gray-400",children:["Desvio padrão: ±",Number(t.stddev).toFixed(1)]})]}):r.jsx("p",{className:"text-xs text-gray-400",children:"Sem avaliações"})})}function ox({label:e,value:t,color:n}){return r.jsxs("div",{className:"text-center flex-1",children:[r.jsx("div",{className:"text-[11px] text-gray-500",children:e}),r.jsx("div",{style:{fontSize:18,fontWeight:500,color:n,lineHeight:1.2},children:t})]})}function OEe({kpis:e={},rating:t={},passthrough:n=[],time_per_stage:s=[]}){const i=g.useMemo(()=>{const l=[];
929if(e.overall_conversion_rate!==null&&e.overall_conversion_rate!==void 0&&l.push(Math.min(100,e.overall_conversion_rate*10)),(t==null?void 0:t.avg)!==null&&(t==null?void 0:t.avg)!==void 0&&l.push(Math.min(100,Math.max(0,t.avg))),e.avg_time_to_hire_days!==null&&e.avg_time_to_hire_days!==void 0){const c=Math.max(0,Math.min(100,100-(e.avg_time_to_hire_days-30)/60*100));l.push(c)}if(n.length>0){const c=n.reduce((d,u)=>d+(u.rate||0),0)/n.length;l.push(c)}return l.length===0?null:Math.round(l.reduce((c,d)=>c+d,0)/l.length)},[e,t,n]),a=i===null?"#9CA3AF":i>=70?"#10B981":i>=40?"#F59E0B":"#EF4444",o=i===null?"Sem dados":i>=70?"Saudável":i>=40?"Atenção":"Crítico";return r.jsx(Uc,{icon:uS,title:"Health score do processo",children:r.jsxs("div",{className:"flex items-center gap-5",children:[r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-5xl font-semibold",style:{color:a},children:i===null?"—":i}),r.jsx("div",{className:"text-xs mt-1",style:{color:a},children:o})]}),r.jsxs("div",{className:"flex-1 text-xs text-gray-600 space-y-1",children:[r.jsxs("div",{children:["Conversão geral: ",Wd(e.overall_conversion_rate,1)]}),r.jsxs("div",{children:["Rating médio: ",(t==null?void 0:t.avg)!==null&&(t==null?void 0:t.avg)!==void 0?Number(t.avg).toFixed(1):"—"]}),r.jsxs("div",{children:["Tempo médio contratação: ",Sz(e.avg_time_to_hire_days)]}),r.jsxs("div",{children:["Etapas analisadas: ",s.length]})]})]})})}function MEe({sources:e=[]}){return r.jsx(Uc,{icon:mH,title:"Canais de origem",children:e.length===0?r.jsx("p",{className:"text-xs text-gray-400",children:"Sem dados de origem."}):r.jsxs("table",{className:"w-full text-xs",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"text-gray-500 border-b border-gray-100",children:[r.jsx("th",{className:"text-left font-medium py-1.5",children:"Origem"}),r.jsx("th",{className:"text-right font-medium py-1.5",children:"Total"}),r.jsx("th",{className:"text-right font-medium py-1.5",children:"Contratados"}),r.jsx("th",{className:"text-right font-medium py-1.5",children:"Efetividade"})]})}),r.jsx("tbody",{children:e.map(t=>r.jsxs("tr",{className:"border-b border-gray-50 last:border-0",children:[r.jsx("td",{className:"py-1.5 text-gray-800",children:t.label}),r.jsx("td",{className:"py-1.5 text-right text-gray-700",children:Qd(t.total)}),r.jsx("td",{className:"py-1.5 text-right text-gray-700",children:Qd(t.hired)}),r.jsx("td",{className:"py-1.5 text-right font-medium text-gray-900",children:Wd(t.effectiveness,1)})]},t.origin))})]})})}function LEe({salary:e,job:t}){const n=(e==null?void 0:e.candidates)||{},s=(e==null?void 0:e.job_min)!==null&&(e==null?void 0:e.job_min)!==void 0&&(e==null?void 0:e.job_max)!==null&&(e==null?void 0:e.job_max)!==void 0;return r.jsx(Uc,{icon:o8,title:"Análise salarial",children:n.count_with_expectation===0?r.jsx("p",{className:"text-xs text-gray-400",children:"Nenhum candidato com pretensão informada."}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-[10px] text-gray-500 uppercase",children:"Faixa da vaga"}),r.jsx("div",{className:"text-sm font-medium text-gray-900",children:s?`${tw(e.job_min)} – ${tw(e.job_max)}`:"Não definida"})]}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[10px] text-gray-500 uppercase",children:"Mediana candidatos"}),r.jsx("div",{className:"text-sm font-medium text-gray-900",children:tw(n.median)})]})]}),s&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-center justify-between text-xs",children:[r.jsx("span",{className:"text-gray-700",children:"Dentro da faixa"}),r.jsx("span",{className:"text-green-600 font-medium",children:Wd(n.within_range_pct,0)})]}),r.jsxs("div",{className:"flex items-center justify-between text-xs",children:[r.jsx("span",{className:"text-gray-700",children:"Acima da faixa"}),r.jsx("span",{className:"text-amber-600 font-medium",children:Wd(n.above_range_pct,0)})]}),r.jsxs("div",{className:"flex items-center justify-between text-xs",children:[r.jsx("span",{className:"text-gray-700",children:"Abaixo da faixa"}),r.jsx("span",{className:"text-blue-600 font-medium",children:Wd(n.below_range_pct,0)})]})]})]})})}function zEe({rejections:e}){const t=(e==null?void 0:e.reasons)||[],n=(e==null?void 0:e.total_rejected)||0,s=Math.max(1,...t.map(i=>i.count));return r.jsx(Uc,{icon:yl,title:"Motivos de rejeição",children:t.length===0?r.jsx("p",{className:"text-xs text-gray-400",children:"Sem rejeições no período."}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"text-xs text-gray-500 mb-2",children:["Total: ",Qd(n)]}),t.map(i=>r.jsx(mC,{label:i.reason,count:i.count,total:s,color:"#EF4444",suffix:`(${Math.round(i.percentage)}%)`},i.reason))]})})}function WEe({time_per_stage:e=[]}){const t=e.filter(s=>s.avg_days!==null&&s.avg_days!==void 0),n=Math.max(1,...t.map(s=>s.avg_days));return r.jsx(Uc,{icon:Di,title:"Tempo por etapa",children:t.length===0?r.jsx("p",{className:"text-xs text-gray-400",children:"Sem transições suficientes para calcular."}):t.map(s=>r.jsx(mC,{label:s.stage_name,count:Math.round(s.avg_days*10)/10,total:n,color:s.avg_days>5?"#F59E0B":"#3B82F6",suffix:"dias"},s.stage_id))})}const $Ee={alert:_o,trend:Uy,tip:Wy,prediction:Di};function UEe({insights:e,loading:t}){return r.jsxs("div",{className:"rounded-xl p-5 mb-5",style:{background:"linear-gradient(135deg, #EEEDFE 0%, #E6F1FB 100%)"},children:[r.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[r.jsx(Va,{size:16,className:"text-purple-600"}),r.jsx("span",{className:"text-sm font-semibold text-gray-900",children:"Summit Insights"}),r.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wide px-1.5 py-0.5 rounded bg-purple-600 text-white",children:"IA"})]}),t&&r.jsx("div",{className:"animate-pulse text-sm text-gray-600",children:"Analisando seus dados..."}),!t&&(!e||e.length===0)&&r.jsx("div",{className:"text-sm text-gray-600",children:"Nenhum insight disponível no momento."}),!t&&e&&e.length>0&&r.jsx("div",{className:"space-y-2.5",children:e.map((n,s)=>{const i=$Ee[n.icon]||Wy;
929return r.jsxs("div",{style:{borderLeft:"2px solid #AFA9EC",paddingLeft:12},className:"flex gap-2",children:[r.jsx(i,{size:14,className:"text-purple-600 mt-0.5 flex-shrink-0"}),r.jsxs("div",{className:"flex-1",children:[n.title&&r.jsx("div",{className:"text-xs font-semibold text-gray-900 mb-0.5",children:n.title}),r.jsx("div",{className:"text-xs text-gray-700 leading-relaxed",children:n.body})]})]},s)})})]})}const VEe=[{key:"funnel",label:"Funil de candidatos"},{key:"passthrough",label:"Taxa de aprovação"},{key:"rating",label:"Curva de avaliação"},{key:"health",label:"Health score"},{key:"hunting_grounds",label:"Hunting grounds"},{key:"sources",label:"Canais de origem"},{key:"salary",label:"Análise salarial"},{key:"rejections",label:"Motivos de rejeição"},{key:"time_per_stage",label:"Tempo por etapa"}],HEe=[{key:"pipeline_history",label:"Pipeline history"},{key:"trend_semanal",label:"Trend semanal"},{key:"atividade_recrutador",label:"Atividade recrutador"},{key:"sla_etapa",label:"SLA por etapa"},{key:"offer_acceptance",label:"Offer acceptance"},{key:"dei_pipeline",label:"DEI pipeline"},{key:"custo_contratacao",label:"Custo por contratação"},{key:"benchmarks",label:"Benchmarks mercado"}];function qEe({open:e,onToggle:t,activeReports:n,onToggleReport:s}){const i=n.length;return r.jsxs("div",{className:"mb-5",children:[r.jsxs("button",{type:"button",onClick:t,className:"w-full flex items-center justify-between gap-2 bg-gray-50 border border-gray-200 rounded-lg px-4 py-2.5 hover:bg-gray-100 transition",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(pS,{size:14,className:"text-gray-500"}),r.jsx("span",{className:"text-sm font-semibold text-gray-900",children:"Relatórios — selecione relatórios"}),r.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold px-1.5 py-0.5 rounded bg-blue-100 text-blue-700",children:[i," ativos"]})]}),r.jsx(ar,{size:16,className:"text-gray-500 transition-transform",style:{transform:e?"rotate(180deg)":"rotate(0deg)"}})]}),e&&r.jsx("div",{className:"mt-2 p-4 bg-white border border-gray-200 rounded-lg",children:r.jsxs("div",{className:"flex flex-wrap gap-2",children:[VEe.map(a=>{const o=n.includes(a.key);return r.jsxs("button",{type:"button",onClick:()=>s(a.key),className:`inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full border transition ${o?"bg-blue-50 text-blue-700 border-blue-100 hover:bg-blue-100":"bg-white text-gray-500 border-gray-200 hover:bg-gray-50"}`,children:[o?r.jsx(fn,{size:11}):r.jsx(Ln,{size:11})," ",a.label]},a.key)}),HEe.map(a=>r.jsxs("button",{type:"button",disabled:!0,title:"Em breve",className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full bg-gray-50 text-gray-400 border border-gray-200 cursor-not-allowed opacity-70",children:[r.jsx(Ln,{size:11})," ",a.label]},a.key))]})})]})}function GEe(){var X;const e=In(),[t,n]=g.useState(null),[s,i]=g.useState([]),[a,o]=g.useState(null),[l,c]=g.useState("30d"),[d,u]=g.useState(""),[p,m]=g.useState(""),[x,w]=g.useState(!0),[y,v]=g.useState(null),[j,k]=g.useState(null),[S,_]=g.useState(!1),[F,A]=g.useState([]),[C,D]=g.useState(!1),[P,L]=g.useState(["funnel","passthrough","rating","health","hunting_grounds","sources","salary","rejections","time_per_stage"]),[T,R]=g.useState(!1),U=g.useCallback(N=>{L(W=>W.includes(N)?W.filter(O=>O!==N):[...W,N])},[]);g.useEffect(()=>{let N=!1;return(async()=>{var W;try{const O=await ne.auth.me(),G=await ne.functions.invoke("getWorkspaceId",{user_email:O==null?void 0:O.email}),M=((W=G==null?void 0:G.data)==null?void 0:W.workspace_id)||(G==null?void 0:G.workspace_id);if(!M){N||(w(!1),k("Nenhum workspace encontrado para este usuário."));return}if(N)return;n(M);const z=await ne.entities.Job.filter({workspace_id:M}).catch(()=>[]);if(N)return;i((z||[]).filter(K=>K.status!=="deleted"))}catch{N||(w(!1),k("Erro ao carregar dados do workspace."))}})(),()=>{N=!0}},[]);const I=g.useMemo(()=>{if(!a)return null;const N=s.find(W=>W.id===a);return(N==null?void 0:N.title)||null},[a,s]),H=g.useCallback(async()=>{if(t&&!(l==="custom"&&(!d||!p))){w(!0),k(null),A([]);try{let N,W;if(l==="custom")N=`${d}T00:00:00Z`,W=`${p}T23:59:59Z`;else{const M=TEe(l);N=M.date_start,W=M.date_end}
929const O=await ne.functions.invoke("computeDashboardAnalytics",{workspace_id:t,job_id:a,date_start:N,date_end:W}),G=(O==null?void 0:O.data)||O;G!=null&&G.success?v(G.data):(k((G==null?void 0:G.error)||"Erro ao calcular métricas."),v(null))}catch(N){k((N==null?void 0:N.message)||"Erro ao calcular métricas."),v(null)}w(!1)}},[t,a,l,d,p]);if(g.useEffect(()=>{H()},[H]),g.useEffect(()=>{if(!y)return;let N=!1;return(async()=>{_(!0);try{const W=await ne.functions.invoke("generateDashboardInsights",{analytics_data:y,job_title:I}),O=(W==null?void 0:W.data)||W;if(N)return;O!=null&&O.success&&Array.isArray(O.insights)?A(O.insights):A([])}catch{N||A([])}N||_(!1)})(),()=>{N=!0}},[y,I]),x&&!y)return r.jsx("div",{children:r.jsxs("div",{className:"flex items-center justify-center py-20 text-gray-500",children:[r.jsx(rt,{className:"w-5 h-5 animate-spin mr-2"})," Calculando métricas..."]})});if(j&&!y)return r.jsx("div",{children:r.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-sm text-red-700",children:j})});const V=((X=y==null?void 0:y.kpis)==null?void 0:X.total_candidates)||0;return r.jsxs("div",{children:[r.jsx(qEe,{open:C,onToggle:()=>D(N=>!N),activeReports:P,onToggleReport:U}),r.jsxs("div",{className:"mb-5 flex flex-wrap items-center gap-3",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(OV,{size:12,className:"text-gray-500"}),r.jsxs("select",{value:a||"",onChange:N=>o(N.target.value||null),className:"border border-gray-200 rounded-lg px-3 py-2 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-500",style:{minWidth:200},children:[r.jsx("option",{value:"",children:"Todas as vagas"}),s.map(N=>r.jsx("option",{value:N.id,children:N.title||"(sem título)"},N.id))]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 ml-auto",children:[r.jsx(Di,{size:12,className:"text-gray-500"}),jz.map(N=>r.jsx(NEe,{active:l===N.key,onClick:()=>{if(N.key==="custom"&&(!d||!p)){const W=new Date,O=new Date;O.setDate(W.getDate()-30),u(vN(O)),m(vN(W))}c(N.key)},children:N.label},N.key)),l==="custom"&&r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("input",{type:"date",value:d,onChange:N=>u(N.target.value),className:"border border-gray-200 rounded-lg px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",style:{maxWidth:150}}),r.jsx("span",{className:"text-gray-400 text-xs",children:"—"}),r.jsx("input",{type:"date",value:p,onChange:N=>m(N.target.value),className:"border border-gray-200 rounded-lg px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",style:{maxWidth:150}})]})]})]}),V===0?r.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl py-16 px-6 text-center",children:[r.jsx(ts,{className:"w-10 h-10 text-gray-300 mx-auto mb-3"}),r.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Sem dados para análise"}),r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Adicione candidatos às suas vagas para começar a ver métricas."}),r.jsx("button",{type:"button",onClick:()=>e("/app/vagas"),className:"text-sm px-4 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700",children:"Ir para Vagas"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-5",children:[r.jsx(lx,{label:"Candidatos ativos",value:Qd(y.kpis.total_candidates)}),r.jsx(lx,{label:"Aplicações (período)",value:Qd(y.kpis.total_applications)}),r.jsx(lx,{label:"Tempo médio contratação",value:Sz(y.kpis.avg_time_to_hire_days)}),r.jsx(lx,{label:"Conversão geral",value:Wd(y.kpis.overall_conversion_rate,1)})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3 mb-5",children:[P.includes("funnel")&&r.jsx(REe,{funnel:y.funnel}),P.includes("passthrough")&&r.jsx(DEe,{passthrough:y.passthrough}),P.includes("rating")&&r.jsx(BEe,{rating:y.rating}),P.includes("health")&&r.jsx(OEe,{kpis:y.kpis,rating:y.rating,passthrough:y.passthrough,time_per_stage:y.time_per_stage,sources:y.sources}),P.includes("hunting_grounds")&&r.jsx(FEe,{huntingGrounds:y.hunting_grounds,onSeeAll:()=>R(!0)}),P.includes("sources")&&r.jsx(MEe,{sources:y.sources}),P.includes("salary")&&r.jsx(LEe,{salary:y.salary,job:y.job}),P.includes("rejections")&&r.jsx(zEe,{rejections:y.rejections}),P.includes("time_per_stage")&&r.jsx(WEe,{time_per_stage:y.time_per_stage})]}),r.jsx(UEe,{insights:F,loading:S})]}),r.jsx(AEe,{open:T,onClose:()=>R(!1),huntingGrounds:y==null?void 0:y.hunting_grounds})]})}function lx({label:e,value:t}){return r.jsxs("div",{className:"bg-gray-50 rounded-lg p-3 border border-gray-100",children:[r.jsx("div",{className:"text-[11px] text-gray-500 uppercase tracking-wide",children:e}),r.jsx("div",{className:"mt-1",style:{fontSize:22,fontWeight:500,color:"#0F172A",lineHeight:1.2},children:t})]})}const hc=e=>String(e).padStart(2,"0");function bN(){const e=new Date;return e.setMinutes(0,0,0),e.setHours(e.getHours()+1),`${e.getFullYear()}-${hc(e.getMonth()+1)}-${hc(e.getDate())}T${hc(e.getHours())}:${hc(e.getMinutes())}`}function nw(e){if(!e)return"";const[t,n]=e.split("T");if(!t||!n)return"";const[s,i,a]=t.split("-").map(Number),[o,l]=n.split(":").map(Number),c=new Date(s,i-1,a,o,l);return c.setHours(c.getHours()+1),`${c.getFullYear()}-${hc(c.getMonth()+1)}-${hc(c.getDate())}T${hc(c.getHours())}:${hc(c.getMinutes())}`}function wN(e){return e?e.length===16?e+":00":e:""}const hh="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",mh="block text-sm font-medium text-gray-700 mb-1";function KEe({isOpen:e,onClose:t,onEventCreated:n}){const s=bN(),[i,a]=g.useState(""),[o,l]=g.useState(s),[c,d]=g.useState(nw(s)),[u,p]=g.useState(!1),[m,x]=g.useState(""),[w,y]=g.useState(""),[v,j]=g.useState([]),[k,S]=g.useState(""),[_,F]=g.useState(!1),[A,C]=g.useState(null);if(!e)return null;const D=U=>{l(U),(!u||c&&U&&c<=U)&&d(nw(U))},P=U=>{d(U),p(!0)},L=()=>{const U=bN();a(""),l(U),d(nw(U)),p(!1),x(""),y(""),j([]),S(""),C(null)},T=async()=>
929{if(!(!i.trim()||!o||!c||_)){F(!0),C(null);try{const U=await ne.functions.invoke("createCalendarEvent",{title:i.trim(),start:wN(o),end:wN(c),description:m.trim()||void 0,location:w.trim()||void 0,attendees:v}),I=(U==null?void 0:U.data)||U;I!=null&&I.success?(n==null||n(),t==null||t(),L()):C((I==null?void 0:I.error)||"Erro ao criar evento")}catch(U){C((U==null?void 0:U.message)||"Erro ao criar evento")}F(!1)}},R=!!i.trim()&&!!o&&!!c&&!_;return r.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",onClick:t,children:r.jsxs("div",{className:"bg-white max-w-lg w-full rounded-xl shadow-xl p-6",onClick:U=>U.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Novo Evento"}),r.jsx("button",{type:"button",onClick:t,disabled:_,className:"p-1 hover:bg-gray-100 rounded text-gray-500 disabled:opacity-50",children:r.jsx(Jt,{size:18})})]}),r.jsxs("div",{className:"flex flex-col gap-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:mh,children:"Título"}),r.jsx("input",{type:"text",value:i,onChange:U=>a(U.target.value),placeholder:"Ex: Entrevista com João Silva",className:hh})]}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:mh,children:"Data e hora início"}),r.jsx("input",{type:"datetime-local",value:o,onChange:U=>D(U.target.value),className:hh})]}),r.jsxs("div",{children:[r.jsx("label",{className:mh,children:"Data e hora fim"}),r.jsx("input",{type:"datetime-local",value:c,onChange:U=>P(U.target.value),className:hh})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:mh,children:"Descrição"}),r.jsx("textarea",{value:m,onChange:U=>x(U.target.value),rows:3,placeholder:"Detalhes do evento...",className:hh,style:{resize:"vertical"}})]}),r.jsxs("div",{children:[r.jsx("label",{className:mh,children:"Localização"}),r.jsx("input",{type:"text",value:w,onChange:U=>y(U.target.value),placeholder:"Ex: Sala 3, Google Meet, etc.",className:hh})]}),r.jsx(ry,{label:"Participantes",list:v,setList:j,inputValue:k,setInputValue:S}),A&&r.jsx("div",{className:"text-xs text-red-600",children:A})]}),r.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[r.jsx("button",{type:"button",onClick:t,disabled:_,className:"px-4 py-2 text-sm border border-gray-200 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{type:"button",onClick:T,disabled:!R,className:"px-4 py-2 text-sm bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 disabled:opacity-50 flex items-center gap-2",children:[_&&r.jsx(rt,{size:14,className:"animate-spin"}),"Criar Evento"]})]})]})})}const gh="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",xh="block text-xs font-medium text-gray-500 mb-1",YEe=["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],XEe=["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],da=e=>String(e).padStart(2,"0");function Fd(e){if(!e)return null;const t=typeof e=="string"&&!e.includes("T")?new Date(e+"T00:00:00"):new Date(e);return isNaN(t.getTime())?null:t}function JEe(e,t,n){const s=Fd(e);if(!s)return"";const i=`${YEe[s.getDay()]}, ${s.getDate()} ${XEe[s.getMonth()]} ${s.getFullYear()}`;if(n)return`${i} • Dia inteiro`;const a=Fd(t),o=`${da(s.getHours())}:${da(s.getMinutes())}`,l=a?`${da(a.getHours())}:${da(a.getMinutes())}`:"";return l?`${i} • ${o} – ${l}`:`${i} • ${o}`}function cx(e){const t=Fd(e);return t?`${t.getFullYear()}-${da(t.getMonth()+1)}-${da(t.getDate())}T${da(t.getHours())}:${da(t.getMinutes())}`:""}function jN(e){return e?e.length===16?e+":00":e:""}function rw(e){return Array.isArray(e)?e.map(t=>{var n;return typeof t=="string"?t:(t==null?void 0:t.email)||((n=t==null?void 0:t.emailAddress)==null?void 0:n.address)||""}).filter(Boolean):[]}function QEe(e){return e==="google"?"Google Calendar":e==="outlook"?"Outlook":e||""}function ZEe(e){if(!e)return"";const[t,n]=e.split("T");if(!t||!n)return"";const[s,i,a]=t.split("-").map(Number),[o,l]=n.split(":").map(Number),c=new Date(s,i-1,a,o,l);return c.setHours(c.getHours()+1),`${c.getFullYear()}-${da(c.getMonth()+1)}-${da(c.getDate())}T${da(c.getHours())}:${da(c.getMinutes())}`}
929const e4e=["holiday","holidays","feriado","feriados","birthday","aniversário","aniversarios"],t4e=["#holiday@","#contacts@"];function n4e(e){if(!e)return!1;const t=(e.calendar_name||"").toLowerCase();if(e4e.some(s=>t.includes(s)))return!0;const n=(e.calendar_id||"").toLowerCase();return!!t4e.some(s=>n.includes(s))}function r4e({event:e}){return r.jsx("span",{className:"inline-block w-2 h-2 rounded-full",style:{background:"#9CA3AF"}})}function s4e({isOpen:e,onClose:t,event:n,onEventUpdated:s}){const[i,a]=g.useState(!1),[o,l]=g.useState(""),[c,d]=g.useState(""),[u,p]=g.useState(""),[m,x]=g.useState(""),[w,y]=g.useState(""),[v,j]=g.useState([]),[k,S]=g.useState(""),[_,F]=g.useState(!1),[A,C]=g.useState(null),[D,P]=g.useState(null);if(g.useEffect(()=>{n&&(a(!1),l(n.title||""),d(cx(n.start)),p(cx(n.end)),x(n.description||""),y(n.location||""),j(rw(n.attendees)),S(""),F(!1),C(null),P(null))},[n]),!e||!n)return null;const L=()=>a(!0),T=()=>{l(n.title||""),d(cx(n.start)),p(cx(n.end)),x(n.description||""),y(n.location||""),j(rw(n.attendees)),C(null),P(null),a(!1)},R=async()=>{if(_)return;const H=Fd(c),V=Fd(u);if(H&&V&&H>=V){P("A data de início não pode ser posterior à data de fim.");return}P(null),F(!0),C(null);try{const X=await ne.functions.invoke("updateCalendarEvent",{event_id:n.id,calendar_id:n.calendar_id,provider:n.provider,title:o.trim(),start:jN(c),end:jN(u),description:m.trim(),location:w.trim(),attendees:v}),N=(X==null?void 0:X.data)||X;N!=null&&N.success?(s==null||s(),t==null||t()):C((N==null?void 0:N.error)||"Erro ao atualizar evento")}catch(X){C((X==null?void 0:X.message)||"Erro ao atualizar evento")}F(!1)},U=rw(n.attendees),I=n4e(n);return r.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",onClick:t,children:r.jsxs("div",{className:"bg-white max-w-lg w-full rounded-xl shadow-xl max-h-[90vh] overflow-y-auto",onClick:H=>H.stopPropagation(),children:[r.jsxs("div",{className:"flex items-start justify-between gap-3 p-5 border-b border-gray-100",children:[i?r.jsxs("div",{className:"flex-1",children:[r.jsx("label",{className:xh,children:"Título"}),r.jsx("input",{type:"text",value:o,onChange:H=>l(H.target.value),className:gh})]}):r.jsx("h2",{className:"text-lg font-semibold text-gray-900 flex-1 break-words",children:n.title||"(Sem título)"}),r.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[!i&&!I&&r.jsxs("button",{type:"button",onClick:L,className:"flex items-center gap-1 px-2.5 py-1 text-xs border border-gray-200 rounded-lg text-gray-700 hover:bg-gray-50",children:[r.jsx($r,{size:12})," Editar"]}),r.jsx("button",{type:"button",onClick:t,disabled:_,className:"p-1 hover:bg-gray-100 rounded text-gray-500 disabled:opacity-50",children:r.jsx(Jt,{size:18})})]})]}),r.jsx("div",{className:"p-5 space-y-4",children:i?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:xh,children:"Início"}),r.jsx("input",{type:"datetime-local",value:c,onChange:H=>{const V=H.target.value;d(V),P(null);const X=Fd(V),N=Fd(u);X&&N&&X>=N&&p(ZEe(V))},className:gh})]}),r.jsxs("div",{children:[r.jsx("label",{className:xh,children:"Fim"}),r.jsx("input",{type:"datetime-local",value:u,onChange:H=>{p(H.target.value),P(null)},className:gh})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:xh,children:"Descrição"}),r.jsx("textarea",{value:m,onChange:H=>x(H.target.value),rows:3,className:gh,style:{resize:"vertical"}})]}),r.jsxs("div",{children:[r.jsx("label",{className:xh,children:"Localização"}),r.jsx("input",{type:"text",value:w,onChange:H=>y(H.target.value),className:gh})]}),r.jsx(ry,{label:"Participantes",list:v,setList:j,inputValue:k,setInputValue:S}),D&&r.jsx("div",{className:"text-xs text-red-600",children:D}),A&&r.jsx("div",{className:"text-xs text-red-600",children:A})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(Di,{size:16,className:"text-gray-400 mt-0.5 flex-shrink-0"}),r.jsx("div",{className:"text-sm text-gray-900",children:JEe(n.start,n.end,n.all_day)})]}),n.location&&r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(ma,{size:16,className:"text-gray-400 mt-0.5 flex-shrink-0"}),r.jsx("div",{className:"text-sm text-gray-900 break-words",children:n.location})]}),n.meet_link&&r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(b8,{size:16,className:"text-gray-400 mt-0.5 flex-shrink-0"}),r.jsx("a",{href:n.meet_link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline",children:"Entrar na reunião"})]}),n.description&&r.jsx("div",{className:"text-sm text-gray-700 whitespace-pre-wrap leading-relaxed",children:n.description}),(n.calendar_name||n.provider)&&r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(kl,{size:16,className:"text-gray-400 mt-0.5 flex-shrink-0"}),r.jsxs("div",{className:"text-sm text-gray-900 flex items-center gap-2",children:[r.jsx(r4e,{event:n}),r.jsx("span",{children:n.calendar_name||"Calendário"}),n.provider&&r.jsxs("span",{className:"text-gray-500",children:["· ",QEe(n.provider)]})]})]}),U.length>0&&r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(Nr,{size:16,className:"text-gray-400 mt-0.5 flex-shrink-0"}),r.jsx("div",{className:"flex flex-wrap gap-1.5",children:U.map(H=>r.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-700 rounded-full text-xs",children:H},H))})]}),I&&r.jsx("div",{className:"text-xs text-gray-400 italic",children:"Este evento pertence a um c
929alendário somente leitura."})]})}),i&&r.jsxs("div",{className:"flex justify-end gap-2 p-5 border-t border-gray-100",children:[r.jsx("button",{type:"button",onClick:T,disabled:_,className:"px-4 py-2 text-sm border border-gray-200 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{type:"button",onClick:R,disabled:_||!o.trim(),className:"px-4 py-2 text-sm bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 disabled:opacity-50 flex items-center gap-2",children:[_&&r.jsx(rt,{size:14,className:"animate-spin"}),"Salvar"]})]})]})})}const dx=["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],i4e=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],kz=["Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],il=0,Sf=24,nc=60,a4e=(Sf-il)*nc,sw=[{bg:"#DBEAFE",text:"#1E40AF",border:"#3B82F6"},{bg:"#D1FAE5",text:"#065F46",border:"#10B981"},{bg:"#EDE9FE",text:"#5B21B6",border:"#8B5CF6"},{bg:"#FEF3C7",text:"#92400E",border:"#F59E0B"},{bg:"#FCE7F3",text:"#9D174D",border:"#EC4899"},{bg:"#E0E7FF",text:"#3730A3",border:"#6366F1"},{bg:"#FFEDD5",text:"#9A3412",border:"#F97316"},{bg:"#CCFBF1",text:"#115E59",border:"#14B8A6"}];function gC(e,t){if(!e||!Array.isArray(t))return sw[0];const n=t.findIndex(s=>s.id===e);return sw[(n>=0?n:0)%sw.length]}function _z(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function o4e(e){const t=new Date(e);return t.setHours(23,59,59,999),t}function u0(e){const t=new Date(e),n=t.getDay(),s=n===0?-6:1-n;return t.setDate(t.getDate()+s),t.setHours(0,0,0,0),t}function xC(e){const t=u0(e),n=new Date(t);return n.setDate(n.getDate()+6),n.setHours(23,59,59,999),n}function Cz(e){const t=new Date(e.getFullYear(),e.getMonth(),1);return u0(t)}function Ez(e){const t=new Date(e.getFullYear(),e.getMonth()+1,0);return xC(t)}function Fz(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function O1(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Kj(e){return O1(e,new Date)}function l4e(e,t){if(e==="day")return`${t.getDate()} ${dx[t.getMonth()]} ${t.getFullYear()}`;if(e==="week"){const n=u0(t),s=xC(t);return n.getMonth()===s.getMonth()&&n.getFullYear()===s.getFullYear()?`${n.getDate()} - ${s.getDate()} ${dx[n.getMonth()]} ${n.getFullYear()}`:`${n.getDate()} ${dx[n.getMonth()]} - ${s.getDate()} ${dx[s.getMonth()]} ${s.getFullYear()}`}return`${i4e[t.getMonth()]} ${t.getFullYear()}`}function c4e(e,t){return e==="day"?{start:_z(t),end:o4e(t)}:e==="week"?{start:u0(t),end:xC(t)}:{start:Cz(t),end:Ez(t)}}function d4e(e){return kz[(e.getDay()+6)%7]}function Pm(e){return e?typeof e=="string"&&!e.includes("T")?new Date(e+"T00:00:00"):new Date(e):null}const Yj=60;function u4e({event:e,calendars:t,onEventClick:n}){const s=Pm(e.start),i=Pm(e.end);if(!s||!i||isNaN(s.getTime())||isNaN(i.getTime()))return null;const a=s.getHours()+s.getMinutes()/60,o=i.getHours()+i.getMinutes()/60,l=Math.max(a,il),c=Math.min(o,Sf);if(c<=il||l>=Sf)return null;const d=(l-il)*nc,u=Math.max(22,(c-l)*nc-2),p=gC(e.calendar_id,t),m=`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`;return r.jsxs("div",{className:"absolute rounded-md cursor-pointer overflow-hidden",style:{top:d,height:u,left:4,right:4,background:p.bg,color:p.text,borderLeft:`3px solid ${p.border}`,padding:"3px 6px"},title:`${e.title}
930${m}`,onClick:x=>{x.stopPropagation(),n==null||n(e)},children:[r.jsx("div",{className:"font-medium truncate",style:{fontSize:11,lineHeight:1.2},children:e.title||"(Sem título)"}),r.jsx("div",{className:"opacity-80 truncate",style:{fontSize:10},children:m})]})}function f4e({days:e,events:t,calendars:n,onEventClick:s}){const i=e.map(a=>t.filter(o=>o.all_day&&o.start&&O1(Pm(o.start),a)));return i.every(a=>a.length===0)?null:r.jsx("div",{className:"flex border-b border-gray-200 bg-gray-50/60",style:{paddingLeft:Yj},children:e.map((a,o)=>r.jsx("div",{className:"flex-1 p-1 space-y-0.5",style:{borderRight:o<e.length-1?"1px solid #E5E7EB":"none",minHeight:22},children:i[o].map(l=>{const c=gC(l.calendar_id,n);return r.jsx("div",{className:"rounded px-1.5 py-0.5 truncate cursor-pointer",style:{background:c.bg,color:c.text,fontSize:11},title:l.title,onClick:d=>{d.stopPropagation(),s==null||s(l)},children:l.title||"(Sem título)"},l.id)})},o))})}function SN({viewMode:e,refDate:t,events:n,calendars:s,now:i,onEventClick:a}){const o=g.useRef(null);g.useEffect(()=>{const d=requestAnimationFrame(()=>{o.current&&(o.current.scrollTop=7*nc)});return()=>cancelAnimationFrame(d)},[e]);const l=g.useMemo(()=>
930{if(e==="day")return[_z(t)];const d=u0(t);return Array.from({length:7},(u,p)=>Fz(d,p))},[e,t]),c=g.useMemo(()=>l.map(d=>(n||[]).filter(u=>!u.start||u.all_day?!1:O1(Pm(u.start),d))),[l,n]);return r.jsx("div",{className:"bg-white border border-gray-200 rounded-xl overflow-hidden",children:r.jsxs("div",{ref:o,className:"overflow-y-auto",style:{maxHeight:"calc(100vh - 420px)",minHeight:420},children:[r.jsxs("div",{className:"sticky top-0 z-10 bg-white",children:[r.jsx("div",{className:"flex border-b border-gray-200",style:{paddingLeft:Yj},children:l.map((d,u)=>{const p=Kj(d);return r.jsxs("div",{className:`flex-1 py-3 text-center ${p?"bg-blue-50":""}`,style:{borderRight:u<l.length-1?"1px solid #E5E7EB":"none"},children:[r.jsx("div",{className:`text-xs ${p?"text-blue-600 font-semibold":"text-gray-500"}`,children:d4e(d)}),r.jsx("div",{className:`text-lg font-semibold ${p?"text-blue-700":"text-gray-900"}`,children:d.getDate()})]},u)})}),r.jsx(f4e,{days:l,events:n||[],calendars:s,onEventClick:a})]}),r.jsxs("div",{className:"relative flex",style:{height:a4e},children:[r.jsx("div",{className:"flex-shrink-0 border-r border-gray-200",style:{width:Yj},children:Array.from({length:Sf-il},(d,u)=>r.jsxs("div",{className:"text-right pr-2 text-gray-400",style:{height:nc,fontSize:10,paddingTop:2},children:[String(il+u).padStart(2,"0"),":00"]},u))}),l.map((d,u)=>{const p=Kj(d);return r.jsxs("div",{className:`flex-1 relative ${p?"bg-blue-50/40":""}`,style:{borderRight:u<l.length-1?"1px solid #E5E7EB":"none"},children:[Array.from({length:Sf-il},(m,x)=>r.jsx("div",{className:"absolute left-0 right-0 border-b border-gray-100",style:{to
930p:x*nc,height:nc}},x)),c[u].map(m=>r.jsx(u4e,{event:m,calendars:s,onEventClick:a},m.id)),p&&(()=>{const m=i.getHours()+i.getMinutes()/60;if(m<il||m>Sf)return null;const x=(m-il)*nc;return r.jsx("div",{className:"absolute left-0 right-0 pointer-events-none",style:{top:x,borderTop:"2px solid #EF4444",zIndex:5}})})()]},u)})]})]})})}function p4e({refDate:e,events:t,calendars:n,onEventClick:s}){const i=g.useMemo(()=>{const o=Cz(e),l=Ez(e),c=[];let d=new Date(o);for(;d<=l;)c.push(new Date(d)),d=Fz(d,1);return c},[e]),a=o=>(t||[]).filter(l=>l.start?O1(Pm(l.start),o):!1);return r.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl overflow-hidden",children:[r.jsx("div",{className:"grid grid-cols-7 border-b border-gray-200 bg-gray-50",children:kz.map(o=>r.jsx("div",{className:"text-xs font-medium text-gray-500 text-center py-2 uppercase",children:o},o))}),r.jsx("div",{className:"grid grid-cols-7",children:i.map((o,l)=>{const c=Kj(o),d=o.getMonth()===e.getMonth(),u=a(o),p=u.slice(0,3),m=u.length-p.length;return r.jsxs("div",{className:`p-1.5 ${c?"bg-blue-50":"bg-white"} ${d?"":"opacity-50"}`,style:{borderRight:(l+1)%7!==0?"1px solid #E5E7EB":"none",borderBottom:"1px solid #E5E7EB",minHeight:110},children:[r.jsx("div",{className:`text-xs font-medium mb-1 ${c?"text-blue-700":"text-gray-900"}`,children:o.getDate()}),r.jsxs("div",{className:"space-y-0.5",children:[p.map(x=>{const w=gC(x.calendar_id,n);return r.jsx("div",{className:"rounded px-1.5 py-0.5 truncate cursor-pointer",style:{background:w.bg,color:w.text,fontSize:10,lineHeight:1.3},title:x.title,onClick:y=>{y.stopPropagation(),s==null||s(x)},children:x.title||"(Sem título)"},x.id)}),m>0&&r.jsxs("div",{className:"text-gray-500",style:{fontSize:10},children:["+",m," mais"]})]})]},l)})})]})}const kN="#E3E8EE";function h4e({config:e,jobTitle:t,bookingsCount:n,onEdit:s,onDuplicate:i,onDelete:a,onToast:o}){const[l,c]=g.useState(!1),[d,u]=g.useState(!1),p=e.slug?`https://summitinc.io/schedule/${e.slug}`:"",m=e.slug?`summitinc.io/schedule/${e.slug}`:"",x=e.is_active!==!1,w=async y=>{if(y.stopPropagation(),!!p)try{await navigator.clipboard.writeText(p),c(!0),o==null||o("Link copiado"),setTimeout(()=>c(!1),1800)}catch{}};return r.jsxs("div",{className:"bg-white rounded-lg p-5 hover:shadow-sm transition relative",style:{border:`1px solid ${kN}`},children:[r.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[r.jsx("div",{className:"flex-1 min-w-0",children:r.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[r.jsx("h3",{className:"text-base font-semibold text-gray-900 truncate",children:e.name||"Sem nome"}),r.jsx("span",{className:"text-[10px] uppercase font-semibold px-1.5 py-0.5 rounded-full",style:{background:x?"#DCFCE7":"#F3F4F6",color:x?"#15803D":"#6B7280"},children:x?"Ativo":"Inativo"})]})}),r.jsxs("div",{className:"relative flex-shrink-0",children:[r.jsx("button",{type:"button",onClick:()=>u(y=>!y),onBlur:()=>setTimeout(()=>u(!1),150),className:"p-1.5 rounded-md hover:bg-gray-100 text-gray-500","aria-label":"Mais ações",children:r.jsx(No,{size:16})}),d&&r.jsxs("div",{className:"absolute right-0 top-full mt-1 bg-white rounded-md shadow-lg z-10 py-1 w-40",style:{border:`1px solid ${kN}`},children:[r.jsxs("button",{type:"button",onMouseDown:y=>{y.preventDefault(),u(!1),s()},className:"w-full text-left px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 flex items-center gap-2",children:[r.jsx($r,{size:12})," Editar"]}),r.jsxs("button",{type:"button",onMouseDown:y=>{y.preventDefault(),u(!1),i()},className:"w-full text-left px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 flex items-center gap-2",children:[r.jsx(yV,{size:12})," Duplicar"]}),r.jsxs("button",{type:"button",onMouseDown:y=>{y.preventDefault(),u(!1),a()},className:"w-full text-left px-3 py-2 text-sm text-red-600 hover:bg-red-50 flex items-center gap-2",children:[r.jsx(zn,{size:12})," Excluir"]})]})]})]}),r.jsx("div",{className:"flex items-center gap-2 flex-wrap mb-3",children:e.slug?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-indigo-600 hover:text-indigo-700 inline-flex items-center gap-1 truncate",children:[m," ",r.jsx($a,{size:11,className:"flex-shrink-0"})]}),r.jsxs("button",{type:"button",onClick:w,className:"text-xs px-2 py-0.5 border border-gray-200 bg-white text-gray-700 rounded-md hover:bg-gray-50 inline-flex items-center gap-1",children:[l?r.jsx(fn,{size:11,className:"text-green-600"}):r.jsx(Js,{size:11}),l?"Copiado!":"Copiar link"]})]}):r.jsx("span",{className:"text-xs text-gray-400",children:"Sem slug definido"})}),r.jsxs("div",{className:"text-xs text-gray-600 mb-3 inline-flex items-center gap-1.5",children:[r.jsx(On,{size:11,className:"text-gray-400"}),t?r.jsxs("span",{children:["Vaga: ",r.jsx("span",{className:"font-medium text-gray-800",children:t})]}):r.jsx("span",{className:"text-gray-400",children:"Sem vaga vinculada"})]}),Array.isArray(e.duration_options_parsed)&&e.duration_options_parsed.length>0&&r.jsx("div",{className:"flex gap-1.5 flex-wrap mb-3",children:e.duration_options_parsed.map(y=>r.jsxs("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded bg-gray-100 text-gray-700",children:[y,"min"]},y))}),r.jsx("div",{className:"pt-3 border-t border-gray-100",children:r.jsxs("button",{type:"button",onClick:s,className:"text-xs text-gray-600 hover:text-indigo-600",children:[r.jsx("span",{className:"font-semibold",children:n??"—"})," agendamento",n===1?"":"s"," confirmado",n===1?"":"s"]})})]})}const _N="#6C24F5";function m4e({configs:e,jobsMap:t,bookingCounts:n,onNew:s,onEdit:i,onDuplicate:a,onDelete:o,onToast:l}){return!e||e.length===0?r.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl py-16 px-6 text-center",children:[r.jsx("div",{className:"w-14 h-14 roun
930ded-full mx-auto mb-4 flex items-center justify-center",style:{background:"#EEF2FF",color:_N},children:r.jsx(LU,{size:28})}),r.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Crie seu primeiro link de agendamento"}),r.jsx("p",{className:"text-sm text-gray-500 mb-5",children:"Configure horários disponíveis e deixe candidatos agendarem direto com você."}),r.jsxs("button",{type:"button",onClick:s,className:"text-sm px-4 py-2 text-white rounded-md font-semibold hover:opacity-90 inline-flex items-center gap-1.5",style:{background:_N},children:[r.jsx(Ln,{size:14})," Novo link"]})]}):r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.map(c=>r.jsx(h4e,{config:c,jobTitle:c.job_id?t[c.job_id]:null,bookingsCount:n[c.id],onEdit:()=>i(c),onDuplicate:()=>a(c),onDelete:()=>o(c),onToast:l},c.id))})}const Vu="#E3E8EE",g4e="#6C24F5";function Az(e){return String(e||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function x4e({name:e,onNameChange:t,slug:n,onSlugChange:s,isActive:i,onActiveChange:a,defaultLocation:o,onLocationChange:l,jobId:c,onJobChange:d,jobs:u}){const[p,m]=g.useState(!1),x=n?`summitinc.io/schedule/${n}`:"",w=n?`https://summitinc.io/schedule/${n}`:"",y=async()=>{if(w)try{await navigator.clipboard.writeText(w),m(!0),setTimeout(()=>m(!1),1800)}catch{}};return r.jsxs("div",{className:"bg-white rounded-lg p-6",style:{border:`1px solid ${Vu}`},children:[r.jsxs("div",{className:"flex items-start justify-between gap-4 mb-1",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-sm font-semibold text-gray-900",children:"Informações do link"}),r.jsx("p",{className:"text-xs text-gray-500",children:"Identificação e endereço público."})]}),r.jsxs("label",{className:"inline-flex items-center gap-2 cursor-pointer",children:[r.jsx("span",{className:"text-xs text-gray-500 font-medium",children:i?"Ativo":"Inativo"}),r.jsx("button",{type:"button",onClick:()=>a(!i),className:"relative inline-flex h-6 w-11 items-center rounded-full transition",style:{background:i?g4e:"#D1D5DB"},children:r.jsx("span",{className:"inline-block h-5 w-5 transform rounded-full bg-white shadow transition",style:{transform:i?"translateX(22px)":"translateX(2px)"}})})]})]}),r.jsxs("div",{className:"mt-5 space-y-4",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:["Nome do link ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"text",value:e,onChange:v=>t(v.target.value),placeholder:"Ex: Vaga CCO, Entrevista Inicial...",className:"w-full text-sm px-3 py-2.5 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${Vu}`}})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:"Slug (URL)"}),r.jsxs("div",{className:"flex items-stretch",children:[r.jsx("span",{className:"inline-flex items-center px-3 text-xs text-gray-500 bg-gray-50 rounded-l-md border-r-0",style:{border:`1px solid ${Vu}`},children:"summitinc.io/schedule/"}),r.jsx("input",{type:"text",value:n,onChange:v=>s(Az(v.target.value)),placeholder:"seu-link",className:"flex-1 text-sm px-3 py-2 rounded-r-md focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${Vu}`}})]}),x&&r.jsxs("div",{className:"mt-2 flex items-center gap-2 flex-wrap",children:[r.jsxs("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-indigo-600 hover:text-indigo-700 inline-flex items-center gap-1",children:[x," ",r.jsx($a,{size:11})]}),r.jsxs("button",{type:"button",onClick:y,className:"text-xs px-2.5 py-1 border border-gray-200 bg-white text-gray-700 rounded-md font-medium hover:bg-gray-50 inline-flex items-center gap-1.5",children:[p?r.jsx(fn,{size:12,className:"text-green-600"}):r.jsx(Js,{size:12}),p?"Copiado!":"Copiar"]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:"Localização padrão"}),r.jsx("input",{type:"text",value:o,onChange:v=>l(v.target.value),placeholder:"Google Meet, Zoom, endereço do escritório...",className:"w-full text-sm px-3 py-2.5 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${Vu}`}})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"block text-xs font-medium text-gray-700 mb-1.5 inline-flex items-center gap-1.5",children:[r.jsx(On,{size:12,className:"text-gray-500"})," Vincular a uma vaga"]}),r.jsxs("select",{value:c||"",onChange:v=>d(v.target.value||null),className:"w-full text-sm px-3 py-2.5 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${Vu}`},children:[r.jsx("option",{value:"",children:"Nenhuma vaga (link genérico)"}),(u||[]).map(v=>r.jsx("option",{value:v.id,children:v.title||"(sem título)"},v.id))]}),c&&r.jsx("p",{className:"mt-2 text-xs text-indigo-700 bg-indigo-50 border border-indigo-100 rounded-md px-3 py-2",children:"Candidatos que agendarem por este link serão adicionados automaticamente ao pipeline desta vaga."})]})]})]})}const hd="#E3E8EE",ux="#6C24F5",y4e=[15,30,60],v4e=[{value:1,label:"Seg"},{value:2,label:"Ter"},{value:3,label:"Qua"},{value:4,label:"Qui"},{value:5,label:"Sex"},{value:6,label:"Sáb"},{value:0,label:"Dom"}],b4e=[0,5,10,15,30],CN=[7,14,30,60,90],EN=(()=>{const e=[];for(let t=6;t<=23;t++)for(const n of[0,30])e.push(`${String(t).padStart(2,"0")}
930:${String(n).padStart(2,"0")}`);return e})();function w4e({durations:e,onDurationsChange:t,availableDays:n,onDaysChange:s,startTime:i,onStartTimeChange:a,endTime:o,onEndTimeChange:l,bufferMinutes:c,onBufferChange:d,schedulingWindowDays:u,onSchedulingWindowChange:p}){const m=!CN.includes(Number(u)),[x,w]=g.useState(m),y=j=>{const k=e.includes(j);k&&e.length===1||t(k?e.filter(S=>S!==j):[...e,j].sort((S,_)=>S-_))},v=j=>{const k=n.includes(j);k&&n.length===1||s(k?n.filter(S=>S!==j):[...n,j])};return r.jsxs("div",{className:"bg-white rounded-lg p-6",style:{border:`1px solid ${hd}`},children:[r.jsx("h2",{className:"text-sm font-semibold text-gray-900 mb-1",children:"Disponibilidade"}),r.jsx("p",{className:"text-xs text-gray-500 mb-5",children:"Defina suas durações, dias e horários disponíveis."}),r.jsxs("div",{className:"mb-5",children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-2",children:"Durações oferecidas"}),r.jsx("div",{className:"flex gap-4 flex-wrap",children:y4e.map(j=>r.jsxs("label",{className:"inline-flex items-center gap-2 cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:e.includes(j),onChange:()=>y(j),className:"w-4 h-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),r.jsxs("span",{className:"text-sm text-gray-700",children:[j," min"]})]},j))})]}),r.jsxs("div",{className:"mb-5",children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-2",children:"Dias disponíveis"}),r.jsx("div",{className:"flex gap-1.5 flex-wrap",children:v4e.map(j=>{const k=n.includes(j.value);return r.jsx("button",{type:"button",onClick:()=>v(j.value),className:`text-xs px-3 py-1.5 rounded-full font-medium transition ${k?"bg-indigo-600 text-white border border-indigo-600":"bg-white text-gray-600 border border-gray-200 hover:bg-gray-50"}`,children:j.label},j.value)})})]}),r.jsxs("div",{className:"mb-5 grid grid-cols-2 gap-4 max-w-md",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:"Início"}),r.jsx("select",{value:i,onChange:j=>a(j.target.value),className:"w-full text-sm px-3 py-2 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${hd}`},children:EN.map(j=>r.jsx("option",{value:j,children:j},j))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:"Fim"}),r.jsx("select",{value:o,onChange:j=>l(j.target.value),className:"w-full text-sm px-3 py-2 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${hd}`},children:EN.map(j=>r.jsx("option",{value:j,children:j},j))})]})]}),r.jsxs("div",{className:"max-w-md mb-5",children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:"Intervalo entre reuniões"}),r.jsx("select",{value:c,onChange:j=>d(parseInt(j.target.value,10)),className:"w-full text-sm px-3 py-2 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${hd}`},children:b4e.map(j=>r.jsxs("option",{value:j,children:[j," min"]},j))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Janela de agendamento"}),r.jsxs("p",{className:"text-xs text-gray-500 mb-2",children:["Candidatos podem agendar dentro dos próximos ",u||30," dias."]}),r.jsxs("div",{className:"flex gap-1.5 flex-wrap items-center",children:[CN.map(j=>{const k=!x&&Number(u)===j;return r.jsxs("button",{type:"button",onClick:()=>{w(!1),p(j)},className:"text-xs font-medium rounded-full border transition",style:{padding:"6px 12px",background:k?ux:"#fff",color:k?"#fff":"#374151",borderColor:k?ux:hd},children:[j," dias"]},j)}),r.jsx("button",{type:"button",onClick:()=>w(!0),className:"text-xs font-medium rounded-full border transition",style:{padding:"6px 12px",background:x?ux:"#fff",color:x?"#fff":"#374151",borderColor:x?ux:hd},children:"Personalizar"}),x&&r.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[r.jsx("input",{type:"number",min:1,max:365,value:u||"",onChange:j=>{const k=parseInt(j.target.value,10);p(Number.isFinite(k)&&k>0?k:1)},className:"text-sm px-2 py-1 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${hd}`,width:80}}),r.jsx("span",{className:"text-xs text-gray-500",children:"dias"})]})]})]})]})}const Ad="#E3E8EE",j4e=[{key:"phone",label:"Telefone"},{key:"salary_expectation",label:"Expectativa salarial"},{key:"cv",label:"Upload de CV"},{key:"notes",label:"Notas / Mensagem"}],Tz=[{value:"text",label:"Texto"},{value:"number",label:"Número"},{value:"select",label:"Seleção"},{value:"date",label:"Data"}];function S4e(){return`cf_${Math.random().toString(36).slice(2,9)}`}function iw({label:e,enabled:t,required:n,onToggleEnabled:s,onToggleRequired:i,locked:a}){return r.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5 rounded-md",style:{background:a?"#F9FAFB":"#FFFFFF",border:`1px solid ${Ad}`},children:[r.jsxs("div",{className:"flex items-center gap-2",children:[a&&r.jsx(hS,{size:11,className:"text-gray-400"}),r.jsx("span",{className:"text-sm text-gray-800",children:e})]}),r.jsx("div",{className:"flex items-center gap-4",children:a?r.jsx("span",{className:"text-xs text-gray-500",children:"Sempre obrigatório"}):r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:"inline-flex items-center gap-1.5 cursor-pointer text-xs text-gray-600",children:[r.jsx("input",{type:"checkbox",checked:t,onChange:s,className:"w-3.5 h-3.5 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),"Incluir"]}),r.jsxs("label",{className:"inline-flex items-center gap-1.5 cursor-pointer text-xs text-gray-600",children:[r.jsx("input",{type:"checkbox",checked:t&&n,disabled:!t,onChange:i,className:"w-3.5 h-3.5 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 disabled:opacity-40"}),"Obrigatório"]})]})})]})}function k4e({onAdd:e,onCancel:t}){const[n,s]=g.useState(""),[i,a]=g.useState("text"),[o,l]=g.useState(""),[c,d]=g.useState(!1),u=n.trim().length>0&&(i!=="select"||o.trim().length>0),p=()=>
930{if(!u)return;const m=i==="select"?o.split(",").map(x=>x.trim()).filter(Boolean):[];e({key:S4e(),label:n.trim(),type:i,options:m,required:c})};return r.jsxs("div",{className:"rounded-md p-3 space-y-3",style:{background:"#F9FAFB",border:`1px solid ${Ad}`},children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Label"}),r.jsx("input",{type:"text",value:n,onChange:m=>s(m.target.value),placeholder:"Ex: Anos de experiência",className:"w-full text-sm px-3 py-2 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${Ad}`}})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Tipo"}),r.jsx("select",{value:i,onChange:m=>a(m.target.value),className:"w-full text-sm px-3 py-2 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${Ad}`},children:Tz.map(m=>r.jsx("option",{value:m.value,children:m.label},m.value))})]}),r.jsx("div",{className:"flex items-end",children:r.jsxs("label",{className:"inline-flex items-center gap-1.5 text-xs text-gray-600 cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:c,onChange:m=>d(m.target.checked),className:"w-3.5 h-3.5 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),"Obrigatório"]})})]}),i==="select"&&r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Opções (separadas por vírgula)"}),r.jsx("textarea",{rows:2,value:o,onChange:m=>l(m.target.value),placeholder:"Opção 1, Opção 2, Opção 3",className:"w-full text-sm px-3 py-2 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${Ad}`}})]}),r.jsxs("div",{className:"flex gap-2 justify-end",children:[r.jsx("button",{type:"button",onClick:t,className:"text-xs px-3 py-1.5 border border-gray-200 bg-white text-gray-700 rounded-md font-medium hover:bg-gray-50",children:"Cancelar"}),r.jsx("button",{type:"button",disabled:!u,onClick:p,className:"text-xs px-3 py-1.5 bg-indigo-600 text-white rounded-md font-medium hover:bg-indigo-700 disabled:opacity-50",children:"Adicionar"})]})]})}
930function _4e({formConfig:e,onChange:t}){const[n,s]=g.useState(!1),i=e.optional||{},a=e.custom||[],o=(d,u)=>{t({...e,optional:{...i,[d]:{...i[d]||{},...u}}})},l=d=>{t({...e,custom:[...a,d]}),s(!1)},c=d=>{t({...e,custom:a.filter(u=>u.key!==d)})};return r.jsxs("div",{className:"bg-white rounded-lg p-6",style:{border:`1px solid ${Ad}`},children:[r.jsx("h2",{className:"text-sm font-semibold text-gray-900 mb-1",children:"Campos do formulário"}),r.jsx("p",{className:"text-xs text-gray-500 mb-5",children:"Configure quais informações pedir ao candidato no momento da reserva."}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(iw,{label:"Nome",enabled:!0,required:!0,locked:!0}),r.jsx(iw,{label:"Email",enabled:!0,required:!0,locked:!0}),j4e.map(d=>{const u=i[d.key]||{enabled:!1,required:!1};return r.jsx(iw,{label:d.label,enabled:!!u.enabled,required:!!u.required,onToggleEnabled:()=>o(d.key,{enabled:!u.enabled,required:u.enabled?!1:u.required}),onToggleRequired:()=>o(d.key,{required:!u.required})},d.key)})]}),r.jsxs("div",{className:"mt-6",children:[r.jsx("h3",{className:"text-xs font-semibold text-gray-800 mb-2",children:"Campos personalizados"}),a.length===0&&!n&&r.jsx("p",{className:"text-xs text-gray-400 mb-2",children:"Nenhum campo personalizado."}),a.length>0&&r.jsx("div",{className:"space-y-2 mb-3",children:a.map(d=>{var u;return r.jsxs("div",{className:"flex items-center justify-between px-3 py-2 rounded-md",style:{background:"#FFFFFF",border:`1px solid ${Ad}`},children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("span",{className:"text-sm text-gray-800",children:d.label}),r.jsx("span",{className:"text-[10px] uppercase font-medium px-1.5 py-0.5 rounded bg-gray-100 text-gray-600",children:((u=Tz.find(p=>p.value===d.type))==null?void 0:u.label)||d.type}),d.required&&r.jsx("span",{className:"text-[10px] uppercase font-medium px-1.5 py-0.5 rounded bg-amber-50 text-amber-700",children:"Obrigatório"})]}),r.jsx("button",{type:"button",onClick:()=>c(d.key),className:"p-1 rounded hover:bg-red-50 text-gray-400 hover:text-red-600",title:"Remover",children:r.jsx(zn,{size:13})})]},d.key)})}),n?r.jsx(k4e,{onAdd:l,onCancel:()=>s(!1)}):r.jsxs("button",{type:"button",onClick:()=>s(!0),className:"text-xs px-3 py-1.5 border border-dashed border-gray-300 text-gray-600 rounded-md font-medium hover:bg-gray-50 inline-flex items-center gap-1.5",children:[r.jsx(Ln,{size:12})," Adicionar campo personalizado"]})]})]})}const C4e="#E3E8EE";function E4e({enabled:e,onChange:t}){return r.jsxs("div",{className:"bg-white rounded-lg p-6",style:{border:`1px solid ${C4e}`},children:[r.jsx("h2",{className:"text-sm font-semibold text-gray-900 mb-1",children:"Lembretes automáticos"}),r.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"Mensagens enviadas automaticamente ao candidato antes da entrevista."}),r.jsxs("label",{className:"inline-flex items-center gap-3 cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:e,onChange:n=>t(n.target.checked),className:"w-4 h-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),r.jsx("span",{className:"text-sm text-gray-800",children:"Enviar lembretes por email ao candidato"})]}),e&&r.jsxs("ul",{className:"mt-3 ml-7 text-xs text-gray-600 space-y-1",children:[r.jsx("li",{children:"• 24 horas antes da entrevista"}),r.jsx("li",{children:"• 1 hora antes da entrevista"})]})]})}const F4e="#E3E8EE",A4e=["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],T4e=["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"];function N4e(e){if(!e)return"—";const t=new Date(e);if(Number.isNaN(t.getTime()))return"—";const n=`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`;return`${A4e[t.getDay()].slice(0,3)}, ${t.getDate()} ${T4e[t.getMonth()]} · ${n}`}const FN={confirmed:{label:"Confirmado",color:"#15803D",bg:"#DCFCE7"},cancelled_by_candidate:{label:"Cancelado",color:"#991B1B",bg:"#FEE2E2"},cancelled_by_recruiter:{label:"Cancelado",color:"#991B1B",bg:"#FEE2E2"},rescheduled:{label:"Reagendado",color:"#92400E",bg:"#FEF3C7"},no_show:{label:"No-show",color:"#991B1B",bg:"#FEE2E2"},completed:{label:"Concluído",color:"#374151",bg:"#F3F4F6"}};function R4e({configId:e}){const[t,n]=g.useState([]),[s,i]=g.useState({}),[a,o]=g.useState(!1);g.useEffect(()=>{if(!e){n([]);return}let c=!0;return(async()=>{o(!0);try{const d=await ne.entities.SchedulingBooking.filter({config_id:e,status:"confirmed"}).catch(()=>[]);if(!c)return;const u=(d||[]).filter(m=>m.scheduled_start&&new Date(m.scheduled_start).getTime()>=Date.now()).sort((m,x)=>new Date(m.scheduled_start).getTime()-new Date(x.scheduled_start).getTime());n(u);const p=Array.from(new Set(u.map(m=>
930m.job_id).filter(Boolean)));if(p.length>0)try{const m=await ne.entities.Job.filter({id:{$in:p}}),x={};(m||[]).forEach(w=>{x[w.id]=w.title||"(sem título)"}),c&&i(x)}catch{c&&i({})}else i({})}catch{c&&n([])}c&&o(!1)})(),()=>{c=!1}},[e]);const l=g.useMemo(()=>t,[t]);return r.jsxs("div",{className:"bg-white rounded-lg p-6",style:{border:`1px solid ${F4e}`},children:[r.jsx("h2",{className:"text-sm font-semibold text-gray-900 mb-1",children:"Próximos agendamentos"}),r.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"Reservas confirmadas a partir de hoje."}),e?a?r.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400 py-6",children:[r.jsx(rt,{size:14,className:"animate-spin"})," Carregando..."]}):l.length===0?r.jsx("p",{className:"text-xs text-gray-400",children:"Nenhum agendamento futuro."}):r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"text-xs text-gray-500 border-b border-gray-100",children:[r.jsx("th",{className:"text-left font-medium py-2 pr-3",children:"Candidato"}),r.jsx("th",{className:"text-left font-medium py-2 pr-3",children:"Email"}),r.jsx("th",{className:"text-left font-medium py-2 pr-3",children:"Data / Hora"}),r.jsx("th",{className:"text-left font-medium py-2 pr-3",children:"Duração"}),r.jsx("th",{className:"text-left font-medium py-2 pr-3",children:"Status"}),r.jsx("th",{className:"text-left font-medium py-2",children:"Vaga"})]})}),r.jsx("tbody",{children:l.map(c=>{const d=FN[c.status]||FN.confirmed;return r.jsxs("tr",{className:"border-b border-gray-50 last:border-0",children:[r.jsx("td",{className:"py-2 pr-3 text-gray-800",children:c.candidate_name}),r.jsx("td",{className:"py-2 pr-3 text-gray-600 text-xs",children:c.candidate_email}),r.jsx("td",{className:"py-2 pr-3 text-gray-700 text-xs",children:N4e(c.scheduled_start)}),r.jsxs("td",{className:"py-2 pr-3 text-gray-700 text-xs",children:[c.duration_minutes," min"]}),r.jsx("td",{className:"py-2 pr-3",children:r.jsx("span",{className:"text-[10px] uppercase font-medium px-1.5 py-0.5 rounded",style:{background:d.bg,color:d.color},children:d.label})}),r.jsx("td",{className:"py-2 text-gray-700 text-xs",children:c.job_id&&s[c.job_id]||"—"})]},c.id)})})]})}):r.jsx("p",{className:"text-xs text-gray-400",children:"Salve a configuração para começar a receber agendamentos."})]})}const D4e="#6C24F5",AN={optional:{phone:{enabled:!0,required:!1},salary_expectation:{enabled:!1,required:!1},cv:{enabled:!0,required:!1},notes:{enabled:!0,required:!1}},custom:[]};function aw(e,t){if(!e)return t;try{return JSON.parse(e)}catch{return t}}function I4e({mode:e,initialConfig:t,jobs:n,onBack:s,onSave:i,saving:a}){const o=e==="edit",[l,c]=g.useState(""),[d,u]=g.useState(""),[p,m]=g.useState(!1),[x,w]=g.useState(!0),[y,v]=g.useState(""),[j,k]=g.useState(null),[S,_]=g.useState([30]),[F,A]=g.useState([1,2,3,4,5]),[C,D]=g.useState("09:00"),[P,L]=g.useState("18:00"),[T,R]=g.useState(10),[U,I]=g.useState(30),[H,V]=g.useState(!0),[X,N]=g.useState(AN);g.useEffect(()=>{t&&(c(t.name||""),u(t.slug||""),m(!0),w(t.is_active!==!1),v(t.default_location||""),k(t.job_id||null),_(aw(t.duration_options,[30])),A(aw(t.available_days,[1,2,3,4,5])),D(t.start_time||"09:00"),L(t.end_time||"18:00"),R(Number.isFinite(t.buffer_minutes)?t.buffer_minutes:10),I(Number.isFinite(t.scheduling_window_days)?t.scheduling_window_days:30),V(t.reminders_enabled!==!1),N(aw(t.form_fields_config,AN)))},[t]);const W=g.useCallback(M=>{c(M),p||u(Az(M))},[p]),O=g.useCallback(M=>{m(!0),u(M)},[]),G=()=>{i({name:l.trim(),slug:d.trim(),is_active:x,default_location:y||"",job_id:j||"",duration_options:JSON.stringify(S),available_days:JSON.stringify(F),start_time:C,end_time:P,buffer_minutes:T,scheduling_window_days:U,reminders_enabled:H,form_fields_config:JSON.stringify(X)})};return r.jsxs("div",{className:"space-y-5",children:[r.jsxs("button",{type:"button",onClick:s,className:"text-sm text-gray-600 hover:text-gray-900 inline-flex items-center gap-1.5",children:[r.jsx(bo,{size:14})," Voltar para lista"]}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-semibold text-gray-900 mb-1",children:o?"Editar link de agendamento":"Novo link de agendamento"}),r.jsx("p",{className:"text-sm text-gray-500",children:"Configure os detalhes do seu link público de agendamento."})]}),r.jsx(x4e,{name:l,onNameChange:W,slug:d,onSlugChange:O,isActive:x,onActiveChange:w,defaultLocation:y,onLocationChange:v,jobId:j,onJobChange:k,jobs:n}),r.jsx(w4e,{durations:S,onDurationsChange:_,availableDays:F,onDaysChange:A,startTime:C,onStartTimeChange:D,endTime:P,onEndTimeChange:L,bufferMinutes:T,onBufferChange:R,schedulingWindowDays:U,onSchedulingWindowChange:I}),r.jsx(_4e,{formConfig:X,onChange:N}),r.jsx(E4e,{enabled:H,onChange:V}),o&&(t==null?void 0:t.id)&&r.jsx(R4e,{configId:t.id}),r.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[r.jsx("button",{type:"button",onClick:s,disabled:a,className:"text-sm px-4 py-2.5 border border-gray-200 bg-white text-gray-700 rounded-md font-medium hover:bg-gray-50 disabled:opacity-50",children:"Cancelar"}),r.jsxs("button",{type:"button",onClick:G,disabled:a,className:"text-sm px-5 py-2.5 text-white rounded-md font-semibold hover:opacity-90 disabled:opacity-50 flex items-center gap-2",style:{background:D4e},children:[a&&r.jsx(rt,{size:14,className:"animate-spin"}),o?"Salvar alterações":"Criar link de agendamento"]})]})]})}const TN="#E3E8EE";function P4e({open:e,name:t,onConfirm:n,onCancel:s}){const[i,a]=g.useState(!1);if(!e)return null;const o=async()=>{a(!0);try{await n()}finally{a(!1)}};return r.jsx("div",{onClick:()=>!i&&s(),style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:2e3,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:l=>l.stopPropagation(),className:"bg-white rounded-lg p-6 w-full max-w-md 
930shadow-xl",style:{border:`1px solid ${TN}`},children:[r.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[r.jsx("div",{className:"w-9 h-9 rounded-full flex items-center justify-center flex-shrink-0",style:{background:"#FEE2E2"},children:r.jsx(_o,{size:18,className:"text-red-600"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Excluir link de agendamento"}),r.jsxs("p",{className:"text-sm text-gray-600",children:["Tem certeza que deseja excluir o link ",r.jsxs("strong",{children:['"',t,'"']}),"? Agendamentos existentes não serão afetados."]})]})]}),r.jsxs("div",{className:"flex justify-end gap-2",children:[r.jsx("button",{type:"button",onClick:s,disabled:i,className:"text-sm px-4 py-2 border bg-white text-gray-700 rounded-md font-medium hover:bg-gray-50 disabled:opacity-50",style:{borderColor:TN},children:"Cancelar"}),r.jsxs("button",{type:"button",onClick:o,disabled:i,className:"text-sm px-4 py-2 text-white rounded-md font-semibold hover:opacity-90 disabled:opacity-50 flex items-center gap-2",style:{background:"#DC2626"},children:[i&&r.jsx(rt,{size:13,className:"animate-spin"}),"Excluir"]})]})]})})}const NN="#6C24F5",Hu="Plano Free permite 1 link ativo. Faça upgrade para criar mais.";function ow(e,t){if(!e)return t;try{return JSON.parse(e)}catch{return t}}function B4e({hideTitle:e=!1,statusSlot:t=null,onConfigsLoaded:n}){var G;const{user:s}=tr(),{entitlements:i}=Xa(),[a,o]=g.useState(!0),[l,c]=g.useState(!1),[d,u]=g.useState(null),[p,m]=g.useState(null),[x,w]=g.useState([]),[y,v]=g.useState([]),[j,k]=g.useState({}),[S,_]=g.useState({}),[F,A]=g.useState("list"),[C,D]=g.useState(null),[P,L]=g.useState(null),T=(M,z="success")=>{u({msg:M,type:z}),setTimeout(()=>u(null),2800)},R=g.useCallback(async()=>{var M;if(s){o(!0);try{let z=null;try{const re=await ne.functions.invoke("getWorkspaceId",{user_email:s.email});z=((M=re==null?void 0:re.data)==null?void 0:M.workspace_id)||(re==null?void 0:re.workspace_id)||null}catch{z=null}m(z);const[K,Y]=await Promise.all([ne.entities.SchedulingConfig.filter({user_id:s.id}).catch(()=>[]),z?ne.entities.Job.filter({workspace_id:z}).catch(()=>[]):Promise.resolve([])]),J=(Y||[]).filter(re=>re.status!=="deleted"&&re.status!=="closed"),Q={};(Y||[]).forEach(re=>{Q[re.id]=re.title||"(sem título)"}),v(J),k(Q);const ie=(K||[]).map(re=>({...re,duration_options_parsed:ow(re.duration_options,[])}));ie.sort((re,pe)=>(re.name||"").localeCompare(pe.name||"")),w(ie),n==null||n(ie);const ae={};await Promise.all(ie.map(async re=>{try{const pe=await ne.entities.SchedulingBooking.filter({config_id:re.id,status:"confirmed"});ae[re.id]=(pe||[]).length}catch{ae[re.id]=0}})),_(ae)}catch{}o(!1)}},[s]);g.useEffect(()=>{R()},[R]);const U=!((G=i==null?void 0:i.ats)!=null&&G.plan_key)||i.ats.plan_key==="free",I=x.filter(M=>M.is_active===!0).length,H=U&&I>=1,V=()=>{if(H){T(Hu,"error");return}D(null),A("create")},X=M=>{D(M),A("edit")},N=M=>{const z=M.slug||"",K={...M,id:null,name:`${M.name||"Sem nome"} (cópia)`,slug:z?`${z}-copy`:""};D(K),A("create")},W=async M=>{if(!M.name||M.name.length<1){T("Defina um nome para o link","error");return}if(!M.slug||M.slug.length<3){T("Slug inválido (mínimo 3 caracteres)","error");return}if(!p){T("Workspace não encontrado","error");return}const z=ow(M.duration_options,[]),K=ow(M.available_days,[]);if(z.length===0){T("Selecione pelo menos uma duração","error");return}if(K.length===0){T("Selecione pelo menos um dia","error");return}if(M.start_time>=M.end_time){T("Horário de início deve ser antes do fim","error");return}c(!0);try{const Y={...M,workspace_id:p,user_id:s.id};if(F==="edit"&&(C!=null&&C.id))await ne.entities.SchedulingConfig.update(C.id,Y),T("Link atualizado");else{if(H){T(Hu,"error"),c(!1);return}const J=await ne.functions.invoke("createSchedulingConfig",Y),Q=(J==null?void 0:J.data)||J;if(!(Q!=null&&Q.success)){T((Q==null?void 0:Q.error)==="free_link_limit"?Hu:(Q==null?void 0:Q.error)||"Erro ao salvar link","error"),c(!1);return}T("Link criado")}A("list"),D(null),await R()}catch(Y){const J=(Y==null?void 0:Y.message)||"";T(J.includes("free_link_limit")?Hu:J||"Erro ao salvar link","error")}c(!1)},O=async()=>
930{if(P)try{await ne.entities.SchedulingConfig.delete(P.id),T("Link excluído"),L(null),await R()}catch(M){T((M==null?void 0:M.message)||"Erro ao excluir link","error")}};return a?r.jsxs("div",{className:"flex items-center justify-center py-20 text-gray-400",children:[r.jsx(rt,{size:20,className:"animate-spin mr-2"})," Carregando..."]}):r.jsxs(r.Fragment,{children:[F==="list"?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-start justify-between gap-4 mb-6 flex-wrap",children:[!e&&r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-semibold text-gray-900 mb-1",children:"Agendamento"}),r.jsx("p",{className:"text-sm text-gray-500",children:"Gerencie seus links de agendamento."})]}),e&&r.jsx("div",{className:"min-w-0",children:t}),x.length>0&&r.jsxs("div",{className:"flex items-center gap-3",children:[H&&r.jsxs("span",{className:"text-xs text-gray-500 text-right",style:{maxWidth:260},children:[Hu," ",r.jsx("a",{href:"/app/conta/plano",className:"font-semibold hover:underline",style:{color:NN},children:"Ver planos"})]}),r.jsxs("button",{type:"button",onClick:V,disabled:H,title:H?Hu:void 0,className:"text-sm px-4 py-2 text-white rounded-md font-semibold hover:opacity-90 inline-flex items-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed",style:{background:NN},children:[r.jsx(Ln,{size:14})," Novo link"]})]})]}),r.jsx(m4e,{configs:x,jobsMap:j,bookingCounts:S,onNew:V,onEdit:X,onDuplicate:N,onDelete:M=>L(M),onToast:M=>T(M)})]}):r.jsx(I4e,{mode:F==="edit"?"edit":"create",initialConfig:C,jobs:y,onBack:()=>{A("list"),D(null)},onSave:W,saving:l}),r.jsx(P4e,{open:!!P,name:(P==null?void 0:P.name)||"",onConfirm:O,onCancel:()=>L(null)}),d&&r.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 px-4 py-2 rounded-lg shadow-lg text-sm font-medium z-50",style:{background:d.type==="error"?"#DC2626":"#1F2937",color:"#FFFFFF"},children:d.msg})]})}const O4e="#6C24F5",RN={height:40,borderRadius:8,border:"1px solid #DADCE0",background:"#FFFFFF",color:"#1A1F36",fontWeight:500,padding:"0 16px"};function M4e({onConnectGoogle:e,onConnectOutlook:t,googleBusy:n,microsoftBusy:s}){return r.jsxs("div",{className:"flex flex-col items-center text-center py-10 px-6 mb-8 bg-white border border-gray-200 rounded-xl",children:[r.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mb-4",style:{background:"#F5EEFF",color:O4e},children:r.jsx(kl,{size:22})}),r.jsx("h2",{className:"text-base font-semibold text-gray-900 mb-1.5",children:"Ative seu link de agendamento"}),r.jsx("p",{className:"text-sm text-gray-500 leading-relaxed mb-5",style:{maxWidth:420},children:"Conecte o seu calendário para criar seus links de agendamento. Simplifique a gestão dos compromissos com seus candidatos."}),r.jsxs("div",{className:"flex items-center gap-3 flex-wrap justify-center",children:[r.jsxs("button",{type:"button",onClick:e,disabled:n,className:"text-sm inline-flex items-center gap-2.5 hover:bg-gray-50 disabled:opacity-50",style:RN,children:[n?r.jsx(rt,{size:18,className:"animate-spin"}):r.jsx(EO,{size:18}),"Conectar Google Agenda"]}),r.jsxs("button",{type:"button",onClick:t,disabled:s,className:"text-sm inline-flex items-center gap-2.5 hover:bg-gray-50 disabled:opacity-50",style:RN,children:[s?r.jsx(rt,{size:18,className:"animate-spin"}):r.jsx(CO,{size:18}),"Conectar Outlook"]})]})]})}function L4e({providerLabel:e,email:t,busy:n,onDisconnect:s}){return r.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 min-w-0",children:[r.jsx("span",{className:"rounded-full flex-shrink-0",style:{width:8,height:8,background:"#1D9E75"}}),r.jsxs("span",{className:"truncate",children:[e," conectado",t?` — ${t}`:""]}),r.jsxs("button",{type:"button",onClick:s,disabled:n,className:"text-xs underline text-gray-400 hover:text-gray-600 disabled:opacity-50 inline-flex items-center gap-1 flex-shrink-0",children:[n&&r.jsx(rt,{size:11,className:"animate-spin"}),"Desconectar"]})]})}const DN="#6C24F5",z4e=[{key:"day",label:"Dia"},{key:"week",label:"Semana"},{key:"month",label:"Mês"}],W4e=["[email protected]","[email protected]"],$4e=["calendario","links"];function U4e(){var _e;const e=In(),{user:t}=tr(),{entitlements:n,loading:s}=Xa(),[i,a]=Um();(_e=n==null?void 0:n.ats)!=null&&_e.plan_key&&n.ats.plan_key;const o=W4e.includes((t==null?void 0:t.email)||""),l=i.get("tab")||"calendario",c=$4e.includes(l)?l:"calendario",d=be=>{const Re=new URLSearchParams(i);Re.set("tab",be),a(Re)}
930,[u,p]=g.useState("week"),[m,x]=g.useState(new Date),[w,y]=g.useState([]),[v,j]=g.useState([]),[k,S]=g.useState(!1),[_,F]=g.useState(null),[A,C]=g.useState("all"),[D,P]=g.useState(!1),[L,T]=g.useState(null),[R,U]=g.useState(new Date),[I,H]=g.useState(null);g.useEffect(()=>{const be=setInterval(()=>U(new Date),6e4);return()=>clearInterval(be)},[]);const{start:V,end:X}=g.useMemo(()=>c4e(u,m),[u,m]),N=g.useCallback(async()=>{S(!0),F(null);try{const be=await ne.functions.invoke("fetchCalendarEvents",{date_start:V.toISOString(),date_end:X.toISOString()}),Re=(be==null?void 0:be.data)||be;Re!=null&&Re.success?(y(Re.events||[]),j(Re.calendars||[])):(y([]),j([]),F((Re==null?void 0:Re.error)||"Erro ao buscar eventos"))}catch(be){y([]),j([]),F((be==null?void 0:be.message)||"Erro ao buscar eventos")}S(!1)},[V,X]);g.useEffect(()=>{c==="calendario"&&N()},[N,c]);const W=g.useMemo(()=>A==="all"?w:w.filter(be=>be.calendar_id===A),[w,A]),O=()=>{x(be=>{const Re=new Date(be);return u==="day"?Re.setDate(Re.getDate()-1):u==="week"?Re.setDate(Re.getDate()-7):Re.setMonth(Re.getMonth()-1),Re})},G=()=>{x(be=>{const Re=new Date(be);return u==="day"?Re.setDate(Re.getDate()+1):u==="week"?Re.setDate(Re.getDate()+7):Re.setMonth(Re.getMonth()+1),Re})},M=()=>x(new Date),z=_&&/no calendar provider connected|400|unauthorized|no.*connector/i.test(_)||!k&&!_&&v.length===0,K=(be,Re="success")=>{H({msg:typeof be=="string"?be:be==null?void 0:be.msg,type:typeof be=="string"?Re:(be==null?void 0:be.type)||"success"}),setTimeout(()=>H(null),2800)},[Y,J]=g.useState(null),[Q,ie]=g.useState(null),[ae,re]=g.useState(!1),[pe,Z]=g.useState(!1),Ne=g.useCallback(async()=>{try{const be=await ne.functions.invoke("getGoogleSchedulingStatus",{}),Re=(be==null?void 0:be.data)||be;return J(Re||{connected:!1}),Re}catch{return J({connected:!1}),{connected:!1}}},[]),te=g.useCallback(async()=>{try{const be=await ne.functions.invoke("getMicrosoftSchedulingStatus",{}),Re=(be==null?void 0:be.data)||be;return ie(Re||{connected:!1}),Re}catch{return ie({connected:!1}),{connected:!1}}},[]);g.useEffect(()=>{Ne(),te()},[Ne,te]);const xe=async()=>{re(!0);try{const be=window.location.origin+"/app/ats/google-auth-callback",Re=await ne.functions.invoke("startGoogleSchedulingAuth",{redirect_uri:be}),Xe=(Re==null?void 0:Re.data)||Re;if(!(Xe!=null&&Xe.auth_url)){K((Xe==null?void 0:Xe.error)||"Falha ao iniciar OAuth","error"),re(!1);return}const He=window.open(Xe.auth_url,"google_scheduling_oauth","width=500,height=650,popup=yes"),St=async Se=>{if(Se.key!=="scheduling_oauth_done")return;window.removeEventListener("storage",St),clearInterval(Ct),localStorage.removeItem("scheduling_oauth_done");const et=await Ne();et!=null&&et.connected?K("Google conectado para agendamento público"):K("Conexão não concluída. Tente novamente.","error"),re(!1)};window.addEventListener("storage",St);const Ct=setInterval(async()=>{try{if(He&&!He.closed)return}catch{}clearInterval(Ct),window.removeEventListener("storage",St);const Se=await Ne();Se!=null&&Se.connected?K("Google conectado para agendamento público"):K("Conexão não concluída. Tente novamente.","error"),re(!1)},1e3)}catch(be){K((be==null?void 0:be.message)||"Erro ao conectar","error"),re(!1)}},he=async()=>{re(!0);try{await ne.functions.invoke("disconnectGoogleScheduling",{}),J({connected:!1}),K("Google desconectado do agendamento público")}
930catch(be){K((be==null?void 0:be.message)||"Erro ao desconectar","error")}re(!1)},le=async()=>{Z(!0);try{const be=window.location.origin+"/app/ats/microsoft-auth-callback",Re=await ne.functions.invoke("startMicrosoftSchedulingAuth",{redirect_uri:be}),Xe=(Re==null?void 0:Re.data)||Re;if(!(Xe!=null&&Xe.auth_url)){K((Xe==null?void 0:Xe.error)||"Falha ao iniciar OAuth","error"),Z(!1);return}const He=window.open(Xe.auth_url,"microsoft_scheduling_oauth","width=500,height=650,popup=yes"),St=async Se=>{if(Se.key!=="microsoft_scheduling_oauth_done")return;window.removeEventListener("storage",St),clearInterval(Ct),localStorage.removeItem("microsoft_scheduling_oauth_done");const et=await te();et!=null&&et.connected?K("Microsoft conectado para agendamento público"):K("Conexão não concluída. Tente novamente.","error"),Z(!1)};window.addEventListener("storage",St);const Ct=setInterval(async()=>{try{if(He&&!He.closed)return}catch{}clearInterval(Ct),window.removeEventListener("storage",St);const Se=await te();Se!=null&&Se.connected?K("Microsoft conectado para agendamento público"):K("Conexão não concluída. Tente novamente.","error"),Z(!1)},1e3)}catch(be){K((be==null?void 0:be.message)||"Erro ao conectar","error"),Z(!1)}},ge=async()=>{Z(!0);try{await ne.functions.invoke("disconnectMicrosoftScheduling",{}),ie({connected:!1}),K("Microsoft desconectado do agendamento público")}
930catch(be){K((be==null?void 0:be.message)||"Erro ao desconectar","error")}Z(!1)},[$e,ft]=g.useState([]),Qe=!!(Y!=null&&Y.connected)||!!(Q!=null&&Q.connected),Ve=Y!=null&&Y.connected?"Google Agenda":"Outlook",ze=Y!=null&&Y.connected?Y==null?void 0:Y.email:Q==null?void 0:Q.email,at=$e.some(be=>be.is_active),Nt=Qe&&at;return r.jsxs("div",{className:"px-6 py-6",children:[r.jsx("div",{className:"flex items-center gap-1.5 text-sm text-gray-500 mb-6",children:r.jsx("span",{className:"font-medium text-gray-700",children:"Agenda"})}),r.jsxs("div",{className:"flex items-center border-b border-gray-200 mb-6 gap-7",children:[r.jsx("button",{onClick:()=>d("calendario"),className:`py-2.5 text-sm ${c==="calendario"?"font-semibold text-gray-900":"text-gray-500 hover:text-gray-700"}`,style:c==="calendario"?{borderBottom:`2px solid ${DN}`,marginBottom:-1}:void 0,children:"Calendário"}),r.jsx("button",{onClick:()=>d("links"),className:`py-2.5 text-sm ${c==="links"?"font-semibold text-gray-900":"text-gray-500 hover:text-gray-700"}`,style:c==="links"?{borderBottom:`2px solid ${DN}`,marginBottom:-1}:void 0,children:r.jsxs("span",{className:"inline-flex items-center gap-2",children:["Links de Agendamento",r.jsx("span",{className:"inline-flex items-center rounded-full",style:{fontSize:11,fontWeight:500,padding:"2px 8px",background:Nt?"#E1F5EE":"#FCEBEB",color:Nt?"#085041":"#A32D2D"},children:Nt?"Ativo":"Inativo"})]})})]}),c==="calendario"&&r.jsxs("div",{children:[r.jsx("div",{className:"flex items-center justify-end mb-4 gap-3 flex-wrap",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"inline-flex rounded-lg border border-gray-200 overflow-hidden",children:z4e.map(be=>r.jsx("button",{onClick:()=>p(be.key),className:`px-3 py-1.5 text-sm font-medium ${u===be.key?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:be.label},be.key))}),r.jsxs("button",{onClick:()=>P(!0),className:"flex items-center gap-1.5 px-3 py-1.5 bg-blue-600 text-white rounded-lg text-sm font-medium hover:bg-blue-700",children:[r.jsx(Ln,{size:14})," Evento"]})]})}),r.jsxs("div",{className:"flex items-center justify-between mb-4 gap-3 flex-wrap",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:O,className:"p-1.5 rounded-lg border border-gray-200 hover:bg-gray-50 text-gray-700","aria-label":"Anterior",children:r.jsx(Sc,{size:16})}),r.jsx("button",{onClick:M,className:"px-3 py-1.5 text-sm border border-gray-200 rounded-lg hover:bg-gray-50 text-gray-700 font-medium",children:"Hoje"}),r.jsx("button",{onClick:G,className:"p-1.5 rounded-lg border border-gray-200 hover:bg-gray-50 text-gray-700","aria-label":"Próximo",children:r.jsx(Qr,{size:16})}),r.jsx("span",{className:"ml-2 text-sm font-semibold text-gray-900",children:l4e(u,m)})]}),v.length>0&&r.jsxs("select",{value:A,onChange:be=>C(be.target.value),className:"text-sm border border-gray-200 rounded-lg px-3 py-1.5 bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",children:[r.jsx("option",{value:"all",children:"Todos os calendários"}),v.map(be=>r.jsx("option",{value:be.id,children:be.name},be.id))]})]}),k?r.jsx("div",{className:"flex items-center justify-center py-20",children:r.jsx(rt,{size:24,className:"animate-spin text-gray-400"})}):z?r.jsxs("div",{style:{position:"relative",overflow:"hidden",borderRadius:14,background:"linear-gradient(135deg, #0F0B2E 0%, #1A1145 40%, #2D1B69 70%, #3D2580 100%)",padding:"28px 32px"},children:[r.jsx("div",{style:{position:"absolute",top:-30,right:-30,width:140,height:140,borderRadius:"50%",background:"rgba(99, 91, 255, 0.08)"}}),r.jsxs("div",{className:"flex items-center gap-8",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"inline-flex items-center gap-1.5 mb-3",style:{padding:"3px 10px",borderRadius:16,background:"rgba(99, 91, 255, 0.25)",border:"1px solid rgba(99, 91, 255, 0.3)",fontSize:11,color:"#C4B5FD"},children:[r.jsx(kl,{size:13}),"Agenda"]}
930),r.jsxs("div",{style:{fontSize:20,fontWeight:500,color:"#FFFFFF",lineHeight:1.3,marginBottom:8,fontFamily:"Switzer, sans-serif"},children:["Conecte sua agenda",r.jsx("br",{}),r.jsx("span",{style:{background:"linear-gradient(90deg, #F97316, #FB923C, #FBBF24)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"e organize suas entrevistas."})]}),r.jsx("p",{style:{fontSize:13,color:"#A0A0B8",lineHeight:1.6,margin:"0 0 16px",fontFamily:"Switzer, sans-serif"},children:"Visualize compromissos, agende entrevistas e gerencie sua disponibilidade — tudo integrado ao pipeline."}),r.jsxs("div",{className:"flex gap-2.5",children:[r.jsx("button",{onClick:()=>e("/app/conta/integracoes"),className:"flex items-center gap-1.5",style:{padding:"9px 20px",background:"#6C24F5",color:"white",borderRadius:8,fontSize:13,fontWeight:500,fontFamily:"Switzer, sans-serif",border:"none",cursor:"pointer",boxShadow:"0 2px 8px rgba(99,91,255,0.3)"},children:"Google Calendar →"}),r.jsx("button",{onClick:()=>e("/app/conta/integracoes"),className:"flex items-center gap-1.5",style:{padding:"9px 16px",background:"rgba(255,255,255,0.08)",color:"#D4D4E0",border:"1px solid rgba(255,255,255,0.12)",borderRadius:8,fontSize:13,fontFamily:"Switzer, sans-serif",cursor:"pointer"},children:"Outlook"})]})]}),r.jsx("div",{className:"hidden md:flex flex-col gap-2 flex-shrink-0",children:[{label:"Dia, semana e mês"},{label:"Disponibilidade automática"},{label:"Link de agendamento"},{label:"Integrado ao pipeline"}].map(be=>r.jsxs("div",{className:"flex items-center gap-1.5",style:{padding:"6px 12px",borderRadius:8,background:"rgba(99, 91, 255, 0.12)"},children:[r.jsx("span",{style:{fontSize:14,color:"#A78BFA"},children:"●"}),r.jsx("span",{style:{fontSize:12,color:"#D4D4E0",fontFamily:"Switzer, sans-serif"},children:be.label})]},be.label))})]})]}):_?r.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 rounded-lg p-4 text-sm",children:_}):u==="month"?r.jsx(p4e,{refDate:m,events:W,calendars:v,onEventClick:T}):W.length===0?r.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl",children:[r.jsx(SN,{viewMode:u,refDate:m,events:[],calendars:v,now:R,onEventClick:T}),r.jsx("div",{className:"text-center text-sm text-gray-400 py-3 border-t border-gray-100",children:"Nenhum evento neste período"})]}):r.jsx(SN,{viewMode:u,refDate:m,events:W,calendars:v,now:R,onEventClick:T})]}),c==="links"&&r.jsxs("div",{children:[Qe?r.jsx(B4e,{hideTitle:!0,onConfigsLoaded:ft,statusSlot:r.jsx(L4e,{providerLabel:Ve,email:ze,busy:Y!=null&&Y.connected?ae:pe,onDisconnect:Y!=null&&Y.connected?he:ge})}):r.jsx(M4e,{onConnectGoogle:xe,onConnectOutlook:le,googleBusy:ae,microsoftBusy:pe}),o&&r.jsxs("div",{className:"mt-4 inline-flex items-center gap-2 px-3 py-1.5 rounded-md text-xs",style:{background:"#FFFBEB",border:"1px solid #FCD34D",color:"#92400E"},children:[r.jsx(u8,{size:13}),"Modo QA — ambos provedores visíveis para ",t==null?void 0:t.email]})]}),r.jsx(KEe,{isOpen:D,onClose:()=>P(!1),onEventCreated:N}),r.jsx(s4e,{isOpen:!!L,onClose:()=>T(null),event:L,onEventUpdated:()=>{T(null),N()}}),I&&r.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 px-4 py-2 rounded-lg shadow-lg text-sm font-medium z-50",style:{background:I.type==="error"?"#DC2626":"#1F2937",color:"#FFFFFF"},children:I.msg})]})}function dp({icon:e,title:t,description:n,isActive:s,onToggle:i,saving:a,justSaved:o,children:l}){return r.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden",children:[r.jsxs("div",{className:"flex items-start gap-4 p-5",children:[r.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-50 border border-indigo-100 flex items-center justify-center flex-shrink-0",children:r.jsx(e,{size:18,className:"text-indigo-600"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:t}),a&&r.jsx(rt,{size:12,className:"animate-spin text-gray-400"}),o&&r.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-green-600",children:[r.jsx(fn,{size:12})," Salvo"]})]}),r.jsx("p",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:n})]}),r.jsx("button",{type:"button",onClick:()=>i(!s),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors flex-shrink-0 ${s?"bg-indigo-600":"bg-gray-200"}`,"aria-label":s?"Desativar":"Ativar",children:r.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${s?"translate-x-6":"translate-x-1"}`})})]}),s&&l&&r.jsx("div",{className:"border-t border-gray-100 px-5 py-4 bg-gray-50/40 space-y-4 animate-in fade-in slide-in-from-top-1",children:l})]})}const Ox="#E3E8EE",pf="#6C24F5";function up({label:e,hint:t,children:n}){return r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1.5",children:e}),n,t&&r.jsx("p",{className:"text-xs text-gray-500 mt-1.5",children:t})]})}function Nz({children:e,tone:t="amber"}){const n={amber:"bg-amber-50 border-amber-100 text-amber-800",indigo:"bg-indigo-50 border-indigo-100 text-indigo-700"};return r.jsx("div",{className:`text-xs rounded-md border px-3 py-2 ${n[t]}`,children:e})}function Xj({stages:e,value:t,onChange:n,label:s="Etapa de aplicação",placeholder:i="Selecione..."}){return r.jsx(up,{label:s,children:r.jsxs("select",{value:t||"",onChange:a=>n(a.target.value||null),className:"w-full text-sm px-3 py-2 rounded-md bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",children:[r.jsx("option",{value:"",children:i}),(e||[]).map(a=>r.jsx("option",{value:a.id,children:a.name},a.id))]})})}const V4e=[{value:"rating",label:"Rating"},{value:"test_result",label:"Resultado de teste"},{value:"both",label:"Ambos"}];
930function Rz({value:e,onChange:t}){return r.jsx(up,{label:"Critério",children:r.jsx("div",{className:"flex gap-1.5 flex-wrap",children:V4e.map(n=>{const s=e===n.value;return r.jsx("button",{type:"button",onClick:()=>t(n.value),className:"text-xs font-medium rounded-full border transition",style:{padding:"6px 12px",background:s?pf:"#fff",color:s?"#fff":"#374151",borderColor:s?pf:Ox},children:n.label},n.value)})})})}function Dz({criteria:e,value:t,onChange:n,label:s="Threshold mínimo"}){const a=e==="test_result"||e==="both"?Array.from({length:10},(o,l)=>({value:l*10,label:`${l*10}-${(l+1)*10}%`})):Array.from({length:10},(o,l)=>({value:l+1,label:String(l+1)}));return r.jsx(up,{label:s,children:r.jsxs("select",{value:t??"",onChange:o=>n(o.target.value===""?null:Number(o.target.value)),className:"w-full text-sm px-3 py-2 rounded-md bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",children:[r.jsx("option",{value:"",children:"Selecione..."}),a.map(o=>r.jsx("option",{value:o.value,children:o.label},o.value))]})})}function M1({templates:e,value:t,onChange:n,label:s,placeholder:i="Selecione um template..."}){return r.jsxs(up,{label:s,children:[r.jsxs("select",{value:t||"",onChange:a=>n(a.target.value||null),className:"w-full text-sm px-3 py-2 rounded-md bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",children:[r.jsx("option",{value:"",children:i}),(e||[]).map(a=>r.jsx("option",{value:a.id,children:a.name},a.id))]}),(e||[]).length===0&&r.jsx("p",{className:"text-xs text-amber-600 mt-1.5",children:"Nenhum template criado. Vá em Configurações > Definições de Email."})]})}function Iz({label:e="Dias de inatividade",presets:t,value:n,onChange:s,allowCustom:i=!0}){const a=n!=null&&!t.includes(Number(n)),[o,l]=g.useState(a);return r.jsx(up,{label:e,children:r.jsxs("div",{className:"flex gap-1.5 flex-wrap items-center",children:[t.map(c=>{const d=!o&&Number(n)===c;return r.jsxs("button",{type:"button",onClick:()=>{l(!1),s(c)},className:"text-xs font-medium rounded-full border transition",style:{padding:"6px 12px",background:d?pf:"#fff",color:d?"#fff":"#374151",borderColor:d?pf:Ox},children:[c," dias"]},c)}),i&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",onClick:()=>l(!0),className:"text-xs font-medium rounded-full border transition",style:{padding:"6px 12px",background:o?pf:"#fff",color:o?"#fff":"#374151",borderColor:o?pf:Ox},children:"Personalizar"}),o&&r.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[r.jsx("input",{type:"number",min:1,max:365,value:n||"",onChange:c=>{const d=parseInt(c.target.value,10);s(Number.isFinite(d)&&d>0?d:1)},className:"text-sm px-2 py-1 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",style:{border:`1px solid ${Ox}`,width:80}}),r.jsx("span",{className:"text-xs text-gray-500",children:"dias"})]})]})]})})}function H4e({stages:e,values:t,onChange:n,label:s="Etapa(s) de aplicação"}){const i=new Set(t||[]),a=o=>{const l=new Set(i);l.has(o)?l.delete(o):l.add(o),n(Array.from(l))};return r.jsx(up,{label:s,children:r.jsx("div",{className:"space-y-1.5",children:(e||[]).map(o=>r.jsxs("label",{className:"inline-flex items-center gap-2 mr-4 cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:i.has(o.id),onChange:()=>a(o.id),className:"w-4 h-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),r.jsx("span",{className:"text-sm text-gray-700",children:o.name})]},o.id))})})}const gl=(e,t)=>`${e}:${t||"general"}`;function q4e(e,t){if(!e)return t;try{return JSON.parse(e)}catch{return t}}function G4e(){const{user:e}=tr(),[t,n]=g.useState(null),[s,i]=g.useState("job"),[a,o]=g.useState([]),[l,c]=g.useState(""),[d,u]=g.useState([]),[p,m]=g.useState([]),[x,w]=g.useState({}),[y,v]=g.useState({}),[j,k]=g.useState({}),[S,_]=g.useState(!0),F=g.useRef({});g.useEffect(()=>{e!=null&&e.email&&(async()=>{var P;_(!0);try{const L=await ne.functions.invoke("getWorkspaceId",{user_email:e.email}),T=((P=L==null?void 0:L.data)==null?void 0:P.workspace_id)||(L==null?void 0:L.workspace_id);if(!T)return;n(T);const[R,U,I]=await Promise.all([ne.entities.Job.filter({workspace_id:T}),ne.entities.PipelineAutomation.filter({workspace_id:T}),ne.entities.MessageTemplate.filter({workspace_id:T})]),H=(R||[]).filter(X=>["published","paused","closed"].includes(X.status));o(H),m(I||[]);const V={};
930(U||[]).forEach(X=>{V[gl(X.automation_type,X.job_id)]=X}),w(V)}finally{_(!1)}})()},[e==null?void 0:e.email]),g.useEffect(()=>{if(!l||!t){u([]);return}(async()=>{try{await ne.functions.invoke("ensureJobPipeline",{workspace_id:t,job_id:l});const L=(await ne.entities.PipelineStage.filter({workspace_id:t,job_id:l})||[]).filter(T=>!T.is_archived).sort((T,R)=>(T.order||0)-(R.order||0));u(L)}catch{u([])}})()},[l,t]);const A=g.useCallback(P=>{k(L=>({...L,[P]:!0})),F.current[P]&&clearTimeout(F.current[P]),F.current[P]=setTimeout(()=>{k(L=>({...L,[P]:!1}))},1500)},[]),C=g.useCallback(async(P,L,T)=>{if(!t)return;const R=gl(P,L),U=x[R];v(I=>({...I,[R]:!0}));try{let I;U?(await ne.entities.PipelineAutomation.update(U.id,T),I={...U,...T}):I=await ne.entities.PipelineAutomation.create({workspace_id:t,job_id:L||"",automation_type:P,is_active:!1,created_by:(e==null?void 0:e.email)||"",...T}),w(H=>({...H,[R]:I})),A(R)}finally{v(I=>({...I,[R]:!1}))}},[t,x,e==null?void 0:e.email,A]),D=g.useCallback((P,L)=>x[gl(P,L)]||null,[x]);return S?r.jsx("div",{children:r.jsx("div",{className:"py-12 flex justify-center",children:r.jsx(rt,{size:20,className:"animate-spin text-gray-400"})})}):r.jsxs("div",{children:[r.jsxs("div",{className:"border-b border-gray-200 mb-6 flex gap-6",children:[r.jsx(IN,{label:"Por vaga",active:s==="job",onClick:()=>i("job")}),r.jsx(IN,{label:"Geral",active:s==="general",onClick:()=>i("general")})]}),s==="job"?r.jsx(K4e,{jobs:a,selectedJobId:l,onSelectJob:c,stages:d,templates:p,getRecord:D,saving:y,justSaved:j,upsert:C}):r.jsx(Y4e,{templates:p,getRecord:D,saving:y,justSaved:j,upsert:C})]})}function IN({label:e,active:t,onClick:n}){return r.jsx("button",{type:"button",onClick:n,className:`pb-2.5 text-sm font-medium border-b-2 -mb-px transition-colors ${t?"text-indigo-600 border-indigo-600":"text-gray-500 border-transparent hover:text-gray-700"}`,children:e})}function K4e({jobs:e,selectedJobId:t,onSelectJob:n,stages:s,templates:i,getRecord:a,saving:o,justSaved:l,upsert:c}){return r.jsxs("div",{className:"space-y-5 max-w-3xl",children:[r.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4 flex items-center gap-3",children:[r.jsx(On,{size:16,className:"text-gray-500"}),r.jsx("label",{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:"Selecionar vaga:"}),r.jsxs("select",{value:t,onChange:d=>n(d.target.value),className:"flex-1 text-sm px-3 py-2 rounded-md bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-100 focus:border-indigo-400",children:[r.jsx("option",{value:"",children:"Selecione uma vaga..."}),e.map(d=>r.jsxs("option",{value:d.id,children:[d.title," ",d.status!=="published"?`(${d.status})`:""]},d.id))]})]}),t?r.jsxs(r.Fragment,{children:[r.jsx(X4e,{jobId:t,record:a("auto_reject",t),stages:s,templates:i,saving:o,justSaved:l,upsert:c}),r.jsx(J4e,{jobId:t,record:a("auto_approve",t),stages:s,templates:i,saving:o,justSaved:l,upsert:c}),r.jsx(Q4e,{jobId:t,record:a("warmup",t),stages:s,templates:i,saving:o,justSaved:l,upsert:c}),r.jsx(PN,{type:"application_confirmation",jobId:t,record:a("application_confirmation",t),templates:i,saving:o,justSaved:l,upsert:c,icon:mr,title:"Confirmação de candidatura",description:"Envia email automático ao candidato quando é adicionado ao pipeline desta vaga.",templateLabel:"Template de email"}),r.jsx(PN,{type:"rejection_feedback",jobId:t,record:a("rejection_feedback",t),templates:i,saving:o,justSaved:l,upsert:c,icon:mS,title:"Feedback automático de reprovação",description:"Envia email de feedback quando candidato é reprovado manualmente.",templateLabel:"Template de email de feedback"})]}):r.jsx("div",{className:"bg-white border border-dashed border-gray-200 rounded-lg py-16 text-center text-sm text-gray-500",children:"Selecione uma vaga para configurar automações."})]})}function Y4e({templates:e,getRecord:t,saving:n,justSaved:s,upsert:i}){return r.jsxs("div",{className:"space-y-5 max-w-3xl",children:[r.jsx(BN,{type:"inactivity_alert",record:t("inactivity_alert",null),presets:[7,14,21,30],defaultDays:14,allowCustom:!1,saving:n,justSaved:s,upsert:i,icon:Di,title:"Alerta de inatividade",description:"Alerta in-app quando candidatos estão parados em qualquer etapa há muitos dias."}),r.jsx(BN,{type:"auto_archive",record:t("auto_archive",null),presets:[30,60,90],defaultDays:60,allowCustom:!0,saving:n,justSaved:s,upsert:i,icon:mU,title:"Auto-arquivar",description:"Move candidatos automaticamente para Arquivado após período de inatividade."}),r.jsx(Z4e,{record:t("new_candidate_notification",null),saving:n,justSaved:s,upsert:i})]})}function X4e({jobId:e,record:t,stages:n,templates:s,saving:i,justSaved:a,upsert:o}){const l=gl("auto_reject",e),c=!!(t!=null&&t.is_active),d=u=>o("auto_reject",e,u);return r.jsxs(dp,{icon:yl,title:"Reprovação automática",description:"Reprova candidatos automaticamente quando o rating ou resultado de teste fica abaixo do critério definido.",isActive:c,onToggle:u=>d({is_active:u,threshold_operator:"below"}),saving:i[l],justSaved:a[l],children:[r.jsx(Xj,{stages:n,value:t==null?void 0:t.stage_id,onChange:u=>d({stage_id:u})}
930),r.jsx(Rz,{value:t==null?void 0:t.criteria_type,onChange:u=>d({criteria_type:u,threshold_value:null})}),r.jsx(Dz,{criteria:t==null?void 0:t.criteria_type,value:t==null?void 0:t.threshold_value,onChange:u=>d({threshold_value:u})}),r.jsx(M1,{templates:s,value:t==null?void 0:t.email_template_id,onChange:u=>d({email_template_id:u}),label:"Template de email de feedback"}),r.jsx(Nz,{children:"Para resultado de teste, uma campanha de assessments deve estar vinculada à vaga."})]})}function J4e({jobId:e,record:t,stages:n,templates:s,saving:i,justSaved:a,upsert:o}){const l=gl("auto_approve",e),c=!!(t!=null&&t.is_active),d=u=>o("auto_approve",e,u);return r.jsxs(dp,{icon:Mi,title:"Aprovação e convite automático",description:"Avança candidatos automaticamente quando atingem o critério e envia convite para próxima fase.",isActive:c,onToggle:u=>d({is_active:u,threshold_operator:"above"}),saving:i[l],justSaved:a[l],children:[r.jsx(Xj,{stages:n,value:t==null?void 0:t.stage_id,onChange:u=>d({stage_id:u})}),r.jsx(Rz,{value:t==null?void 0:t.criteria_type,onChange:u=>d({criteria_type:u,threshold_value:null})}),r.jsx(Dz,{criteria:t==null?void 0:t.criteria_type,value:t==null?void 0:t.threshold_value,onChange:u=>d({threshold_value:u})}),r.jsx(Xj,{stages:n,value:t==null?void 0:t.target_stage_id,onChange:u=>d({target_stage_id:u}),label:"Mover para etapa"}),r.jsx(M1,{templates:s,value:t==null?void 0:t.email_template_id,onChange:u=>d({email_template_id:u}),label:"Template de email de convite"}),r.jsx(Nz,{children:"Para resultado de teste, uma campanha de assessments deve estar vinculada à vaga."})]})}function Q4e({jobId:e,record:t,stages:n,templates:s,saving:i,justSaved:a,upsert:o}){const l=gl("warmup",e),c=!!(t!=null&&t.is_active),d=x=>o("warmup",e,x),u=q4e(t==null?void 0:t.config_json,{}),p=Array.isArray(u.stage_ids)?u.stage_ids:[],m=x=>{d({config_json:JSON.stringify({...u,stage_ids:x})})};return r.jsxs(dp,{icon:LV,title:"Warm-up de candidatos",description:"Notifica quando candidatos estão parados e permite enviar email de aquecimento.",isActive:c,onToggle:x=>d({is_active:x}),saving:i[l],justSaved:a[l],children:[r.jsx(H4e,{stages:n,values:p,onChange:m}),r.jsx(Iz,{presets:[7,14,21,30],value:t==null?void 0:t.days_threshold,onChange:x=>d({days_threshold:x}),allowCustom:!0}),r.jsx(M1,{templates:s,value:t==null?void 0:t.email_template_id,onChange:x=>d({email_template_id:x}),label:"Template de email de aquecimento (opcional)"})]})}function PN({type:e,jobId:t,record:n,templates:s,saving:i,justSaved:a,upsert:o,icon:l,title:c,description:d,templateLabel:u}){const p=gl(e,t),m=!!(n!=null&&n.is_active),x=w=>o(e,t,w);return r.jsx(dp,{icon:l,title:c,description:d,isActive:m,onToggle:w=>x({is_active:w}),saving:i[p],justSaved:a[p],children:r.jsx(M1,{templates:s,value:n==null?void 0:n.email_template_id,onChange:w=>x({email_template_id:w}),label:u})})}function BN({type:e,record:t,presets:n,defaultDays:s,allowCustom:i,saving:a,justSaved:o,upsert:l,icon:c,title:d,description:u}){const p=gl(e,null),m=!!(t!=null&&t.is_active),x=w=>l(e,null,w);return r.jsx(dp,{icon:c,title:d,description:u,isActive:m,onToggle:w=>x({is_active:w,days_threshold:(t==null?void 0:t.days_threshold)||s}),saving:a[p],justSaved:o[p],children:r.jsx(Iz,{presets:n,value:(t==null?void 0:t.days_threshold)||s,onChange:w=>x({days_threshold:w}),allowCustom:i})})}function Z4e({record:e,saving:t,justSaved:n,upsert:s}){const i=gl("new_candidate_notification",null),a=!!(e!=null&&e.is_active);return r.jsx(dp,{icon:n8,title:"Notificação de novo candidato",description:"Notificação in-app quando um novo candidato é adicionado ao pipeline.",isActive:a,onToggle:o=>s("new_candidate_notification",null,{is_active:o}),saving:t[i],justSaved:n[i]})}function eFe(){const[e,t]=g.useState("loading"),[n,s]=g.useState("");return g.useEffect(()=>{(async()=>{const a=new URLSearchParams(window.location.search),o=a.get("code"),l=a.get("state"),c=a.get("error");if(c){t("error"),s(`Autorização cancelada: ${c}`);return}if(!o||!l){t("error"),s("Parâmetros inválidos no callback.");return}const d=window.location.origin+"/app/ats/google-auth-callback";try{const u=await ne.functions.invoke("googleSchedulingAuthCallback",{code:o,state:l,redirect_uri:d}),p=(u==null?void 0:u.data)||u;if(p!=null&&p.success){t("success"),s(`Conectado como ${p.google_email||"sua conta Google"}.`);try{localStorage.setItem("scheduling_oauth_done",Date.now().toString())}catch{}setTimeout(()=>{try{window.close()}catch{}},1500)}else t("error"),s((p==null?void 0:p.error)||"Falha ao conectar.")}catch(u){t("error"),s((u==null?void 0:u.message)||"Falha ao conectar.")}})()},[]),r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 px-4",children:r.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-8 max-w-md w-full text-center",children:[e==="loading"&&r.jsxs(r.Fragment,{children:[r.jsx(rt,{className:"w-10 h-10 text-blue-600 animate-spin mx-auto mb-4"}),r.jsx("h1",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Conectando sua conta Google..."}),r.jsx("p",{className:"text-sm text-gray-500",children:"Aguarde alguns segundos."})]}),e==="success"&&r.jsxs(r.Fragment,{children:[r.jsx(Mi,{className:"w-12 h-12 text-green-600 mx-auto mb-4"}),r.jsx("h1",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Conectado com sucesso!"}),r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:n}),r.jsx("p",{className:"text-xs text-gray-400",children:"Esta janela vai fechar automaticamente."})]}),e==="error"&&r.jsxs(r.Fragment,{children:[r.jsx(xl,{className:"w-12 h-12 text-red-600 mx-auto mb-4"}),r.jsx("h1",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Erro ao conectar"}),r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:n}),r.jsx("button",{onClick:()=>{try{window.close()}catch{}},className:"text-sm px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200",children:"Fechar"})]})]})})}function tFe(){const[e,t]=g.useState("loading"),[n,s]=g.useState("");return g.useEffect(()=>{(async()=>{const a=new URLSearchParams(window.location.search),o=a.get("code"),l=a.get("state"),c=a.get("error");
930if(c){t("error"),s(`Autorização cancelada: ${c}`);return}if(!o||!l){t("error"),s("Parâmetros inválidos no callback.");return}const d=window.location.origin+"/app/ats/microsoft-auth-callback";try{const u=await ne.functions.invoke("microsoftSchedulingAuthCallback",{code:o,state:l,redirect_uri:d}),p=(u==null?void 0:u.data)||u;if(p!=null&&p.success){t("success"),s(`Conectado como ${p.ms_email||"sua conta Microsoft"}.`);try{localStorage.setItem("microsoft_scheduling_oauth_done",Date.now().toString())}catch{}setTimeout(()=>{try{window.close()}catch{}},1500)}else t("error"),s((p==null?void 0:p.error)||"Falha ao conectar.")}catch(u){t("error"),s((u==null?void 0:u.message)||"Falha ao conectar.")}})()},[]),r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 px-4",children:r.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-8 max-w-md w-full text-center",children:[e==="loading"&&r.jsxs(r.Fragment,{children:[r.jsx(rt,{className:"w-10 h-10 text-blue-600 animate-spin mx-auto mb-4"}),r.jsx("h1",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Conectando sua conta Microsoft..."}),r.jsx("p",{className:"text-sm text-gray-500",children:"Aguarde alguns segundos."})]}),e==="success"&&r.jsxs(r.Fragment,{children:[r.jsx(Mi,{className:"w-12 h-12 text-green-600 mx-auto mb-4"}),r.jsx("h1",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Conectado com sucesso!"}),r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:n}),r.jsx("p",{className:"text-xs text-gray-400",children:"Esta janela vai fechar automaticamente."})]}),e==="error"&&r.jsxs(r.Fragment,{children:[r.jsx(xl,{className:"w-12 h-12 text-red-600 mx-auto mb-4"}),r.jsx("h1",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Erro ao conectar"}),r.jsx("p",{className:"text-sm text-gray-500 mb-4",children:n}),r.jsx("button",{onClick:()=>{try{window.close()}catch{}},className:"text-sm px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200",children:"Fechar"})]})]})})}const nFe="var(--sv-danger, #DC2626)";function Mx(e){return String(e??"").replace(/\D/g,"")}function rFe(e){const t=Mx(e);return t?`R$ ${Number(t).toLocaleString("pt-BR")}`:""}function Lx({label:e,value:t,type:n="text",options:s=[],emptyLabel:i,placeholder:a,onSave:o,copyable:l=!0,extraAction:c,fontSize:d=13}){const[u,p]=g.useState(t),[m,x]=g.useState(!1),[w,y]=g.useState(""),[v,j]=g.useState(!1),[k,S]=g.useState(null),[_,F]=g.useState(!1),A=g.useRef(null);g.useEffect(()=>{p(t)},[t]),g.useEffect(()=>{m&&A.current&&A.current.focus()},[m]);const C=n==="multiselect",D=n!=="readonly",P=C?Array.isArray(u)&&u.length>0:u!=null&&String(u)!=="",L=(()=>{if(!P)return null;if(n==="money")return rFe(u);if(n==="select"){const V=s.find(X=>X.value===u);return V?V.label:String(u)}return C?u.map(V=>{var X;return((X=s.find(N=>N.value===V))==null?void 0:X.label)||V}).join(", "):String(u)})(),T=()=>{D&&(S(null),y(C?Array.isArray(u)?[...u]:[]:n==="money"?Mx(u):u==null?"":String(u)),x(!0))},R=async V=>{const X=n==="money"?Mx(V):V;x(!1);const N=u;if(!(C?JSON.stringify(X)===JSON.stringify(N||[]):String(X??"")===String(N??""))&&(p(X),S(null),!!o)){j(!0);try{await o(X)}catch{p(N),S("Não foi possível salvar")}j(!1)}},U=()=>{x(!1),S(null)},I=async V=>{V.stopPropagation();try{await navigator.clipboard.writeText(C?L:String(u)),F(!0),setTimeout(()=>F(!1),1600)}catch{}},H={fontSize:d,fontFamily:"var(--sv-font)",color:"var(--sv-ink)",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-sm)",padding:"3px 8px",outline:"none",background:"transparent",width:"100%",maxWidth:260};return r.jsxs("div",{style:{fontFamily:"var(--sv-font)",opacity:v?.6:1},children:[e&&r.jsx("div",{style:{fontSize:11,color:"var(--sv-ink-3)",marginBottom:2},children:e}),m?C?r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"4px 0"},children:[s.map(V=>{const X=Array.isArray(w)&&w.includes(V.value);return r.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:d,color:"var(--sv-ink)"},children:[r.jsx("input",{type:"checkbox",checked:X,onChange:()=>{const N=new Set(Array.isArray(w)?w:[]);N.has(V.value)?N.delete(V.value):N.add(V.value),y(Array.from(N))}}),V.label]},V.value)}),r.jsxs("div",{style:{display:"flex",gap:8,marginTop:4},children:[r.jsx("button",{type:"button",onClick:()=>R(w),style:{fontSize:12,color:"var(--sv-accent)",background:"none",border:"none",cursor:"pointer",padding:0,fontFamily:"var(--sv-font)"},children:"Salvar"}),r.jsx("button",{type:"button",onClick:U,style:{fontSize:12,color:"var(--sv-ink-3)",background:"none",border:"none",cursor:"pointer",padding:0,fontFamily:"var(--sv-font)"},children:"Cancelar"})]})]}):n==="select"?r.jsxs("select",{ref:A,value:w,onChange:V=>y(V.target.value),onBlur:()=>R(w),onKeyDown:V=>{V.key==="Enter"&&R(V.target.value),V.key==="Escape"&&U()},style:H,children:[r.jsx("option",{value:"",children:a||"Selecionar"}),s.map(V=>r.jsx("option",{value:V.value,children:V.label},V.value))]}):r.jsx("input",{ref:A,value:w,placeholder:a,onChange:V=>y(n==="money"?Mx(V.target.value):V.target.value),onBlur:()=>R(w),onKeyDown:V=>
930{V.key==="Enter"&&R(w),V.key==="Escape"&&U()},style:H}):r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{onClick:T,style:{fontSize:d,color:P?"var(--sv-ink)":"var(--sv-ink-3)",fontStyle:P?"normal":"italic",cursor:D?"pointer":"default"},children:P?L:i||"Não disponível"}),D&&r.jsx($r,{size:13,onClick:T,style:{color:"var(--sv-ink-3)",opacity:.4,cursor:"pointer",flexShrink:0},onMouseEnter:V=>{V.currentTarget.style.opacity=1},onMouseLeave:V=>{V.currentTarget.style.opacity=.4}}),P&&l&&r.jsx(Js,{size:13,onClick:I,style:{color:"var(--sv-ink-3)",opacity:.4,cursor:"pointer",flexShrink:0},onMouseEnter:V=>{V.currentTarget.style.opacity=1},onMouseLeave:V=>{V.currentTarget.style.opacity=.4}}),_&&r.jsx("span",{style:{fontSize:11,color:"var(--sv-ink-2)"},children:"Copiado"}),c]}),k&&r.jsx("div",{style:{fontSize:11,color:nFe,marginTop:2},children:k})]})}function sFe({profile:e,onEmail:t,onEdit:n,onFieldSave:s}){const i=(e==null?void 0:e.full_name)||"Candidato",a=MP(i),o=e==null?void 0:e.avatar_url,l=Ai((e==null?void 0:e.headline)||(e==null?void 0:e.current_title)),c=Ai(e==null?void 0:e.location),d=Ai(e==null?void 0:e.email),u=Ai(e==null?void 0:e.phone),p=(e==null?void 0:e.linkedin_url)||"",[m,x]=g.useState(!1),w=async S=>{S.stopPropagation();try{await navigator.clipboard.writeText(d),x(!0),setTimeout(()=>x(!1),1600)}catch{}},y=d&&d.toLowerCase().endsWith("@summit.internal"),v=d&&!y,j=((e==null?void 0:e.full_name)||"").trim().split(/\s+/)[0]||"",k=u?r.jsx("a",{href:`https://wa.me/${u.replace(/\D/g,"")}?text=${encodeURIComponent(`Oi, ${j}, tudo bem?`)}`,target:"_blank",rel:"noopener noreferrer",title:"Abrir no WhatsApp",style:{display:"inline-flex",alignItems:"center",flexShrink:0,marginLeft:2},children:r.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"#25D366",children:r.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.001-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"})})}):null;return r.jsx("div",{children:r.jsx("div",{style:{background:"var(--sv-surface)",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-lg)",overflow:"hidden",boxShadow:"var(--sv-sh-card)"},children:r.jsxs("div",{style:{borderLeft:"3px solid var(--sv-accent)",padding:"24px 28px",position:"relative"},children:[r.jsx("button",{onClick:n,title:"Editar",style:{position:"absolute",top:20,right:20,width:28,height:28,display:"grid",placeItems:"center",background:"transparent",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-sm)",cursor:"pointer",color:"var(--sv-ink-3)",transition:"background 0.12s, color 0.12s"},onMouseEnter:S=>{S.currentTarget.style.background="var(--sv-inset)",S.currentTarget.style.color="var(--sv-ink-2)"},onMouseLeave:S=>{S.currentTarget.style.background="transparent",S.currentTarget.style.color="var(--sv-ink-3)"},children:r.jsx($r,{size:13})}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:20,paddingRight:36},children:[o?r.jsx("img",{src:o,alt:i,style:{width:52,height:52,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):r.jsx("div",{style:{width:52,height:52,borderRadius:"50%",background:"var(--sv-accent)",color:"#fff",fontSize:17,fontWeight:600,fontFamily:"var(--sv-font)",display:"grid",placeItems:"center",flexShrink:0},children:a}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[r.jsx("h1",{style:{margin:0,fontSize:19,fontWeight:700,color:"var(--sv-ink)",fontFamily:"var(--sv-font)",letterSpacing:"-0.02em",lineHeight:1.2},children:i}),p&&r.jsx("a",{href:Qm(p),target:"_blank",rel:"noopener noreferrer",title:"LinkedIn",style:{display:"flex",flexShrink:0},children:r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#0A66C2",children:r.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})})]}),r.jsx("div",{style:{marginTop:8},children:r.jsx(Lx,{value:l,type:"text",placeholder:"Headline",emptyLabel:"Headline",fontSize:13,copyable:!1,onSave:S=>s==null?void 0:s("headline",S)})}),r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"4px 20px",marginTop:12},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[r.jsx(ma,{size:12,style:{color:"var(--sv-ink-3)",flexShrink:0}}),r.jsx(Lx,{value:c,type:"text",emptyLabel:"Inserir local",fontSize:12.5,copyable:!1,onSave:S=>s==null?void 0:s("location",S)})]}),v?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[r.jsxs("button",{onClick:t,style:{display:"flex",alignItems:"center",gap:4,fontSize:12.5,color:"var(--sv-accent)",fontFamily:"var(--sv-font)",background:"none",border:"none",padding:0,cursor:"pointer",minWidth:0},title:"Enviar email",children:[r.jsx(mr,{size:12,style:{color:"var(--sv-ink-3)",flexShrink:0}}),r.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d})]}),r.jsx("button",{type:"button",onClick:w,title:"Copiar",style:{width:20,height:20,display:"grid",placeItems:"center",background:"none",border:"none",padding:0,cursor:"pointer",color:"var(--sv-ink-3)",opacity:.4,flexShrink:0},onMouseEnter:S=>{S.currentTarget.style.opacity=1},onMouseLeave:S=>{S.currentTarget.style.opacity=.4},children:r.jsx(Js,{size:13})}),m&&r.jsx("span",{style:{fontSize:11,color:"var(--sv-accent)",flexShrink:0},children:"Copiado"})]}):r.jsxs("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:4,fontSize:12.5,color:"var(--sv-accent)",fontFamily:"var(--sv-font)",background:"none",border:"none",padding:0,cursor:"pointer",textDecoration:"underline",textUnderlineOffset:2},children:[r.jsx(mr,{size:12,style:{color:"var(--sv-ink-3)",flexShrink:0}}),"Inserir e-mail"]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[r.jsx(xS,{size:12,style:{color:"var(--sv-ink-3)",flexShrink:0}}),r.jsx(Lx,{value:u,type:"text",emptyLabel:"Inserir telefone",fontSize:12.5,extraAction:k,onSave:S=>s==null?void 0:s("phone",S)})]})]})]})]})]})})})}function iFe(e,t){if(!t)return"";const n=(e||[]).find(s=>s.value===t);return n?n.label:t}function aFe(e,t,n,s){return(e||[]).filter(i=>i&&i[t]).map(i=>{const a=iFe(s,i[n]);return`${i[t]}${a?` (${a})`:""}`}).join(", ")}function oFe({value:e,keyName:t,levelName:n,keyLabel:s,levelLabel:i,levelOptions:a=[],onSave:o,readOnly:l=!1}){const c=Array.isArray(e)?e:[],[d,u]=g.useState(!1),[p,m]=g.useState([]),[x,w]=g.useState(!1),[y,v]=g.useState(null),[j,k]=g.useState(!1),[S,_]=g.useState(!1),F=aFe(c,t,n,a),A=()=>{l||(m(c.map(P=>({name:(P==null?void 0:P[t])||"",level:(P==null?void 0:P[n])||""}))),v(null),u(!0))},C=async()=>
930{if(F)try{await navigator.clipboard.writeText(F),k(!0),setTimeout(()=>k(!1),1200)}catch{}},D=async()=>{const P=p.filter(L=>L.name&&L.name.trim()).map(L=>({[t]:L.name.trim(),[n]:L.level||""}));w(!0),v(null),u(!1);try{await(o==null?void 0:o(P))}catch{v("Erro ao salvar"),u(!0)}w(!1)};return d?r.jsxs("div",{style:{fontFamily:"var(--sv-font)"},children:[r.jsxs("div",{style:{display:"flex",gap:8,marginBottom:4},children:[r.jsx("span",{style:{flex:1,fontSize:10,color:"var(--sv-ink-3)"},children:s}),r.jsx("span",{style:{flex:1,fontSize:10,color:"var(--sv-ink-3)"},children:i}),r.jsx("span",{style:{width:20}})]}),p.map((P,L)=>{const T=(a||[]).some(R=>R.value===P.level)||!P.level?a:[...a,{value:P.level,label:P.level}];return r.jsxs("div",{style:{display:"flex",gap:8,marginBottom:6,alignItems:"center"},children:[r.jsx("input",{value:P.name,onChange:R=>m(U=>U.map((I,H)=>H===L?{...I,name:R.target.value}:I)),style:{flex:1,fontSize:13,fontFamily:"var(--sv-font)",color:"var(--sv-ink)",padding:"4px 8px",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-sm)",outline:"none",minWidth:0}}),r.jsxs("select",{value:P.level||"",onChange:R=>m(U=>U.map((I,H)=>H===L?{...I,level:R.target.value}:I)),style:{flex:1,fontSize:13,fontFamily:"var(--sv-font)",color:"var(--sv-ink)",padding:"4px 8px",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-sm)",outline:"none",background:"#fff",minWidth:0},children:[r.jsx("option",{value:"",children:"—"}),T.map(R=>r.jsx("option",{value:R.value,children:R.label},R.value))]}),r.jsx("button",{type:"button",onClick:()=>m(R=>R.filter((U,I)=>I!==L)),style:{width:20,height:20,display:"grid",placeItems:"center",border:"none",background:"none",cursor:"pointer",color:"var(--sv-ink-3)",padding:0},children:r.jsx(Jt,{size:13})})]},L)}),r.jsxs("button",{type:"button",onClick:()=>m(P=>[...P,{name:"",level:""}]),style:{display:"inline-flex",alignItems:"center",gap:4,fontSize:12,color:"var(--sv-accent)",background:"none",border:"none",cursor:"pointer",padding:"2px 0",fontFamily:"var(--sv-font)"},children:[r.jsx(Ln,{size:12})," Adicionar"]}),r.jsxs("div",{style:{display:"flex",gap:6,marginTop:8},children:[r.jsx("button",{type:"button",onClick:D,disabled:x,style:{fontSize:12,fontWeight:500,color:"#fff",background:"var(--sv-accent)",border:"none",borderRadius:"var(--sv-r-sm)",padding:"4px 12px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Salvar"}),r.jsx("button",{type:"button",onClick:()=>{u(!1),v(null)},style:{fontSize:12,color:"var(--sv-ink-2)",background:"none",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-sm)",padding:"4px 12px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Cancelar"})]}),y&&r.jsx("div",{style:{fontSize:11,color:"#DC2626",marginTop:4,fontFamily:"var(--sv-font)"},children:y})]}):r.jsxs("div",{onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),style:{display:"flex",alignItems:"center",gap:6,fontFamily:"var(--sv-font)"},children:[F?r.jsx("span",{onClick:A,style:{fontSize:13,color:"var(--sv-ink)",cursor:l?"default":"pointer"},children:F}):r.jsx("span",{onClick:A,style:{fontSize:13,color:"var(--sv-ink-3)",fontStyle:"italic",cursor:l?"default":"pointer"},children:"Não disponível"}),!l&&r.jsx("button",{type:"button",onClick:A,style:{border:"none",background:"none",cursor:"pointer",padding:0,color:"var(--sv-ink-3)",opacity:S?1:.4,display:"grid",placeItems:"center"},children:r.jsx($r,{size:11})}),F&&r.jsx("button",{type:"button",onClick:C,title:j?"Copiado":"Copiar",style:{border:"none",background:"none",cursor:"pointer",padding:0,color:j?"var(--sv-accent)":"var(--sv-ink-3)",opacity:S?1:.4,display:"grid",placeItems:"center"},children:r.jsx(Js,{size:11})}),y&&r.jsx("span",{style:{fontSize:11,color:"#DC2626"},children:y})]})}function lFe({value:e,onSave:t,readOnly:n=!1}){const s=Array.isArray(e)?e:[],[i,a]=g.useState(!1),[o,l]=g.useState([]),[c,d]=g.useState(""),[u,p]=g.useState(!1),[m,x]=g.useState(null),[w,y]=g.useState(!1),[v,j]=g.useState(!1),k={fontSize:11,fontWeight:500,background:"var(--sv-accent-muted)",color:"var(--sv-accent)",borderRadius:4,padding:"2px 8px",fontFamily:"var(--sv-font)",display:"inline-flex",alignItems:"center",gap:4},S=()=>{n||(l(s.map(C=>({id:C.id,name:C.name||C.label||C.id}))),d(""),x(null),a(!0))},_=async()=>{const C=s.map(D=>D.name||D.label||D.id).join(", ");
930if(C)try{await navigator.clipboard.writeText(C),y(!0),setTimeout(()=>y(!1),1200)}catch{}},F=async C=>{if(C.key!=="Enter")return;C.preventDefault();const D=c.trim();if(!(!D||u)){p(!0),x(null);try{const P=await ne.functions.invoke("resolveSkill",{raw_term:D}),L=(P==null?void 0:P.data)||P,T=L==null?void 0:L.skill_id;T&&(l(R=>R.some(U=>U.id===T)?R:[...R,{id:T,name:D}]),d(""))}catch{x("Erro ao adicionar")}p(!1)}},A=async()=>{const C=o.map(D=>D.id);x(null),a(!1);try{await(t==null?void 0:t(C))}catch{x("Erro ao salvar"),a(!0)}};return i?r.jsxs("div",{style:{fontFamily:"var(--sv-font)"},children:[r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:6},children:o.map((C,D)=>r.jsxs("span",{style:k,children:[C.name,r.jsx("button",{type:"button",onClick:()=>l(P=>P.filter((L,T)=>T!==D)),style:{border:"none",background:"none",cursor:"pointer",padding:0,color:"var(--sv-accent)",display:"grid",placeItems:"center"},children:r.jsx(Jt,{size:10})})]},C.id||D))}),r.jsx("input",{value:c,onChange:C=>d(C.target.value),onKeyDown:F,disabled:u,placeholder:"Adicionar competência e pressionar Enter",style:{width:"100%",fontSize:13,fontFamily:"var(--sv-font)",color:"var(--sv-ink)",padding:"4px 8px",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-sm)",outline:"none",opacity:u?.6:1}}),r.jsxs("div",{style:{display:"flex",gap:6,marginTop:8},children:[r.jsx("button",{type:"button",onClick:A,style:{fontSize:12,fontWeight:500,color:"#fff",background:"var(--sv-accent)",border:"none",borderRadius:"var(--sv-r-sm)",padding:"4px 12px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Salvar"}),r.jsx("button",{type:"button",onClick:()=>{a(!1),x(null)},style:{fontSize:12,color:"var(--sv-ink-2)",background:"none",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-sm)",padding:"4px 12px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Cancelar"})]}),m&&r.jsx("div",{style:{fontSize:11,color:"#DC2626",marginTop:4},children:m})]}):r.jsxs("div",{onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:6,fontFamily:"var(--sv-font)"},children:[s.length===0?r.jsx("span",{onClick:S,style:{fontSize:13,color:"var(--sv-ink-3)",fontStyle:"italic",cursor:n?"default":"pointer"},children:"Não disponível"}):r.jsx("span",{onClick:S,style:{display:"flex",flexWrap:"wrap",gap:4,cursor:n?"default":"pointer"},children:s.map((C,D)=>r.jsx("span",{style:k,children:C.name||C.label||C.id},C.id||D))}),!n&&r.jsx("button",{type:"button",onClick:S,style:{border:"none",background:"none",cursor:"pointer",padding:0,color:"var(--sv-ink-3)",opacity:v?1:.4,display:"grid",placeItems:"center"},children:r.jsx($r,{size:11})}),s.length>0&&r.jsx("button",{type:"button",onClick:_,title:w?"Copiado":"Copiar",style:{border:"none",background:"none",cursor:"pointer",padding:0,color:w?"var(--sv-accent)":"var(--sv-ink-3)",opacity:v?1:.4,display:"grid",placeItems:"center"},children:r.jsx(Js,{size:11})}),m&&r.jsx("span",{style:{fontSize:11,color:"#DC2626"},children:m})]})}const cFe=[{value:"Elementary",label:"Básico"},{value:"Limited Working",label:"Intermediário"},{value:"Professional Working",label:"Avançado"},{value:"Full Professional",label:"Fluente"},{value:"Native or Bilingual",label:"Nativo"}],dFe=["cv_file_url","source"],uFe=e=>e?String(e).charAt(0).toUpperCase()+String(e).slice(1):"";function fFe(e){try{return JSON.parse((e==null?void 0:e.custom_fields_json)||"{}")||{}}catch{return{}}}function ON(e){return e.field_type==="number"?e.source_path==="salary_current"||e.source_path==="salary_expectation"?"money":"text":e.field_type==="select"||e.field_type==="boolean"?"select":e.field_type==="multi_select"?"multiselect":"text"}function lw(e){const t=e.options||[];if(e.field_type==="boolean")return[{value:"",label:"—"},{value:"true",label:"Sim"},{value:"false",label:"Não"}];if(e.field_type==="select")return[{value:"",label:"—"},...t.map(n=>({value:n,label:(Qb==null?void 0:Qb[n])||n}))];if(e.field_type==="multi_select")return t.map(n=>({value:n,label:uFe(n)}))}function pFe(e,t,n,s,i){const a=t||{},o={key:e.field_key,label:e.field_label,savePath:e.source_path};if(!e.is_native){const u=i==null?void 0:i[e.field_key];if(e.field_type==="pair_list")return{...o,type:"text",isCustom:!0,fieldKey:e.f
930ield_key,isPairList:!0,rawValue:Array.isArray(u)?u:[],pairKeyName:"name",pairLevelName:"level",pairKeyLabel:e.field_label,pairLevelLabel:"Nível",pairLevelOptions:(e.options||[]).map(x=>({value:x,label:x})),value:(Array.isArray(u)?u:[]).map(x=>`${(x==null?void 0:x.name)||""}${x!=null&&x.level?` (${x.level})`:""}`).join(", ")||null};const p=ON(e);let m;return p==="multiselect"?m=Array.isArray(u)?u:[]:p==="money"?m=u:m=Ai(u==null?null:String(u)),{...o,type:p,options:lw(e),value:m,isCustom:!0,fieldKey:e.field_key}}const l=e.source_path;if(l==="languages")return{...o,type:"text",isPairList:!0,rawValue:a.languages||[],value:Ai((a.languages||[]).map(u=>`${u.language}${u.level?` (${u.level})`:""}`).join(", "))};if(l==="cv_file_url")return{...o,type:"readonly",value:a.cv_file_url?"Ver currículo":null,linkHref:a.cv_file_url};if(l==="skill_ids")return{...o,type:"readonly",chips:!0,isSkills:!0,rawValue:s||[],value:(s||[]).map(u=>u.name||u.label||u.id)};if(l==="source"){const u=Ai((n==null?void 0:n.source)||a.source);return{...o,type:"readonly",value:u?qie[u]||u:null}}if(l==="contract_type_current"){const u=Ai(a.contract_type_current);return{...o,type:"select",options:lw(e),value:u}}const c=ON(e),d=a[l];return{...o,type:c,options:lw(e),value:c==="money"?d:c==="multiselect"?d||[]:Ai(d)}}function hFe({profile:e,workspaceTalent:t,skills:n,onFieldSave:s,onCustomFieldSave:i,wsId:a}){const[o,l]=g.useState(!0),[c,d]=g.useState(""),[u,p]=g.useState(null),[m,x]=g.useState(!1),w=g.useCallback(async({ensure:F=!1}={})=>{if(!a)return;if(F)try{await ne.functions.invoke("ensureWorkspaceFieldDefinitions",{workspace_id:a})}catch{}const A=await ne.entities.CustomFieldDefinition.filter({workspace_id:a}).catch(()=>[]);p(A||[])},[a]);g.useEffect(()=>{w({ensure:!0})},[w]);const y=fFe(t),j=(u||[]).filter(F=>F.show_in_summary===!0).sort((F,A)=>(F.order_summary||0)-(A.order_summary||0)).map(F=>pFe(F,e,t,n,y)),k=j.filter(F=>{const A=F.value;return Array.isArray(A)?A.length>0:A!=null&&A!==""&&A!=="Não disponível"}).length,S=c.trim().toLowerCase(),_=S?j.filter(F=>(F.label||"").toLowerCase().includes(S)):j;return r.jsxs("div",{style:{background:"var(--sv-surface)",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-lg)",overflow:"hidden",boxShadow:"var(--sv-sh-card)",marginTop:8},children:[r.jsxs("button",{onClick:()=>l(F=>!F),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",background:"none",border:"none",cursor:"pointer",fontFamily:"var(--sv-font)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--sv-ink)"},children:"Resumo das informações"}),r.jsx("span",{style:{fontSize:11,fontWeight:600,color:"var(--sv-accent)",background:"var(--sv-accent-muted)",borderRadius:10,padding:"1px 8px"},children:k})]}),o?r.jsx(Dc,{size:16,style:{color:"var(--sv-ink-3)"}}):r.jsx(ar,{size:16,style:{color:"var(--sv-ink-3)"}})]}),o&&r.jsxs("div",{style:{padding:"0 16px 14px"},children:[r.jsxs("div",{style:{display:"flex",gap:8,marginBottom:10},children:[r.jsxs("div",{style:{position:"relative",flex:1},children:[r.jsx(Ua,{size:13,style:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)",color:"var(--sv-ink-3)",pointerEvents:"none"}}),r.jsx("input",{value:c,onChange:F=>d(F.target.value),placeholder:"Buscar campo...",style:{width:"100%",fontSize:12,fontFamily:"var(--sv-font)",padding:"7px 10px 7px 30px",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-md)",background:"var(--sv-surface)",outline:"none"}})]}),r.jsx("button",{onClick:()=>x(!0),style:{width:32,height:32,display:"grid",placeItems:"center",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-md)",background:"var(--sv-surface)",cursor:"pointer",color:"var(--sv-ink-3)"},children:r.jsx(Gf,{size:14})})]}),r.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"12px 24px"},children:_.map(F=>r.jsx(mFe,{field:F,onFieldSave:s,onCustomFieldSave:i},F.key))})]}),r.jsx(yz,{isOpen:m,onClose:()=>x(!1),wsId:a,scope:"summary",definitions:u||[],onChanged:()=>w()})]})}function mFe({field:e,onFieldSave:t,onCustomFieldSave:n}){const s=r.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--sv-ink-3)",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:3,fontFamily:"var(--sv-font)"},children:e.label});if(e.isSkills)return r.jsxs("div",{children:[s,r.jsx(lFe,{value:e.rawValue,readOnly:!t,onSave:o=>t==null?void 0:t("skill_ids",o)})]});if(e.chips){const o=Array.isArray(e.value)?e.value:[];return r.jsxs("div",{children:[s,o.length===0?r.jsx("span",{style:{fontSize:13,color:"var(--sv-ink-3)",fontStyle:"italic",fontFamily:"var(--sv-font)"},children:"Não disponível"}):r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:o.map((l,c)=>r.jsx("span",{style:{fontSize:11,fontWeight:500,background:"var(--sv-accent-muted)",color:"var(--sv-accent)",borderRadius:4,padding:"2px 8px",fontFamily:"var(--sv-font)"},children:l},c))})]})}if(e.linkHref)return r.jsxs("div",{children:[s,r.jsx("a",{href:e.linkHref,target:"_blank",rel:"noopener noreferrer",style:{fontSize:13,color:"var(--sv-accent)",fontFamily:"var(--sv-font)",textDecoration:"underline",textUnderlineOffset:2},children:"Ver currículo"})]});const i=e.isCustom?!n:e.type==="readonly"||!e.savePath||dFe.includes(e.savePath);if(e.isPairList){const o=e.isCustom;return r.jsxs("div",{children:[s,r.jsx(oFe,{value:e.rawValue,keyName:e.pairKeyName||"language",levelName:e.pairLevelName||"level",keyLabel:e.pairKeyLabel||"Idioma",levelLabel:e.pairLevelLabel||"Nível",levelOptions:e.pairLevelOptions||cFe,readOnly:o?!n:!t,onSave:l=>o?n==null?void 0:n(e.fieldKey,l):t==null?void 0:t(e.savePath,l)})]})}const a=e.isCustom?o=>n==null?void 0:n(e.fieldKey,o):o=>t==null?void 0:t(e.savePath,o);return r.jsxs("div",{children:[s,r.jsx(Lx,{value:e.value,type:i?"readonly":e.type==="readonly"?"text":e.type,options:e.options,onSave:i?void 0:a})]})}function gFe(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const xFe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yFe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vFe={};function MN(e,t){return(vFe.jsx?yFe:xFe).test(e)}const bFe=/[ \t\n\f\r]/g;function wFe(e){return typeof e=="object"?e.type==="text"?LN(e.value):!1:LN(e)}function LN(e){return e.replace(bFe,"")===""}class f0{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}f0.prototype.normal={};f0.prototype.property={};f0.prototype.space=void 0;function Pz(e,t){const n={},s={};for(const i of e)Object.assign(n,i.property),Object.assign(s,i.normal);return new f0(n,s,t)}function Jj(e){return e.toLowerCase()}class hi{constructor(t,n){this.attribute=n,this.property=t}}hi.prototype.attribute="";hi.prototype.booleanish=!1;hi.prototype.boolean=!1;hi.prototype.commaOrSpaceSeparated=!1;hi.prototype.commaSeparated=!1;hi.prototype.defined=!1;hi.prototype.mustUseProperty=!1;hi.prototype.number=!1;hi.prototype.overloadedBoolean=!1;hi.prototype.property="";hi.prototype.spaceSeparated=!1;hi.prototype.space=void 0;let jFe=0;const dn=cu(),Ar=cu(),Qj=cu(),gt=cu(),Yn=cu(),kf=cu(),ki=cu();function cu(){return 2**++jFe}const Zj=Object.freeze(Object.defineProperty({__proto__:null,boolean:dn,booleanish:Ar,commaOrSpaceSeparated:ki,commaSeparated:kf,number:gt,overloadedBoolean:Qj,spaceSeparated:Yn},Symbol.toStringTag,{value:"Module"})),cw=Object.keys(Zj);class yC extends hi{constructor(t,n,s,i){let a=-1;if(super(t,n),zN(this,"space",i),typeof s=="number")for(;++a<cw.length;){const o=cw[a];zN(this,cw[a],(s&Zj[o])===Zj[o])}}}yC.prototype.defined=!0;function zN(e,t,n){n&&(e[t]=n)}function fp(e){const t={},n={};for(const[s,i]of Object.entries(e.properties)){const a=new yC(s,e.transform(e.attributes||{},s),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(a.mustUseProperty=!0),t[s]=a,n[Jj(s)]=s,n[Jj(a.attribute)]=s}return new f0(t,n,e.space)}const Bz=fp({properties:{ariaActiveDescendant:null,ariaAtomic:Ar,ariaAutoComplete:null,ariaBusy:Ar,ariaChecked:Ar,ariaColCount:gt,ariaColIndex:gt,ariaColSpan:gt,ariaControl
vendor: 5,436 bytes, line 930
930s:Yn,ariaCurrent:null,ariaDescribedBy:Yn,ariaDetails:null,ariaDisabled:Ar,ariaDropEffect:Yn,ariaErrorMessage:null,ariaExpanded:Ar,ariaFlowTo:Yn,ariaGrabbed:Ar,ariaHasPopup:null,ariaHidden:Ar,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yn,ariaLevel:gt,ariaLive:null,ariaModal:Ar,ariaMultiLine:Ar,ariaMultiSelectable:Ar,ariaOrientation:null,ariaOwns:Yn,ariaPlaceholder:null,ariaPosInSet:gt,ariaPressed:Ar,ariaReadOnly:Ar,ariaRelevant:null,ariaRequired:Ar,ariaRoleDescription:Yn,ariaRowCount:gt,ariaRowIndex:gt,ariaRowSpan:gt,ariaSelected:Ar,ariaSetSize:gt,ariaSort:null,ariaValueMax:gt,ariaValueMin:gt,ariaValueNow:gt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Oz(e,t){return t in e?e[t]:t}function Mz(e,t){return Oz(e,t.toLowerCase())}const SFe=fp({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kf,acceptCharset:Yn,accessKey:Yn,action:null,allow:null,allowFullScreen:dn,allowPaymentRequest:dn,allowUserMedia:dn,alt:null,as:null,async:dn,autoCapitalize:null,autoComplete:Yn,autoFocus:dn,autoPlay:dn,blocking:Yn,capture:null,charSet:null,checked:dn,cite:null,className:Yn,cols:gt,colSpan:null,content:null,contentEditable:Ar,controls:dn,controlsList:Yn,coords:gt|kf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:dn,defer:dn,dir:null,dirName:null,disabled:dn,download:Qj,draggable:Ar,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:dn,formTarget:null,headers:Yn,height:gt,hidden:Qj,high:gt,href:null,hrefLang:null,htmlFor:Yn,httpEquiv:Yn,id:null,imageSizes:null,imageSrcSet:null,inert:dn,inputMode:null,integrity:null,is:null,isMap:dn,itemId:null,itemProp:Yn,itemRef:Yn,itemScope:dn,itemType:Yn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:dn,low:gt,manifest:null,max:null,maxLength:gt,media:null,method:null,min:null,minLength:gt,multiple:dn,muted:dn,name:null,nonce:null,noModule:dn,noValidate:dn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:dn,optimum:gt,pattern:null,ping:Yn,placeholder:null,playsInline:dn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:dn,referrerPolicy:null,rel:Yn,required:dn,reversed:dn,rows:gt,rowSpan:gt,sandbox:Yn,scope:null,scoped:dn,seamless:dn,selected:dn,shadowRootClonable:dn,shadowRootDelegatesFocus:dn,shadowRootMode:null,shape:null,size:gt,sizes:null,slot:null,span:gt,spellCheck:Ar,src:null,srcDoc:null,srcLang:null,srcSet:null,start:gt,step:null,style:null,tabIndex:gt,target:null,title:null,translate:null,type:null,typeMustMatch:dn,useMap:null,value:Ar,width:gt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yn,axis:null,background:null,bgColor:null,border:gt,borderColor:null,bottomMargin:gt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:dn,declare:dn,event:null,face:null,frame:null,frameBorder:null,hSpace:gt,leftMargin:gt,link:null,longDesc:null,lowSrc:null,marginHeight:gt,marginWidth:gt,noResize:dn,noHref:dn,noShade:dn,noWrap:dn,object:null,profile:null,prompt:null,rev:null,rightMargin:gt,rules:null,scheme:null,scrolling:Ar,standby:null,summary:null,text:null,topMargin:gt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:gt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:dn,disableRemotePlayback:dn,prefix:null,property:null,results:gt,security:null,unselectable:null},space:"html",transform:Mz}),kFe=fp({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRen
930dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ki,accentHeight:gt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:gt,amplitude:gt,arabicForm:null,ascent:gt,attributeName:null,attributeType:null,azimuth:gt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:gt,by:null,calcMode:null,capHeight:gt,className:Yn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
930dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:gt,diffuseConstant:gt,direction:null,display:null,dur:null,divisor:gt,dominantBaseline:null,download:dn,dx:null,dy:null,edgeMode:null,editable:null,elevation:gt,enableBackground:null,end:null,event:null,exponent:gt,externalResourcesRequired:null,fill:null,fillOpacity:gt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:kf,g2:kf,glyphName:kf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:gt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:gt,horizOriginX:gt,horizOriginY:gt,id:null,ideographic:gt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:gt,k:gt,k1:gt,k2:gt,k3:gt,k4:gt,kernelMatrix:ki,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:gt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:gt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:gt,overlineThickness:gt,paintOrder:null,panose1:null,path:null,pathLength:gt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:gt,pointsAtY:gt,pointsAtZ:gt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ki,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ki,rev:ki,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ki,requiredFeatures:ki,requiredFonts:ki,requiredFormats:ki,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:gt,specularExponent:gt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:gt,strikethroughThickness:gt,string:null,stroke:null,strokeDashArray:ki,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:gt,strokeOpacity:gt,strokeWidth:null,style:null,surfaceScale:gt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ki,tabIndex:gt,tableValues:null,target:null,targetX:gt,targetY:gt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ki,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:gt,underlineThickness:gt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:gt,values:null,vAlphabetic:gt,vMathematical:gt,vectorEffect:null,vHanging:gt,vIdeographic:gt,version:null,vertAdvY:gt,vertOriginX:gt,vertOriginY:gt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:gt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Oz}),Lz=fp({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}
vendor: 3,119 bytes, lines 930-931
930,space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),zz=fp({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Mz}),Wz=fp({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_Fe={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},CFe=/[A-Z]/g,WN=/-[a-z]/g,EFe=/^data[-\w.:]+$/i;function FFe(e,t){const n=Jj(t);let s=t,i=hi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&EFe.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(WN,TFe);s="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!WN.test(a)){let o=a.replace(CFe,AFe);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=yC}return new i(s,t)}function AFe(e){return"-"+e.toLowerCase()}function TFe(e){return e.charAt(1).toUpperCase()}const NFe=Pz([Bz,SFe,Lz,zz,Wz],"html"),vC=Pz([Bz,kFe,Lz,zz,Wz],"svg");function RFe(e){return e.join(" ").trim()}var qu={},dw,$N;function DFe(){if($N)return dw;$N=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
931`,d="/",u="*",p="",m="comment",x="declaration";function w(v,j){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];j=j||{};var k=1,S=1;function _(I){var H=I.match(t);H&&(k+=H.length);var V=I.lastIndexOf(c);S=~V?I.length-V:S+I.length}function F(){var I={line:k,column:S};return function(H){return H.position=new A(I),P(),H}}function A(I){this.start=I,this.end={line:k,column:S},this.source=j.source}A.prototype.content=v;function C(I){var H=new Error(j.source+":"+k+":"+S+": "+I);if(H.reason=I,H.filename=j.source,H.line=k,H.column=S,H.source=v,!j.silent)throw H}function D(I){var H=I.exec(v);if(H){var V=H[0];return _(V),v=v.slice(V.length),H}}function P(){D(n)}function L(I){var H;for(I=I||[];H=T();)H!==!1&&I.push(H);return I}function T(){var I=F();if(!(d!=v.charAt(0)||u!=v.charAt(1))){for(var H=2;p!=v.charAt(H)&&(u!=v.charAt(H)||d!=v.charAt(H+1));)++H;if(H+=2,p===v.charAt(H-1))return C("End of comment missing");var V=v.slice(2,H-2);return S+=2,_(V),v=v.slice(H),S+=2,I({type:m,comment:V})}}function R(){var I=F(),H=D(s);if(H){if(T(),!D(i))return C("property missing ':'");var V=D(a),X=I({type:x,property:y(H[0].replace(e,p)),value:V?y(V[0].replace(e,p)):p});return D(o),X}}function U(){var I=[];L(I);for(var H;H=R();)H!==!1&&(I.push(H),L(I));return I}return P(),U()}function y(v){return v?v.replace(l,p):p}return dw=w,dw}var UN;function IFe(){if(UN)return qu;UN=1;var e=qu&&qu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};
vendor: 3,730 bytes, line 931
931Object.defineProperty(qu,"__esModule",{value:!0}),qu.default=n;const t=e(DFe());function n(s,i){let a=null;if(!s||typeof s!="string")return a;const o=(0,t.default)(s),l=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:u}=c;l?i(d,u,c):u&&(a=a||{},a[d]=u)}),a}return qu}var yh={},VN;function PFe(){if(VN)return yh;VN=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(d){return!d||n.test(d)||e.test(d)},o=function(d,u){return u.toUpperCase()},l=function(d,u){return"".concat(u,"-")},c=function(d,u){return u===void 0&&(u={}),a(d)?d:(d=d.toLowerCase(),u.reactCompat?d=d.replace(i,l):d=d.replace(s,l),d.replace(t,o))};return yh.camelCase=c,yh}var vh,HN;function BFe(){if(HN)return vh;HN=1;var e=vh&&vh.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(IFe()),n=PFe();function s(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(o[(0,n.camelCase)(l,a)]=c)}),o}return s.default=s,vh=s,vh}var OFe=BFe();const MFe=zm(OFe),$z=Uz("end"),bC=Uz("start");function Uz(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function LFe(e){const t=bC(e),n=$z(e);if(t&&n)return{start:t,end:n}}function em(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?qN(e.position):"start"in e||"end"in e?qN(e):"line"in e||"column"in e?eS(e):""}function eS(e){return GN(e&&e.line)+":"+GN(e&&e.column)}function qN(e){return eS(e&&e.start)+"-"+eS(e&&e.end)}function GN(e){return e&&typeof e=="number"?e:1}class Ms extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof s=="string"){const c=s.indexOf(":");c===-1?a.ruleId=s:(a.source=s.slice(0,c),a.ruleId=s.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=em(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ms.prototype.file="";Ms.prototype.name="";Ms.prototype.reason="";Ms.prototype.message="";Ms.prototype.stack="";Ms.prototype.column=void 0;Ms.prototype.line=void 0;Ms.prototype.ancestors=void 0;Ms.prototype.cause=void 0;Ms.prototype.fatal=void 0;Ms.prototype.place=void 0;Ms.prototype.ruleId=void 0;Ms.prototype.source=void 0;const wC={}.hasOwnProperty,zFe=new Map,WFe=/[A-Z]/g,$Fe=new Set(["table","tbody","thead","tfoot","tr"]),UFe=new Set(["td","th"]),Vz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function VFe(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=QFe(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 6,347 bytes, line 931
931if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=JFe(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?vC:NFe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Hz(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Hz(e,t,n){if(t.type==="element")return HFe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return qFe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return KFe(e,t,n);if(t.type==="mdxjsEsm")return GFe(e,t);if(t.type==="root")return YFe(e,t,n);if(t.type==="text")return XFe(e,t)}function HFe(e,t,n){const s=e.schema;let i=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(i=vC,e.schema=i),e.ancestors.push(t);const a=Gz(e,t.tagName,!1),o=ZFe(e,t);let l=SC(e,t);return $Fe.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!wFe(c):!0})),qz(e,o,a,t),jC(o,l),e.ancestors.pop(),e.schema=s,e.create(t,a,o,n)}function qFe(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}Bm(e,t.position)}function GFe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bm(e,t.position)}function KFe(e,t,n){const s=e.schema;let i=s;t.name==="svg"&&s.space==="html"&&(i=vC,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Gz(e,t.name,!0),o=e5e(e,t),l=SC(e,t);return qz(e,o,a,t),jC(o,l),e.ancestors.pop(),e.schema=s,e.create(t,a,o,n)}function YFe(e,t,n){const s={};return jC(s,SC(e,t)),e.create(t,e.Fragment,s,n)}function XFe(e,t){return t.value}function qz(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function jC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function JFe(e,t,n){return s;function s(i,a,o,l){const d=Array.isArray(o.children)?n:t;return l?d(a,o,l):d(a,o)}}function QFe(e,t){return n;function n(s,i,a,o){const l=Array.isArray(a.children),c=bC(s);return t(i,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function ZFe(e,t){const n={};let s,i;for(i in t.properties)if(i!=="children"&&wC.call(t.properties,i)){const a=t5e(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&UFe.has(t.tagName)?s=l:n[o]=l}}if(s){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function e5e(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const a=s.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Bm(e,t.position);else{const i=s.name;let a;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const l=s.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Bm(e,t.position);else a=s.value===null?!0:s.value;n[i]=a}return n}function SC(e,t){const n=[];let s=-1;const i=e.passKeys?new Map:zFe;for(;++s<t.children.length;){const a=t.children[s];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const d=i.get(c)||0;o=c+"-"+d,i.set(c,d+1)}}const l=Hz(e,a,o);l!==void 0&&n.push(l)}return n}function t5e(e,t,n){const s=FFe(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?gFe(n):RFe(n)),s.property==="style"){let i=typeof n=="object"?n:n5e(e,String(n));return e.stylePropertyNameCase==="css"&&(i=r5e(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&s.space?_Fe[s.property]||s.property:s.attribute,n]}}function n5e(e,t){try{return MFe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,i=new Ms("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Vz+"#cannot-parse-style-attribute",i}}function Gz(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=MN(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}s=o}else s=MN(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const i=s.value;return wC.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(s);Bm(e)}function Bm(e,t){const n=new Ms("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Vz+"#cannot-handle-mdx-estrees-without-createevaluater",n}function r5e(e){const t={};let n;for(n in e)wC.call(e,n)&&(t[s5e(n)]=e[n]);return t}function s5e(e){let t=e.replace(WFe,i5e);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function i5e(e){return"-"+e.toLowerCase()}const uw={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},a5e={};function o5e(e,t){const n=a5e,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Kz(e,s,i)}function Kz(e,t,n){if(l5e(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return KN(e.children,t,n)}return Array.isArray(e)?KN(e,t,n):""}function KN(e,t,n){const s=[];let i=-1;for(;++i<e.length;)s[i]=Kz(e[i],t,n);return s.join("")}function l5e(e){return!!(e&&typeof e=="object")}const YN=document.createElement("i");function kC(e){const t="&"+e+";";YN.innerHTML=t;const n=YN.textContent;
vendor: 10,925 bytes, line 931
931return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function To(e,t,n,s){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,s.length<1e4)o=Array.from(s),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<s.length;)o=s.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function aa(e,t){return e.length>0?(To(e,e.length,0,t),e):t}const XN={}.hasOwnProperty;function c5e(e){const t={};let n=-1;for(;++n<e.length;)d5e(t,e[n]);return t}function d5e(e,t){let n;for(n in t){const i=(XN.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){XN.call(i,o)||(i[o]=[]);const l=a[o];u5e(i[o],Array.isArray(l)?l:l?[l]:[])}}}function u5e(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);To(e,0,0,s)}function Yz(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function _f(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mo=Vc(/[A-Za-z]/),Ri=Vc(/[\dA-Za-z]/),f5e=Vc(/[#-'*+\--9=?A-Z^-~]/);function tS(e){return e!==null&&(e<32||e===127)}const nS=Vc(/\d/),p5e=Vc(/[\dA-Fa-f]/),h5e=Vc(/[!-/:-@[-`{-~]/);function nn(e){return e!==null&&e<-2}function pi(e){return e!==null&&(e<0||e===32)}function Dn(e){return e===-2||e===-1||e===32}const m5e=Vc(new RegExp("\\p{P}|\\p{S}","u")),g5e=Vc(/\s/);function Vc(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function pp(e){const t=[];let n=-1,s=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&Ri(e.charCodeAt(n+1))&&Ri(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(s,n),encodeURIComponent(o)),s=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(s)}function Xn(e,t,n,s){const i=s?s-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return Dn(c)?(e.enter(n),l(c)):t(c)}function l(c){return Dn(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}const x5e={tokenize:y5e};function y5e(e){const t=e.attempt(this.parser.constructs.contentInitial,s,i);let n;return t;function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Xn(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return nn(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const v5e={tokenize:b5e},JN={tokenize:w5e};function b5e(e){const t=this,n=[];let s=0,i,a,o;return l;function l(S){if(s<n.length){const _=n[s];return t.containerState=_[1],e.attempt(_[0].continuation,c,d)(S)}return d(S)}function c(S){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const _=t.events.length;let F=_,A;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){A=t.events[F][1].end;break}j(s);let C=_;for(;C<t.events.length;)t.events[C][1].end={...A},C++;return To(t.events,F+1,0,t.events.slice(_)),t.events.length=C,d(S)}return l(S)}function d(S){if(s===n.length){if(!i)return m(S);if(i.currentConstruct&&i.currentConstruct.concrete)return w(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(JN,u,p)(S)}function u(S){return i&&k(),j(s),m(S)}function p(S){return t.parser.lazy[t.now().line]=s!==n.length,o=t.now().offset,w(S)}function m(S){return t.containerState={},e.attempt(JN,x,w)(S)}function x(S){return s++,n.push([t.currentConstruct,t.containerState]),m(S)}function w(S){if(S===null){i&&k(),j(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),y(S)}function y(S){if(S===null){v(e.exit("chunkFlow"),!0),j(0),e.consume(S);return}return nn(S)?(e.consume(S),v(e.exit("chunkFlow")),s=0,t.interrupt=void 0,l):(e.consume(S),y)}function v(S,_){const F=t.sliceStream(S);if(_&&F.push(null),S.previous=a,a&&(a.next=S),a=S,i.defineSkip(S.start),i.write(F),t.parser.lazy[S.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<o&&(!i.events[A][1].end||i.events[A][1].end.offset>o))return;const C=t.events.length;let D=C,P,L;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(P){L=t.events[D][1].end;break}P=!0}for(j(s),A=C;A<t.events.length;)t.events[A][1].end={...L},A++;To(t.events,D+1,0,t.events.slice(C)),t.events.length=A}}function j(S){let _=n.length;for(;_-- >S;){const F=n[_];t.containerState=F[1],F[0].exit.call(t,e)}n.length=S}function k(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function w5e(e,t,n){return Xn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function QN(e){if(e===null||pi(e)||g5e(e))return 1;if(m5e(e))return 2}function _C(e,t,n){const s=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!s.includes(a)&&(t=a(t,n),s.push(a))}return t}const rS={name:"attention",resolveAll:j5e,tokenize:S5e};function j5e(e,t){let n=-1,s,i,a,o,l,c,d,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(s=n;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[s][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[s][1].end.offset-e[s][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[s][1].end},m={...e[n][1].start};ZN(p,-c),ZN(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[s][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[s][1].end={...o.start},e[n][1].start={...l.end},d=[],e[s][1].end.offset-e[s][1].start.offset&&(d=aa(d,[["enter",e[s][1],t],["exit",e[s][1],t]])),d=aa(d,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),d=aa(d,_C(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),d=aa(d,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,d=aa(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,To(e,s-1,n-s+3,d),n=s+d.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function S5e(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,i=QN(s);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const d=e.exit("attentionSequence"),u=QN(c),p=!u||u===2&&i||n.includes(c),m=!i||i===2&&u||n.includes(s);return d._open=!!(a===42?p:p&&(i||!m)),d._close=!!(a===42?m:m&&(u||!p)),t(c)}}function ZN(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const k5e={name:"autolink",tokenize:_5e};function _5e(e,t,n){let s=0;return i;function i(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(x){return mo(x)?(e.consume(x),o):x===64?n(x):d(x)}function o(x){return x===43||x===45||x===46||Ri(x)?(s=1,l(x)):d(x)}function l(x){return x===58?(e.consume(x),s=0,c):(x===43||x===45||x===46||Ri(x))&&s++<32?(e.consume(x),l):(s=0,d(x))}function c(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||tS(x)?n(x):(e.consume(x),c)}function d(x){return x===64?(e.consume(x),u):f5e(x)?(e.consume(x),d):n(x)}function u(x){return Ri(x)?p(x):n(x)}function p(x){return x===46?(e.consume(x),s=0,u):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):m(x)}function m(x){if((x===45||Ri(x))&&s++<63){const w=x===45?m:p;return e.consume(x),w}return n(x)}}const L1={partial:!0,tokenize:C5e};function C5e(e,t,n){return s;function s(a){return Dn(a)?Xn(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||nn(a)?t(a):n(a)}}const Xz={continuation:{tokenize:F5e},exit:A5e,name:"blockQuote",tokenize:E5e};function E5e(e,t,n){const s=this;return i;function i(o){if(o===62){const l=s.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Dn(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function F5e(e,t,n){const s=this;return i;function i(o){return Dn(o)?Xn(e,a,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Xz,t,n)(o)}}function A5e(e){e.exit("blockQuote")}const Jz={name:"characterEscape",tokenize:T5e};function T5e(e,t,n){return s;function s(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return h5e(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Qz={name:"characterReference",tokenize:N5e};function N5e(e,t,n){const s=this;let i=0,a,o;return l;function l(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,o=Ri,u(p))}function d(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=p5e,u):(e.enter("characterReferenceValue"),a=7,o=nS,u(p))}function u(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return o===Ri&&!kC(s.sliceSerialize(m))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(p)&&i++<a?(e.consume(p),u):n(p)}}const eR={partial:!0,tokenize:D5e},tR={concrete:!0,name:"codeFenced",tokenize:R5e};function R5e(e,t,n){const s=this,i={partial:!0,tokenize:F};let a=0,o=0,l;return c;function c(A){return d(A)}function d(A){const C=s.events[s.events.length-1];return a=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,l=A,e.enter("co
931deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(A)}function u(A){return A===l?(o++,e.consume(A),u):o<3?n(A):(e.exit("codeFencedFenceSequence"),Dn(A)?Xn(e,p,"whitespace")(A):p(A))}function p(A){return A===null||nn(A)?(e.exit("codeFencedFence"),s.interrupt?t(A):e.check(eR,y,_)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(A))}function m(A){return A===null||nn(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(A)):Dn(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xn(e,x,"whitespace")(A)):A===96&&A===l?n(A):(e.consume(A),m)}function x(A){return A===null||nn(A)?p(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(A))}function w(A){return A===null||nn(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(A)):A===96&&A===l?n(A):(e.consume(A),w)}function y(A){return e.attempt(i,_,v)(A)}function v(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),j}function j(A){return a>0&&Dn(A)?Xn(e,k,"linePrefix",a+1)(A):k(A)}function k(A){return A===null||nn(A)?e.check(eR,y,_)(A):(e.enter("codeFlowValue"),S(A))}function S(A){return A===null||nn(A)?(e.exit("codeFlowValue"),k(A)):(e.consume(A),S)}function _(A){return e.exit("codeFenced"),t(A)}function F(A,C,D){let P=0;return L;function L(H){return A.enter("lineEnding"),A.consume(H),A.exit("lineEnding"),T}function T(H){return A.enter("codeFencedFence"),Dn(H)?Xn(A,R,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):R(H)}function R(H){return H===l?(A.enter("codeFencedFenceSequence"),U(H)):D(H)}function U(H){return H===l?(P++,A.consume(H),U):P>=o?(A.exit("codeFencedFenceSequence"),Dn(H)?Xn(A,I,"whitespace")(H):I(H)):D(H)}function I(H){return H===null||nn(H)?(A.exit("codeFencedFence"),C(H)):D(H)}}}function D5e(e,t,n){const s=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return s.parser.lazy[s.now().line]?n(o):t(o)}}const fw={name:"codeIndented",tokenize:P5e},I5e={partial:!0,tokenize:B5e};function P5e(e,t,n){const s=this;return i;function i(d){return e.enter("codeIndented"),Xn(e,a,"linePrefix",5)(d)}function a(d){const u=s.events[s.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(d):n(d)}function o(d){return d===null?c(d):nn(d)?e.attempt(I5e,o,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||nn(d)?(e.exit("codeFlowValue"),o(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),t(d)}}function B5e(e,t,n){const s=this;return i;function i(o){return s.parser.lazy[s.now().line]?n(o):nn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Xn(e,a,"linePrefix",5)(o)}function a(o){const l=s.events[s.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):nn(o)?i(o):n(o)}}const O5e={name:"codeText",previous:L5e,resolve:M5e,tokenize:z5e};function M5e(e){let t=e.length-4,n=3,s,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)i===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(i=s):(s===t||e[s][1].type==="lineEnding")&&(e[i][1].type="codeTextData",s!==i+2&&(e[i][1].end=e[s-1][1].end,e.splice(i+2,s-i-2),t-=s-i-2,s=i+2),i=void 0);return e}function L5e(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function z5e(e,t,n){let s=0,i,a;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),l(p)}function l(p){return p===96?(e.consume(p),s++,l):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(a=e.enter("codeTextSequence"),i=0,u(p)):nn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(p))}function d(p){return p===null||p===32||p===96||nn(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),d)}function u(p){return p===96?(e.consume(p),i++,u):i===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",d(p))}}class W5e{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return s&&bh(this.left,s),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),bh(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),bh(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);bh(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);bh(this.left,n.reverse())}}}function bh(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Zz(e){const t={};let n=-1,s,i,a,o,l,c,d;const u=new W5e(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(s=u.get(n),n&&s[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(c=s[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,$5e(u,n)),n=t[n],d=!0);else if(s[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(s[1].end={...u.get(i)[1].start},l=u.slice(i,n),l.unshift(s),u.splice(i,n-i+1,l))}}return To(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!d}function $5e(e,t){const n=e.get(t)[1],s=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],d={};let u,p,m=-1,x=n,w=0,y=0;const v=[y];for(;x;){for(;e.get(++i)[1]!==x;);a.push(i),x._tokenizer||(u=s.sliceStream(x),x.next||u.push(null),p&&o.defineSki
vendor: 22,839 bytes, line 931
931p(x.start),x._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),x._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=x,x=x.next}for(x=n;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(y=m+1,v.push(y),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(o.events=[],x?(x._tokenizer=void 0,x.previous=void 0):v.pop(),m=v.length;m--;){const j=l.slice(v[m],v[m+1]),k=a.pop();c.push([k,k+j.length-1]),e.splice(k,2,j)}for(c.reverse(),m=-1;++m<c.length;)d[w+c[m][0]]=w+c[m][1],w+=c[m][1]-c[m][0]-1;return d}const U5e={resolve:H5e,tokenize:q5e},V5e={partial:!0,tokenize:G5e};function H5e(e){return Zz(e),e}function q5e(e,t){let n;return s;function s(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):nn(l)?e.check(V5e,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function G5e(e,t,n){const s=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Xn(e,a,"linePrefix")}function a(o){if(o===null||nn(o))return n(o);const l=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(s.parser.constructs.flow,n,t)(o)}}function eW(e,t,n,s,i,a,o,l,c){const d=c||Number.POSITIVE_INFINITY;let u=0;return p;function p(j){return j===60?(e.enter(s),e.enter(i),e.enter(a),e.consume(j),e.exit(a),m):j===null||j===32||j===41||tS(j)?n(j):(e.enter(s),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(j))}function m(j){return j===62?(e.enter(a),e.consume(j),e.exit(a),e.exit(i),e.exit(s),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),x(j))}function x(j){return j===62?(e.exit("chunkString"),e.exit(l),m(j)):j===null||j===60||nn(j)?n(j):(e.consume(j),j===92?w:x)}function w(j){return j===60||j===62||j===92?(e.consume(j),x):x(j)}function y(j){return!u&&(j===null||j===41||pi(j))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(s),t(j)):u<d&&j===40?(e.consume(j),u++,y):j===41?(e.consume(j),u--,y):j===null||j===32||j===40||tS(j)?n(j):(e.consume(j),j===92?v:y)}function v(j){return j===40||j===41||j===92?(e.consume(j),y):y(j)}}function tW(e,t,n,s,i,a){const o=this;let l=0,c;return d;function d(x){return e.enter(s),e.enter(i),e.consume(x),e.exit(i),e.enter(a),u}function u(x){return l>999||x===null||x===91||x===93&&!c||x===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(x):x===93?(e.exit(a),e.enter(i),e.consume(x),e.exit(i),e.exit(s),t):nn(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||nn(x)||l++>999?(e.exit("chunkString"),u(x)):(e.consume(x),c||(c=!Dn(x)),x===92?m:p)}function m(x){return x===91||x===92||x===93?(e.consume(x),l++,p):p(x)}}function nW(e,t,n,s,i,a){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(s),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,c):n(m)}function c(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(s),t):(e.enter(a),d(m))}function d(m){return m===o?(e.exit(a),c(o)):m===null?n(m):nn(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Xn(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===o||m===null||nn(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?p:u)}function p(m){return m===o||m===92?(e.consume(m),u):u(m)}}function tm(e,t){let n;return s;function s(i){return nn(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,s):Dn(i)?Xn(e,s,n?"linePrefix":"lineSuffix")(i):t(i)}}const K5e={name:"definition",tokenize:X5e},Y5e={partial:!0,tokenize:J5e};function X5e(e,t,n){const s=this;let i;return a;function a(x){return e.enter("definition"),o(x)}function o(x){return tW.call(s,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function l(x){return i=_f(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),c):n(x)}function c(x){return pi(x)?tm(e,d)(x):d(x)}function d(x){return eW(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function u(x){return e.attempt(Y5e,p,p)(x)}function p(x){return Dn(x)?Xn(e,m,"whitespace")(x):m(x)}function m(x){return x===null||nn(x)?(e.exit("definition"),s.parser.defined.push(i),t(x)):n(x)}}function J5e(e,t,n){return s;function s(l){return pi(l)?tm(e,i)(l):n(l)}function i(l){return nW(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Dn(l)?Xn(e,o,"whitespace")(l):o(l)}function o(l){return l===null||nn(l)?t(l):n(l)}}const Q5e={name:"hardBreakEscape",tokenize:Z5e};function Z5e(e,t,n){return s;function s(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return nn(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const eAe={name:"headingAtx",resolve:tAe,tokenize:nAe};function tAe(e,t){let n=e.length-2,s=3,i,a;return e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(i={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},a={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"},To(e,s,n-s+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function nAe(e,t,n){let s=0;return i;function i(u){return e.enter("atxHeading"),a(u)}function a(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&s++<6?(e.consume(u),o):u===null||pi(u)?(e.exit("atxHeadingSequence"),l(u)):n(u)}function l(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||nn(u)?(e.exit("atxHeading"),t(u)):Dn(u)?Xn(e,l,"whitespace")(u):(e.enter("atxHeadingText"),d(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),l(u))}function d(u){return u===null||u===35||pi(u)?(e.exit("atxHeadingText"),l(u)):(e.consume(u),d)}}const rAe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],nR=["pre","script","style","textarea"],sAe={concrete:!0,name:"htmlFlow",resolveTo:oAe,tokenize:lAe},iAe={partial:!0,tokenize:dAe},aAe={partial:!0,tokenize:cAe};function oAe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function lAe(e,t,n){const s=this;let i,a,o,l,c;return d;function d(z){return u(z)}function u(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),p}function p(z){return z===33?(e.consume(z),m):z===47?(e.consume(z),a=!0,y):z===63?(e.consume(z),i=3,s.interrupt?t:O):mo(z)?(e.consume(z),o=String.fromCharCode(z),v):n(z)}function m(z){return z===45?(e.consume(z),i=2,x):z===91?(e.consume(z),i=5,l=0,w):mo(z)?(e.consume(z),i=4,s.interrupt?t:O):n(z)}function x(z){return z===45?(e.consume(z),s.interrupt?t:O):n(z)}function w(z){const K="CDATA[";return z===K.charCodeAt(l++)?(e.consume(z),l===K.length?s.interrupt?t:R:w):n(z)}function y(z){return mo(z)?(e.consume(z),o=String.fromCharCode(z),v):n(z)}function v(z){if(z===null||z===47||z===62||pi(z)){const K=z===47,Y=o.toLowerCase();return!K&&!a&&nR.includes(Y)?(i=1,s.interrupt?t(z):R(z)):rAe.includes(o.toLowerCase())?(i=6,K?(e.consume(z),j):s.interrupt?t(z):R(z)):(i=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(z):a?k(z):S(z))}return z===45||Ri(z)?(e.consume(z),o+=String.fromCharCode(z),v):n(z)}function j(z){return z===62?(e.consume(z),s.interrupt?t:R):n(z)}function k(z){return Dn(z)?(e.consume(z),k):L(z)}function S(z){return z===47?(e.consume(z),L):z===58||z===95||mo(z)?(e.consume(z),_):Dn(z)?(e.consume(z),S):L(z)}function _(z){return z===45||z===46||z===58||z===95||Ri(z)?(e.consume(z),_):F(z)}function F(z){return z===61?(e.consume(z),A):Dn(z)?(e.consume(z),F):S(z)}function A(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),c=z,C):Dn(z)?(e.consume(z),A):D(z)}function C(z){return z===c?(e.consume(z),c=null,P):z===null||nn(z)?n(z):(e.consume(z),C)}function D(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||pi(z)?F(z):(e.consume(z),D)}function P(z){return z===47||z===62||Dn(z)?S(z):n(z)}function L(z){return z===62?(e.consume(z),T):n(z)}function T(z){return z===null||nn(z)?R(z):Dn(z)?(e.consume(z),T):n(z)}function R(z){return z===45&&i===2?(e.consume(z),V):z===60&&i===1?(e.consume(z),X):z===62&&i===4?(e.consume(z),G):z===63&&i===3?(e.consume(z),O):z===93&&i===5?(e.consume(z),W):nn(z)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(iAe,M,U)(z)):z===null||nn(z)?(e.exit("htmlFlowData"),U(z)):(e.consume(z),R)}function U(z){return e.check(aAe,I,M)(z)}function I(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),H}function H(z){return z===null||nn(z)?U(z):(e.enter("htmlFlowData"),R(z))}function V(z){return z===45?(e.consume(z),O):R(z)}function X(z){return z===47?(e.consume(z),o="",N):R(z)}function N(z){if(z===62){const K=o.toLowerCase();return nR.includes(K)?(e.consume(z),G):R(z)}return mo(z)&&o.length<8?(e.consume(z),o+=String.fromCharCode(z),N):R(z)}function W(z){return z===93?(e.consume(z),O):R(z)}function O(z){return z===62?(e.consume(z),G):z===45&&i===2?(e.consume(z),O):R(z)}function G(z){return z===null||nn(z)?(e.exit("htmlFlowData"),M(z)):(e.consume(z),G)}function M(z){return e.exit("htmlFlow"),t(z)}}function cAe(e,t,n){const s=this;return i;function i(o){return nn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return s.parser.lazy[s.now().line]?n(o):t(o)}}function dAe(e,t,n){return s;function s(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(L1,t,n)}}const uAe={name:"htmlText",tokenize:fAe};function fAe(e,t,n){const s=this;let i,a,o;return l;function l(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),c}function c(O){return O===33?(e.consume(O),d):O===47?(e.consume(O),F):O===63?(e.consume(O),S):mo(O)?(e.consume(O),D):n(O)}function d(O){return O===45?(e.consume(O),u):O===91?(e.consume(O),a=0,w):mo(O)?(e.consume(O),k):n(O)}function u(O){return O===45?(e.consume(O),x):n(O)}function p(O){return O===null?n(O):O===45?(e.consume(O),m):nn(O)?(o=p,X(O)):(e.consume(O),p)}function m(O){return O===45?(e.consume(O),x):p(O)}function x(O){return O===62?V(O):O===45?m(O):p(O)}function w(O){const G="CDATA[";return O===G.charCodeAt(a++)?(e.consume(O),a===G.length?y:w):n(O)}function y(O){return O===null?n(O):O===93?(e.consume(O),v):nn(O)?(o=y,X(O)):(e.consume(O),y)}function v(O){return O===93?(e.consume(O),j):y(O)}function j(O){return O===62?V(O):O===93?(e.consume(O),j):y(O)}function k(O){return O===null||O===62?V(O):nn(O)?(o=k,X(O)):(e.consume(O),k)}function S(O){return O===null?n(O):O===63?(e.consume(O),_):nn(O)?(o=S,X(O)):(e.consume(O),S)}function _(O){return O===62?V(O):S(O)}function F(O){return mo(O)?(e.consume(O),A):n(O)}function A(O){return O===45||Ri(O)?(e.consume(O),A):C(O)}function C(O){return nn(O)?(o=C,X(O)):Dn(O)?(e.consume(O),C):V(O)}function D(O){return O===45||Ri(O)?(e.consume(O),D):O===47||O===62||pi(O)?P(O):n(O)}function P(O){return O===47?(e.consume(O),V):O===58||O===95||mo(O)?(e.consume(O),L):nn(O)?(o=P,X(O)):Dn(O)?(e.consume(O),P):V(O)}function L(O){return O===45||O===46||O===58||O===95||Ri(O)?(e.consume(O),L):T(O)}function T(O){return O===61?(e.consume(O),R):nn(O)?(o=T,X(O)):Dn(O)?(e.consume(O),T):P(O)}function R(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),i=O,U):nn(O)?(o=R,X(O)):Dn(O)?(e.consume(O),R):(e.consume(O),I)}function U(O){return O===i?(e.consume(O),i=void 0,H):O===null?n(O):nn(O)?(o=U,X(O)):(e.consume(O),U)}function I(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||pi(O)?P(O):(e.consume(O),I)}function H(O){return O===47||O===62||pi(O)?P(O):n(O)}function V(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function X(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),N}function N(O){return Dn(O)?Xn(e,W,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):W(O)}function W(O){return e.enter("htmlTextData"),o(O)}}const CC={name:"labelEnd",resolveAll:gAe,resolveTo:xAe,tokenize:yAe},pAe={tokenize:vAe},hAe={tokenize:bAe},mAe={tokenize:wAe};function gAe(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const i=s.type==="labelImage"?4:2;s.type="data",t+=i}}return e.length!==n.length&&To(e,0,e.length,n),e}function xAe(e,t){let n=e.length,s=0,i,a,o,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){s=2;break}}else i.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[a+s+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",d,t]],l=aa(l,e.slice(a+1,a+s+3)),l=aa(l,[["enter",u,t]]),l=aa(l,_C(t.parser.constructs.insideSpan.null,e.slice(a+s+4,o-3),t)),l=aa(l,[["exit",u,t],e[o-2],e[o-1],["exit",d,t]]),l=aa(l,e.slice(o+1)),l=aa(l,[["exit",c,t]]),To(e,a,e.length,l),e}function yAe(e,t,n){const s=this;let i=s.events.length,a,o;for(;i--;)if((s.events[i][1].type==="labelImage"||s.events[i][1].type==="labelLink")&&!s.events[i][1]._balanced){a=s.events[i][1];break}return l;function l(m){return a?a._inactive?p(m):(o=s.parser.defined.includes(_f(s.sliceSerialize({start:a.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(pAe,u,o?u:p)(m):m===91?e.attempt(hAe,u,o?d:p)(m):o?u(m):p(m)}function d(m){return e.attempt(mAe,u,p)(m)}function u(m){return t(m)}function p(m){return a._balanced=!0,n(m)}}function vAe(e,t,n){return s;function s(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return pi(p)?tm(e,a)(p):a(p)}function a(p){return p===41?u(p):eW(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return pi(p)?tm(e,c)(p):u(p)}function l(p){return n(p)}function c(p){return p===34||p===39||p===40?nW(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):u(p)}function d(p){return pi(p)?tm(e,u)(p):u(p)}function u(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function bAe(e,t,n){const s=this;return i;function i(l){return tW.call(s,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return s.parser.defined.includes(_f(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function wAe(e,t,n){return s;function s(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const jAe={name:"labelStartImage",resolveAll:CC.resolveAll,tokenize:SAe};function SAe(e,t,n){const s=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(l):t(l)}}const kAe={name:"labelStartLink",resolveAll:CC.resolveAll,tokenize:_Ae};function _Ae(e,t,n){const s=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(o):t(o)}}const pw={name:"lineEnding",tokenize:CAe};function CAe(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Xn(e,t,"linePrefix")}}const zx={name:"thematicBreak",tokenize:EAe};function EAe(e,t,n){let s=0,i;return a;function a(d){return e.enter("thematicBreak"),o(d)}function o(d){return i=d,l(d)}function l(d){return d===i?(e.enter("thematicBreakSequence"),c(d)):s>=3&&(d===null||nn(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===i?(e.consume(d),s++,c):(e.exit("thematicBreakSequence"),Dn(d)?Xn(e,l,"whitespace")(d):l(d))}}const li={continuation:{tokenize:NAe},exit:DAe,name:"list",tokenize:TAe},FAe={partial:!0,tokenize:IAe},AAe={partial:!0,tokenize:RAe};function TAe(e,t,n){const s=this,i=s.events[s.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(x){const w=s.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!s.containerState.marker||x===s.containerState.marker:nS(x)){if(s.containerState.type||(s.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(zx,n,d)(x):d(x);if(!s.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(x)}return n(x)}function c(x){return nS(x)&&++o<10?(e.consume(x),c):(!s.interrupt||o<2)&&(s.containerState.marker?x===s.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),d(x)):n(x)}function d(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||x,e.check(L1,s.interrupt?n:u,e.attempt(FAe,m,p))}function u(x){return s.containerState.initialBlankLine=!0,a++,m(x)}function p(x){return Dn(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),m):n(x)}function m(x){return s.containerState.size=a+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function NAe(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(L1,i,a);function i(l){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Xn(e,t,"listItemIndent",s.containerState.size+1)(l)}function a(l){return s.containerState.furtherBlankLines||!Dn(l)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,o(l)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(AAe,t,o)(l))}function o(l){return s.containerState._closeFlow=!0,s.interrupt=void 0,Xn(e,e.attempt(li,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function RAe(e,t,n){const s=this;return Xn(e,i,"listItemIndent",s.containerState.size+1);function i(a){const o=s.events[s.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===s.containerState.size?t(a):n(a)}}function DAe(e){e.exit(this.containerState.type)}function IAe(e,t,n){const s=this;return Xn(e,i,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=s.events[s.events.length-1];return!Dn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const rR={name:"setextUnderline",resolveTo:PAe,tokenize:BAe};function PAe(e,t){let n=e.length,s,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){s=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[s][1],t]),e[s][1].end={...e[a][1].end}):e[s][1]=o,e.push(["exit",o,t]),e}function BAe(e,t,n){const s=this;let i;return a;function a(d){let u=s.events.length,p;for(;u--;)if(s.events[u][1].type!=="lineEnding"&&s.events[u][1].type!=="linePrefix"&&s.events[u][1].type!=="content"){p=s.events[u][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||p)?(e.enter("setextHeadingLine"),i=d,o(d)):n(d)}function o(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===i?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),Dn(d)?Xn(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||nn(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const OAe={tokenize:MAe};function MAe(e){const t=this,n=e.attempt(L1,s,e.attempt(this.parser.constructs.flowInitial,i,Xn(e,e.attempt(this.parser.constructs.flow,i,e.attempt(U5e,i)),"linePrefix")));return n;function s(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const LAe={resolveAll:sW()},zAe=rW("string"),WAe=rW("text");function rW(e){return{resolveAll:sW(e==="text"?$Ae:void 0),tokenize:t};function t(n){const s=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(u){return d(u)?a(u):l(u)}function l(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),c}function c(u){return d(u)?(n.exit("data"),a(u)):(n.consume(u),c)}function d(u){if(u===null)return!0;const p=i[u];let m=-1;if(p)for(;++m<p.length;){const x=p[m];if(!x.previous||x.previous.call(s,s.previous))return!0}return!1}}}function sW(e){return t;function t(n,s){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,s):n}}function $Ae(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const s=e[n-1][1],i=t.sliceStream(s);let a=i.length,o=-1,l=0,c;for(;a--;){const d=i[a];
vendor: 4,223 bytes, lines 931-933
931if(typeof d=="string"){for(o=d.length;d.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(d===-2)c=!0,l++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const d={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:s.start._bufferIndex+o,_index:s.start._index+a,line:s.end.line,column:s.end.column-l,offset:s.end.offset-l},end:{...s.end}};s.end={...d.start},s.start.offset===s.end.offset?Object.assign(s,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const UAe={42:li,43:li,45:li,48:li,49:li,50:li,51:li,52:li,53:li,54:li,55:li,56:li,57:li,62:Xz},VAe={91:K5e},HAe={[-2]:fw,[-1]:fw,32:fw},qAe={35:eAe,42:zx,45:[rR,zx],60:sAe,61:rR,95:zx,96:tR,126:tR},GAe={38:Qz,92:Jz},KAe={[-5]:pw,[-4]:pw,[-3]:pw,33:jAe,38:Qz,42:rS,60:[k5e,uAe],91:kAe,92:[Q5e,Jz],93:CC,95:rS,96:O5e},YAe={null:[rS,LAe]},XAe={null:[42,95]},JAe={null:[]},QAe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:XAe,contentInitial:VAe,disable:JAe,document:UAe,flow:qAe,flowInitial:HAe,insideSpan:YAe,string:GAe,text:KAe},Symbol.toStringTag,{value:"Module"}));function ZAe(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],l=[];const c={attempt:C(F),check:C(A),consume:k,enter:S,exit:_,interrupt:C(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:y,events:[],now:w,parser:e,previous:null,sliceSerialize:m,sliceStream:x,write:p};let u=t.tokenize.call(d,c);return t.resolveAll&&a.push(t),d;function p(T){return o=aa(o,T),v(),o[o.length-1]!==null?[]:(D(t,0),d.events=_C(a,d.events,d),d.events)}function m(T,R){return t3e(x(T),R)}function x(T){return e3e(o,T)}function w(){const{_bufferIndex:T,_index:R,line:U,column:I,offset:H}=s;return{_bufferIndex:T,_index:R,line:U,column:I,offset:H}}function y(T){i[T.line]=T.column,L()}function v(){let T;for(;s._index<o.length;){const R=o[s._index];if(typeof R=="string")for(T=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===T&&s._bufferIndex<R.length;)j(R.charCodeAt(s._bufferIndex));else j(R)}}function j(T){u=u(T)}function k(T){nn(T)?(s.line++,s.column=1,s.offset+=T===-3?2:1,L()):T!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===o[s._index].length&&(s._bufferIndex=-1,s._index++)),d.previous=T}function S(T,R){const U=R||{};return U.type=T,U.start=w(),d.events.push(["enter",U,d]),l.push(U),U}function _(T){const R=l.pop();return R.end=w(),d.events.push(["exit",R,d]),R}function F(T,R){D(T,R.from)}function A(T,R){R.restore()}function C(T,R){return U;function U(I,H,V){let X,N,W,O;return Array.isArray(I)?M(I):"tokenize"in I?M([I]):G(I);function G(J){return Q;function Q(ie){const ae=ie!==null&&J[ie],re=ie!==null&&J.null,pe=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(re)?re:re?[re]:[]];return M(pe)(ie)}}function M(J){return X=J,N=0,J.length===0?V:z(J[N])}function z(J){return Q;function Q(ie){return O=P(),W=J,J.partial||(d.currentConstruct=J),J.name&&d.parser.constructs.disable.null.includes(J.name)?Y():J.tokenize.call(R?Object.assign(Object.create(d),R):d,c,K,Y)(ie)}}function K(J){return T(W,O),H}function Y(J){return O.restore(),++N<X.length?z(X[N]):V}}}function D(T,R){T.resolveAll&&!a.includes(T)&&a.push(T),T.resolve&&To(d.events,R,d.events.length-R,T.resolve(d.events.slice(R),d)),T.resolveTo&&(d.events=T.resolveTo(d.events,d))}function P(){const T=w(),R=d.previous,U=d.currentConstruct,I=d.events.length,H=Array.from(l);return{from:I,restore:V};function V(){s=T,d.previous=R,d.currentConstruct=U,d.events.length=I,l=H,L()}}function L(){s.line in i&&s.column<2&&(s.column=i[s.line],s.offset+=i[s.line]-1)}}function e3e(e,t){const n=t.start._index,s=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(s,a)];else{if(o=e.slice(n,i),s>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(s):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function t3e(e,t){let n=-1;const s=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
932`;break}case-3:{o=`\r
933`;break}case-2:{o=t?" ":"	";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}
vendor: 11,682 bytes, line 933
933i=a===-2,s.push(o)}return s.join("")}function n3e(e){const s={constructs:c5e([QAe,...(e||{}).extensions||[]]),content:i(x5e),defined:[],document:i(v5e),flow:i(OAe),lazy:{},string:i(zAe),text:i(WAe)};return s;function i(a){return o;function o(l){return ZAe(s,a,l)}}}function r3e(e){for(;!Zz(e););return e}const sR=/[\0\t\n\r]/g;function s3e(){let e=1,t="",n=!0,s;return i;function i(a,o,l){const c=[];let d,u,p,m,x;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if(sR.lastIndex=p,d=sR.exec(a),m=d&&d.index!==void 0?d.index:a.length,x=a.charCodeAt(m),!d){t=a.slice(p);break}if(x===10&&p===m&&s)c.push(-3),s=void 0;else switch(s&&(c.push(-5),s=void 0),p<m&&(c.push(a.slice(p,m)),e+=m-p),x){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:s=!0,e=1}p=m+1}return l&&(s&&c.push(-5),t&&c.push(t),c.push(null)),c}}const i3e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function a3e(e){return e.replace(i3e,o3e)}function o3e(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Yz(n.slice(a?2:1),a?16:10)}return kC(n)||e}const iW={}.hasOwnProperty;function l3e(e,t,n){return typeof t!="string"&&(n=t,t=void 0),c3e(n)(r3e(n3e(n).document().write(s3e()(e,t,!0))))}function c3e(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a($e),autolinkProtocol:P,autolinkEmail:P,atxHeading:a(xe),blockQuote:a(re),characterEscape:P,characterReference:P,codeFenced:a(pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(pe,o),codeText:a(Z,o),codeTextData:P,data:P,codeFlowValue:P,definition:a(Ne),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(te),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(le,o),htmlFlowData:P,htmlText:a(le,o),htmlTextData:P,image:a(ge),label:o,link:a($e),listItem:a(Qe),listItemValue:m,listOrdered:a(ft,p),listUnordered:a(ft),paragraph:a(Ve),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(xe),strong:a(ze),thematicBreak:a(Nt)},exit:{atxHeading:c(),atxHeadingSequence:F,autolink:c(),autolinkEmail:ae,autolinkProtocol:ie,blockQuote:c(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:J,characterReference:Q,codeFenced:c(v),codeFencedFence:y,codeFencedFenceInfo:x,codeFencedFenceMeta:w,codeFlowValue:L,codeIndented:c(j),codeText:c(H),codeTextData:L,data:L,definition:c(),definitionDestinationString:_,definitionLabelString:k,definitionTitleString:S,emphasis:c(),hardBreakEscape:c(R),hardBreakTrailing:c(R),htmlFlow:c(U),htmlFlowData:L,htmlText:c(I),htmlTextData:L,image:c(X),label:W,labelText:N,lineEnding:T,link:c(V),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:K,resourceDestinationString:O,resourceTitleString:G,resource:M,setextHeading:c(D),setextHeadingLineSequence:C,setextHeadingText:A,strong:c(),thematicBreak:c()}};aW(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(_e){let be={type:"root",children:[]};const Re={stack:[be],tokenStack:[],config:t,enter:l,exit:d,buffer:o,resume:u,data:n},Xe=[];let He=-1;for(;++He<_e.length;)if(_e[He][1].type==="listOrdered"||_e[He][1].type==="listUnordered")if(_e[He][0]==="enter")Xe.push(He);else{const St=Xe.pop();He=i(_e,St,He)}for(He=-1;++He<_e.length;){const St=t[_e[He][0]];iW.call(St,_e[He][1].type)&&St[_e[He][1].type].call(Object.assign({sliceSerialize:_e[He][2].sliceSerialize},Re),_e[He][1])}if(Re.tokenStack.length>0){const St=Re.tokenStack[Re.tokenStack.length-1];(St[1]||iR).call(Re,void 0,St[0])}for(be.position={start:Jl(_e.length>0?_e[0][1].start:{line:1,column:1,offset:0}),end:Jl(_e.length>0?_e[_e.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<t.transforms.length;)be=t.transforms[He](be)||be;return be}function i(_e,be,Re){let Xe=be-1,He=-1,St=!1,Ct,Se,et,bt;for(;++Xe<=Re;){const Ot=_e[Xe];switch(Ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ot[0]==="enter"?He++:He--,bt=void 0;break}case"lineEndingBlank":{Ot[0]==="enter"&&(Ct&&!bt&&!He&&!et&&(et=Xe),bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bt=void 0}if(!He&&Ot[0]==="enter"&&Ot[1].type==="listItemPrefix"||He===-1&&Ot[0]==="exit"&&(Ot[1].type==="listUnordered"||Ot[1].type==="listOrdered")){if(Ct){let sn=Xe;for(Se=void 0;sn--;){const Vt=_e[sn];if(Vt[1].type==="lineEnding"||Vt[1].type==="lineEndingBlank"){if(Vt[0]==="exit")continue;Se&&(_e[Se][1].type="lineEndingBlank",St=!0),Vt[1].type="lineEnding",Se=sn}else if(!(Vt[1].type==="linePrefix"||Vt[1].type==="blockQuotePrefix"||Vt[1].type==="blockQuotePrefixWhitespace"||Vt[1].type==="blockQuoteMarker"||Vt[1].type==="listItemIndent"))break}et&&(!Se||et<Se)&&(Ct._spread=!0),Ct.end=Object.assign({},Se?_e[Se][1].start:Ot[1].end),_e.splice(Se||Xe,0,["exit",Ct,Ot[2]]),Xe++,Re++}if(Ot[1].type==="listItemPrefix"){const sn={type:"listItem",_spread:!1,start:Object.assign({},Ot[1].start),end:void 0};Ct=sn,_e.splice(Xe,0,["enter",sn,Ot[2]]),Xe++,Re++,et=void 0,bt=!0}}}return _e[be][1]._spread=St,Re}function a(_e,be){return Re;function Re(Xe){l.call(this,_e(Xe),Xe),be&&be.call(this,Xe)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(_e,be,Re){this.stack[this.stack.length-1].children.push(_e),this.stack.push(_e),this.tokenStack.push([be,Re||void 0]),_e.position={start:Jl(be.start),end:void 0}}function c(_e){return be;function be(Re){_e&&_e.call(this,Re),d.call(this,Re)}}function d(_e,be){const Re=this.stack.pop(),Xe=this.tokenStack.pop();if(Xe)Xe[0].type!==_e.type&&(be?be.call(this,_e,Xe[0]):(Xe[1]||iR).call(this,_e,Xe[0]));else throw new Error("Cannot close `"+_e.type+"` ("+em({start:_e.start,end:_e.end})+"): it’s not open");Re.position.end=Jl(_e.end)}function u(){return o5e(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(_e){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(_e),10),this.data.expectingFirstListItemValue=void 0}}function x(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.lang=_e}function w(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.meta=_e}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.value=_e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.value=_e.replace(/(\r?\n|\r)$/g,"")}function k(_e){const be=this.resume(),Re=this.stack[this.stack.length-1];Re.label=be,Re.identifier=_f(this.sliceSerialize(_e)).toLowerCase()}function S(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.title=_e}function _(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.url=_e}function F(_e){const be=this.stack[this.stack.length-1];if(!be.depth){const Re=this.sliceSerialize(_e).length;be.depth=Re}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function C(_e){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(_e).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function P(_e){const Re=this.stack[this.stack.length-1].children;let Xe=Re[Re.length-1];(!Xe||Xe.type!=="text")&&(Xe=at(),Xe.position={start:Jl(_e.start),end:void 0},Re.push(Xe)),this.stack.push(Xe)}function L(_e){const be=this.stack.pop();be.value+=this.sliceSerialize(_e),be.position.end=Jl(_e.end)}function T(_e){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=be.children[be.children.length-1];Re.position.end=Jl(_e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(be.type)&&(P.call(this,_e),L.call(this,_e))}function R(){this.data.atHardBreak=!0}function U(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.value=_e}function I(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.value=_e}function H(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.value=_e}function V(){const _e=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";_e.type+="Reference",_e.referenceType=be,delete _e.url,delete _e.title}else delete _e.identifier,delete _e.label;this.data.referenceType=void 0}function X(){const _e=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";_e.type+="Reference",_e.referenceType=be,delete _e.url,delete _e.title}else delete _e.identifier,delete _e.label;this.data.referenceType=void 0}function N(_e){const be=this.sliceSerialize(_e),Re=this.stack[this.stack.length-2];Re.label=a3e(be),Re.identifier=_f(be).toLowerCase()}function W(){const _e=this.stack[this.stack.length-1],be=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const Xe=_e.children;Re.children=Xe}else Re.alt=be}function O(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.url=_e}function G(){const _e=this.resume(),be=this.stack[this.stack.length-1];be.title=_e}function M(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function K(_e){const be=this.resume(),Re=this.stack[this.stack.length-1];Re.label=be,Re.identifier=_f(this.sliceSerialize(_e)).toLowerCase(),this.data.referenceType="full"}function Y(_e){this.data.characterReferenceType=_e.type}function J(_e){const be=this.sliceSerialize(_e),Re=this.data.characterReferenceType;let Xe;Re?(Xe=Yz(be,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Xe=kC(be);const He=this.stack[this.stack.length-1];He.value+=Xe}function Q(_e){const be=this.stack.pop();be.position.end=Jl(_e.end)}function ie(_e){L.call(this,_e);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(_e)}function ae(_e){L.call(this,_e);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(_e)}function re(){return{type:"blockquote",children:[]}}function pe(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function Ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function te(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function he(){return{type:"break"}}function le(){return{type:"html",value:""}}function ge(){return{type:"image",title:null,url:"",alt:null}}function $e(){return{type:"link",title:null,url:"",children:[]}}function ft(_e){return{type:"list",ordered:_e.type==="listOrdered",start:null,spread:_e._spread,children:[]}}function Qe(_e){return{type:"listItem",spread:_e._spread,checked:null,children:[]}}function Ve(){return{type:"paragraph",children:[]}}function ze(){return{type:"strong",children:[]}}function at(){return{type:"text",value:""}}function Nt(){return{type:"thematicBreak"}}}function Jl(e){return{line:e.line,column:e.column,offset:e.offset}}function aW(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?aW(e,s):d3e(e,s)}}function d3e(e,t){let n;for(n in t)if(iW.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function iR(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+em
vendor: 10,766 bytes, lines 933-937
933({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+em({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+em({start:t.start,end:t.end})+") is still open")}function u3e(e){const t=this;t.parser=n;function n(s){return l3e(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function f3e(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function p3e(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
934`}]}function h3e(e,t){const n=t.value?t.value+`
935`:"",s={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(s.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:s,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function m3e(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g3e(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function x3e(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),i=pp(s.toLowerCase()),a=e.footnoteOrder.indexOf(s);let o,l=e.footnoteCounts.get(s);l===void 0?(l=0,e.footnoteOrder.push(s),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(s,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function y3e(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function v3e(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function oW(e,t){const n=t.referenceType;let s="]";if(n==="collapsed"?s+="[]":n==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=s:i.push({type:"text",value:s}),i}function b3e(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return oW(e,t);const i={src:pp(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(i.title=s.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function w3e(e,t){const n={src:pp(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function j3e(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const s={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,s),e.applyData(t,s)}function S3e(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return oW(e,t);const i={href:pp(s.url||"")};s.title!==null&&s.title!==void 0&&(i.title=s.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function k3e(e,t){const n={href:pp(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function _3e(e,t,n){const s=e.all(t),i=n?C3e(n):lW(t),a={},o=[];if(typeof t.checked=="boolean"){const u=s[0];let p;u&&u.type==="element"&&u.tagName==="p"?p=u:(p={type:"element",tagName:"p",properties:{},children:[]},s.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<s.length;){const u=s[l];(i||l!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
936`}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const c=s[s.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
937`});const d={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,d),e.applyData(t,d)}function C3e(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let s=-1;for(;!t&&++s<n.length;)t=lW(n[s])}return t}function lW(e){const t=e.spread;return t??e.children.length>1}function E3e(e,t){const n={},s=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<s.length;){const o=s[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function F3e(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function A3e(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function T3e(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N3e(e,t){const n=e.all(t),s=n.shift(),i=[];if(s){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=bC(t.children[1]),c=$z(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function R3e(e,t,n){const s=n?n.children:void 0,a=(s?s.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const d=[];for(;++c<l;){const p=t.children[c],m={},x=o?o[c]:void 0;x&&(m.align=x);let w={type:"element",tagName:a,properties:m,children:[]};p&&(w.children=e.all(p),e.patch(p,w),w=e.applyData(p,w)),d.push(w)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,u),e.applyData(t,u)}function D3e(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const aR=9,oR=32;function I3e(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),i=0;const a=[];for(;s;)a.push(lR(t.slice(i,s.index),i>0,!0),s[0]),i=s.index+s[0].length,s=n.exec(t);return a.push(lR(t.slice(i),i>0,!1)),a.join("")}function lR(e,t,n){let s=0,i=e.length;if(t){let a=e.codePointAt(s);for(;a===aR||a===oR;)s++,a=e.codePointAt(s)}if(n){let a=e.codePointAt(i-1);for(;a===aR||a===oR;)i--,a=e.codePointAt(i-1)}return i>s?e.slice(s,i):""}function P3e(e,t){const n={type:"text",value:I3e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function B3e(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const O3e={blockquote:f3e,break:p3e,code:h3e,delete:m3e,emphasis:g3e,footnoteReference:x3e,heading:y3e,html:v3e,imageReference:b3e,image:w3e,inlineCode:j3e,linkReference:S3e,link:k3e,listItem:_3e,list:E3e,paragraph:F3e,root:A3e,strong:T3e,table:N3e,tableCell:D3e,tableRow:R3e,text:P3e,thematicBreak:B3e,toml:fx,yaml:fx,definition:fx,footnoteDefinition:fx};function fx(){}const cW=-1,z1=0,nm=1,Py=2,EC=3,FC=4,AC=5,TC=6,dW=7,uW=8,cR=typeof self=="object"?self:globalThis,M3e=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),s=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case z1:case cW:return n(o,i);case nm:{const l=n([],i);for(const c of o)l.push(s(c));return l}case Py:{const l=n({},i);for(const[c,d]of o)l[s(c)]=s(d);return l}case EC:return n(new Date(o),i);case FC:{const{source:l,flags:c}=o;return n(new RegExp(l,c),i)}case AC:{const l=n(new Map,i);for(const[c,d]of o)l.set(s(c),s(d));return l}case TC:{const l=n(new Set,i);for(const c of o)l.add(s(c));return l}case dW:{const{name:l,message:c}=o;return n(new cR[l](c),i)}case uW:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new cR[a](o),i)};return s},dR=e=>M3e(new Map,e)(0),Gu="",{toString:L3e}={},{keys:z3e}=Object,wh=e=>{const t=typeof e;if(t!=="object"||!e)return[z1,t];const n=L3e.call(e).slice(8,-1);switch(n){case"Array":return[nm,Gu];case"Object":return[Py,Gu];case"Date":return[EC,Gu];case"RegExp":return[FC,Gu];case"Map":return[AC,Gu];case"Set":return[TC,Gu];case"DataView":return[nm,n]}return n.includes("Array")?[nm,n]:n.includes("Error")?[dW,n]:[Py,n]},px=([e,t])=>e===z1&&(t==="function"||t==="symbol"),W3e=(e,t,n,s)=>{const i=(o,l)=>{const c=s.push(o)-1;return n.set(l,c),c},a=o=>{if(n.has(o))return n.get(o);let[l,c]=wh(o);switch(l){case z1:{let u=o;switch(c){case"bigint":l=uW,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);u=null;break;case"undefined":return i([cW],o)}return i([l,u],o)}case nm:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),i([c,[...m]],o)}const u=[],p=i([l,u],o);for(const m of o)u.push(a(m));return p}case Py:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const u=[],p=i([l,u],o);for(const m of z3e(o))(e||!px(wh(o[m])))&&u.push([a(m),a(o[m])]);return p}case EC:return i([l,o.toISOString()],o);case FC:{const{source:u,flags:p}=o;return i([l,{source:u,flags:p}],o)}case AC:{const u=[],p=i([l,u],o);for(const[m,x]of o)(e||!(px(wh(m))||px(wh(x))))&&u.push([a(m),a(x)]);return p}case TC:{const u=[],p=i([l,u],o);for(const m of o)(e||!px(wh(m)))&&u.push(a(m));return p}}const{message:d}=o;return i([l,{name:c,message:d}],o)};return a},uR=(e,{json:t,lossy:n}={})=>{const s=[];return W3e(!(t||n),!!t,new Map,s)(e),s},By=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?dR(uR(e,t)):structuredClone(e):(e,t)=>dR(uR(e,t));function $3e(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function U3e(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}
vendor: 4,983 bytes, lines 937-939
937function V3e(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$3e,s=e.options.footnoteBackLabel||U3e,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const u=e.all(d),p=String(d.identifier).toUpperCase(),m=pp(p.toLowerCase());let x=0;const w=[],y=e.footnoteCounts.get(p);for(;y!==void 0&&++x<=y;){w.length>0&&w.push({type:"text",value:" "});let k=typeof n=="string"?n:n(c,x);typeof k=="string"&&(k={type:"text",value:k}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(c,x),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const k=v.children[v.children.length-1];k&&k.type==="text"?k.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...w)}else u.push(...w);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(u,!0)};e.patch(d,j),l.push(j)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...By(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
938`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
939`}]}}const fW=(function(e){if(e==null)return K3e;if(typeof e=="function")return W1(e);if(typeof e=="object")return Array.isArray(e)?H3e(e):q3e(e);if(typeof e=="string")return G3e(e);throw new Error("Expected function, string, or object as test")});function H3e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fW(e[n]);return W1(s);function s(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function q3e(e){const t=e;return W1(n);function n(s){const i=s;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function G3e(e){return W1(t);function t(n){return n&&n.type===e}}function W1(e){return t;function t(n,s,i){return!!(Y3e(n)&&e.call(this,n,typeof s=="number"?s:void 0,i||void 0))}}function K3e(){return!0}function Y3e(e){return e!==null&&typeof e=="object"&&"type"in e}const pW=[],X3e=!0,fR=!1,J3e="skip";function Q3e(e,t,n,s){let i;typeof t=="function"&&typeof n!="function"?(s=n,n=t):i=t;const a=fW(i),o=s?-1:1;l(e,void 0,[])();function l(c,d,u){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const x=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(x?"<"+x+">":""))+")"})}return m;function m(){let x=pW,w,y,v;if((!t||a(c,d,u[u.length-1]||void 0))&&(x=Z3e(n(c,u)),x[0]===fR))return x;if("children"in c&&c.children){const j=c;if(j.children&&x[0]!==J3e)for(y=(s?j.children.length:-1)+o,v=u.concat(j);y>-1&&y<j.children.length;){const k=j.children[y];if(w=l(k,y,v)(),w[0]===fR)return w;y=typeof w[1]=="number"?w[1]:y+o}}return x}}}function Z3e(e){return Array.isArray(e)?e:typeof e=="number"?[X3e,e]:e==null?pW:[e]}function hW(e,t,n,s){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=s),Q3e(e,a,l,i);function l(c,d){const u=d[d.length-1],p=u?u.children.indexOf(c):void 0;return o(c,p,u)}}const sS={}.hasOwnProperty,eTe={};function tTe(e,t){const n=t||eTe,s=new Map,i=new Map,a=new Map,o={...O3e,...n.handlers},l={all:d,applyData:rTe,definitionById:s,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:c,options:n,patch:nTe,wrap:iTe};return hW(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const p=u.type==="definition"?s:i,m=String(u.identifier).toUpperCase();p.has(m)||p.set(m,u)}}),l;function c(u,p){const m=u.type,x=l.handlers[m];if(sS.call(l.handlers,m)&&x)return x(l,u,p);if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in u){const{children:y,...v}=u,j=By(v);return j.children=l.all(u),j}return By(u)}return(l.options.unknownHandler||sTe)(l,u,p)}function d(u){const p=[];if("children"in u){const m=u.children;let x=-1;for(;++x<m.length;){const w=l.one(m[x],u);if(w){if(x&&m[x-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=pR(w.value)),!Array.isArray(w)&&w.type==="element")){const y=w.children[0];y&&y.type==="text"&&(y.value=pR(y.value))}Array.isArray(w)?p.push(...w):p.push(w)}}}return p}}function nTe(e,t){e.position&&(t.position=LFe(e))}function rTe(e,t){let n=t;if(e&&e.data){const s=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof s=="string")if(n.type==="element")n.tagName=s;else{const o="children"in n?n.children:[n];n={type:"element",tagName:s,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,By(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function sTe(e,t){const n=t.data||{}
vendor: 10,765 bytes, lines 939-943
939,s="value"in t&&!(sS.call(n,"hProperties")||sS.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function iTe(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
940`});++s<e.length;)s&&n.push({type:"text",value:`
941`}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
942`}),n}function pR(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function hR(e,t){const n=tTe(e,t),s=n.one(e,void 0),i=V3e(n),a=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
943`},i),a}function aTe(e,t){return e&&"run"in e?async function(n,s){const i=hR(n,{file:s,...t});await e.run(i,s)}:function(n,s){return hR(n,{file:s,...e||t})}}function mR(e){if(e)throw e}var hw,gR;function oTe(){if(gR)return hw;gR=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},a=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var u=e.call(d,"constructor"),p=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!u&&!p)return!1;var m;for(m in d);return typeof m>"u"||e.call(d,m)},o=function(d,u){n&&u.name==="__proto__"?n(d,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):d[u.name]=u.newValue},l=function(d,u){if(u==="__proto__")if(e.call(d,u)){if(s)return s(d,u).value}else return;return d[u]};return hw=function c(){var d,u,p,m,x,w,y=arguments[0],v=1,j=arguments.length,k=!1;for(typeof y=="boolean"&&(k=y,y=arguments[1]||{},v=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});v<j;++v)if(d=arguments[v],d!=null)for(u in d)p=l(y,u),m=l(d,u),y!==m&&(k&&m&&(a(m)||(x=i(m)))?(x?(x=!1,w=p&&i(p)?p:[]):w=p&&a(p)?p:{},o(y,{name:u,newValue:c(k,w,m)})):typeof m<"u"&&o(y,{name:u,newValue:m}));return y},hw}var lTe=oTe();const mw=zm(lTe);function iS(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function cTe(){const e=[],t={run:n,use:s};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(c,...d){const u=e[++a];let p=-1;if(c){o(c);return}for(;++p<i.length;)(d[p]===null||d[p]===void 0)&&(d[p]=i[p]);i=d,u?dTe(u,l)(...d):o(null,...d)}}function s(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function dTe(e,t){let n;return s;function s(...o){const l=e.length>o.length;let c;l&&o.push(i);try{c=e.apply(this,o)}catch(d){const u=d;if(l&&n)throw u;return i(u)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const lo={basename:uTe,dirname:fTe,extname:pTe,join:hTe,sep:"/"};function uTe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');p0(e);let n=0,s=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1);return s<0?"":e.slice(n,s)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(s=i):(l=-1,s=o));return n===s?s=o:s<0&&(s=e.length),e.slice(n,s)}function fTe(e){if(p0(e),e.length===0)return".";let t=-1,n=e.length,s;for(;--n;)if(e.codePointAt(n)===47){if(s){t=n;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function pTe(e){p0(e);let t=e.length,n=-1,s=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){s=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===s+1?"":e.slice(i,n)}function hTe(...e){let t=-1,n;for(;++t<e.length;)p0(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":mTe(n)}function mTe(e){p0(e);const t=e.codePointAt(0)===47;let n=gTe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function gTe(e,t){let n="",s=0,i=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||s!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",s=0):(n=n.slice(0,c),s=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",s=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),s=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function p0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xTe={cwd:yTe};function yTe(){return"/"}function aS(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vTe(e){if(typeof e=="string")e=new URL(e);else if(!aS(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return bTe(e)}function bTe(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const s=t.codePointAt(n+2);if(s===70||s===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const gw=["history","path","basename","stem","extname","dirname"];class mW{constructor(t){let n;t?aS(t)?n={path:t}:typeof t=="string"||wTe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":xTe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<gw.length;){const a=gw[s];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)gw.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?lo.basename(this.path):void 0}set basename(t){yw(t,"basename"),xw(t,"basename"),this.path=lo.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?lo.dirname(this.path):void 0}set dirname(t){xR(this.basename,"dirname"),this.path=lo.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?lo.extname(this.path):void 0}set extname(t){if(xw(t,"extname"),xR(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=lo.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){aS(t)&&(t=vTe(t)),yw(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?lo.basename(this.path,this.extname):void 0}set stem(t){yw(t,"stem"),xw(t,"stem"),this.path=lo.join(this.dirname||"",t+(this.extname||""))}fail(t,n,s){const i=this.message(t,n,s);throw i.fatal=!0,i}info(t,n,s){const i=this.message(t,n,s);return i.fatal=void 0,i}message(t,n,s){const i=new Ms(t,n,s);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xw(e,t){if(e&&e.includes(lo.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+lo.sep+"`")}function yw(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function xR(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function wTe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jTe=(function(e){const s=this.constructor.prototype,i=s[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,s),a}),STe={}.hasOwnProperty;class NC extends jTe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=cTe()}copy(){const t=new NC;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(mw(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ww("data",this.frozen),this.namespace[t]=n,this):STe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ww("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const i=n.call(t,...s);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=hx(t),s=this.parser||this.Parser;return vw("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),vw("process",this.parser||this.Parser),bw("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=hx(t),c=s.parse(l);s.run(c,l,function(u,p,m){if(u||!p||!m)return d(u);const x=p,w=s.stringify(x,m);CTe(w)?m.value=w:m.result=w,d(u,m)});function d(u,p){u||!p?o(u):a?a(p):n(void 0,p)}}}processSync(t){let n=!1,s;return this.freeze(),vw("processSync",this.parser||this.Parser),bw("processSync",this.compiler||this.Compiler),this.process(t,i),vR("processSync","process",n),s;function i(a,o){n=!0,mR(a),s=o}}run(t,n,s){yR(t),this.freeze();const i=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?a(void 0,s):new Promise(a);function a(o,l){const c=hx(n);i.run(t,c,d);function d(u,p,m){const x=p||t;u?l(u):o?o(x):s(void 0,x,m)}}}runSync(t,n){let s=!1,i;return this.run(t,n,a),vR("runSync","run",s),i;function a(o,l){mR(o),i=l,s=!0}}stringify(t,n){this.freeze();const s=hx(n),i=this.compiler||this.Compiler;return bw("stringify",i),yR(t),i(t,s)}use(t,...n){const s=this.attachers,i=this.namespace;if(ww("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;
943function a(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[u,...p]=d;c(u,p)}else o(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function o(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(d.plugins),d.settings&&(i.settings=mw(!0,i.settings,d.settings))}function l(d){let u=-1;if(d!=null)if(Array.isArray(d))for(;++u<d.length;){const p=d[u];a(p)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,u){let p=-1,m=-1;for(;++p<s.length;)if(s[p][0]===d){m=p;break}if(m===-1)s.push([d,...u]);else if(u.length>0){let[x,...w]=u;const y=s[m][1];iS(y)&&iS(x)&&(x=mw(!0,y,x)),s[m]=[d,x,...w]}}}}const kTe=new NC().freeze();function vw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ww(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yR(e){if(!iS(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vR(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hx(e){return _Te(e)?e:new mW(e)}function _Te(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function CTe(e){return typeof e=="string"||ETe(e)}function ETe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FTe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bR=[],wR={allowDangerousHtml:!0},ATe=/^(https?|ircs?|mailto|xmpp)$/i,TTe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function NTe(e){const t=RTe(e),n=DTe(e);return ITe(t.runSync(t.parse(n),n),e)}function RTe(e){const t=e.rehypePlugins||bR,n=e.remarkPlugins||bR,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wR}:wR;return kTe().use(u3e).use(n).use(aTe,s).use(t)}function DTe(e){const t=e.children||"",n=new mW;return typeof t=="string"&&(n.value=t),n}function ITe(e,t){const n=t.allowedElements,s=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||PTe;for(const u of TTe)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+FTe+u.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),hW(e,d),VFe(e,{Fragment:r.Fragment,components:i,ignoreInvalidStyle:!0,jsx:r.jsx,jsxs:r.jsxs,passKeys:!0,passNode:!0});function d(u,p,m){if(u.type==="raw"&&m&&typeof p=="number")return o?m.children.splice(p,1):m.children[p]={type:"text",value:u.value},p;if(u.type==="element"){let x;for(x in uw)if(Object.hasOwn(uw,x)&&Object.hasOwn(u.properties,x)){const w=u.properties[x],y=uw[x];(y===null||y.includes(u.tagName))&&(u.properties[x]=c(String(w||""),x,u))}}if(u.type==="element"){let x=n?!n.includes(u.tagName):a?a.includes(u.tagName):!1;if(!x&&s&&typeof p=="number"&&(x=!s(u,p,m)),x&&m&&typeof p=="number")return l&&u.children?m.children.splice(p,1,...u.children):m.children.splice(p,1),p}}}function PTe(e){const t=e.indexOf(":"),n=e.indexOf("?"),s=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||s!==-1&&t>s||ATe.test(e.slice(0,t))?e:""}const BTe=new Set(["removed_by_recruiter","withdrawn"]);function OTe({applications:e,jobs:t,stages:n,onSendToJob:s,candidateName:i,onApplicationsChanged:a}){var F;const o=In(),[l,c]=g.useState([]),[d,u]=g.useState(new Set),[p,m]=g.useState(null),[x,w]=g.useState(!1),[y,v]=g.useState(!1),j=(e||[]).filter(A=>!BTe.has(A.status)&&!d.has(A.id)),k=A=>{c(C=>C.includes(A)?C.filter(D=>D!==A):[...C,A])},S=async A=>{v(!0),u(C=>new Set(C).add(A.id)),await ne.entities.JobApplication.update(A.id,{status:"removed_by_recruiter"}),setTimeout(()=>{const C=(e||[]).filter(D=>D.id!==A.id);a==null||a(C),u(D=>{const P=new Set(D);return P.delete(A.id),P}),c(D=>D.filter(P=>P!==A.id))},800),m(null),v(!1)},_=async()=>{v(!0);const A=[...l];u(new Set(A)),await Promise.all(A.map(C=>ne.entities.JobApplication.update(C,{status:"removed_by_recruiter"}))),setTimeout(()=>{const C=new Set(A),D=(e||[]).filter(P=>!C.has(P.id));a==null||a(D),u(new Set),c([])},800),w(!1),v(!1)};return j.length===0?r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:48,gap:12},children:[r.jsx(On,{size:28,style:{color:"#D1D5DB"}}
943),r.jsx("span",{style:{fontSize:13,color:"#9CA3AF",fontFamily:"var(--sv-font)"},children:"Nenhuma vaga ativa"}),r.jsxs("button",{onClick:s,style:{display:"flex",alignItems:"center",gap:5,fontSize:12,fontWeight:600,color:"#fff",background:"var(--sv-accent)",border:"none",borderRadius:"var(--sv-r-md)",padding:"8px 16px",cursor:"pointer",fontFamily:"var(--sv-font)",marginTop:4},children:[r.jsx(Ln,{size:13})," Enviar para vaga"]})]}):r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:2},children:r.jsxs("button",{onClick:s,style:{display:"flex",alignItems:"center",gap:5,fontSize:12,fontWeight:600,color:"#fff",background:"var(--sv-accent)",border:"none",borderRadius:"var(--sv-r-md)",padding:"7px 14px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:[r.jsx(Ln,{size:13})," Enviar para vaga"]})}),l.length>0&&r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#FEF2F2",border:"1px solid #FECACA",borderRadius:8,padding:"10px 16px"},children:[r.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"#111827",fontFamily:"var(--sv-font)"},children:[l.length," vaga",l.length>1?"s":""," selecionada",l.length>1?"s":""]}),r.jsxs("button",{onClick:()=>w(!0),style:{display:"flex",alignItems:"center",gap:5,fontSize:12,fontWeight:600,color:"#DC2626",background:"none",border:"1px solid #DC2626",borderRadius:6,padding:"5px 12px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:[r.jsx(zn,{size:13})," Remover das vagas"]})]}),j.map(A=>{const C=t==null?void 0:t[A.job_id],D=A.status||"pool",P=YA[D]||YA.pool,L=A.current_stage_id&&n[A.current_stage_id]?n[A.current_stage_id].name:Hie[D]||D,T=l.includes(A.id),R=d.has(A.id);return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 14px",background:R?"#FEF2F2":T?"#F0F4FF":"#fff",borderRadius:8,border:"1px solid var(--sv-border)",transition:"background 0.2s, opacity 0.4s",opacity:R?.5:1,cursor:"pointer"},onMouseEnter:U=>{!T&&!R&&(U.currentTarget.style.background="#F6F8FA")},onMouseLeave:U=>{!T&&!R&&(U.currentTarget.style.background="#fff")},children:[r.jsx("input",{type:"checkbox",checked:T,onChange:()=>k(A.id),style:{width:15,height:15,accentColor:"var(--sv-accent)",cursor:"pointer",flexShrink:0},onClick:U=>U.stopPropagation()}),r.jsx(On,{size:14,style:{color:"#9CA3AF",flexShrink:0}}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{onClick:U=>{U.stopPropagation(),o(`/app/vagas/${A.job_id}`)},style:{fontSize:13,fontWeight:600,color:"#1A1F36",fontFamily:"var(--sv-font)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"pointer"},onMouseEnter:U=>{U.currentTarget.style.color="#6C24F5",U.currentTarget.style.textDecoration="underline"},onMouseLeave:U=>{U.currentTarget.style.color="#1A1F36",U.currentTarget.style.textDecoration="none"},children:(C==null?void 0:C.title)||"Vaga"}),r.jsx("div",{style:{fontSize:11,color:"#9CA3AF",fontFamily:"var(--sv-font)"},children:(C==null?void 0:C.company_name)||""})]}),R?r.jsx("span",{style:{fontSize:11,fontWeight:600,background:"#F0F2F5",color:"#697386",borderRadius:20,padding:"3px 10px",fontFamily:"var(--sv-font)",whiteSpace:"nowrap"},children:"Removido"}):r.jsx("span",{style:{fontSize:11,fontWeight:600,background:P.bg,color:P.text,borderRadius:20,padding:"3px 10px",fontFamily:"var(--sv-font)",whiteSpace:"nowrap"},children:L}),r.jsx("span",{style:{fontSize:11,color:"#9CA3AF",fontFamily:"var(--sv-num)",fontFeatureSettings:'"tnum" 1',whiteSpace:"nowrap",flexShrink:0},children:Oc(A.applied_at||A.created_date)}),r.jsx(MTe,{app:A,job:C,candidateName:i,onRemove:()=>m(A)})]},A.id)}),p&&r.jsx(jR,{message:`Remover ${i||"candidato"} da vaga "${((F=t==null?void 0:t[p.job_id])==null?void 0:F.title)||"Vaga"}"?`,busy:y,onCancel:()=>m(null),onConfirm:()=>S(p)}),x&&r.jsx(jR,{message:`Remover candidato de ${l.length} vaga${l.length>1?"s":""}?`,busy:y,onCancel:()=>w(!1),onConfirm:_})]})}function MTe({app:e,job:t,candidateName:n,onRemove:s}){const[i,a]=g.useState(!1),o=g.useRef(null);return g.useEffect(()=>{if(!i)return;const l=c=>{o.current&&!o.current.contains(c.target)&&a(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[i]),r.jsxs("div",{ref:o,style:{position:"relative",flexShrink:0},children:[r.jsx("button",{onClick:l=>{l.stopPropagation(),a(c=>!c)},style:{width:28,height:28,display:"grid",placeItems:"center",background:"none",border:"none",borderRadius:6,cursor:"pointer",color:"#9
943CA3AF"},onMouseEnter:l=>l.currentTarget.style.background="#F0F2F5",onMouseLeave:l=>l.currentTarget.style.background="none",children:r.jsx(No,{size:15})}),i&&r.jsx("div",{style:{position:"absolute",right:0,top:32,background:"#fff",border:"1px solid #E5E7EB",borderRadius:8,boxShadow:"0 4px 12px rgba(0,0,0,0.1)",zIndex:50,minWidth:180,padding:4},children:r.jsxs("button",{onClick:l=>{l.stopPropagation(),a(!1),s()},style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"8px 12px",fontSize:13,fontWeight:500,color:"#DC2626",background:"none",border:"none",borderRadius:6,cursor:"pointer",fontFamily:"var(--sv-font)"},onMouseEnter:l=>l.currentTarget.style.background="#FEF2F2",onMouseLeave:l=>l.currentTarget.style.background="none",children:[r.jsx(zn,{size:14})," Remover da vaga"]})})]})}function jR({message:e,busy:t,onCancel:n,onConfirm:s}){return r.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.3)",zIndex:1e3,display:"grid",placeItems:"center"},onClick:n,children:r.jsxs("div",{onClick:i=>i.stopPropagation(),style:{background:"#fff",borderRadius:12,padding:"24px 28px",maxWidth:380,width:"90%",boxShadow:"0 8px 24px rgba(0,0,0,0.15)"},children:[r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"#111827",fontFamily:"var(--sv-font)",marginBottom:16},children:e}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[r.jsx("button",{onClick:n,disabled:t,style:{fontSize:13,fontWeight:500,color:"#6B7280",background:"none",border:"1px solid #E5E7EB",borderRadius:6,padding:"7px 16px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Cancelar"}),r.jsx("button",{onClick:s,disabled:t,style:{fontSize:13,fontWeight:600,color:"#fff",background:"#DC2626",border:"none",borderRadius:6,padding:"7px 16px",cursor:t?"wait":"pointer",fontFamily:"var(--sv-font)",opacity:t?.6:1},children:t?"Removendo...":"Confirmar"})]})]})})}function LTe(e){return e?e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`:""}function zTe(e){const t=(e.file_name||"").toLowerCase(),n=(e.file_type||"").toLowerCase();return t.endsWith(".pdf")||n==="application/pdf"?"pdf":/\.(png|jpe?g|gif|webp|svg)$/.test(t)||n.startsWith("image/")?"image":/\.(docx?|rtf)$/.test(t)||n.includes("word")||n.includes("rtf")?"doc":"other"}function WTe({attachment:e,onClose:t,onDelete:n,onForward:s}){const[i,a]=g.useState(!1),[o,l]=g.useState(!1),[c,d]=g.useState(!1);g.useEffect(()=>{requestAnimationFrame(()=>a(!0));const y=v=>{v.key==="Escape"&&t()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[t]);const u=e,p=zTe(u),m=()=>{const y=document.createElement("a");y.href=u.file_url,y.download=u.file_name||"download",y.target="_blank",y.rel="noopener noreferrer",document.body.appendChild(y),y.click(),document.body.removeChild(y)},x=async()=>{d(!0),await ne.entities.TalentProfileAttachment.delete(u.id),n==null||n(u.id),t()},w=({icon:y,title:v,onClick:j,hoverColor:k})=>{const[S,_]=g.useState(!1);return r.jsx("button",{onClick:j,title:v,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),style:{width:32,height:32,display:"grid",placeItems:"center",background:S?"#F6F8FA":"transparent",border:"none",borderRadius:6,cursor:"pointer",color:S?k||"#1A1F36":"#9CA3AF",transition:"background 0.12s, color 0.12s"},children:r.jsx(y,{size:15})})};return r.jsx("div",{onClick:t,style:{position:"fixed",inset:0,zIndex:1500,background:i?"rgba(0,0,0,0.3)":"rgba(0,0,0,0)",transition:"background 0.2s ease"},children:r.jsxs("div",{onClick:y=>y.stopPropagation(),style:{position:"absolute",top:0,right:0,bottom:0,width:"min(720px, 100vw)",background:"#FFFFFF",boxShadow:"-8px 0 24px rgba(0,0,0,0.12)",borderRadius:"12px 0 0 12px",display:"flex",flexDirection:"column",transform:i?"translateX(0)":"translateX(100%)",transition:"transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)"},children:[r.jsxs("div",{style:{flexShrink:0,padding:"16px 20px",borderBottom:"1px solid #E3E8EE",display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:14,fontWeight:500,color:"#1A1F36",fontFamily:"var(--sv-font)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.file_name}
943),r.jsx("div",{style:{fontSize:11,color:"#9CA3AF",fontFamily:"var(--sv-num)",marginTop:2},children:LTe(u.file_size_bytes)})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2,flexShrink:0},children:[s&&r.jsx(w,{icon:pa,title:"Encaminhar por e-mail",onClick:()=>s(u)}),r.jsx(w,{icon:Wa,title:"Download",onClick:m}),r.jsx(w,{icon:zn,title:"Excluir",onClick:()=>l(!0),hoverColor:"#DC2626"}),r.jsx("div",{style:{width:1,height:20,background:"#E3E8EE",margin:"0 6px"}}),r.jsx(w,{icon:Jt,title:"Fechar",onClick:t})]})]}),r.jsxs("div",{style:{flex:1,overflow:"hidden",background:"#F6F8FA"},children:[p==="pdf"&&r.jsx("iframe",{src:u.file_url,style:{width:"100%",height:"100%",border:"none"},title:u.file_name}),p==="image"&&r.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",padding:24},children:r.jsx("img",{src:u.file_url,alt:u.file_name,style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain",borderRadius:4}})}),p==="doc"&&r.jsx("iframe",{src:`https://docs.google.com/viewer?url=${encodeURIComponent(u.file_url)}&embedded=true`,style:{width:"100%",height:"100%",border:"none"},title:u.file_name}),p==="other"&&r.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12},children:[r.jsx(ui,{size:36,style:{color:"#CBD5E1"}}),r.jsx("span",{style:{fontSize:13,color:"#9CA3AF",fontFamily:"var(--sv-font)",textAlign:"center"},children:"Pré-visualização não disponível para este tipo de arquivo"}),r.jsxs("button",{onClick:m,style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:13,fontWeight:600,color:"#fff",background:"#6C24F5",border:"none",borderRadius:8,padding:"10px 20px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:[r.jsx(Wa,{size:14})," Download"]})]})]}),o&&r.jsx("div",{onClick:()=>!c&&l(!1),style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.25)",display:"grid",placeItems:"center",zIndex:10,borderRadius:"12px 0 0 12px"},children:r.jsxs("div",{onClick:y=>y.stopPropagation(),style:{background:"#fff",borderRadius:12,padding:"24px 28px",maxWidth:380,width:"90%",boxShadow:"0 8px 24px rgba(0,0,0,0.15)"},children:[r.jsxs("div",{style:{fontSize:14,fontWeight:600,color:"#111827",fontFamily:"var(--sv-font)",marginBottom:16},children:['Excluir "',u.file_name,'"?']}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[r.jsx("button",{onClick:()=>l(!1),disabled:c,style:{fontSize:13,fontWeight:500,color:"#6B7280",background:"none",border:"1px solid #E5E7EB",borderRadius:6,padding:"7px 16px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Cancelar"}),r.jsx("button",{onClick:x,disabled:c,style:{fontSize:13,fontWeight:600,color:"#fff",background:"#DC2626",border:"none",borderRadius:6,padding:"7px 16px",cursor:c?"wait":"pointer",fontFamily:"var(--sv-font)",opacity:c?.6:1},children:c?"Excluindo...":"Confirmar"})]})]})})]})})}function $Te(e){return e?e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`:""}const UTe=["phone","email","headline","current_company","current_title","location","summary_executive","linkedin_url"],VTe=["salary_expectation"],HTe=["experiences","education","languages","skills"];function qTe(e,t){var s;const n={};for(const i of UTe)!e[i]&&t[i]&&(n[i]=t[i]);for(const i of VTe)(!e[i]||e[i]===0)&&t[i]&&(n[i]=t[i]);for(const i of HTe)(!e[i]||e[i].length===0)&&((s=t[i])==null?void 0:s.length)>0&&(n[i]=t[i]);return n}function GTe({attachments:e,talentProfileId:t,profile:n,onProfileUpdated:s}){const[i,a]=g.useState(e||[]),[o,l]=g.useState([]),[c,d]=g.useState(!1),[u,p]=g.useState(!1),[m,x]=g.useState(null),[w,y]=g.useState(null),[v,j]=g.useState(!1),[k,S]=g.useState(!1),[_,F]=g.useState(null),A=g.useRef(null),C=U=>l(I=>I.includes(U)?I.filter(H=>H!==U):[...I,U]),D=async U=>{var W;const I=(W=U.target.files)==null?void 0:W[0];if(!I||!t)return;d(!0),x(null);const{file_url:H}=await ne.integrations.Core.UploadFile({file:I}),V=await ne.entities.TalentProfileAttachment.create({talent_profile_id:t,file_url:H,file_name:I.name,file_size_bytes:I.size,file_type:I.type,uploaded_at:new Date().toISOString()});a(O=>[V,...O]),d(!1),A.current&&(A.current.value="");const X=I.name.toLowerCase();(X.endsWith(".pdf")||X.endsWith(".docx")||X.endsWith(".doc"))&&n&&(p(!0),ne.functions.invoke("parseProfileFromCV",{file_url:H}).then(O=>{const G=(O==null?void 0:O.data)||O;if(!(G!=null&&G.success)||!(G!=null&&G.profile)){p(!1);return}const M=qTe(n,G.profile);if(Object.keys(M).length===0){p(!1),x({type:"neutral",text:"CV processado — perfil já estava completo"}),setTimeout(()=>x(null),4e3);return}ne.entities.TalentProfile.update(n.id,M).then(()=>{s==null||s(M),p(!1);const z=Object.keys(M).length;x({type:"success",text:`Perfil atualizado com ${z} campo${z>1?"s":""} do CV`}),setTimeout(()=>x(null),5e3),ne.functions.invoke("generateCandidateSummary",{talent_profile_id:n.id}).catch(()=>{})}).catch(()=>p(!1))}).catch(()=>p(!1)))},P=async U=>{S(!0),await ne.entities.TalentProfileAttachment.delete(U.id),a(I=>I.filter(H=>H.id!==U.id)),l(I=>I.filter(H=>H!==U.id)),y(null),S(!1)},L=async()=>{S(!0),await Promise.all(o.map(I=>ne.entities.TalentProfileAttachment.delete(I)));const U=new Set(o);a(I=>I.filter(H=>!U.has(H.id))),l([]),j(!1),S(!1)},T=()=>{if(u)return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 14px",background:"#F0F4FF",borderRadius:8,fontSize:12,color:"#4338CA",fontFamily:"var(--sv-font)",fontWeight:500},children:[r.jsx(rt,{size:13,className:"animate-spin"})," Analisando CV para atualizar perfil..."]});if(m){const U=m.type==="success";return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 14px",background:U?"#ECFDF5":"#F9FAFB",borderRadius:8,fontSize:12,color:U?"#16A34A":"#6B7280",fontFamily:"var(--sv-font)",fontWeight:500},children:[r.jsx(fn,{size:13})," ",m.text]})}return null},R=({prominent:U})=>r.jsxs(r.Fragment,{children:[r.jsxs("button",{onClick:()=>{var I;return(I=A.current)==null?void 0:I.click()},disabled:c,style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:12,fontWeight:600,color:"#fff",background:"#6C24F5",border:"none",borderRadius:8,padding:U?"10px 20px":"7px 14px",cursor:c?"wait":"pointer",fontFamily:"var(--sv-font)",opacity:c?.7:1},children:[c?r.jsx(rt,{size:13,className:"animate-spin"}):r.jsx(Ln,{size:13}),c?"Enviando...":"Enviar arquivo"]}),r.jsx("input",{ref:A,type:"file",accept:".pdf,.docx,.doc,.png,.jpg,.jpeg,.gif,.mp4",style:{display:"none"},onChange:D})]});return i.length===0&&!c?r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:48,gap:10},children:[r.jsx(ui,{size:28,style:{color:"#CBD5E1"}}),r.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#1A1F36",fontFamily:"var(--sv-font)"},children:"Nenhum arquivo"}
943),r.jsx("span",{style:{fontSize:12,color:"#9CA3AF",fontFamily:"var(--sv-font)"},children:"Envie CVs e documentos para este candidato."}),r.jsx("div",{style:{marginTop:8},children:r.jsx(R,{prominent:!0})}),r.jsx(T,{})]}):r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:2},children:r.jsx(R,{})}),r.jsx(T,{}),o.length>0&&r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#FEF2F2",border:"1px solid #FECACA",borderRadius:8,padding:"10px 16px"},children:[r.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"#111827",fontFamily:"var(--sv-font)"},children:[o.length," arquivo",o.length>1?"s":""," selecionado",o.length>1?"s":""]}),r.jsxs("button",{onClick:()=>j(!0),style:{display:"flex",alignItems:"center",gap:5,fontSize:12,fontWeight:600,color:"#DC2626",background:"none",border:"1px solid #DC2626",borderRadius:6,padding:"5px 12px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:[r.jsx(zn,{size:13})," Excluir selecionados"]})]}),i.map(U=>{const I=o.includes(U.id);return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 14px",background:I?"#F0F4FF":"#fff",borderRadius:8,border:"1px solid var(--sv-border)",transition:"background 0.15s"},onMouseEnter:H=>{I||(H.currentTarget.style.background="#F6F8FA")},onMouseLeave:H=>{I||(H.currentTarget.style.background=I?"#F0F4FF":"#fff")},children:[r.jsx("input",{type:"checkbox",checked:I,onChange:()=>C(U.id),style:{width:15,height:15,accentColor:"var(--sv-accent)",cursor:"pointer",flexShrink:0}}),r.jsx(ui,{size:15,style:{color:"var(--sv-accent)",flexShrink:0}}),r.jsxs("div",{onClick:()=>F(U),style:{flex:1,minWidth:0,cursor:"pointer"},children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36",fontFamily:"var(--sv-font)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:U.file_name}),r.jsxs("div",{style:{fontSize:11,color:"#9CA3AF",fontFamily:"var(--sv-num)",display:"flex",gap:8},children:[U.file_size_bytes&&r.jsx("span",{children:$Te(U.file_size_bytes)}),r.jsx("span",{children:Oc(U.uploaded_at||U.created_date)})]})]}),r.jsx("a",{href:U.file_url,target:"_blank",rel:"noopener noreferrer",title:"Baixar",style:{display:"flex",flexShrink:0,color:"#9CA3AF",padding:4,borderRadius:4},onMouseEnter:H=>H.currentTarget.style.color="#374151",onMouseLeave:H=>H.currentTarget.style.color="#9CA3AF",children:r.jsx(Wa,{size:14})}),r.jsx("button",{onClick:()=>y(U),title:"Excluir",style:{display:"flex",flexShrink:0,color:"#9CA3AF",background:"none",border:"none",padding:4,borderRadius:4,cursor:"pointer"},onMouseEnter:H=>H.currentTarget.style.color="#DC2626",onMouseLeave:H=>H.currentTarget.style.color="#9CA3AF",children:r.jsx(zn,{size:14})})]},U.id)}),w&&r.jsx(SR,{message:`Excluir "${w.file_name}"?`,busy:k,onCancel:()=>y(null),onConfirm:()=>P(w)}),v&&r.jsx(SR,{message:`Excluir ${o.length} arquivo${o.length>1?"s":""}?`,busy:k,onCancel:()=>j(!1),onConfirm:L}),_&&r.jsx(WTe,{attachment:_,onClose:()=>F(null),onDelete:U=>{a(I=>I.filter(H=>H.id!==U)),l(I=>I.filter(H=>H!==U))}})]})}function SR({message:e,busy:t,onCancel:n,onConfirm:s}){return r.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.3)",zIndex:1e3,display:"grid",placeItems:"center"},onClick:n,children:r.jsxs("div",{onClick:i=>i.stopPropagation(),style:{background:"#fff",borderRadius:12,padding:"24px 28px",maxWidth:380,width:"90%",boxShadow:"0 8px 24px rgba(0,0,0,0.15)"},children:[r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"#111827",fontFamily:"var(--sv-font)",marginBottom:16},children:e}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[r.jsx("button",{onClick:n,disabled:t,style:{fontSize:13,fontWeight:500,color:"#6B7280",background:"none",border:"1px solid #E5E7EB",borderRadius:6,padding:"7px 16px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Cancelar"}),r.jsx("button",{onClick:s,disabled:t,style:{fontSize:13,fontWeight:600,color:"#fff",background:"#DC2626",border:"none",borderRadius:6,padding:"7px 16px",cursor:t?"wait":"pointer",fontFamily:"var(--sv-font)",opacity:t?.6:1},children:t?"Excluindo...":"Confirmar"})]})]})})}const KTe=[{key:"all",label:"Tudo"},{key:"note",label:"Notas"},{key:"transition",label:"Movimentações"},{key:"email",label:"E-mails"},{key:"file",label:"Arquivos"}],kR={note:{icon:GH,color:"#D97706",bg:"#FEF3C7"},transition:{icon:Rc,color:"#6C24F5",bg:"#F0EFFF"},rejection:{icon:Jt,color:"#EF4444",bg:"#FEE2E2"},hired:{icon:fn,color:"#059669",bg:"#D1FAE5"},email:{icon:mr,color:"#3B82F6",bg:"#EFF6FF"},file:{icon:ui,color:"#EF4444",bg:"#FEE2E2"},added:{icon:v8,color:"#059669",bg:"#D1FAE5"}},YTe={sourcing_manual:"Manual",import_csv:"Import CSV",linkedin:"LinkedIn",cv:"Upload CV",jobs_organico:"
943Candidatura orgânica",chrome_extension:"Extensão Chrome"};function jh(e,t){return e?t[e]||e.split("@")[0]:"Sistema"}function XTe({applications:e,jobs:t,wsId:n,talentProfileId:s,workspaceTalent:i}){const a=In(),[o,l]=g.useState("all"),[c,d]=g.useState(!0),[u,p]=g.useState([]),[m,x]=g.useState([]),[w,y]=g.useState([]),[v,j]=g.useState([]),[k,S]=g.useState({}),[_,F]=g.useState({}),A=g.useMemo(()=>new Set((e||[]).map(L=>L.id)),[e]),C=g.useMemo(()=>{const L={};return(e||[]).forEach(T=>{L[T.id]=T.job_id}),L},[e]);g.useEffect(()=>{if(!s||!n)return;let L=!0;return d(!0),Promise.all([ne.entities.RecruiterNote.filter({talent_profile_id:s,workspace_id:n}).catch(()=>[]),ne.entities.StageTransition.filter({workspace_id:n}).catch(()=>[]),ne.entities.CandidateMessage.filter({talent_profile_id:s,workspace_id:n}).catch(()=>[]),ne.entities.TalentProfileAttachment.filter({talent_profile_id:s}).catch(()=>[]),ne.entities.PipelineStage.filter({workspace_id:n}).catch(()=>[]),ne.entities.Membership.filter({workspace_id:n,status:"active"}).catch(()=>[])]).then(async([T,R,U,I,H,V])=>{if(!L)return;const X={};(H||[]).forEach(O=>{X[O.id]=O}),S(X);const N={},W=(V||[]).map(O=>O.user_email).filter(Boolean);W.length>0&&(await ne.entities.User.filter({email:{$in:W.slice(0,50)}}).catch(()=>[])||[]).forEach(G=>{G.email&&G.full_name&&(N[G.email]=G.full_name)}),F(N),p(T||[]),x((R||[]).filter(O=>A.has(O.application_id))),y(U||[]),j(I||[]),d(!1)}),()=>{L=!1}},[s,n,A]);const D=g.useMemo(()=>{const L=[];if((u||[]).forEach(T=>{const R=T.application_id?C[T.application_id]:null;L.push({type:"note",filterType:"note",date:T.created_date,actor:jh(T.created_by,_),description:"adicionou uma nota",jobId:R,jobName:R&&t[R]?t[R].title:null,content:T.note_text})}),(m||[]).forEach(T=>{const R=k[T.to_stage_id],U=k[T.from_stage_id],I=R==null?void 0:R.internal_status,H=I==="rejected",V=I==="hired",X=C[T.application_id];let N="transition";H?N="rejection":V&&(N="hired");let W=`moveu de ${(U==null?void 0:U.name)||"—"} para ${(R==null?void 0:R.name)||"etapa"}`;H&&(W=`rejeitou candidato na etapa ${(U==null?void 0:U.name)||"—"}`),V&&(W="contratou candidato"),L.push({type:N,filterType:"transition",date:T.moved_at||T.created_date,actor:jh(T.moved_by,_),description:W,jobId:X,jobName:X&&t[X]?t[X].title:null,content:T.rejection_reason||T.notes||null,meta:{fromStage:U==null?void 0:U.name,toStage:R==null?void 0:R.name,isRejection:H,isHired:V}})}),(w||[]).forEach(T=>{const R=T.direction==="sent";L.push({type:"email",filterType:"email",date:T.sent_at||T.created_date,actor:R?jh(T.sender_email,_):T.sender_email||"Candidato",description:R?"enviou e-mail":"recebeu e-mail",jobId:null,jobName:null,content:T.subject||"(sem assunto)"})}),(v||[]).forEach(T=>{L.push({type:"file",filterType:"file",date:T.uploaded_at||T.created_date,actor:jh(T.created_by_id,_),description:"anexou",jobId:null,jobName:null,content:T.file_name,meta:{fileUrl:T.file_url}})}),i){const T=i.source,R=YTe[T]||T||"Manual";L.push({type:"added",filterType:"all",date:i.added_at||i.created_date,actor:jh(i.added_by||i.created_by_id,_),description:`adicionou candidato via ${R}`,jobId:null,jobName:null,content:null})}return L.sort((T,R)=>new Date(R.date||0)-new Date(T.date||0)),L},[u,m,w,v,i,k,t,C,_]),P=o==="all"?D:D.filter(L=>L.filterType===o);return c?r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:48,color:"#9CA3AF"},children:[r.jsx(rt,{size:18,className:"animate-spin",style:{marginRight:8}})," Carregando histórico..."]}):r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[r.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:KTe.map(L=>{const T=o===L.key;return r.jsx("button",{onClick:()=>l(L.key),style:{fontSize:12,fontWeight:500,fontFamily:"var(--sv-font)",padding:"5px 14px",borderRadius:16,cursor:"pointer",border:T?"none":"1px solid #E3E8EE",background:T?"#6C24F5":"#F6F8FA",color:T?"#fff":"#697386",transition:"all 0.15s"},children:L.label},L.key)})}),P.length===0?r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:48,gap:8,color:"#9
943CA3AF",fontFamily:"var(--sv-font)"},children:[r.jsx(Di,{size:24}),r.jsx("span",{style:{fontSize:13},children:"Nenhum histórico registrado"})]}):r.jsxs("div",{style:{position:"relative",paddingLeft:28},children:[r.jsx("div",{style:{position:"absolute",left:11,top:4,bottom:4,width:1.5,background:"#E3E8EE",borderRadius:1}}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:0},children:P.map((L,T)=>r.jsx(JTe,{event:L,navigate:a},T))})]})]})}function JTe({event:e,navigate:t}){var a;const n=kR[e.type]||kR.transition,s=n.icon,i=e.type==="rejection";return r.jsxs("div",{style:{position:"relative",paddingBottom:20},children:[r.jsx("div",{style:{position:"absolute",left:-28,top:0,width:24,height:24,borderRadius:"50%",background:n.bg,display:"grid",placeItems:"center",border:"2px solid #fff"},children:r.jsx(s,{size:12,style:{color:n.color}})}),r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",fontSize:13,fontFamily:"var(--sv-font)",lineHeight:1.4},children:[r.jsx("span",{style:{fontWeight:500,color:"#1A1F36"},children:e.actor}),r.jsx("span",{style:{color:"#697386"},children:e.description}),e.jobName&&r.jsxs("button",{onClick:()=>t(`/app/vagas/${e.jobId}`),style:{display:"inline-flex",alignItems:"center",gap:3,fontSize:11,padding:"1px 8px",borderRadius:4,background:"#F6F8FA",border:"0.5px solid #E3E8EE",color:"#697386",cursor:"pointer",fontFamily:"var(--sv-font)",fontWeight:500},children:[r.jsx(On,{size:10})," ",e.jobName]})]}),r.jsx("div",{style:{fontSize:11,color:"#9CA3AF",fontFamily:"var(--sv-num)",marginTop:2},children:Oc(e.date)}),e.content&&r.jsx("div",{style:{marginTop:6,padding:"8px 12px",borderRadius:6,fontSize:12,lineHeight:1.5,fontFamily:"var(--sv-font)",background:i?"#FEF2F2":"#F6F8FA",borderLeft:i?"3px solid #EF4444":"none",color:i?"#991B1B":"#4B5563"},children:e.type==="file"&&((a=e.meta)!=null&&a.fileUrl)?r.jsx("a",{href:e.meta.fileUrl,target:"_blank",rel:"noopener noreferrer",style:{color:"#6C24F5",fontWeight:500,textDecoration:"underline",textUnderlineOffset:2},children:e.content}):e.content})]})]})}function jw({icon:e,title:t,onClick:n}){const[s,i]=g.useState(!1);return r.jsx("button",{onClick:n,title:t,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{width:32,height:32,display:"grid",placeItems:"center",background:s?"#F6F8FA":"transparent",border:"none",borderRadius:6,cursor:"pointer",color:s?"#1A1F36":"#9CA3AF",transition:"background 0.12s, color 0.12s"},children:r.jsx(e,{size:15})})}function QTe({email:e,onClose:t,onReply:n}){const[s,i]=g.useState(!1);g.useEffect(()=>{requestAnimationFrame(()=>i(!0));const w=y=>{y.key==="Escape"&&t()};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[t]);const a=e,o=a.subject||"(sem assunto)",l=a.sender_email||"—",c=a.recipient_email||"—",d=a.sent_at||a.created_date,u=!!(a.body_html||a.html_body),p=a.body_html||a.html_body||"",m=a.body_text||a.body||"",x=()=>{const w=`<!DOCTYPE html>
944<html><head><meta charset="utf-8"><title>${o}</title>
945<style>
946body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin: 40px; color: #1A1F36; font-size: 14px; line-height: 1.7; }
947.header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #E3E8EE; }
948.label { font-size: 12px; color: #697386; margin-bottom: 4px; }
949.subject { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
950img { max-width: 100%; }
951</style></head><body>
952<div class="header">
953<div class="subject">${o}</div>
954<div class="label"><strong>De:</strong> ${l}</div>
955<div class="label"><strong>Para:</strong> ${c}</div>
956<div class="label"><strong>Data:</strong> ${d?new Date(d).toLocaleString("pt-BR"):"—"}</div>
957</div>
958<div>${u?p:`<pre style="white-space:pre-wrap;font-family:inherit;">${m}</pre>`}</div>
959</body></html>`,y=new Blob([w],{type:"text/html"}),v=URL.createObjectURL(y),j=window.open(v,"_blank");j&&j.addEventListener("load",()=>{setTimeout(()=>j.print(),300)}),setTimeout(()=>URL.revokeObjectURL(v),6e4)};return r.jsx("div",{onClick:t,style:{position:"fixed",inset:0,zIndex:1500,background:s?"rgba(0,0,0,0.3)":"rgba(0,0,0,0)",transition:"background 0.2s ease"},children:r.jsxs("div",{onClick:w=>w.stopPropagation(),style:{position:"absolute",top:0,right:0,bottom:0,width:"min(720px, 100vw)",background:"#FFFFFF",boxShadow:"-8px 0 24px rgba(0,0,0,0.12)",borderRadius:"12px 0 0 12px",display:"flex",flexDirection:"column",transform:s?"translateX(0)":"translateX(100%)",transition:"transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)"},children:[r.jsxs("div",{style:{flexShrink:0,padding:"16px 20px",borderBottom:"1px solid #E3E8EE",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12},children:[r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:15,fontWeight:500,color:"#1A1F36",fontFamily:"var(--sv-font)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o}),r.jsxs("div",{style:{fontSize:12,color:"#697386",fontFamily:"var(--sv-font)",marginTop:4},children:["De: ",l,"  →  Para: ",c]}
959),r.jsx("div",{style:{fontSize:11,color:"#9CA3AF",fontFamily:"var(--sv-num)",marginTop:2},children:Oc(d)})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2,flexShrink:0,marginTop:2},children:[n&&r.jsx(jw,{icon:wV,title:"Responder",onClick:()=>n(a)}),r.jsx(jw,{icon:Wa,title:"Baixar PDF",onClick:x}),r.jsx("div",{style:{width:1,height:20,background:"#E3E8EE",margin:"0 6px"}}),r.jsx(jw,{icon:Jt,title:"Fechar",onClick:t})]})]}),r.jsx("div",{style:{flex:1,overflowY:"auto",padding:"20px 24px"},children:u?r.jsx(XP,{html:p,height:"calc(100vh - 200px)"}):r.jsx("pre",{style:{fontSize:14,color:"#1A1F36",lineHeight:1.7,fontFamily:"var(--sv-font)",whiteSpace:"pre-wrap",margin:0,overflowWrap:"break-word"},children:m||"(sem conteúdo)"})}),r.jsx("style",{children:`
960          .email-preview-drawer img { max-width: 100% !important; height: auto !important; }
961        `})]})})}const ZTe={behavioral:"Comportamental",cognitive:"Cognitivo",language:"Idiomas",culture:"Cultura",role_specific:"Cargo",custom:"Personalizado"},mx=["#6C24F5","#1EA672","#EF4444","#D97706","#3B82F6","#EC4899","#8B5CF6","#14B8A6"];function _R({icon:e,title:t,onClick:n}){const[s,i]=g.useState(!1);return r.jsx("button",{onClick:n,title:t,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{width:32,height:32,display:"grid",placeItems:"center",background:s?"#F6F8FA":"transparent",border:"none",borderRadius:6,cursor:"pointer",color:s?"#1A1F36":"#9CA3AF",transition:"background 0.12s, color 0.12s"},children:r.jsx(e,{size:15})})}function Ku({children:e}){return r.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px",color:"#9CA3AF",marginBottom:10,fontFamily:"var(--sv-font)"},children:e})}function e6e({assessment:e,onClose:t,candidateName:n,candidateEmail:s,candidateAvatar:i}){const[a,o]=g.useState(!1);g.useEffect(()=>{requestAnimationFrame(()=>o(!0));const V=X=>{X.key==="Escape"&&t()};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[t]);const l=e,c=l.result||{},d=l.template||{},u=c.detailed_interpretation||{},p=c.metadata||{},m=d.category,x=ZTe[m]||m||"Avaliação",w=d.name_pt||d.name||l.templateName||"Avaliação",y=c.computed_at||l.completed_at||l.date,v=u.type_code||p.type_code||c.profile_label||null,j=u.type_name||p.type_name||null,k=u.type_description||p.type_description||null,S=c.dimension_scores||{},_=d.dimensions||[],F=u.axes||p.axes||null,A=c.summary_pt||c.summary||"",C=c.strengths_pt||c.strengths||[],D=c.development_areas||[],P=c.communication_style_pt||c.communication_style||"",L=c.management_tips_pt||c.management_tips||"",T=u.attention_point||p.attention_point||null,R=u.development_point||p.development_point||null,U=F?Array.isArray(F)&&F.length>0:Object.keys(S).length>0,I=!!(v&&(j||k)),H=()=>{const V=window.open("","_blank");if(!V)return;const X=document.getElementById("assessment-report-body");X&&(V.document.write(`<!DOCTYPE html><html><head><meta charset="utf-8"><title>${w}</title><style>body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;margin:32px;color:#1A1F36;font-size:14px;line-height:1.7;}@media print{body{margin:20px;}}</style></head><body>${X.innerHTML}</body></html>`),V.document.close(),V.addEventListener("load",()=>setTimeout(()=>V.print(),300)))};return r.jsx("div",{onClick:t,style:{position:"fixed",inset:0,zIndex:1500,background:a?"rgba(0,0,0,0.3)":"rgba(0,0,0,0)",transition:"background 0.2s ease"},children:r.jsxs("div",{onClick:V=>V.stopPropagation(),style:{position:"absolute",top:0,right:0,bottom:0,width:"min(720px, 100vw)",background:"#FFFFFF",boxShadow:"-8px 0 24px rgba(0,0,0,0.12)",borderRadius:"12px 0 0 12px",display:"flex",flexDirection:"column",transform:a?"translateX(0)":"translateX(100%)",transition:"transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)"},children:[r.jsxs("div",{style:{flexShrink:0,padding:"16px 20px",borderBottom:"1px solid #E3E8EE",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12},children:[r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:15,fontWeight:500,color:"#1A1F36",fontFamily:"var(--sv-font)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w}),r.jsxs("div",{style:{fontSize:12,color:"#697386",fontFamily:"var(--sv-font)",marginTop:4},children:[x," · ",Oc(y)]})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2,flexShrink:0,marginTop:2},children:[r.jsx(_R,{icon:Wa,title:"Baixar PDF",onClick:H}),r.jsx("div",{style:{width:1,height:20,background:"#E3E8EE",margin:"0 6px"}}),r.jsx(_R,{icon:Jt,title:"Fechar",onClick:t})]})]}),r.jsxs("div",{id:"assessment-report-body",style:{flex:1,overflowY:"auto",padding:"20px 24px"},children:[r.jsx(t6e,{name:n,email:s,avatar:i,date:y,instrumentLabel:x}),I&&r.jsx(n6e,{code:v,name:j,description:k}),A&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx(Ku,{children:"Resumo"}),r.jsx("p",{style:{fontSize:13,color:"#4B5563",lineHeight:1.7,fontFamily:"var(--sv-font)",margin:0},children:A})]}),U&&r.jsxs("div",{style:{marginBottom:24},children:[r.jsx(Ku,{children:"Posicionamento por eixo"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:20},children:F?F.map((V,X)=>r.jsx(CR,{axis:V,color:mx[X%mx.length],index:X},X)):Object.entries(S).map(([V,X],N)=>{const W=_.find(G=>G.key===V),O={category:(W==null?void 0:W.label_pt)||(W==null?void 0:W.label)||V,left_label:"",right_label:"",score:typeof X=="number"?X:50};return r.jsx(CR,{axis:O,color:mx[N%mx.length],index:N},V)})})]}),(T||R)&&r.jsxs("div",{style:{display:"grid",gridTemplateColumns:T&&R?"1fr 1fr":"1fr",gap:10,marginBottom:20},children:[T&&r.jsx(ER,{title:"Ponto de atenção",text:typeof T=="string"?T:T.description||T.text||JSON.stringify(T),borderColor:"#D97706",bg:"#FFFBEB",titleColor:"#92400E"}
961),R&&r.jsx(ER,{title:"Desenvolvimento",text:typeof R=="string"?R:R.description||R.text||JSON.stringify(R),borderColor:"#E5993E",bg:"#FFF7ED",titleColor:"#9A3412"})]}),C.length>0&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx(Ku,{children:"Pontos fortes"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:C.map((V,X)=>r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8,fontSize:13,color:"#4B5563",lineHeight:1.6,fontFamily:"var(--sv-font)"},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"#6C24F5",flexShrink:0,marginTop:7}}),V]},X))})]}),D.length>0&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx(Ku,{children:"Áreas de desenvolvimento"}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:D.map((V,X)=>r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8,fontSize:13,color:"#4B5563",lineHeight:1.6,fontFamily:"var(--sv-font)"},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"#D97706",flexShrink:0,marginTop:7}}),V]},X))})]}),P&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx(Ku,{children:"Estilo de comunicação"}),r.jsx("p",{style:{fontSize:13,color:"#4B5563",lineHeight:1.7,fontFamily:"var(--sv-font)",margin:0},children:P})]}),L&&r.jsxs("div",{style:{marginBottom:20},children:[r.jsx(Ku,{children:"Dicas de gestão"}),r.jsx("p",{style:{fontSize:13,color:"#4B5563",lineHeight:1.7,fontFamily:"var(--sv-font)",margin:0},children:L})]}),r.jsx("div",{style:{background:"#F6F8FA",borderRadius:8,padding:"12px 14px",marginTop:8},children:r.jsx("p",{style:{fontSize:11,color:"#697386",lineHeight:1.6,fontFamily:"var(--sv-font)",margin:0},children:"Cerca de 50% das pessoas alteram ao menos uma letra em re-aplicação após 5 semanas. Use como ponto de partida, não como rótulo definitivo. Não utilizar como critério de seleção ou exclusão."})})]})]})})}function t6e({name:e,email:t,avatar:n,date:s,instrumentLabel:i}){const a=MP(e||"");return r.jsxs("div",{style:{background:"#F6F8FA",borderRadius:10,padding:"14px 16px",display:"flex",alignItems:"center",gap:12,marginBottom:20},children:[n?r.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",flexShrink:0}}):r.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:"#6C24F5",color:"#fff",fontSize:14,fontWeight:600,display:"grid",placeItems:"center",flexShrink:0,fontFamily:"var(--sv-font)"},children:a}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("div",{style:{fontSize:14,fontWeight:500,color:"#1A1F36",fontFamily:"var(--sv-font)"},children:e||"Candidato"}),r.jsxs("div",{style:{fontSize:12,color:"#697386",fontFamily:"var(--sv-font)",marginTop:1},children:[t&&r.jsx("span",{children:t}),t&&s&&r.jsx("span",{children:" · "}),s&&r.jsx("span",{children:Oc(s)})]})]}),r.jsx("span",{style:{fontSize:11,fontWeight:500,background:"#6C24F5",color:"#fff",borderRadius:6,padding:"4px 10px",flexShrink:0,fontFamily:"var(--sv-font)"},children:i})]})}function n6e({code:e,name:t,description:n}){return r.jsxs("div",{style:{border:"1px solid #E3E8EE",borderRadius:10,padding:"16px 18px",display:"flex",alignItems:"flex-start",gap:16,marginBottom:20},children:[r.jsx("div",{style:{width:56,height:56,borderRadius:10,background:"#6C24F5",color:"#fff",fontSize:18,fontWeight:500,letterSpacing:"1px",display:"grid",placeItems:"center",flexShrink:0,fontFamily:"Geist, var(--sv-num), monospace"},children:e}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[t&&r.jsxs("div",{style:{fontSize:15,fontWeight:500,color:"#1A1F36",fontFamily:"var(--sv-font)",marginBottom:4},children:[e," — ",t]}),n&&r.jsx("div",{style:{fontSize:13,color:"#4B5563",lineHeight:1.6,fontFamily:"var(--sv-font)"},children:n})]})]})}function CR({axis:e,color:t,index:n}){const s=e.category||e.label||`Eixo ${n+1}`,i=e.left_label||e.low_label||"",a=e.right_label||e.high_label||"",o=typeof e.score=="number"?e.score:typeof e.value=="number"?e.value:50,l=Math.max(0,Math.min(100,o)),c=e.direction||(l>55?a:l<45?i:"Equilibrado"),d=e.intensity||(Math.abs(l-50)>25?"Forte":Math.abs(l-50)>10?"Moderado":"Leve");return r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,fontWeight:500,color:"#697386",fontFamily:"var(--sv-font)",marginBottom:6,textTransform:"uppercase",letterSpacing:"0.3px"},children:s}),r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:[r.jsx("span",{style:{fontSize:12,color:"#1A1F36",fontFamily:"var(--sv-font)",fontWeight:500},children:i}),r.jsx("span",{style:{fontSize:12,color:"#1A1F36",fontFamily:"var(--sv-font)",fontWeight:500},children:a})]}),r.jsxs("div",{style:{position:"relative",height:8,borderRadius:4,overflow:"visible"},children:[r.jsx("div",{style:{position:"absolute",inset:0,borderRadius:4,background:`linear-gradient(90deg, ${t}22 0%, ${t}44 50%, ${t}22 100%)`}}),r.jsx("div",{style:{position:"absolute",left:`${l}%`,top:"50%",transform:"translate(-50%, -50%)",width:16,height:16,borderRadius:"50%",background:t,border:"2.5px solid #fff",boxShadow:"0 1px 4px rgba(0,0,0,0.18)",transition:"left 0.3s"}})]}),r.jsxs("div",{style:{textAlign:"center",fontSize:11,color:"#697386",fontFamily:"var(--sv-font)",marginTop:6},children:["Score ",Math.round(l)," — ",c," — ",d]})]})}function ER({title:e,text:t,borderColor:n,bg:s,titleColor:i}){return r.jsxs("div",{style:{borderLeft:`3px solid ${n}`,background:s,borderRadius:8,padding:"12px 14px"},children:[r.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px",color:i,marginBottom:6,fontFamily:"var(--sv-font)"},children:e}),r.jsx("div",{style:{fontSize:13,color:"#4B5563",lineHeight:1.6,fontFamily:"var(--sv-font)"},children:t})]})}const gx="#E3E8EE";function FR({wsId:e,talentProfileId:t,candidateEmail:n,candidateName:s,onClose:i,onSent:a}){const[o,l]=g.useState([]),[c,d]=g.useState(!0),[u,p]=g.useState(null),[m,x]=g.useState(!1);g.useEffect(()=>{let y=!0;return(async()=>{const v=await ne.entities.AssessmentCampaign.filter({workspace_id:e,status:"active"}).catch(()=>[]);y&&(l(v||[]),d(!1))})(),()=>{y=!1}},[e]),g.useEffect(()=>{const y=v=>{v.key==="Escape"&&!m&&i()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[i,m]);const w=async()=>
961{if(!(!u||m)){x(!0);try{const y=crypto.randomUUID().replace(/-/g,"").substring(0,16),v=await ne.entities.AssessmentInvitation.create({workspace_id:e,campaign_id:u,talent_profile_id:t,email:n,full_name:s,token:y,status:"pending"});await ne.functions.invoke("sendAssessmentInvite",{invitation_id:v.id}),a(v)}catch(y){throw x(!1),y}}};return r.jsx("div",{onClick:()=>!m&&i(),style:{position:"fixed",inset:0,zIndex:2e3,background:"rgba(0,0,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:r.jsxs("div",{onClick:y=>y.stopPropagation(),style:{background:"#fff",borderRadius:12,width:420,maxHeight:"80vh",display:"flex",flexDirection:"column",boxShadow:"0 20px 25px -5px rgba(0,0,0,0.1)"},children:[r.jsxs("div",{style:{padding:"16px 20px",borderBottom:`1px solid ${gx}`,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:15,fontWeight:500,color:"#1A1F36",fontFamily:"var(--sv-font)"},children:"Enviar avaliação"}),r.jsx("div",{style:{fontSize:12,color:"#697386",fontFamily:"var(--sv-font)",marginTop:2},children:s||n})]}),r.jsx("button",{onClick:i,disabled:m,style:{width:28,height:28,display:"grid",placeItems:"center",border:"none",background:"transparent",cursor:"pointer",borderRadius:6,color:"#9CA3AF"},children:r.jsx(Jt,{size:16})})]}),r.jsx("div",{style:{flex:1,overflowY:"auto",padding:"16px 20px"},children:c?r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:32,color:"#9CA3AF",gap:8,fontSize:13},children:[r.jsx(rt,{size:16,className:"animate-spin"})," Carregando campanhas..."]}):o.length===0?r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",padding:32,gap:8,textAlign:"center"},children:[r.jsx(za,{size:24,style:{color:"#CBD5E1"}}),r.jsxs("div",{style:{fontSize:13,color:"#697386",fontFamily:"var(--sv-font)",lineHeight:1.5},children:["Nenhuma campanha ativa.",r.jsx("br",{}),"Crie uma campanha em Avaliações antes de enviar."]})]}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:o.map(y=>{const v=u===y.id;return r.jsxs("button",{onClick:()=>p(y.id),style:{textAlign:"left",padding:"12px 14px",borderRadius:8,border:`1.5px solid ${v?"#6C24F5":gx}`,background:v?"rgba(99,91,255,0.04)":"#fff",cursor:"pointer",transition:"border-color 0.12s, background 0.12s",fontFamily:"var(--sv-font)"},children:[r.jsx("div",{style:{fontSize:13,fontWeight:500,color:"#1A1F36"},children:y.name}),y.description&&r.jsx("div",{style:{fontSize:12,color:"#697386",marginTop:3,lineHeight:1.4},children:y.description})]},y.id)})})}),r.jsxs("div",{style:{padding:"14px 20px",borderTop:`1px solid ${gx}`,display:"flex",justifyContent:"flex-end",gap:8},children:[r.jsx("button",{onClick:i,disabled:m,style:{fontSize:13,fontWeight:500,padding:"8px 16px",borderRadius:8,border:`1px solid ${gx}`,background:"#fff",color:"#697386",cursor:"pointer",fontFamily:"var(--sv-font)"},children:"Cancelar"}),r.jsxs("button",{onClick:w,disabled:!u||m,style:{fontSize:13,fontWeight:500,padding:"8px 16px",borderRadius:8,border:"none",background:!u||m?"#C4C1FF":"#6C24F5",color:"#fff",cursor:!u||m?"default":"pointer",fontFamily:"var(--sv-font)",display:"inline-flex",alignItems:"center",gap:6},children:[m&&r.jsx(rt,{size:13,className:"animate-spin"}),"Enviar"]})]})]})})}const r6e={behavioral:{icon:qf,color:"#6C24F5",bg:"rgba(108,36,245,0.08)",label:"Comportamental"},cognitive:{icon:za,color:"#1EA672",bg:"rgba(30,166,114,0.08)",label:"Cognitivo"},language:{icon:zy,color:"#E5993E",bg:"rgba(229,153,62,0.08)",label:"Idiomas"}},s6e={icon:RV,color:"#697386",bg:"rgba(156,163,175,0.08)",label:"Avaliação"},AR={completed:{label:"Concluído",bg:"#D1FAE5",color:"#065F46"},scored:{label:"Concluído",bg:"#D1FAE5",color:"#065F46"},pending:{label:"Pendente",bg:"#FEF3C7",color:"#92400E"},sent:{label:"Pendente",bg:"#FEF3C7",color:"#92400E"},opened:{label:"Pendente",bg:"#FEF3C7",color:"#92400E"},expired:{label:"Expirado",bg:"#FEE2E2",color:"#991B1B"},started:{label:"Em andamento",bg:"#DBEAFE",color:"#1E40AF"},in_progress:{label:"Em andamento",bg:"#DBEAFE",color:"#1E40AF"}};function i6e(e){return e>=75?"#059669":e>=50?"#D97706":"#EF4444"}function a6e(e){return e==="completed"||e==="scored"}function o6e(e){return["pending","sent","opened","expired"].includes(e)}function l6e({wsId:e,talentProfileId:t,candidateEmail:n,candidateName:s,candidateAvatar:i}){var F;const{entitlements:a,loading:o}=Xa(),l=(F=a==null?void 0:a.assessments)==null?void 0:F.unlocked,[c,d]=g.useState(!0),[u,p]=g.useState([]),[m,x]=g.useState(null),[w,y]=g.useState(!1),[v,j]=g.useState(null),k=(A,C="success")=>{j({msg:A,type:C}),setTimeout(()=>j(null),3500)};g.useEffect(()=>{if(!t||!e||!l)return;let A=!0;return d(!0),(async()=>{const[C,D,P,L]=await Promise.all([ne.entities.AssessmentInvitation.filter({workspace_id:e,talent_profile_id:t}).catch(()=>n?ne.entities.AssessmentInvitation.filter({workspace_id:e,email:n}).catch(()=>[]):[]),ne.entities.AssessmentSession.filter({workspace_id:e,talent_profile_id:t}).catch(()=>[]),ne.entities.AssessmentResult.filter({workspace_id:e,talent_profile_id:t}).catch(()=>[]),ne.entities.AssessmentTemplate.filter({}).catch(()=>[])]);if(!A)return;const T={};
961(L||[]).forEach(V=>{T[V.id]=V});const R={};(P||[]).forEach(V=>{R[V.session_id]=V});const U={};(D||[]).forEach(V=>{V.invitation_id&&(U[V.invitation_id]=V)});const I=[],H=new Set;(C||[]).forEach(V=>{const X=U[V.id],N=X?R[X.id]:null;let W=T[V.campaign_id]||(X?T[X.template_id]:null);!W&&(X!=null&&X.template_id)&&(W=T[X.template_id]);const O=N?"completed":(X==null?void 0:X.status)==="in_progress"||(X==null?void 0:X.status)==="started"?"in_progress":V.status;I.push({id:V.id,status:O,date:(N==null?void 0:N.computed_at)||(X==null?void 0:X.completed_at)||V.sent_at||V.created_date,completed_at:X==null?void 0:X.completed_at,template:W,templateName:(W==null?void 0:W.name_pt)||(W==null?void 0:W.name)||"Avaliação",result:N,session:X,invitation:V}),X&&H.add(X.id)}),(D||[]).forEach(V=>{if(H.has(V.id))return;const X=R[V.id],N=T[V.template_id],W=X?"completed":V.status;I.push({id:V.id,status:W,date:(X==null?void 0:X.computed_at)||V.completed_at||V.started_at||V.created_date,completed_at:V.completed_at,template:N,templateName:(N==null?void 0:N.name_pt)||(N==null?void 0:N.name)||"Avaliação",result:X,session:V,inv
961itation:null})}),I.sort((V,X)=>new Date(X.date||0)-new Date(V.date||0)),p(I),d(!1)})(),()=>{A=!1}},[e,t,n,l]);const S=async(A,C)=>{C.stopPropagation();try{await ne.functions.invoke("resendAssessmentInvite",{invitation_id:A}),k("Convite reenviado com sucesso")}catch(D){k((D==null?void 0:D.message)||"Erro ao reenviar convite","error")}},_=A=>{p(C=>[{id:A.id,status:"pending",date:A.created_date||new Date().toISOString(),template:null,templateName:"Avaliação",result:null,session:null,invitation:A},...C]),y(!1),k(`Avaliação enviada para ${s||n}`)};return o?r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:48,color:"#9CA3AF"},children:[r.jsx(rt,{size:18,className:"animate-spin",style:{marginRight:8}})," Carregando..."]}):l?c?r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:48,color:"#9CA3AF"},children:[r.jsx(rt,{size:18,className:"animate-spin",style:{marginRight:8}})," Carregando avaliações..."]}):u.length===0?r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:48,gap:8,fontFamily:"var(--sv-font)"},children:[r.jsx(za,{size:28,style:{color:"#CBD5E1"}}),r.jsx("div",{style:{fontSize:14,fontWeight:500,color:"#1A1F36",marginTop:4},children:"Nenhuma avaliação"}),r.jsx("div",{style:{fontSize:12,color:"#9CA3AF"},children:"Envie uma avaliação para este candidato."}),r.jsxs("button",{onClick:()=>y(!0),style:{marginTop:8,display:"inline-flex",alignItems:"center",gap:5,fontSize:13,fontWeight:500,color:"#fff",background:"#6C24F5",border:"none",borderRadius:8,padding:"8px 16px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:[r.jsx(Ln,{size:14})," Enviar avaliação"]})]}),w&&r.jsx(FR,{wsId:e,talentProfileId:t,candidateEmail:n,candidateName:s,onClose:()=>y(!1),onSent:_}),r.jsx(TR,{toast:v})]}):r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[r.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"#697386",fontFamily:"var(--sv-font)"},children:[u.length," avaliação",u.length!==1?"ões":""]}),r.jsxs("button",{onClick:()=>y(!0),style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:13,fontWeight:500,color:"#fff",background:"#6C24F5",border:"none",borderRadius:8,padding:"7px 14px",cursor:"pointer",fontFamily:"var(--sv-font)"},children:[r.jsx(Ln,{size:14})," Enviar avaliação"]})]}),u.map(A=>r.jsx(c6e,{assessment:A,onViewReport:()=>x(A),onResend:S},A.id)),m&&r.jsx(e6e,{assessment:m,onClose:()=>x(null),candidateName:s,candidateEmail:n,candidateAvatar:i}),w&&r.jsx(FR,{wsId:e,talentProfileId:t,candidateEmail:n,candidateName:s,onClose:()=>y(!1),onSent:_}),r.jsx(TR,{toast:v})]}):r.jsx(d6e,{})}function c6e({assessment:e,onViewReport:t,onResend:n}){var S,_,F,A,C,D;const[s,i]=g.useState(!1),a=e,o=(S=a.template)==null?void 0:S.category,l=r6e[o]||s6e,c=l.icon,d=AR[a.status]||AR.pending,u=a6e(a.status),p=a.status==="expired",m=(_=a.result)==null?void 0:_.total_score,x=a.templateName,w=l.label,y=((F=a.template)==null?void 0:F.question_count)||((A=a.session)==null?void 0:A.total_questions),v=(C=a.template)==null?void 0:C.estimated_duration_minutes,j=[w,y?`${y} questões`:null,v?`${v} min`:null].filter(Boolean).join(" · "),k=u?1:p?.55:.75;return r.jsxs("div",{onClick:u?t:void 0,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:16,padding:"16px 20px",background:"#fff",border:`0.5px solid ${s&&u?"#D8DEE4":"#E3E8EE"}`,borderRadius:12,cursor:u?"pointer":"default",transition:"border-color 0.12s",opacity:k,fontFamily:"var(--sv-font)"},children:[r.jsx("div",{style:{width:40,height:40,borderRadius:10,background:l.bg,display:"grid",placeItems:"center",flexShrink:0},children:r.jsx(c,{size:18,style:{color:l.color}})}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[r.jsx("span",{style:{fontSize:14,fontWeight:500,color:"#1A1F36",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x}),r.jsx("span",{style:{fontSize:11,fontWeight:500,padding:"2px 8px",borderRadius:20,background:d.bg,color:d.color},children:d.label})]}),r.jsx("div",{style:{fontSize:12,color:"#697386",marginTop:3},children:j})]}),r.jsx("div",{style:{textAlign:"center",flexShrink:0,minWidth:64},children:u&&m!=null?r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{fontSize:22,fontWeight:500,fontFamily:"Geist, monospace",lineHeight:1,color:i6e(m)},children:m}
961),r.jsx("div",{style:{fontSize:10,color:"#9CA3AF",marginTop:2},children:"/ 100"})]}):r.jsx("div",{style:{fontSize:16,color:"#9CA3AF"},children:"—"})}),r.jsxs("div",{style:{textAlign:"right",flexShrink:0,minWidth:90},children:[r.jsx("div",{style:{fontSize:12,color:"#697386"},children:Oc(a.date)}),u?r.jsx("button",{onClick:P=>{P.stopPropagation(),t()},style:{marginTop:4,fontSize:12,fontWeight:500,color:"#6C24F5",background:"none",border:"none",cursor:"pointer",padding:0,fontFamily:"var(--sv-font)"},children:"Ver relatório >"}):o6e(a.status)&&((D=a.invitation)!=null&&D.id)?r.jsxs("button",{onClick:P=>n(a.invitation.id,P),style:{marginTop:4,display:"inline-flex",alignItems:"center",gap:4,fontSize:12,fontWeight:500,color:"#D97706",background:"none",border:"none",cursor:"pointer",padding:0,fontFamily:"var(--sv-font)"},children:[r.jsx($y,{size:11})," Reenviar"]}):null]})]})}function d6e(){const e="Switzer, sans-serif",t=[{icon:qf,text:"MBTI, DISC, Big Five"},{icon:za,text:"Testes técnicos e cognitivos"},{icon:KU,text:"Relatórios detalhados"},{icon:zy,text:"Testes de idiomas"}];return r.jsx("div",{style:{padding:"32px 8px"},children:r.jsxs("div",{style:{borderRadius:14,background:"linear-gradient(135deg, #0F0B2E 0%, #1A1145 40%, #2D1B69 70%, #3D2580 100%)",padding:"28px 32px",position:"relative",overflow:"hidden",display:"flex",alignItems:"center",gap:32},children:[r.jsx("div",{style:{position:"absolute",top:-30,right:-30,width:140,height:140,borderRadius:"50%",background:"rgba(99,91,255,0.08)",pointerEvents:"none"}}),r.jsxs("div",{style:{flex:1,position:"relative",zIndex:1},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 10px",borderRadius:16,background:"rgba(99,91,255,0.25)",border:"1px solid rgba(99,91,255,0.3)",fontSize:11,color:"#C4B5FD",fontFamily:e,marginBottom:12},children:[r.jsx(Va,{size:11})," Summit Assessments"]}),r.jsxs("div",{style:{fontSize:20,fontWeight:500,fontFamily:e,color:"#FFFFFF",lineHeight:1.3},children:["Avalie seus candidatos",r.jsx("br",{}),r.jsx("span",{style:{background:"linear-gradient(90deg, #F97316, #FB923C, #FBBF24)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"de um jeito simples."})]}),r.jsx("div",{style:{fontSize:13,fontFamily:e,color:"#A0A0B8",lineHeight:1.6,marginTop:8,marginBottom:16},children:"Testes comportamentais, cognitivos e de idiomas — integrados ao perfil do candidato."}),r.jsxs("div",{style:{display:"flex",gap:10},children:[r.jsx("a",{href:"/app/conta/plano",style:{display:"inline-flex",alignItems:"center",background:"#6C24F5",color:"#fff",borderRadius:8,padding:"9px 20px",fontSize:13,fontWeight:500,fontFamily:e,textDecoration:"none",boxShadow:"0 2px 8px rgba(99,91,255,0.3)"},children:"Ativar Assessments →"}),r.jsx("button",{style:{background:"rgba(255,255,255,0.08)",color:"#D4D4E0",border:"1px solid rgba(255,255,255,0.12)",borderRadius:8,padding:"9px 16px",fontSize:13,fontFamily:e,cursor:"pointer"},children:"Conhecer"})]})]}),r.jsx("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",gap:8,position:"relative",zIndex:1},children:t.map((n,s)=>{const i=n.icon;return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,padding:"6px 12px",borderRadius:8,background:"rgba(99,91,255,0.12)"},children:[r.jsx(i,{size:14,style:{color:"#A78BFA",flexShrink:0}}),r.jsx("span",{style:{fontSize:12,fontFamily:e,color:"#D4D4E0",whiteSpace:"nowrap"},children:n.text})]},s)})})]})})}function TR({toast:e}){return e?r.jsx("div",{style:{position:"fixed",bottom:24,right:24,zIndex:3e3,padding:"10px 18px",borderRadius:8,fontSize:13,fontWeight:500,fontFamily:"var(--sv-font)",boxShadow:"0 4px 12px rgba(0,0,0,0.12)",background:e.type==="error"?"#FEE2E2":"#DCFCE7",color:e.type==="error"?"#991B1B":"#15803D",border:`1px solid ${e.type==="error"?"#FECACA":"#BBF7D0"}`},children:e.msg}):null}const u6e=[{key:"perfil",label:"Perfil"},{key:"vagas",label:"Vagas",countKey:"appsCount"},{key:"arquivos",label:"Arquivos",countKey:"filesCount"},{key:"historico",label:"Histórico do candidato",countKey:"historyCount"},{key:"emails",label:"E-mails"},{key:"avaliacoes",label:"Avaliações",countKey:"assessCount"}];function f6e({profile:e,applications:t,jobs:n,wsId:s,talentProfileId:i,onSendToJob:a,candidateName:o,onApplicationsChanged:l,onProfileUpdated:c,workspaceTalent:d}){var M;const[u,p]=g.useState("perfil"),[m,x]=g.useState([]),[w,y]=g.useState([]),[v,j]=g.useState([]),[k,S]=g.useState([]),[_,F]=g.useState([]),[A,C]=g.useState({}),[D,P]=g.useState(!1),[L,T]=g.useState(null),[R,U]=g.useState(null),[I,H]=g.useState(!1),[V,X]=g.useState(!1),N=(e==null?void 0:e.email)||"",W=!!(V&&i&&s&&N&&!xo(N));g.useEffect(()=>{let z=!0;return ne.functions.invoke("checkConnectorStatus",{key:"outlook"}).then(K=>{const Y=(K==null?void 0:K.data)||K;z&&X(!!(Y!=null&&Y.connected))}).catch(()=>{}),()=>{z=!1}},[]);const O=async()=>
961{if(!(!W||I)){H(!0);try{await ne.functions.invoke("syncCandidateEmails",{workspace_id:s,candidate_email:N,talent_profile_id:i});const z=await ne.entities.CandidateMessage.filter({talent_profile_id:i,workspace_id:s},"-sent_at").catch(()=>[]);j(z||[])}catch{}H(!1)}};g.useEffect(()=>{if(!i||!s)return;let z=!0;return P(!0),Promise.all([ne.entities.TalentProfileAttachment.filter({talent_profile_id:i}).catch(()=>[]),ne.entities.RecruiterNote.filter({talent_profile_id:i,workspace_id:s}).catch(()=>[]),ne.entities.CandidateMessage.filter({talent_profile_id:i,workspace_id:s},"-sent_at").catch(()=>[]),ne.entities.StageTransition.filter({workspace_id:s}).catch(()=>[]),ne.entities.AssessmentResult.filter({talent_profile_id:i,workspace_id:s}).catch(()=>[]),ne.entities.PipelineStage.filter({workspace_id:s}).catch(()=>[])]).then(([K,Y,J,Q,ie,ae])=>{if(!z)return;x(K||[]),y(Y||[]),j(J||[]);const re=new Set((t||[]).map(Z=>Z.id));S((Q||[]).filter(Z=>re.has(Z.application_id))),F(ie||[]);const pe={};(ae||[]).forEach(Z=>{pe[Z.id]=Z}),C(pe),P(!1)}),()=>{z=!1}},[i,s,t]);const G={appsCount:(t==null?void 0:t.length)||0,filesCount:m.length,historyCount:k.length+w.length+v.length+m.length,assessCount:_.length};return r.jsxs("div",{style:{background:"var(--sv-surface)",border:"1px solid var(--sv-border)",borderRadius:"var(--sv-r-lg)",overflow:"hidden",boxShadow:"var(--sv-sh-card)",marginTop:8},children:[r.jsxs("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--sv-border)",padding:"0 20px",overflowX:"auto"},children:[u6e.map(z=>{const K=u===z.key,Y=z.countKey?G[z.countKey]:null;return r.jsxs("button",{onClick:()=>p(z.key),style:{position:"relative",padding:"12px 16px",fontSize:13,fontWeight:K?600:500,color:K?"var(--sv-accent)":"var(--sv-ink-2)",background:"none",border:"none",cursor:"pointer",fontFamily:"var(--sv-font)",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:5},children:[z.label,Y!=null&&Y>0&&r.jsx("span",{style:{fontSize:10,fontWeight:600,background:K?"var(--sv-accent-muted)":"var(--sv-inset)",color:K?"var(--sv-accent)":"var(--sv-ink-3)",borderRadius:8,padding:"1px 6px",fontFamily:"var(--sv-num)"},children:Y}),K&&r.jsx("div",{style:{position:"absolute",bottom:0,left:16,right:16,height:2,background:"var(--sv-accent)",borderRadius:"2px 2px 0 0"}})]},z.key)}),u==="emails"&&W&&r.jsxs("button",{type:"button",onClick:O,disabled:I,title:"Sincronizar e-mails",style:{marginLeft:"auto",alignSelf:"center",display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:I?"#9CA3AF":"var(--sv-accent)",background:"transparent",border:"none",padding:"6px 4px",borderRadius:6,cursor:I?"not-allowed":"pointer",fontFamily:"var(--sv-font)",whiteSpace:"nowrap"},children:[r.jsx($y,{size:13,className:I?"animate-spin":""}),"Sincronizar"]})]}),r.jsx("div",{style:{padding:16,minHeight:200},children:D?r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:40,color:"var(--sv-ink-3)"},children:[r.jsx(rt,{size:18,className:"animate-spin",style:{marginRight:8}})," Carregando..."]}):r.jsxs(r.Fragment,{children:[u==="perfil"&&r.jsx(p6e,{profile:e,talentProfileId:i,onProfileUpdated:c}),u==="vagas"&&r.jsx(OTe,{applications:t,jobs:n,stages:A,onSendToJob:a,candidateName:o,onApplicationsChanged:l}),u==="arquivos"&&r.jsx(GTe,{attachments:m,talentProfileId:i,profile:e,onProfileUpdated:c}),u==="historico"&&r.jsx(XTe,{applications:t,jobs:n,wsId:s,talentProfileId:i,workspaceTalent:d}),u==="emails"&&r.jsx(h6e,{emails:v,onEmailClick:T}),u==="avaliacoes"&&r.jsx(l6e,{wsId:s,talentProfileId:i,candidateEmail:e==null?void 0:e.email,candidateName:e==null?void 0:e.full_name,candidateAvatar:e==null?void 0:e.avatar_url})]})}),L&&r.jsx(QTe,{email:L,onClose:()=>T(null),onReply:z=>{T(null),U(z)}}),R&&r.jsx(Cc,{candidateProfile:{id:e==null?void 0:e.id,full_name:e==null?void 0:e.full_name,first_name:((e==null?void 0:e.full_name)||"").split(" ")[0],email:e==null?void 0:e.email,phone:e==null?void 0:e.phone},job:null,workspaceId:s,onClose:()=>U(null),onSent:()=>U(null),initialSubject:(M=R.subject)!=null&&M.startsWith("Re:")?R.subject:`Re: ${R.subject||""}`,initialBody:`
962
963---
964Em ${R.sent_at?new Date(R.sent_at).toLocaleString("pt-BR"):""}, ${R.sender_email||""} escreveu:
965${R.body_text||""}`})]})}function NR({title:e,count:t,defaultOpen:n=!0,children:s}){const[i,a]=g.useState(n);return r.jsxs("div",{children:[r.jsxs("button",{onClick:()=>a(o=>!o),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",background:"none",border:"none",cursor:"pointer",padding:"0 0 8px",fontFamily:"var(--sv-font)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[r.jsx("span",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px",color:"#9CA3AF"},children:e}),t!=null&&r.jsx("span",{style:{fontSize:10,fontWeight:600,color:"var(--sv-accent)",background:"var(--sv-accent-muted)",borderRadius:8,padding:"1px 6px"},children:t})]}),i?r.jsx(Dc,{size:14,style:{color:"#9CA3AF"}}):r.jsx(ar,{size:14,style:{color:"#9CA3AF"}})]}),i&&s]})}function p6e({profile:e,talentProfileId:t,onProfileUpdated:n}){var w;const s=e||{},{entitlements:i}=Xa(),a=(w=i==null?void 0:i.assessments)==null?void 0:w.unlocked,[o,l]=g.useState(!1),c=s.experiences||[],d=s.education||[],u=s.languages||[],p=s.skill_names||s.skills||[],m=s.summary_executive||c.length>0||d.length>0,x=async()=>{if(!(!t||o)){l(!0);try{const y=await ne.functions.invoke("generateCandidateSummary",{talent_profile_id:t}),v=(y==null?void 0:y.data)||y;v!=null&&v.success&&(v!=null&&v.summary)&&(n==null||n({summary_executive:v.summary}))}catch{}l(!1)}};return!m&&p.length===0&&u.length===0?r.jsx(gW,{text:"Nenhuma informação de perfil disponível"}):r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:10},children:[r.jsx("span",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px",color:"#9CA3AF",fontFamily:"var(--sv-font)"},children:"Resumo do perfil"}),a&&s.summary_executive&&r.jsx("button",{onClick:x,disabled:o,title:"Regenerar resumo",style:{display:"flex",alignItems:"center",justifyContent:"center",width:20,height:20,background:"none",border:"none",cursor:o?"wait":"pointer",color:"#9CA3AF",padding:0,borderRadius:4},children:r.jsx($y,{size:12,className:o?"animate-spin":""})})]}),a?s.summary_executive?r.jsx("div",{style:{fontSize:13,lineHeight:1.6,color:"#111827",fontFamily:"var(--sv-font)"},children:r.jsx(NTe,{children:s.summary_executive})}):r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[r.jsx("div",{style:{fontSize:13,color:"#9CA3AF",fontStyle:"italic",fontFamily:"var(--sv-font)"},children:"Resumo não disponível."}),r.jsxs("button",{onClick:x,disabled:o,style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:12,fontWeight:500,color:"#fff",background:"#6C24F5",border:"none",borderRadius:6,padding:"5px 12px",cursor:o?"wait":"pointer",fontFamily:"var(--sv-font)",opacity:o?.7:1},children:[o?r.jsx(rt,{size:12,className:"animate-spin"}):r.jsx(Va,{size:12}),"Gerar resumo com IA"]})]}):r.jsxs("div",{style:{background:"#F9F7FF",border:"1px solid #E8E0FF",borderRadius:10,padding:"14px 18px",display:"flex",alignItems:"center",gap:10},children:[r.jsx(Va,{size:16,style:{color:"#6C24F5",flexShrink:0}}),r.jsxs("div",{style:{flex:1},children:[r.jsx("span",{style:{fontSize:13,color:"#6C24F5",fontFamily:"var(--sv-font)"},children:"Resumo inteligente disponível no plano Growth"}),r.jsx("a",{href:"/app/conta/plano",style:{fontSize:12,color:"#6C24F5",fontFamily:"var(--sv-font)",marginLeft:8,fontWeight:500,textDecoration:"none"},children:"Fazer upgrade →"})]})]})]}),c.length>0&&r.jsx(NR,{title:"Experiência",count:c.length,children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:c.map((y,v)=>r.jsxs("div",{children:[r.jsxs("div",{style:{fontSize:13,fontFamily:"var(--sv-font)"},children:[r.jsx("span",{style:{fontWeight:500,color:"#111827"},children:y.title||"Cargo"}),y.company&&r.jsxs("span",{style:{color:"#6B7280"},children:[" · ",y.company]})]}),r.jsxs("div",{style:{fontSize:11,color:"#6B7280",fontFamily:"var(--sv-font)",marginTop:2},children:[y.start_date||"?"," — ",y.end_date||"Atual",y.location?` · ${y.location}`:""]}),y.description&&r.jsx("div",{style:{fontSize:12,color:"#6B7280",fontFamily:"var(--sv-font)",lineHeight:1.5,marginTop:4},children:y.description})]},v))})}),d.length>0&&r.jsx(NR,{title:"Formação",count:d.length,children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:d.map((y,v)=>r.jsxs("div",{children:[r.jsxs("div",{style:{fontSize:13,fontFamily:"var(--sv-font)"},children:[r.jsx("span",{style:{fontWeight:500,color:"#111827"}
965,children:[y.degree,y.field].filter(Boolean).join(" em ")||"Formação"}),y.institution&&r.jsxs("span",{style:{color:"#6B7280"},children:[" · ",y.institution]})]}),r.jsxs("div",{style:{fontSize:11,color:"#6B7280",fontFamily:"var(--sv-font)",marginTop:2},children:[y.start_year||"?"," — ",y.end_year||"Atual"]})]},v))})}),p.length>0&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px",color:"#9CA3AF",marginBottom:10,fontFamily:"var(--sv-font)"},children:"Competências"}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:p.map((y,v)=>r.jsx("span",{style:{fontSize:11,fontWeight:500,background:"var(--sv-accent-muted)",color:"var(--sv-accent)",borderRadius:4,padding:"3px 10px",fontFamily:"var(--sv-font)"},children:typeof y=="string"?y:y.name||y.label||""},v))})]}),u.length>0&&r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px",color:"#9CA3AF",marginBottom:10,fontFamily:"var(--sv-font)"},children:"Idiomas"}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:u.map((y,v)=>r.jsxs("span",{style:{fontSize:12,color:"#111827",fontFamily:"var(--sv-font)"},children:[y.language||y,y.level?` (${y.level})`:"",v<u.length-1?",":""]},v))})]})]})}function h6e({emails:e,onEmailClick:t}){return!e||e.length===0?r.jsx(gW,{text:"Nenhum e-mail registrado"}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:e.map(n=>r.jsxs("div",{onClick:()=>t(n),style:{padding:"12px 14px",background:"var(--sv-inset)",borderRadius:"var(--sv-r-md)",cursor:"pointer",transition:"background 0.12s"},onMouseEnter:s=>{s.currentTarget.style.background="#EEF0F4"},onMouseLeave:s=>{s.currentTarget.style.background="var(--sv-inset)"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[r.jsx(mr,{size:13,style:{color:n.direction==="sent"?"var(--sv-accent)":"var(--sv-d-green)",flexShrink:0}}),r.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--sv-ink)",fontFamily:"var(--sv-font)"},children:n.subject||"(sem assunto)"}),r.jsx("span",{style:{fontSize:10,color:"var(--sv-ink-3)",marginLeft:"auto",fontFamily:"var(--sv-num)"},children:Oc(n.sent_at||n.created_date)})]}),n.body_text&&r.jsx("div",{style:{fontSize:12,color:"var(--sv-ink-2)",fontFamily:"var(--sv-font)",lineHeight:1.5,maxHeight:60,overflow:"hidden"},children:n.body_text.slice(0,200)})]},n.id))})}function gW({text:e}){return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:40,color:"var(--sv-ink-3)",fontFamily:"var(--sv-font)"},children:r.jsx("div",{style:{fontSize:13},children:e})})}function m6e(){const{id:e}=Do(),[t]=Um(),n=t.get("from_job"),{user:s}=tr(),i=In(),[a,o]=g.useState(!0),[l,c]=g.useState(null),[d,u]=g.useState(null),[p,m]=g.useState(null),[x,w]=g.useState([]),[y,v]=g.useState({}),[j,k]=g.useState([]),[S,_]=g.useState([]),[F,A]=g.useState(!1),[C,D]=g.useState(!1),[P,L]=g.useState(!1),T=VP();g.useEffect(()=>{if(!e||!(s!=null&&s.email))return;let M=!0;return o(!0),(async()=>{var te,xe;const z=await ne.functions.invoke("getWorkspaceId",{user_email:s.email}),K=((te=z==null?void 0:z.data)==null?void 0:te.workspace_id)||(z==null?void 0:z.workspace_id);if(!M||!K)return;c(K);let Y;try{Y=await ne.entities.WorkspaceTalent.get(e)}catch{const he=await ne.entities.WorkspaceTalent.filter({workspace_id:K,talent_profile_id:e});Y=he==null?void 0:he[0]}if(!M||!Y){o(!1);return}u(Y);const J=Y.talent_profile_id,[Q,ie,ae,re]=await Promise.all([ne.entities.TalentProfile.get(J).catch(()=>null),ne.entities.JobApplication.filter({talent_profile_id:J}).catch(()=>[]),ne.entities.Job.filter({workspace_id:K}).catch(()=>[]),ne.entities.WorkspaceTalent.filter({workspace_id:K}).catch(()=>[])]);if(!M)return;m(Q);const Z=(ie||[]).filter(he=>he.status!=="removed_by_recruiter"&&he.status!=="withdrawn").sort((he,le)=>new Date(le.updated_date||le.created_date||0)-new Date(he.updated_date||he.created_date||0));w(Z);const Ne={};if((ae||[]).forEach(he=>{Ne[he.id]=he}),v(Ne),_((re||[]).map(he=>he.id)),((xe=Q==null?void 0:Q.skill_ids)==null?void 0:xe.length)>0){const he=await ne.entities.Skill.filter({id:{$in:Q.skill_ids.slice(0,50)}}).catch(()=>[]);M&&k(he||[])}o(!1)})(),()=>{M=!1}},[e,s==null?void 0:s.email]);const R=S.indexOf(e),U=M=>{const z=R+M;z>=0&&z<S.length&&i(`/app/candidatos/${S[z]}${n?`?from_job=${n}`:""}`)},I=M=>{M&&m(z=>z&&{...z,...M})},H=async(M,z)=>{var Q,ie,ae;const K=["salary_current","salary_expectation"];if(M==="languages"){const re=Array.isArray(z)?z:String(z||"").split(",").map(Z=>
965Z.trim()).filter(Boolean).map(Z=>{const Ne=Z.match(/^([^(]+)\(([^)]*)\)/);return Ne?{language:Ne[1].trim(),level:Ne[2].trim()}:{language:Z,level:""}}),pe=await ne.functions.invoke("updateCandidateProfile",{talent_profile_id:p==null?void 0:p.id,languages:re});if((Q=pe==null?void 0:pe.data)!=null&&Q.error||pe!=null&&pe.error)throw new Error("falha ao salvar");I({languages:re});return}if(M==="skill_ids"){const re=Array.isArray(z)?z:[],pe=await ne.functions.invoke("updateCandidateProfile",{talent_profile_id:p==null?void 0:p.id,skill_ids:re});if((ie=pe==null?void 0:pe.data)!=null&&ie.error||pe!=null&&pe.error)throw new Error("falha ao salvar");if(I({skill_ids:re}),re.length===0)k([]);else try{const Z=await ne.entities.Skill.filter({id:{$in:re.slice(0,50)}});k(Z||[])}catch{}return}const Y={talent_profile_id:p==null?void 0:p.id};Y[M]=K.includes(M)?z===""||z===null||z===void 0?null:Number(z):z;const J=await ne.functions.invoke("updateCandidateProfile",Y);if((ae=J==null?void 0:J.data)!=null&&ae.error||J!=null&&J.error)throw new Error("falha ao salvar");I({[M]:Y[M]})},V=async(M,z)=>{if(!(d!=null&&d.id))throw new Error("sem workspace talent");let K={};try{K=JSON.parse(d.custom_fields_json||"{}")||{}}catch{K={}}const Y={...K,[M]:z};await ne.entities.WorkspaceTalent.update(d.id,{custom_fields_json:JSON.stringify(Y)}),u(J=>J&&{...J,custom_fields_json:JSON.stringify(Y)})},X=M=>{w(M)},[N,W]=g.useState(null);if(g.useEffect(()=>{if(!n){W(null);return}if(y[n]){W({id:n,title:y[n].title});return}ne.entities.Job.filter({id:n}).then(M=>{M!=null&&M[0]&&W({id:n,title:M[0].title})}).catch(()=>{})},[n,y]),g.useEffect(()=>{if(!T)return;if(a||!p){T.setOverride(null);return}const M=p.full_name||"Candidato",z=N?[{label:N.title,to:`/app/vagas/${N.id}`},{label:M}]:[{label:"Pessoas",to:"/app/pessoas"},{label:M}];return T.setOverride({crumb:z,pagination:S.length>1?{current:R>=0?R:0,total:S.length,onNavigate:U}:null}),()=>T.clearOverride()},[a,p==null?void 0:p.full_name,N,R,S.length]),a)return r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100vh - 80px)",color:"var(--sv-ink-3)",fontFamily:"var(--sv-font)"},children:[r.jsx(rt,{size:22,className:"animate-spin",style:{marginRight:10}}),r.jsx("span",{style:{fontSize:14},children:"Carregando perfil..."})]});if(!p)return r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100vh - 80px)",color:"var(--sv-ink-3)",fontFamily:"var(--sv-font)"},children:r.jsx("span",{style:{fontSize:14},children:"Candidato não encontrado"})});const O={id:p.id,full_name:p.full_name,first_name:(p.full_name||"").split(" ")[0],email:p.email,phone:p.phone,salary_current:Number(p.salary_current||0),salary_expectation:Number(p.salary_expectation||0)},G=x[0]||{id:`wt_${d==null?void 0:d.id}`,talent_profile_id:p.id,workspace_id:l,status:"pool",talent_profile:p};return r.jsxs("div",{style:{height:"100%"},children:[r.jsx(sFe,{profile:p,onEmail:()=>A(!0),onEdit:()=>D(!0),onFieldSave:H}),r.jsx(hFe,{profile:p,workspaceTalent:d,skills:j,onFieldSave:H,onCustomFieldSave:V,wsId:l}),r.jsx(f6e,{profile:p,applications:x,jobs:y,wsId:l,talentProfileId:p.id,onSendToJob:()=>L(!0),candidateName:p.full_name,onApplicationsChanged:X,onProfileUpdated:I,workspaceTalent:d}),F&&r.jsx(Cc,{candidateProfile:O,job:x[0]&&y[x[0].job_id]?{title:y[x[0].job_id].title}:null,workspaceId:l,onClose:()=>A(!1),onSent:()=>A(!1)}),C&&r.jsx(d_,{isOpen:!0,candidate:G,onClose:()=>D(!1),onSaved:M=>{D(!1),I(M)}}),P&&r.jsx(u_,{isOpen:!0,candidateIds:[p.id],candidateCount:1,wsId:l,currentJobId:null,onClose:()=>L(!1),onSent:()=>L(!1)})]})}const g6e="https://i.imgur.com/MVgsUJ5.png";function x6e(){return r.jsxs("div",{style:{minHeight:"100vh",background:"#F6F9FC",fontFamily:"'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[r.jsxs("header",{style:{background:"#fff",borderBottom:"1px solid #E3E8EF",padding:"0 32px",height:60,display:"flex",alignItems:"center",justifyContent:"space-between",position:"sticky",top:0,zIndex:30},children:[r.jsx("img",{src:g6e,alt:"Summit",style:{height:28}}),r.jsx(wk,{})]}),r.jsx("main",{style:{maxWidth:1240,margin:"0 auto",padding:"40px 32px"},children:r.jsx(Gy,{})})]})}const ye={brand:"#6C24F5",brandDark:"#5347E8",brandTint:"#EFEEFF",brandSoft:"#EBE9FE",brandSofter:"#F4F2FF",ink:"#0A2540",ink2:"#425466",ink3:"#697386",ink4:"#8898AA",ink5:"#ADBDCC",paper:"#FFFFFF",bg:"#F6F9FC",bg2:"#FAFBFC",line:"#E3E8EE",lineSoft:"#EFF1F4",success:"#1B8E5A",successBg:"#E3F8EE",successDark:"#15784C",warning:"#BB5504",warningBg:"#FCEDD5",warningDark:"#8C4A00",danger:"#CD3D64",dangerBg:"#FCE7EC",dangerDark:"#A02945",info:"#1F66BC",infoBg:"#E0EAF8",infoDark:"#174D8C",gradientPurple:"linear-gradient(135deg, #6C24F5 0%, #8B5CF6 100%)",shadowXs:"0 1px 2px 0 rgba(10, 37, 64, 0.04), 0 1px 3px 0 rgba(10, 37, 64, 0.06)",shadowSm:"0 2px 5px 0 rgba(60, 66, 87, 0.08), 0 1px 1px 0 rgba(0, 0, 0, 0.04)",shadowMd:"0 7px 14px 0 rgba(60, 66, 87, 0.10), 0 3px 6px 0 rgba(0, 0, 0, 0.06)",shadowLg:"0 15px 35px 0 rgba(60, 66, 87, 0.12), 0 5px 15px 0 rgba(0, 0, 0, 0.07)",shadowBrand:"0 1px 1px rgba(0, 0, 0, 0.03), 0 2px 5px rgba(108, 36, 245, 0.18)",radiusPill:100,radiusCard:8,radiu
965sCardLg:10,fontMono:"'JetBrains Mono', monospace"},RR={neutral:{bg:ye.bg,fg:ye.ink2,dot:ye.ink4},success:{bg:ye.successBg,fg:ye.successDark,dot:ye.success},warning:{bg:ye.warningBg,fg:ye.warningDark,dot:ye.warning},info:{bg:ye.infoBg,fg:ye.infoDark,dot:ye.info},brand:{bg:ye.brandSoft,fg:ye.brandDark,dot:ye.brand},soft:{bg:ye.brandSofter,fg:ye.brandDark,dot:ye.brand},danger:{bg:ye.dangerBg,fg:ye.dangerDark,dot:ye.danger},outline:{bg:"transparent",fg:ye.ink2,dot:ye.ink4,border:`1px solid ${ye.line}`}};function Cf({tone:e="neutral",children:t,dot:n=!1,icon:s=null,size:i="md"}){const a=RR[e]||RR.neutral,o=i==="lg"?{padding:"5px 12px",fontSize:13}:{padding:"3px 9px",fontSize:11.5};return r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,borderRadius:ye.radiusPill,background:a.bg,color:a.fg,border:a.border||"none",fontWeight:500,letterSpacing:"-0.005em",whiteSpace:"nowrap",...o},children:[n&&r.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:a.dot}}),s,t]})}function oa({title:e,action:t,eyebrow:n,children:s,padded:i=!0,id:a}){return r.jsxs("section",{id:a,style:{background:ye.paper,border:`1px solid ${ye.line}`,borderRadius:ye.radiusCardLg,boxShadow:ye.shadowXs,overflow:"hidden"},children:[e&&r.jsxs("header",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px 14px",borderBottom:`1px solid ${ye.lineSoft}`},children:[r.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:10},children:[r.jsx("h3",{style:{margin:0,fontSize:15,fontWeight:600,color:ye.ink,letterSpacing:"-0.01em"},children:e}),n]}),t]}),r.jsx("div",{style:{padding:i?"18px 20px 20px":0},children:s})]})}const DR={ghost:{bg:"transparent",border:`1px solid ${ye.line}`,color:ye.ink2,hover:ye.bg},brand:{bg:ye.brand,border:`1px solid ${ye.brand}`,color:"#fff",hover:ye.brandDark},soft:{bg:ye.brandSoft,border:"1px solid transparent",color:ye.brandDark,hover:"#DDD9FD"}};function y6e({icon:e,label:t,tone:n="ghost",onClick:s,type:i="button",disabled:a=!1,ariaLabel:o}){const l=DR[n]||DR.ghost;return r.jsxs("button",{type:i,onClick:s,disabled:a,"aria-label":o||t,style:{display:"inline-flex",alignItems:"center",gap:7,padding:"8px 14px",background:l.bg,border:l.border,color:l.color,borderRadius:ye.radiusCard,fontSize:13,fontWeight:500,cursor:a?"not-allowed":"pointer",transition:"background 120ms",letterSpacing:"-0.005em",opacity:a?.6:1,fontFamily:"inherit"},onMouseEnter:c=>{a||(c.currentTarget.style.background=l.hover)},onMouseLeave:c=>{a||(c.currentTarget.style.background=l.bg)},children:[e&&r.jsx(e,{size:14,"aria-hidden":"true"}),t]})}function mc({label:e="Editar",onClick:t}){return r.jsxs("button",{type:"button",onClick:t,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"5px 10px",background:"transparent",border:`1px solid ${ye.line}`,borderRadius:7,color:ye.ink2,fontSize:12.5,fontWeight:500,cursor:"pointer",transition:"background 120ms, color 120ms, border-color 120ms",fontFamily:"inherit",textDecoration:"none",textDecorationLine:"none",lineHeight:1.2},onMouseEnter:n=>{n.currentTarget.style.background=ye.bg,n.currentTarget.style.color=ye.ink,n.currentTarget.style.borderColor=ye.ink5},onMouseLeave:n=>{n.currentTarget.style.background="transparent",n.currentTarget.style.color=ye.ink2,n.currentTarget.style.borderColor=ye.line},children:[r.jsx($r,{size:13,"aria-hidden":"true",style:{textDecoration:"none"}}),r.jsx("span",{style:{textDecoration:"none",textDecorationLine:"none"},children:e})]})}function v6e({height:e=140}){return r.jsx("div",{style:{height:e,position:"relative",overflow:"hidden",background:`
966        radial-gradient(60% 100% at 0% 0%, rgba(108,36,245,0.45), transparent 60%),
967        radial-gradient(50% 100% at 30% 100%, rgba(217,70,239,0.32), transparent 60%),
968        radial-gradient(40% 80% at 70% 0%, rgba(251,146,60,0.18), transparent 65%),
969        radial-gradient(60% 100% at 100% 100%, rgba(56,189,248,0.32), transparent 60%),
970        linear-gradient(135deg, #1E1B4B 0%, #312E81 60%, #4338CA 100%)
971      `},children:r.jsxs("svg",{width:"100%",height:"100%",style:{position:"absolute",inset:0,opacity:.4,mixBlendMode:"overlay"},"aria-hidden":"true",children:[r.jsx("defs",{children:r.jsx("pattern",{id:"meshBannerGrid",width:"32",height:"32",patternUnits:"userSpaceOnUse",children:r.jsx("path",{d:"M 32 0 L 0 0 0 32",fill:"none",stroke:"#fff",strokeWidth:"0.4",strokeOpacity:"0.3"})})}),r.jsx("rect",{width:"100%",height:"100%",fill:"url(#meshBannerGrid)"})]})})}function b6e({value:e}){const t=Math.max(0,Math.min(100,Math.round(e||0)));return r.jsx("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",background:ye.bg,borderRadius:8,border:`1px solid ${ye.line}`,minWidth:240},children:r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:4},children:[r.jsx("span",{style:{fontSize:11.5,fontWeight:500,color:ye.ink2}
971,children:"Perfil completo"}),r.jsxs("span",{style:{fontSize:12,fontWeight:600,color:ye.ink,fontFamily:ye.fontMono},children:[t,"%"]})]}),r.jsx("div",{style:{height:5,background:ye.line,borderRadius:ye.radiusPill,overflow:"hidden"},children:r.jsx("div",{style:{height:"100%",width:`${t}%`,background:ye.gradientPurple,borderRadius:ye.radiusPill,transition:"width 600ms"}})})]})})}const Sw=[{key:"summary_executive",weight:15,label:"Escreva seu resumo profissional",target:"summary_executive",isComplete:e=>typeof e.summary_executive=="string"&&e.summary_executive.trim().length>20},{key:"avatar_url",weight:10,label:"Adicione sua foto de perfil",target:"avatar_url",isComplete:e=>typeof e.avatar_url=="string"&&e.avatar_url.trim().length>0},{key:"experiences",weight:15,label:"Adicione suas experiências profissionais",target:"experiences",isComplete:e=>Array.isArray(e.experiences)&&e.experiences.some(t=>{var n,s;return((n=t==null?void 0:t.title)==null?void 0:n.trim())&&((s=t==null?void 0:t.company)==null?void 0:s.trim())})},{key:"preferences",weight:15,label:"Defina suas preferências de trabalho",target:"preferences",isComplete:e=>Number(e.salary_expectation)>0&&Array.isArray(e.contract_type_desired)&&e.contract_type_desired.length>0&&Array.isArray(e.work_format_desired)&&e.work_format_desired.length>0},{key:"headline_company",weight:10,label:"Adicione seu título profissional e empresa atual",target:"header",isComplete:e=>typeof e.headline=="string"&&e.headline.trim().length>0&&typeof e.current_company=="string"&&e.current_company.trim().length>0},{key:"education",weight:10,label:"Adicione sua formação acadêmica",target:"education",isComplete:e=>Array.isArray(e.education)&&e.education.some(t=>{var n;return(n=t==null?void 0:t.institution)==null?void 0:n.trim()})},{key:"skill_ids",weight:10,label:"Adicione pelo menos 3 skills",target:"skills",isComplete:e=>(Array.isArray(e.skill_ids)?e.skill_ids:Array.isArray(e.skills)?e.skills:[]).length>=3},{key:"languages",weight:10,label:"Adicione seus idiomas",target:"languages",isComplete:e=>Array.isArray(e.languages)&&e.languages.some(t=>{var n;return(n=t==null?void 0:t.language)==null?void 0:n.trim()})},{key:"certifications",weight:5,label:"Adicione suas certificações",target:"certifications",isComplete:e=>Array.isArray(e.certifications)&&e.certifications.some(t=>{var n;return(n=t==null?void 0:t.name)==null?void 0:n.trim()})}];function w6e(e){if(!e||typeof e!="object")return{percent:0,nextField:Sw[0],breakdown:[]};const t=Sw.map(a=>({key:a.key,weight:a.weight,complete:a.isComplete(e)})),n=t.reduce((a,o)=>a+(o.complete?o.weight:0),0),s=Math.max(0,Math.min(100,Math.round(n))),i=Sw.find(a=>!a.isComplete(e))||null;return{percent:s,nextField:i,breakdown:t}}const j6e=10*1024*1024,xx=30*1024*1024,S6e=".pdf,.doc,.docx,.txt,.rtf,.odt,.png,.jpg,.jpeg,.webp";function k6e(e){return!e||e<=0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function IR(e){return(e/(1024*1024)).toFixed(1).replace(/\.0$/,"")}function _6e(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const n=Date.now()-t.getTime(),s=Math.floor(n/864e5);return s<0?t.toLocaleDateString("pt-BR",{day:"2-digit",month:"short"}):s===0?"hoje":s===1?"ontem":s<7?`há ${s} dias`:t.toLocaleDateString("pt-BR",{day:"2-digit",month:"short"}).replace(".","")}function C6e({fileType:e,fileName:t}){var o;const n=(e||"").toLowerCase(),s=((o=(t||"").split(".").pop())==null?void 0:o.toLowerCase())||"",i=n.startsWith("image/")||["png","jpg","jpeg","webp","gif"].includes(s),a=n.includes("pdf")||n.includes("word")||n.includes("text")||["pdf","doc","docx","txt","rtf","odt"].includes(s);return i?r.jsx(fS,{size:20,"aria-hidden":"true",style:{color:ye.brand}}):a?r.jsx(ui,{size:20,"aria-hidden":"true",style:{color:ye.brand}}):r.jsx(d8,{size:20,"aria-hidden":"true",style:{color:ye.ink3}})}function E6e({kind:e,message:t,onClose:n}){g.useEffect(()=>{const i=setTimeout(n,3500);return()=>clearTimeout(i)},[n]);const s=e==="error"?{color:ye.danger,border:"#FCA5A5",Icon:xl}:{color:"#065F46",border:"#A7F3D0",Icon:Mi};return r.jsxs("div",{style:{position:"fixed",bottom:24,right:24,zIndex:1100,background:"#fff",border:`1px solid ${s.border}`,borderLeft:`4px solid ${s.color}`,borderRadius:10,padding:"12px 16px",display:"flex",alignItems:"center",gap:10,boxShadow:ye.shadowLg,maxWidth:380,fontFamily:"inherit"},children:[r.jsx(s.Icon,{size:18,style:{color:s.color,flexShrink:0},"aria-hidden":"true"}),r.jsx("span",{style:{fontSize:13,color:ye.ink,fontWeight:500},children:t})]})}function F6e(){const[e,t]=g.useState([]),[n,s]=g.useState({used_bytes:0,available_bytes:xx,limit_bytes:xx}),[i,a]=g.useState(!0),[o,l]=g.useState(!1),[c,d]=g.useState(null),[u,p]=g.useState(null),[m,x]=g.useState(null),w=g.useRef(null);async function y(){try{const C=await ne.functions.invoke("listMyAttachments",{}),D=(C==null?void 0:C.data)||C;D!=null&&D.success&&(t(D.attachments||[]),s(D.quota||{used_bytes:0,available_bytes:xx,limit_bytes:xx}))}catch(C){console.error("listMyAttachments error:",C==null?void 0:C.message)}finally{a(!1)}}g.useEffect(()=>{y()},[]);function v(C,D){x({kind:C,message:D,id:Date.now()})}async function j(C){var P,L;const D=(P=C.target.files)==null?void 0:P[0];if(C.target.value="",!!D){if(D.size>j6e){v("error","Arquivo excede o limite de 10MB");return}if(D.size>n.available_bytes){const T=IR(n.available_bytes);v("error",`Espaço insuficiente. Você tem ${T} MB disponíveis.`);return}l(!0);try{const T=await ne.integrations.Core.UploadFile({file:D}),R=(T==null?void 0:T.file_url)||((L=T==null?void 0:T.data)==null?void 0:L.file_url);if(!R){v("error","Falha no upload. Tente novamente.");return}const U=await ne.functions.invoke("uploadAttachment",{file_url:R,file_name:D.name,file_size_bytes:D.size,file_type:D.type||"application/octet-stream"}),I=(U==null?void 0:U.data)||U;I!=null&&I.success&&I.attachment?(t(H=>[I.attachment,...H]),await y(),v("success","Arquivo adicionado com sucesso")):v("error",(I==null?void 0:I.message)||"Não foi possível adicionar o arquivo.")}catch(T){console.error("upload flow error:",T==null?void 0:T.message),v("error","Falha no upload. Tente novamente.")}finally{l(!1)}}}async function k(C){const D=e;t(P=>P.filter(L=>L.id!==C)),p(C);try{const P=await ne.functions.invoke("deleteAttachment",{attachment_id:C}),L=(P==null?void 0:P.data)||P;L!=null&&L.success?(await y(),d(null),v("success","Arquivo removido")):(t(D),v("error",(L==null?void 0:L.message)||"Não foi possível remover o arquivo."))}catch(P){console.error("delete error:",P==null?void 0:P.message),t(D),v("error","Não foi possível remover o arquivo.")}finally{p(null)}}const S=IR(n.used_bytes),_=Math.round(n.limit_bytes/(1024*1024)),F=r.jsxs(r.Fragment,{children:[r.jsx("input",{ref:w,type:"file",accept:S6e,style:{display:"none"},onChange:j}),r.jsx("button",{onClick:()=>{var C;return(C=w.current)==null?void 0:C.click()},disabled:o,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 12px",borderRadius:8,border:`1px solid ${ye.line}`,background:o?ye.bg:"#fff",color:o?ye.ink4:ye.ink2,fontSize:12.5,fontWeight:500,cursor:o?"not-allowed":"pointer",fontFamily:"inherit",transition:"border-color 120ms ease, color 120ms ease"},onMouseEnter:C=>{o||(C.currentTarget.style.borderColor=ye.brand,C.currentTarget.style.color=ye.brandDark)},onMouseLeave:C=>{o||(C.currentTarget.style.borderColor=ye.line,C.currentTarget.style.color=ye.ink2)},children:o?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:13,style:{animation:"spin 0.8s linear infinite"},"aria-hidden":"true"}
971)," Enviando..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Ln,{size:13,"aria-hidden":"true"})," Adicionar arquivo"]})})]}),A=r.jsxs("span",{style:{fontSize:11.5,color:ye.ink4,fontFamily:ye.fontMono,fontWeight:500},children:[S," de ",_," MB"]});return r.jsxs(r.Fragment,{children:[r.jsx(oa,{id:"section-my-files",title:"Meus arquivos",eyebrow:A,action:F,padded:e.length===0,children:i?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"12px 0",fontSize:13,color:ye.ink4},children:[r.jsx(rt,{size:14,style:{animation:"spin 0.8s linear infinite"},"aria-hidden":"true"}),"Carregando arquivos..."]}):e.length===0?r.jsxs("div",{style:{textAlign:"center",padding:"24px 16px",border:`1px dashed ${ye.line}`,borderRadius:10,background:ye.bg2},children:[r.jsx(Ha,{size:22,"aria-hidden":"true",style:{color:ye.ink4,marginBottom:10}}),r.jsx("p",{style:{fontSize:14,color:ye.ink3,margin:"0 0 14px"},children:"Você ainda não adicionou nenhum arquivo."}),r.jsx("button",{onClick:()=>{var C;return(C=w.current)==null?void 0:C.click()},disabled:o,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 16px",borderRadius:8,background:o?"#A5B4FC":ye.brand,color:"#fff",fontSize:13,fontWeight:600,border:"none",cursor:o?"not-allowed":"pointer",boxShadow:ye.shadowBrand,fontFamily:"inherit"},children:o?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:13,style:{animation:"spin 0.8s linear infinite"},"aria-hidden":"true"})," Enviando..."]}):"Adicionar primeiro arquivo"})]}):r.jsx("div",{style:{maxHeight:400,overflowY:"auto"},children:e.map((C,D)=>{const P=D===e.length-1,L=u===C.id;return r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"24px 1fr 100px 28px",gap:12,alignItems:"center",padding:"12px 20px",borderBottom:P?"none":`0.5px solid ${ye.lineSoft}`,opacity:L?.5:1,transition:"opacity 120ms ease"},children:[r.jsx(C6e,{fileType:C.file_type,fileName:C.file_name}),r.jsxs("a",{href:C.file_url,target:"_blank",rel:"noopener noreferrer",style:{minWidth:0,textDecoration:"none",color:"inherit"},children:[r.jsx("div",{style:{fontSize:14,fontWeight:500,color:ye.ink,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C.file_name}),r.jsx("div",{style:{fontSize:11,color:ye.ink4,marginTop:2},children:k6e(C.file_size_bytes)})]}),r.jsx("span",{style:{fontSize:12,color:ye.ink4,fontFamily:ye.fontMono},children:_6e(C.uploaded_at)}),r.jsx("button",{onClick:()=>d(C),disabled:L,"aria-label":`Remover ${C.file_name}`,style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",borderRadius:6,color:ye.ink4,cursor:L?"not-allowed":"pointer",transition:"background 120ms ease, color 120ms ease"},onMouseEnter:T=>{L||(T.currentTarget.style.background=ye.dangerBg,T.currentTarget.style.color=ye.danger)},onMouseLeave:T=>{L||(T.currentTarget.style.background="none",T.currentTarget.style.color=ye.ink4)},children:L?r.jsx(rt,{size:14,style:{animation:"spin 0.8s linear infinite"},"aria-hidden":"true"}):r.jsx(zn,{size:14,"aria-hidden":"true"})})]},C.id)})})}),c&&r.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(10, 37, 64, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:16},onClick:()=>{u!==c.id&&d(null)},children:r.jsxs("div",{style:{background:"#fff",borderRadius:16,padding:"28px 32px",maxWidth:480,width:"100%",boxShadow:ye.shadowLg,fontFamily:"inherit"},onClick:C=>C.stopPropagation(),children:[r.jsx("h3",{style:{fontSize:18,fontWeight:700,color:ye.ink,margin:"0 0 12px"},children:"Remover arquivo?"}),r.jsx("p",{style:{fontSize:14,color:ye.ink2,lineHeight:1.6,margin:"0 0 24px"},children:'Esta ação não pode ser desfeita. Candidaturas que já anexaram este arquivo continuarão referenciando-o, mas os recrutadores verão "arquivo removido pelo candidato".'}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[r.jsx("button",{onClick:()=>d(null),disabled:u===c.id,style:{padding:"9px 18px",borderRadius:8,background:"transparent",color:ye.ink2,fontWeight:500,fontSize:13,border:`1px solid ${ye.line}`,cursor:u===c.id?"not-allowed":"pointer",fontFamily:"inherit"},children:"Cancelar"}),r.jsx("button",{onClick:()=>k(c.id),disabled:u===c.id,style:{padding:"9px 18px",borderRadius:8,background:u===c.id?"#FCA5A5":ye.danger,color:"#fff",fontWeight:600,fontSize:13,border:"none",cursor:u===c.id?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:6,fontFamily:"inherit"},children:u===c.id?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:13,style:{animation:"spin 0.8s linear infinite"},"aria-hidden":"true"})," Removendo..."]}):"Remover"})]})]})}),m&&r.jsx(E6e,{kind:m.kind,message:m.message,onClose:()=>x(null)},m.id)]})}const PR={clt:"CLT",pj:"PJ",autonomo:"Autônomo",estagio:"Estágio",temporario:"Temporário",cooperado:"Cooperado"},BR={presencial:"Presencial",hibrido:"Híbrido",remoto:"Remoto"},A6e={pending_verification:"Aguardando confirmação",submitted:"Enviada",viewed:"Visualizada",shortlisted:"Selecionado",approved:"Selecionado",standby:"Em espera",rejected:"Processo encerrado",removed_by_recruiter:"Processo encerrado",hired:"Contratado",expired:"Expirada",withdrawn:"Candidatura retirada"},T6e={pending_verification:"neutral",submitted:"brand",viewed:"info",shortlisted:"success",approved:"success",standby:"warning",rejected:"neutral",removed_by_recruiter:"neutral",hired:"success",expired:"neutral",withdrawn:"neutral"},N6e=["approved","rejected","removed_by_recruiter","withdrawn","expired","hired"],R6e=["rejected","removed_by_recruiter"];function yx(e){const t={janeiro:1,fevereiro:2,marco:3,março:3,abril:4,maio:
9715,junho:6,julho:7,agosto:8,setembro:9,outubro:10,novembro:11,dezembro:12,jan:1,fev:2,mar:3,abr:4,mai:5,jun:6,jul:7,ago:8,set:9,out:10,nov:11,dez:12},n=String(e||"").toLowerCase().trim();let s;return(s=n.match(/^(\d{1,2})\/(\d{4})$/))?parseInt(s[2])*12+parseInt(s[1]):(s=n.match(/^([a-zç]+)\s+(?:de\s+)?(\d{4})$/))&&t[s[1]]?parseInt(s[2])*12+t[s[1]]:(s=n.match(/^(\d{4})$/))?parseInt(s[1])*12+6:0}function OR(e){return!e||e===""?!0:/atual|present/i.test(String(e).trim())}function D6e(e,t){const n=OR(e.end_date),s=OR(t.end_date);return n&&!s?-1:!n&&s?1:n&&s?yx(t.start_date)-yx(e.start_date):yx(t.end_date)-yx(e.end_date)}function MR(e,t,n,s){const i=e[n],a=t[n],o=!i||i==="",l=!a||a==="";return o&&!l?-1:!o&&l?1:o&&l&&s?Number(t[s]||0)-Number(e[s]||0):Number(a||0)-Number(i||0)}function I6e(e){return e.status==="withdrawn"?"withdrawn":R6e.includes(e.status)?"closed":e.job_status==="paused"?"paused":e.job_status==="closed"||e.job_status==="deleted"?"closed":"active"}const Fi={width:"100%",padding:"10px 14px",border:`1px solid ${ye.line}`,borderRadius:10,fontSize:14,color:ye.ink,outline:"none",background:ye.paper,boxSizing:"border-box",fontFamily:"inherit"};function dl({onSave:e,onCancel:t,saving:n,error:s}){return r.jsxs("div",{style:{marginTop:16},children:[s&&r.jsx("p",{style:{fontSize:13,color:ye.danger,marginBottom:8},children:s}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("button",{onClick:e,disabled:n,style:{padding:"8px 20px",borderRadius:8,background:n?"#A5B4FC":ye.brand,color:"#fff",fontWeight:600,fontSize:13,border:"none",cursor:n?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:6,fontFamily:"inherit"},children:n?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:13,style:{animation:"spin 0.8s linear infinite"}})," Salvando..."]}):"Salvar"}),r.jsx("button",{onClick:t,disabled:n,style:{padding:"8px 20px",borderRadius:8,background:"transparent",color:ye.ink3,fontWeight:500,fontSize:13,border:`1px solid ${ye.line}`,cursor:"pointer",fontFamily:"inherit"},children:"Cancelar"})]})]})}function P6e({profile:e,editingSection:t,editData:n,setEditData:s,startEdit:i,cancelEdit:a,saveSection:o,saving:l,saveError:c,completeness:d,uploadingAvatar:u,avatarError:p,handleAvatarUpload:m}){const x=t==="header",w=((e==null?void 0:e.full_name)||"?").trim().split(/\s+/).slice(0,2).map(v=>v[0]).join("").toUpperCase(),y="candidate-avatar-upload-input";return r.jsxs(oa,{padded:!1,children:[r.jsx(v6e,{height:140}),r.jsxs("div",{style:{padding:"0 28px 22px"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:20,marginTop:-52},children:[r.jsxs("div",{style:{position:"relative",flexShrink:0},children:[e!=null&&e.avatar_url?r.jsx("img",{src:e.avatar_url,alt:"",style:{width:116,height:116,borderRadius:"50%",objectFit:"cover",border:"4px solid #fff",boxShadow:"0 4px 16px -4px rgba(10,37,64,0.18)",display:"block"}}):r.jsx("div",{style:{width:116,height:116,borderRadius:"50%",background:ye.gradientPurple,color:"#fff",fontSize:40,fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",letterSpacing:"-0.02em",border:"4px solid #fff",boxShadow:"0 4px 16px -4px rgba(10,37,64,0.18)"},children:w}),r.jsx("input",{id:y,type:"file",accept:"image/jpeg,image/jpg,image/png,image/webp",style:{display:"none"},onChange:v=>{var k;const j=(k=v.target.files)==null?void 0:k[0];j&&m(j),v.target.value=""}}),r.jsx("label",{htmlFor:y,title:e!=null&&e.avatar_url?"Trocar foto":"Adicionar foto",style:{position:"absolute",bottom:4,right:4,width:32,height:32,borderRadius:"50%",background:"#fff",border:`1px solid ${ye.line}`,boxShadow:ye.shadowSm,cursor:u?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",color:ye.brand,pointerEvents:u?"none":"auto",opacity:u?.7:1},children:u?r.jsx(rt,{size:14,style:{animation:"spin 0.8s linear infinite"}}):r.jsx(HU,{size:14,"aria-hidden":"true"})})]}),r.jsx("div",{style:{flex:1,minWidth:0,paddingTop:60},children:x?null:r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr auto",gap:24,alignItems:"flex-start"},children:[r.jsxs("div",{style:{minWidth:0},children:[r.jsx("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:2,flexWrap:"wrap"},children:r.jsx("h1",{style:{margin:0,fontSize:26,fontWeight:600,color:ye.ink,letterSpacing:"-0.025em",lineHeight:1.15},children:e==null?void 0:e.full_name})}),p&&r.jsx("p",{style:{fontSize:12,color:ye.danger,margin:"4px 0 0"},children:p}),(e==null?void 0:e.headline)&&r.jsx("div",{style:{fontSize:15,color:ye.ink2,marginTop:4,letterSpacing:"-0.005em"},children:e.headline}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,flexWrap:"wrap",fontSize:13,color:ye.ink3,marginTop:10},children:[(e==null?void 0:e.current_company)&&r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[r.jsx(OU,{size:14,"aria-hidden":"true"}),e.current_company]}),(e==null?void 0:e.location)&&r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[r.jsx(ma,{size:14,"aria-hidden":"true"}),e.location]}),(e==null?void 0:e.email)&&r.jsxs("a",{href:`mailto:${e.email}`,style:{display:"inline-flex",alignItems:"center",gap:5,color:ye.brandDark,textDecoration:"none",fontWeight:500},children:[r.jsx(mr,{size:14,"aria-hidden":"true"}),e.email]}),(e==null?void 0:e.linkedin_url)&&r.jsxs("a",{href:e.linkedin_url.startsWith("http")?e.linkedin_url:`https://${e.linkedin_url}`,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:5,color:ye.brandDark,textDecoration:"none",fontWeight:500},children:[r.jsx(lH,{size:14,"aria-hidden":"true"}),"LinkedIn"]})]})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,alignItems:"flex-end"},children:[r.jsx(y6e,{icon:$r,label:"Editar perfil",tone:"brand",onClick:()=>i("header",{full_name:(e==null?void 0:e.full_name)||"",headline:(e==null?void 0:e.headline)||"",current_title:(e==null?void 0:e.current_title)||"",current_company:(e==null?void 0:e.current_company)||"",location:(e==null?void 0:e.location)||"",phone:(e==null?void 0:e.phone)||"",linkedin_url:(e==null?void 0:e.linkedin_url)||""})}),d.percent<100&&r.jsx(b6e,{value:d.percent})]})]})})]}),x&&r.jsxs("div",{style:{marginTop:16},children:[[{label:"Nome",key:"full_name"},{label:"Título profissional",key:"headline"},{label:"Cargo atual",key:"current_title"},{label:"Empresa atual",key:"current_company"},{label:"Localização",key:"location"},{label:"Telefone",key:"phone"},{label:"LinkedIn (preenche campos vazios automaticamente)",key:"linkedin_url",placeholder:"https://linkedin.com/in/seu-perfil"}].map(({label:v,key:j,placeholder:k})=>r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:4},children:v}),r.jsx("input",{style:Fi,value:n[j]||"",onChange:S=>s(_=>({..._,[j]:S.target.value})),onFocus:S=>
971S.target.style.borderColor=ye.brand,onBlur:S=>S.target.style.borderColor=ye.line,placeholder:k||""})]},j)),r.jsxs("div",{style:{marginBottom:12},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:4},children:"E-mail da conta"}),r.jsx("p",{style:{fontSize:14,color:ye.ink4,margin:0},children:e==null?void 0:e.email})]}),r.jsx(dl,{onSave:()=>o({full_name:n.full_name,headline:n.headline,current_title:n.current_title,current_company:n.current_company,location:n.location,phone:n.phone,linkedin_url:n.linkedin_url}),onCancel:a,saving:l,error:c})]})]})]})}function B6e({profile:e,applications:t,assessments:n,editingSection:s,editData:i,setEditData:a,startEdit:o,cancelEdit:l,saveSection:c,saving:d,saveError:u,openMenuId:p,setOpenMenuId:m,setConfirmCancelApp:x}){var y,v,j,k,S,_;const w=n.filter(F=>F.status!=="completed"&&F.status!=="expired");return r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:22,minWidth:0},children:[w.length>0&&r.jsx(oa,{id:"section-assessments",title:"Avaliações",eyebrow:r.jsxs(Cf,{tone:"warning",dot:!0,children:[w.length," pendente",w.length>1?"s":""]}),children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:w.map(F=>{var A,C;return r.jsx("div",{style:{border:`1px solid ${ye.line}`,borderRadius:ye.radiusCardLg,padding:"16px 20px",background:ye.brandSofter},children:r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12},children:[r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{fontSize:14,fontWeight:600,color:ye.ink,marginBottom:2},children:F.job_title}),F.company&&r.jsx("p",{style:{fontSize:12,color:ye.ink3,marginBottom:6},children:F.company}),((A=F.templates)==null?void 0:A.length)>0&&r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:F.templates.map((D,P)=>r.jsxs("span",{style:{fontSize:11,padding:"3px 9px",borderRadius:ye.radiusPill,background:ye.brandSoft,color:ye.brandDark,border:`1px solid ${ye.brandTint}`,display:"inline-flex",alignItems:"center",gap:5},children:[r.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:ye.brand}}),D.name," · ",D.duration," min"]},P))}),r.jsxs("p",{style:{fontSize:12,color:ye.ink3,margin:0},children:["Duração estimada: ~",((C=F.templates)==null?void 0:C.reduce((D,P)=>D+(P.duration||20),0))||20," min"]})]}),r.jsx("a",{href:`/respond/${F.token}`,target:"_blank",rel:"noreferrer",style:{flexShrink:0,padding:"8px 18px",borderRadius:ye.radiusCard,background:ye.brand,color:"#fff",fontSize:13,fontWeight:500,textDecoration:"none",whiteSpace:"nowrap",boxShadow:ye.shadowBrand},children:"Fazer avaliação →"})]})},F.invitation_id)})})}),r.jsx(oa,{id:"section-summary_executive",title:"Sobre",action:s!=="summary_executive"&&r.jsx(mc,{onClick:()=>o("summary_executive",{summary_executive:(e==null?void 0:e.summary_executive)||""})}),children:s==="summary_executive"?r.jsxs("div",{children:[r.jsx("textarea",{rows:5,value:i.summary_executive||"",onChange:F=>a(A=>({...A,summary_executive:F.target.value})),style:{...Fi,resize:"vertical",lineHeight:1.6},onFocus:F=>F.target.style.borderColor=ye.brand,onBlur:F=>F.target.style.borderColor=ye.line,placeholder:"Descreva seu perfil profissional..."}),r.jsx(dl,{onSave:()=>c({summary_executive:i.summary_executive}),onCancel:l,saving:d,error:u})]}):e!=null&&e.summary_executive?r.jsx("p",{style:{fontSize:14,color:ye.ink2,lineHeight:1.7,margin:0,overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-wrap"},children:e.summary_executive}):r.jsx("p",{style:{fontSize:14,color:ye.ink4,margin:0},children:'Nenhum resumo profissional. Clique em "Editar" para adicionar.'})}),r.jsx(F6e,{}),r.jsx(oa,{title:"Minhas candidaturas",eyebrow:r.jsx(Cf,{tone:"outline",children:t.length}),action:r.jsxs(ut,{to:"/job-board",style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:12.5,color:ye.brandDark,fontWeight:500,textDecoration:"none"},children:["Explorar vagas ",r.jsx(Rc,{size:13,"aria-hidden":"true"})]}),padded:!1,children:t.length===0?r.jsx("p",{style:{fontSize:14,color:ye.ink4,textAlign:"center",padding:"32px 20px"},children:"Nenhuma candidatura encontrada."}):r.jsx("div",{children:t.map((F,A)=>{const C=I6e(F),D=C==="active",P=C==="withdrawn",L=C==="paused",T=C==="closed",R=(D||L)&&!N6e.includes(F.status),U=A===t.length-1,I=L?"warning":T?"neutral":T6e[F.status]||"neutral",H=L?"On Hold":T?"Processo encerrado":A6e[F.status]||F.status,V=L?"Processo seletivo temporariamente interrompido pela empresa.":T?"Vagas encerradas são automaticamente removidas do seu perfil após até sete dias do encerramento.":null,X=P?.6:T?.7:1;return r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"16px 20px",borderBottom:U?"none":`1px solid ${ye.lineSoft}`,opacity:X},children:[r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{fontSize:15,fontWeight:600,color:ye.ink,marginBottom:2},children:F.job_title}),r.jsxs("p",{style:{fontSize:13,color:ye.ink3,margin:0},children:[F.company_name,F.location_city?` · ${F.location_city}${F.location_state?`/${F.location_state}`:""}`:""]}),F.applied_at&&r.jsxs("p",{style:{fontSize:11,color:ye.ink4,marginTop:4,fontFamily:ye.fontMono,fontWeight:500},children:["Aplicado em ",new Date(F.applied_at).toLocaleDateString("pt-BR"),P&&F.withdrawn_at&&` · Retirada em ${new Date(F.withdrawn_at).toLocaleDateString("pt-BR")}`]}),V&&r.jsx("p",{style:{fontSize:12,color:ye.ink3,marginTop:6,lineHeight:1.5},children:V})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0}
971,children:[r.jsx(Cf,{tone:I,dot:!0,children:H}),R&&r.jsxs("div",{style:{position:"relative"},children:[r.jsx("button",{onClick:()=>m(p===F.application_id?null:F.application_id),style:{background:"none",border:"none",cursor:"pointer",padding:4,color:ye.ink4,display:"flex",alignItems:"center",borderRadius:6},onMouseEnter:N=>{N.currentTarget.style.background=ye.bg,N.currentTarget.style.color=ye.ink2},onMouseLeave:N=>{N.currentTarget.style.background="none",N.currentTarget.style.color=ye.ink4},"aria-label":"Ações",children:r.jsx(No,{size:18})}),p===F.application_id&&r.jsx("div",{style:{position:"absolute",right:0,top:"calc(100% + 4px)",background:"#fff",border:`1px solid ${ye.line}`,borderRadius:10,boxShadow:ye.shadowMd,minWidth:200,zIndex:50,overflow:"hidden"},children:r.jsxs("button",{onClick:()=>{x(F),m(null)},style:{width:"100%",textAlign:"left",padding:"10px 14px",background:"none",border:"none",cursor:"pointer",display:"flex",alignItems:"center",gap:8,color:ye.danger,fontSize:13,fontWeight:500,fontFamily:"inherit"},onMouseEnter:N=>N.currentTarget.style.background=ye.dangerBg,onMouseLeave:N=>N.currentTarget.style.background="none",children:[r.jsx(yl,{size:15}),"Retirar candidatura"]})})]})]})]},F.application_id)})})}),r.jsx(oa,{id:"section-experiences",title:"Experiências",action:s!=="experiences"&&r.jsx(mc,{onClick:()=>o("experiences",{experiences:JSON.parse(JSON.stringify((e==null?void 0:e.experiences)||[]))})}),children:s==="experiences"?r.jsxs("div",{children:[(y=i.experiences)==null?void 0:y.map((F,A)=>r.jsxs("div",{style:{border:`1px solid ${ye.line}`,borderRadius:10,padding:14,marginBottom:10,background:ye.bg2},children:[r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,marginBottom:10},children:[[["Cargo","title"],["Empresa","company"]].map(([C,D])=>r.jsxs("div",{children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:4},children:C}),r.jsx("input",{style:Fi,value:F[D]||"",onChange:P=>{const L=[...i.experiences];L[A]={...L[A],[D]:P.target.value},a(T=>({...T,experiences:L}))}})]},D)),[["Início","start_date"],["Fim","end_date"]].map(([C,D])=>r.jsxs("div",{children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:4},children:C}),r.jsx("input",{style:Fi,value:F[D]||"",onChange:P=>{const L=[...i.experiences];L[A]={...L[A],[D]:P.target.value},a(T=>({...T,experiences:L}))},placeholder:D==="end_date"?"Atual":"mm/aaaa"})]},D))]}),r.jsxs("div",{style:{marginBottom:8},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:4},children:"Descrição"}),r.jsx("textarea",{rows:2,style:{...Fi,resize:"vertical",lineHeight:1.5},value:F.description||"",onChange:C=>{const D=[...i.experiences];D[A]={...D[A],description:C.target.value},a(P=>({...P,experiences:D}))}})]}),r.jsx("button",{onClick:()=>a(C=>({...C,experiences:C.experiences.filter((D,P)=>P!==A)})),style:{fontSize:12,color:ye.danger,background:"none",border:"none",cursor:"pointer",padding:0},children:"Remover"})]},A)),r.jsx("button",{onClick:()=>a(F=>({...F,experiences:[...F.experiences||[],{title:"",company:"",start_date:"",end_date:"",description:""}]})),style:{fontSize:13,color:ye.brand,background:"none",border:"none",cursor:"pointer",padding:"4px 0",marginBottom:12},children:"+ Adicionar experiência"}),r.jsx(dl,{onSave:()=>c({experiences:i.experiences}),onCancel:l,saving:d,error:u})]}):(v=e==null?void 0:e.experiences)!=null&&v.length?[...e.experiences].sort(D6e).map((F,A,C)=>r.jsxs("div",{style:{borderBottom:A<C.length-1?`1px solid ${ye.lineSoft}`:"none",marginBottom:12,paddingBottom:12},children:[r.jsx("p",{style:{fontSize:14,fontWeight:600,color:ye.ink,margin:"0 0 2px"},children:F.title}),r.jsx("p",{style:{fontSize:13,color:ye.ink2,margin:"0 0 2px"},children:F.company}),r.jsxs("p",{style:{fontSize:12,color:ye.ink4,margin:0},children:[F.start_date,F.start_date?" — ":"",F.end_date||(F.start_date?"Atual":"")]}),F.description&&r.jsx("p",{style:{fontSize:13,color:ye.ink3,marginTop:4,marginBottom:0},children:F.description})]},A)):r.jsx("p",{style:{fontSize:14,color:ye.ink4},children:'Nenhuma experiência cadastrada. Clique em "Editar" para adicionar.'})}),r.jsx(oa,{id:"section-education",title:"Formação",action:s!=="education"&&r.jsx(mc,{onClick:()=>o("education",{education:JSON.parse(JSON.stringify((e==null?void 0:e.education)||[]))})}),children:s==="education"?r.jsxs("div",{children:[(j=i.education)==null?void 0:j.map((F,A)=>r.jsxs("div",{style:{border:`1px solid ${ye.line}`,borderRadius:10,padding:14,marginBottom:10,background:ye.bg2},children:[r.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,marginBottom:8},children:[["Instituição","institution"],["Grau","degree"],["Área","field"],["Início","start_year"],["Término","end_year"]].map(([C,D])=>r.jsxs("div",{children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:4},children:C}),r.jsx("input",{style:Fi,value:F[D]||"",onChange:P=>{const L=[...i.education];L[A]={...L[A],[D]:P.target.value},a(T=>({...T,education:L}))},placeholder:D.includes("year")?"aaaa":""})]},D))}),r.jsx("button",{onClick:()=>a(C=>({...C,education:C.education.filter((D,P)=>P!==A)})),style:{fontSize:12,color:ye.danger,background:"none",border:"none",cursor:"pointer",padding:0},children:"Remover"})]},A)),r.jsx("button",{onClick:()=>a(F=>({...F,education:[...F.education||[],{institution:"",degree:"",field:"",start_year:"",end_year:""}]})),style:{fontSize:13,color:ye.brand,background:"none",border:"none",cursor:"pointer",padding:"4px 0",marginBottom:12},children:"+ Adicionar formação"}),r.jsx(dl,{onSave:()=>c({education:i.education}),onCancel:l,saving:d,error:u})]}):(k=e==null?void 0:e.education)!=null&&k.length?[...e.education].sort((F,A)=>MR(F,A,"end_year","start_year")).map((F,A,C)=>r.jsxs("div",{style:{borderBottom:A<C.length-1?`1px solid ${ye.lineSoft}`:"none",marginBottom:12,paddingBottom:12},children:[r.jsx("p",{style:{fontSize:14,fontWeight:600,color:ye.ink,margin:"0 0 2px"},children:F.institution}),r.jsxs("p",{style:{fontSize:13,color:ye.ink2,margin:"0 0 2px"},children:[F.degree,F.field?` em ${F.field}`:""]}),r.jsxs("p",{style:{fontSize:12,color:ye.ink4,margin:0},children:[F.start_year,F.start_year?" — ":"",F.end_year||(F.start_year?"Atual":"")]})]},A)):r.jsx("p",{style:{fontSize:14,color:ye.ink4},children:'Nenhuma formação cadastrada. Clique em "Editar" para adicionar.'})}),r.jsx(oa,{id:"section-certifications",title:"Certificações",action:s!=="certifications"&&r.jsx(mc,{onClick:()=>o("certifications",{certifications:JSON.parse(JSON.stringify((e==null?void 0:e.certifications)||[]))})}),children:s==="certifications"?r.jsxs("div",{children:[(S=i.certifications)==null?void 0:S.map((F,A)=>r.jsxs("div",{style:{border:`1px solid ${ye.line}`,borderRadius:10,padding:14,marginBottom:10,background:ye.bg2},children:[r.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,marginBottom:8},children:[["Nome","name"],["Emissor","issuer"],["Ano","year"]].map(([C,D])=>r.jsxs("div",{children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:4},children:C}),r.jsx("input",{style:Fi,value:F[D]||"",onChange:P=>{const L=[...i.certifications];L[A]={...L[A],[D]:P.target.value},a(T=>({...T,certifications:L}))},placeholder:D==="year"?"aaaa":""})]},D))}),r.jsx("button",{onClick:()=>a(C=>({...C,certifications:C.certifications.filter((D,P)=>P!==A)})),style:{fontSize:12,color:ye.danger,background:"none",border:"none",cursor:"pointer",padding:0},children:"Remover"})]},A)),r.jsx("button",{onClick:()=>a(F=>({...F,certifications:[...F.certifications||[],{name:"",issuer:"",year:""}]})),style:{fontSize:13,color:ye.brand,background:"none",border:"none",cursor:"pointer",padding:"4px 0",marginBottom:12},children:"+ Adicionar certificação"}),r.jsx(dl,{onSave:()=>c({certifications:i.certifications}),onCancel:l,saving:d,error:u})]}):(_=e==null?void 0:e.certifications)!=null&&_.length?[...e.certifications].sort((F,A)=>MR(F,A,"year",null)).map((F,A,C)=>r.jsxs("div",{style:{borderBottom:A<C.length-1?`1px solid ${ye.lineSoft}`:"none",marginBottom:12,paddingBottom:12},children:[r.jsx("p",{style:{fontSize:14,fontWeight:600,color:ye.ink,margin:"0 0 2px"},children:F.name}),r.jsxs("p",{style:{fontSize:13,color:ye.ink4,margin:0},children:[F.issuer,F.year?` · ${F.year}`:""]})]},A)):r.jsx("p",{style:{fontSize:14,color:ye.ink4},children:'Nenhuma certificação cadastrada. Clique em "Editar" para adicionar.'})})]})}function O6e({profile:e,editingSection:t,editData:n,setEditData:s,startEdit:i,cancelEdit:a,saveSection:o,saving:l,saveError:c,completeness:d,jumpToNextField:u}){var p,m,x,w,y,v,j,k,S,_,F,A,C,D,P,L;
971return r.jsxs("aside",{className:"meu-perfil-sidebar",style:{display:"flex",flexDirection:"column",gap:22,position:"sticky",top:24},children:[r.jsx(oa,{id:"section-contact",title:"Contato",action:t!=="contact"&&r.jsx(mc,{onClick:()=>i("contact",{secondary_emails:[...(e==null?void 0:e.secondary_emails)||[]],secondary_phones:[...(e==null?void 0:e.secondary_phones)||[]]})}),children:t==="contact"?r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:12,fontWeight:600,color:ye.ink,marginBottom:8},children:"E-mails secundários"}),(p=n.secondary_emails)==null?void 0:p.map((T,R)=>r.jsxs("div",{style:{display:"flex",gap:8,marginBottom:8},children:[r.jsx("input",{style:{...Fi,flex:1},value:T,onChange:U=>{const I=[...n.secondary_emails];I[R]=U.target.value,s(H=>({...H,secondary_emails:I}))},placeholder:"[email protected]"}),r.jsx("button",{onClick:()=>s(U=>({...U,secondary_emails:U.secondary_emails.filter((I,H)=>H!==R)})),style:{background:"none",border:`1px solid ${ye.line}`,borderRadius:8,cursor:"pointer",padding:"0 10px",color:ye.danger},children:r.jsx(zn,{size:14})})]},R)),r.jsxs("button",{onClick:()=>s(T=>({...T,secondary_emails:[...T.secondary_emails,""]})),style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:ye.brand,background:"none",border:"none",cursor:"pointer",padding:"4px 0",marginBottom:16},children:[r.jsx(Ln,{size:14})," Adicionar e-mail"]}),r.jsx("p",{style:{fontSize:12,fontWeight:600,color:ye.ink,marginBottom:8},children:"Telefones secundários"}),(m=n.secondary_phones)==null?void 0:m.map((T,R)=>r.jsxs("div",{style:{display:"flex",gap:8,marginBottom:8},children:[r.jsx("input",{style:{...Fi,flex:1},value:T,onChange:U=>{const I=[...n.secondary_phones];I[R]=U.target.value,s(H=>({...H,secondary_phones:I}))},placeholder:"(11) 99999-9999"}),r.jsx("button",{onClick:()=>s(U=>({...U,secondary_phones:U.secondary_phones.filter((I,H)=>H!==R)})),style:{background:"none",border:`1px solid ${ye.line}`,borderRadius:8,cursor:"pointer",padding:"0 10px",color:ye.danger},children:r.jsx(zn,{size:14})})]},R)),r.jsxs("button",{onClick:()=>s(T=>({...T,secondary_phones:[...T.secondary_phones,""]})),style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:ye.brand,background:"none",border:"none",cursor:"pointer",padding:"4px 0"},children:[r.jsx(Ln,{size:14})," Adicionar telefone"]}),r.jsx(dl,{onSave:()=>o({secondary_emails:n.secondary_emails.filter(T=>T.trim()!==""),secondary_phones:n.secondary_phones.filter(T=>T.trim()!=="")}),onCancel:a,saving:l,error:c})]}):r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:11,color:ye.ink4,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600},children:"Telefone principal"}),r.jsx("p",{style:{fontSize:14,color:e!=null&&e.phone?ye.ink2:ye.ink4,marginBottom:14},children:(e==null?void 0:e.phone)||"Não cadastrado."}),r.jsx("p",{style:{fontSize:11,color:ye.ink4,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600},children:"E-mails secundários"}),((x=e==null?void 0:e.secondary_emails)==null?void 0:x.length)>0?r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:14},children:e.secondary_emails.map((T,R)=>r.jsx("p",{style:{fontSize:14,color:ye.ink2,margin:0,wordBreak:"break-all"},children:T},R))}):r.jsx("p",{style:{fontSize:14,color:ye.ink4,marginBottom:14},children:"Nenhum."}),r.jsx("p",{style:{fontSize:11,color:ye.ink4,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600},children:"Telefones secundários"}),((w=e==null?void 0:e.secondary_phones)==null?void 0:w.length)>0?r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:e.secondary_phones.map((T,R)=>r.jsx("p",{style:{fontSize:14,color:ye.ink2,margin:0},children:T},R))}):r.jsx("p",{style:{fontSize:14,color:ye.ink4,margin:0},children:"Nenhum."})]})}),r.jsx(oa,{id:"section-preferences",title:"Preferências",action:t!=="preferences"&&r.jsx(mc,{onClick:()=>i("preferences",{salary_expectation:(e==null?void 0:e.salary_expectation)||"",contract_type_desired:[...(e==null?void 0:e.contract_type_desired)||[]],work_format_desired:[...(e==null?void 0:e.work_format_desired)||[]]})}),children:t==="preferences"?r.jsxs("div",{children:[r.jsxs("div",{style:{marginBottom:16},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:6},children:"Expectativa salarial (R$)"}),r.jsx("input",{type:"number",style:Fi,value:n.salary_expectation,onChange:T=>s(R=>({...R,salary_expectation:T.target.value})),onFocus:T=>T.target.style.borderColor=ye.brand,onBlur:T=>T.target.style.borderColor=ye.line,placeholder:"Ex: 8000"})]}),r.jsxs("div",{style:{marginBottom:16},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:8},children:"Regime desejado"}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:Object.entries(PR).map(([T,R])=>{var I;const U=(I=n.contract_type_desired)==null?void 0:I.includes(T);return r.jsx("button",{onClick:()=>s(H=>({...H,contract_type_desired:U?H.contract_type_desired.filter(V=>V!==T):[...H.contract_type_desired,T]})),style:{padding:"5px 12px",borderRadius:ye.radiusPill,border:`1px solid ${U?ye.brand:ye.line}`,background:U?ye.brandSoft:"#fff",color:U?ye.brandDark:ye.ink2,fontSize:12,cursor:"pointer",fontWeight:U?600:400,fontFamily:"inherit"},children:R},T)})})]}),r.jsxs("div",{style:{marginBottom:8},children:[r.jsx("label",{style:{fontSize:12,fontWeight:600,color:ye.ink,display:"block",marginBottom:8},children:"Formato desejado"}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:Object.entries(BR).map(([T,R])=>{var I;const U=(I=n.work_format_desired)==null?void 0:I.includes(T);return r.jsx("button",{onClick:()=>s(H=>({...H,work_format_desired:U?H.work_format_desired.filter(V=>V!==T):[...H.work_format_desired,T]})),style:{padding:"5px 12px",borderRadius:ye.radiusPill,border:`1px solid ${U?ye.brand:ye.line}`,background:U?ye.brandSoft:"#fff",color:U?ye.brandDark:ye.ink2,fontSize:12,cursor:"pointer",fontWeight:U?600:400,fontFamily:"inherit"},children:R},T)})})]}),r.jsx(dl,{onSave:()=>o({salary_expectation:Number(n.salary_expectation)||void 0,contract_type_desired:n.contract_type_desired,work_format_desired:n.work_format_desired}),onCancel:a,saving:l,error:c})]}):r.jsxs("div",{children:[r.jsx("p",{style:{fontSize:11,color:ye.ink4,marginBottom:4,textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600},children:"Expectativa salarial"}),e!=null&&e.salary_expectation?r.jsxs("p",{style:{fontSize:16,fontWeight:600,color:ye.ink,marginBottom:14,letterSpacing:"-0.02em",fontFamily:ye.fontMono}
971,children:["R$ ",Number(e.salary_expectation).toLocaleString("pt-BR")]}):r.jsx("p",{style:{fontSize:14,color:ye.ink4,marginBottom:14},children:"Não definida."}),r.jsx("p",{style:{fontSize:11,color:ye.ink4,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600},children:"Regime desejado"}),((y=e==null?void 0:e.contract_type_desired)==null?void 0:y.length)>0?r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:5,marginBottom:14},children:e.contract_type_desired.map((T,R)=>r.jsx(Cf,{tone:"success",dot:!0,children:PR[T]||T},R))}):r.jsx("p",{style:{fontSize:14,color:ye.ink4,marginBottom:14},children:"Não definido."}),r.jsx("p",{style:{fontSize:11,color:ye.ink4,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600},children:"Formato desejado"}),((v=e==null?void 0:e.work_format_desired)==null?void 0:v.length)>0?r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:5},children:e.work_format_desired.map((T,R)=>r.jsx(Cf,{tone:"success",dot:!0,children:BR[T]||T},R))}):r.jsx("p",{style:{fontSize:14,color:ye.ink4,margin:0},children:"Não definido."})]})}),r.jsx(oa,{id:"section-languages",title:"Idiomas",action:t!=="languages"&&r.jsx(mc,{onClick:()=>i("languages",{languages:JSON.parse(JSON.stringify((e==null?void 0:e.languages)||[]))})}),children:t==="languages"?r.jsxs("div",{children:[(j=n.languages)==null?void 0:j.map((T,R)=>r.jsxs("div",{style:{display:"flex",gap:8,marginBottom:10,alignItems:"flex-end"},children:[r.jsxs("div",{style:{flex:1},children:[r.jsx("label",{style:{fontSize:11,fontWeight:600,color:ye.ink,display:"block",marginBottom:4},children:"Idioma"}),r.jsx("input",{style:Fi,value:T.language||"",onChange:U=>{const I=[...n.languages];I[R]={...I[R],language:U.target.value},s(H=>({...H,languages:I}))},placeholder:"Inglês"})]}),r.jsxs("div",{style:{flex:1},children:[r.jsx("label",{style:{fontSize:11,fontWeight:600,color:ye.ink,display:"block",marginBottom:4},children:"Nível"}),r.jsxs("select",{style:Fi,value:T.level||"",onChange:U=>{const I=[...n.languages];I[R]={...I[R],level:U.target.value},s(H=>({...H,languages:I}))},children:[r.jsx("option",{value:"",children:"Selecione"}),["Básico","Intermediário","Avançado","Fluente","Nativo"].map(U=>r.jsx("option",{value:U,children:U},U))]})]}),r.jsx("button",{onClick:()=>s(U=>({...U,languages:U.languages.filter((I,H)=>H!==R)})),style:{fontSize:12,color:ye.danger,background:"none",border:"none",cursor:"pointer",padding:"0 0 10px"},children:"×"})]},R)),r.jsx("button",{onClick:()=>s(T=>({...T,languages:[...T.languages||[],{language:"",level:""}]})),style:{fontSize:13,color:ye.brand,background:"none",border:"none",cursor:"pointer",padding:"4px 0",marginBottom:12},children:"+ Adicionar idioma"}),r.jsx(dl,{onSave:()=>o({languages:n.languages}),onCancel:a,saving:l,error:c})]}):(k=e==null?void 0:e.languages)!=null&&k.length?r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:e.languages.map((T,R)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[r.jsx("span",{style:{fontSize:14,color:ye.ink,fontWeight:500},children:T.language}),T.level&&r.jsx("span",{style:{fontSize:12,color:ye.ink3},children:T.level})]},R))}):r.jsx("p",{style:{fontSize:14,color:ye.ink4},children:'Nenhum idioma cadastrado. Clique em "Editar" para adicionar.'})}),r.jsx(oa,{id:"section-skills",title:"Skills",eyebrow:(S=e==null?void 0:e.skills)!=null&&S.length||(_=e==null?void 0:e.skill_ids)!=null&&_.length?r.jsx(Cf,{tone:"outline",children:((F=e.skills)==null?void 0:F.length)||((A=e.skill_ids)==null?void 0:A.length)}):null,action:t!=="skills"&&r.jsx(mc,{onClick:()=>i("skills",{skillInput:"",skills:e!=null&&e.skills?[...e.skills]:[]})}),children:t==="skills"?r.jsxs("div",{children:[r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:12},children:n.skills.map((T,R)=>r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:12,padding:"4px 8px 4px 11px",borderRadius:ye.radiusPill,background:ye.brandSoft,color:ye.brandDark,border:`1px solid ${ye.brandTint}`,fontWeight:500},children:[T.name||T,r.jsx("button",{onClick:()=>s(U=>({...U,skills:U.skills.filter((I,H)=>H!==R)})),style:{background:"none",border:"none",cursor:"pointer",color:ye.brandDark,fontSize:14,lineHeight:1,padding:0},children:"×"})]},R))}),r.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12},children:[r.jsx("input",{style:{...Fi,flex:1},value:n.skillInput||"",onChange:T=>s(R=>({...R,skillInput:T.target.value})),placeholder:"Digite e pressione Enter",onKeyDown:T=>{var R;if(T.key==="Enter"&&((R=n.skillInput)!=null&&R.trim())){T.preventDefault();const U=n.skillInput.trim();n.skills.find(I=>(I.name||I)===U)?s(I=>({...I,skillInput:""})):s(I=>({...I,skills:[...I.skills,{name:U}
971],skillInput:""}))}}}),r.jsx("button",{onClick:()=>{var R;const T=(R=n.skillInput)==null?void 0:R.trim();T&&!n.skills.find(U=>(U.name||U)===T)&&s(U=>({...U,skills:[...U.skills,{name:T}],skillInput:""}))},style:{padding:"7px 14px",border:"none",borderRadius:8,background:ye.brand,color:"#fff",fontSize:13,cursor:"pointer",fontFamily:"inherit"},children:"+"})]}),r.jsx(dl,{onSave:()=>o({skills:n.skills}),onCancel:a,saving:l,error:c})]}):!((C=e==null?void 0:e.skills)!=null&&C.length)&&!((D=e==null?void 0:e.skill_ids)!=null&&D.length)?r.jsx("p",{style:{fontSize:14,color:ye.ink4},children:'Nenhuma skill cadastrada. Clique em "Editar" para adicionar.'}):r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:(((P=e.skills)==null?void 0:P.length)>0?e.skills:((L=e.skill_ids)==null?void 0:L.map(T=>({id:T,name:T})))||[]).map((T,R)=>r.jsx("span",{style:{fontSize:12,padding:"4px 11px",borderRadius:ye.radiusPill,background:ye.brandSoft,color:ye.brandDark,border:`1px solid ${ye.brandTint}`,fontWeight:500},children:T.name||T},R))})}),d.percent<100&&d.nextField&&r.jsxs("div",{style:{background:"linear-gradient(135deg, #0A2540 0%, #1E1B4B 100%)",borderRadius:ye.radiusCardLg,padding:18,color:"#fff",position:"relative",overflow:"hidden"},children:[r.jsx("div",{style:{position:"absolute",top:-40,right:-40,width:160,height:160,background:"radial-gradient(circle, rgba(139,92,246,0.5), transparent 65%)",pointerEvents:"none"}}),r.jsxs("div",{style:{position:"relative"},children:[r.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"3px 9px",background:"rgba(255,255,255,0.1)",border:"1px solid rgba(255,255,255,0.15)",borderRadius:ye.radiusPill,fontSize:10.5,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase"},children:[r.jsx(Va,{size:12,style:{color:"#FBBF24"},"aria-hidden":"true"}),"Complete seu perfil"]}),r.jsx("div",{style:{fontSize:15,fontWeight:600,marginTop:12,letterSpacing:"-0.015em",lineHeight:1.35},children:d.nextField.label}),r.jsx("div",{style:{fontSize:12.5,color:"rgba(255,255,255,0.7)",marginTop:8,lineHeight:1.5},children:"Perfis completos recebem até 3x mais visualizações de recrutadores."}),r.jsxs("button",{onClick:u,style:{marginTop:14,padding:"8px 14px",background:"#fff",color:"#0A2540",border:"none",borderRadius:8,fontSize:12.5,fontWeight:600,cursor:"pointer",display:"inline-flex",alignItems:"center",gap:6,fontFamily:"inherit"},children:["Completar agora ",r.jsx(Rc,{size:13,"aria-hidden":"true"})]})]})]})]})}function M6e(){const{user:e}=tr(),[t,n]=g.useState(null),[s,i]=g.useState([]),[a,o]=g.useState([]),[l,c]=g.useState(!0),[d,u]=g.useState(null),[p,m]=g.useState({}),[x,w]=g.useState(!1),[y,v]=g.useState(""),[j,k]=g.useState(null),[S,_]=g.useState(null),[F,A]=g.useState(null),[C,D]=g.useState(!1),[P,L]=g.useState(""),T=g.useMemo(()=>w6e(t||{}),[t]);async function R(N){A(N);try{const W=await ne.functions.invoke("cancelMyApplication",{application_id:N}),O=(W==null?void 0:W.data)||W;O!=null&&O.success?(i(G=>G.map(M=>M.application_id===N?{...M,status:"withdrawn",withdrawn_at:O.withdrawn_at}:M)),_(null)):(console.error("Cancel error:",O==null?void 0:O.error,O==null?void 0:O.message),alert((O==null?void 0:O.message)||"Não foi possível retirar a candidatura. Tente novamente."))}catch(W){console.error("Cancel error:",W==null?void 0:W.message),alert("Não foi possível retirar a candidatura. Tente novamente.")}finally{A(null)}}async function U(N){var W;if(N){if(L(""),!["image/jpeg","image/jpg","image/png","image/webp"].includes(N.type)){L("Use uma imagem JPG, PNG ou WEBP.");return}if(N.size>2*1024*1024){L("Tamanho máximo: 2 MB.");return}D(!0);try{const O=await ne.integrations.Core.UploadFile({file:N}),G=(O==null?void 0:O.file_url)||((W=O==null?void 0:O.data)==null?void 0:W.file_url);if(!G){L("Falha no upload. Tente novamente.");return}const M=await ne.functions.invoke("updateMyProfile",{fields:{avatar_url:G}}),z=(M==null?void 0:M.data)||M;z!=null&&z.success?n(K=>({...K,avatar_url:G})):L("Upload feito, mas falha ao salvar. Tente novamente.")}catch(O){console.error("Avatar upload error:",O==null?void 0:O.message),L("Falha no upload. Tente novamente.")}finally{D(!1)}}}g.useEffect(()=>{if(!(e!=null&&e.email))return;async function N(){var W,O,G;try{const[M,z,K]=await Promise.all([ne.functions.invoke("getTalentProfileByEmail",{email:e.email}).catch(Y=>(console.error("Erro ao carregar perfil:",Y),null)),ne.functions.invoke("getCandidateApplications",{email:e.email}).catch(Y=>(console.error("Erro ao carregar candidaturas:",Y),null)),ne.functions.invoke("getCandidateAssessments",{email:e.email}).catch(Y=>(console.error("Erro ao carregar avaliações:",Y),null))]);n(((W=M==null?void 0:M.data)==null?void 0:W.profile)||(M==null?void 0:M.profile)||null),i(((O=z==null?void 0:z.data)==null?void 0:O.data)||(z==null?void 0:z.data)||[]),o(((G=K==null?void 0:K.data)==null?void 0:G.data)||(K==null?void 0:K.data)||[])}catch(M){console.error("MeuPerfil load error:",M==null?void 0:M.message)}finally{c(!1)}}N()},[e==null?void 0:e.email]);async function I(N){w(!0),v("");try{const W=await ne.functions.invoke("updateMyProfile",{fields:N}),O=(W==null?void 0:W.data)||W;O!=null&&O.success?(n(G=>({...G,...N})),u(null),m({})):(console.error("saveSection error:",O==null?void 0:O.error,O==null?void 0:O.message),v("Não foi possível salvar. Tente novamente."))}catch(W){console.error("saveSection error:",W==null?void 0:W.message),v("Não foi possível salvar. Tente novamente.")}finally{w(!1)}}function H(N,W){m(W),u(N),v("")}function V(){u(null),m({}),v("")}function X(){if(!T.nextField)return;const N=T.nextField.target,W={summary_executive:{summary_executive:(t==null?void 0:t.summary_executive)||""},avatar_url:{},experiences:{experiences:JSON.parse(JSON.stringify((t==null?void 0:t.experiences)||[]))},preferences:{salary_expectation:(t==null?void 0:t.salary_expectation)||"",contract_type_desired:[...(t==null?void 0:t.contract_type_desired)||[]],work_format_desired:[...(t==null?void 0:t.work_format_desired)||[]]},header:{full_name:(t==null?void 0:t.full_name)||"",headline:(t==null?void 0:t.headline)||"",current_title:(t==null?void 0:t.current_title)||"",current_company:(t==null?void 0:t.current_company)||"",location:(t==null?void 0:t.location)||"",phone:(t==null?void 0:t.phone)||"",linkedin_url:(t==null?void 0:t.linkedin_url)||""},education:{education:JSON.parse(JSON.stringify((t==null?void 0:t.education)||[]))},skills:{skillInput:"",skills:t!=null&&t.skills?[...t.skills]:[]},languages:{languages:JSON.parse(JSON.stringify((t==null?void 0:t.languages)||[]))},certifications:{certifications:JSON.parse(JSON.stringify((t==null?void 0:t.certifications)||[]))}};H(N,W[N]||{}),setTimeout(()=>{const O=document.getElementById(`section-${N}`);O&&O.scrollIntoView({behavior:"smooth",block:"start"})},50)}return l?r.jsxs("div",{style:{textAlign:"center",padding:"60px 0"},children:[r.jsx(rt,{size:28,style:{animation:"spin 0.8s linear infinite",color:ye.brand,margin:"0 auto"}}),r.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}):r.jsxs("div",{children:[r.jsx("style",{children:`
972        @keyframes spin { to { transform: rotate(360deg); } }
973        .meu-perfil-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: flex-start; }
974        @media (max-width: 1024px) {
975          .meu-perfil-grid { grid-template-columns: 1fr; }
976          .meu-perfil-sidebar { position: static !important; }
977        }
978      `}),r.jsx("div",{style:{marginBottom:22},children:r.jsx(P6e,{profile:t,editingSection:d,editData:p,setEditData:m,startEdit:H,cancelEdit:V,saveSection:I,saving:x,saveError:y,completeness:T,uploadingAvatar:C,avatarError:P,handleAvatarUpload:U})}),r.jsxs("div",{className:"meu-perfil-grid",children:[r.jsx(B6e,{profile:t,applications:s,assessments:a,editingSection:d,editData:p,setEditData:m,startEdit:H,cancelEdit:V,saveSection:I,saving:x,saveError:y,openMenuId:j,setOpenMenuId:k,setConfirmCancelApp:_}),r.jsx(O6e,{profile:t,editingSection:d,editData:p,setEditData:m,startEdit:H,cancelEdit:V,saveSection:I,saving:x,saveError:y,completeness:T,jumpToNextField:X})]}),S&&r.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(10, 37, 64, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:16},onClick:()=>{F!==S.application_id&&_(null)},children:r.jsxs("div",{style:{background:"#fff",borderRadius:16,padding:"28px 32px",maxWidth:480,width:"100%",boxShadow:ye.shadowLg},onClick:N=>N.stopPropagation(),children:[r.jsx("h3",{style:{fontSize:18,fontWeight:700,color:ye.ink,margin:"0 0 12px"},children:"Retirar candidatura?"}),r.jsxs("p",{style:{fontSize:14,color:ye.ink2,lineHeight:1.6,margin:"0 0 24px"},children:["Você está prestes a retirar sua candidatura para ",r.jsx("strong",{children:S.job_title}),S.company_name&&r.jsxs(r.Fragment,{children:[" na ",r.jsx("strong",{children:S.company_name})]}),". Esta ação removerá você do processo desta vaga. Você poderá se candidatar novamente se mudar de ideia."]}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[r.jsx("button",{onClick:()=>_(null),disabled:F===S.application_id,style:{padding:"9px 18px",borderRadius:8,background:"transparent",color:ye.ink2,fontWeight:500,fontSize:13,border:`1px solid ${ye.line}`,cursor:F===S.application_id?"not-allowed":"pointer",fontFamily:"inherit"},children:"Manter candidatura"}),r.jsx("button",{onClick:()=>R(S.application_id),disabled:F===S.application_id,style:{padding:"9px 18px",borderRadius:8,background:F===S.application_id?"#FCA5A5":ye.danger,color:"#fff",fontWeight:600,fontSize:13,border:"none",cursor:F===S.application_id?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:6,fontFamily:"inherit"},children:F===S.application_id?r.jsxs(r.Fragment,{children:[r.jsx(rt,{size:13,style:{animation:"spin 0.8s linear infinite"}})," Retirando..."]}):"Retirar candidatura"})]})]})})]})}function L6e(){const{user:e,isAuthenticated:t,isLoadingAuth:n}=tr();return g.useEffect(()=>{!n&&(!e||!t)&&ne.auth.redirectToLogin("/app")},[e,t,n]),n||!e||!t?null:r.jsx(Gy,{})}function z6e(){return g.useEffect(()=>{ne.auth.redirectToLogin("/app/verify")},[]),null}function W6e(){const e=new URLSearchParams(Bs().search).get("job");return r.jsx(wx,{to:e?`/app/vagas/${e}`:"/app/vagas",replace:!0})}const $6e=["/","/assessments","/ats","/talent","/jobs","/pricing","/signup","/legal","/como-funciona"],kw=e=>$6e.includes(e)||e.startsWith("/respond/")||e.startsWith("/schedule/")||e==="/job-board"||e.startsWith("/aplicar/")||e.startsWith("/validar")||e.startsWith("/review/"),U6e=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:s,user:i}=tr(),o=Bs().pathname,l=In();if(g.useEffect(()=>{if(!i||o==="/app/ats/google-auth-callback"||o==="/app/ats/microsoft-auth-callback")return;if(i.role==="candidate"){o.startsWith("/meu-perfil")||o.startsWith("/job-board")||o.startsWith("/aplicar/")||o.startsWith("/validar")||o.startsWith("/respond/")||kw(o)||l("/meu-perfil");return}if(kw(o)||o==="/app/onboarding"||o==="/app/verify"||o.startsWith("/meu-perfil")||!o.startsWith("/app"))return;(async()=>{var d;try{const u=await ne.functions.invoke("getWorkspaceId",{user_email:i.email});((d=u==null?void 0:u.data)==null?void 0:d.workspace_id)||(u==null?void 0:u.workspace_id)||l("/app/
978onboarding")}catch{}})()},[i,o]),t||e)return r.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:r.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return r.jsx(UQ,{});if(n.type==="auth_required"&&!kw(o))return window.history.replaceState(null,"","/"),s(),null}return r.jsxs(AK,{children:[r.jsxs(Qt,{element:r.jsx(yZ,{}),children:[r.jsx(Qt,{path:"/",element:r.jsx(Jre,{})}),r.jsx(Qt,{path:"/assessments",element:r.jsx(cse,{})}),r.jsx(Qt,{path:"/ats",element:r.jsx(Fse,{})}),r.jsx(Qt,{path:"/talent",element:r.jsx(Tse,{})}),r.jsx(Qt,{path:"/jobs",element:r.jsx(Ose,{})}),r.jsx(Qt,{path:"/pricing",element:r.jsx(mse,{})}),r.jsx(Qt,{path:"/como-funciona",element:r.jsx(zse,{})})]}),r.jsx(Qt,{path:"/signup",element:r.jsx(z6e,{})}),r.jsx(Qt,{path:"/legal",element:r.jsx(wse,{})}),r.jsx(Qt,{path:"/respond/:token",element:r.jsx(gse,{})}),r.jsx(Qt,{path:"/app/onboarding",element:r.jsx(fke,{})}),r.jsx(Qt,{path:"/app/verify",element:r.jsx(hke,{})}),r.jsxs(Qt,{element:r.jsx(L6e,{}),children:[r.jsx(Qt,{path:"/app/ats/google-auth-callback",element:r.jsx(eFe,{})}),r.jsx(Qt,{path:"/app/ats/microsoft-auth-callback",element:r.jsx(tFe,{})}),r.jsxs(Qt,{element:r.jsx(voe,{}),children:[r.jsx(Qt,{path:"/app",element:r.jsx(cke,{})}),r.jsx(Qt,{path:"/app/assessments",element:r.jsx(OCe,{})}),r.jsx(Qt,{path:"/app/assessments/campaigns/new",element:r.jsx(LCe,{})}),r.jsx(Qt,{path:"/app/assessments/campaigns/:id",element:r.jsx(VCe,{})}),r.jsx(Qt,{path:"/app/assessments/results",element:r.jsx(mz,{})}),r.jsx(Qt,{path:"/app/assessments/results/:id",element:r.jsx(QCe,{})}),r.jsx(Qt,{path:"/app/billing",element:r.jsx(wx,{to:"/app/conta/plano",replace:!0})}),r.jsx(Qt,{path:"/app/billing/success",element:r.jsx(ZCe,{})}),r.jsx(Qt,{path:"/app/settings",element:r.jsx(wx,{to:"/app/conta/geral",replace:!0})}),r.jsx(Qt,{path:"/app/ats/building",element:r.jsx(W6e,{})}),r.jsx(Qt,{path:"/app/pessoas",element:r.jsx(SEe,{})}),r.jsx(Qt,{path:"/app/candidatos/:id",element:r.jsx(m6e,{})}),r.jsx(Qt,{path:"/app/analises",element:r.jsx(GEe,{})}),r.jsx(Qt,{path:"/app/agenda",element:r.jsx(U4e,{})}),r.jsx(Qt,{path:"/app/automacoes",element:r.jsx(G4e,{})}),r.jsx(Qt,{path:"/app/ats/agenda",element:r.jsx(wx,{to:"/app/agenda",replace:!0})}),r.jsx(Qt,{path:"/app/vagas",element:r.jsx(gEe,{})}),r.jsx(Qt,{path:"/app/vagas/:id",element:r.jsx(lke,{})}),r.jsx(Qt,{path:"/app/conta",element:r.jsx(lT,{})}),r.jsx(Qt,{path:"/app/conta/:section",element:r.jsx(lT,{})}),r.jsx(Qt,{path:"/app/suporte",element:r.jsx(Yue,{})})]})]}),r.jsx(Qt,{path:"/job-board",element:r.jsx(Qse,{})}),r.jsx(Qt,{path:"/aplicar/:slug",element:r.jsx(nie,{})}),r.jsx(Qt,{path:"/validar",element:r.jsx(sie,{})}),r.jsx(Qt,{path:"/review/:token",element:r.jsx(Jie,{})}),r.jsx(Qt,{path:"/schedule/manage/:token",element:r.jsx(Vie,{})}),r.jsx(Qt,{path:"/schedule/:slug",element:r.jsx(Aie,{})}),r.jsx(Qt,{element:r.jsx(x6e,{}),children:r.jsx(Qt,{path:"/meu-perfil",element:r.jsx(M6e,{})})}),r.jsx(Qt,{path:"*",element:r.jsx(eZ,{})})]})};function V6e(){return r.jsx($Q,{children:r.jsx(IG,{client:PG,children:r.jsxs(OK,{children:[r.jsx(sZ,{}),r.jsx(U6e,{}),r.jsx(nZ,{}),r.jsx(dZ,{}),r.jsx(uZ,{}),r.jsx(iG,{})]})})})}sU.createRoot(document.getElementById("root")).render(r.jsx(V6e,{}));

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.